Page 1 of 2

Findmore plugin inactive for sticky posts?

Posted: Mon Sep 17, 2012 9:06 am
by Fabien
I use the findmore pligin, but I would like it to be inactive for sticky posts. Is there an easy way to do that?

Thanks, Fabien

Re: Findmore plugin inactive for sticky posts?

Posted: Mon Sep 17, 2012 10:07 am
by Timbalu
Salut Fabien

Yes, go the Smarty way...
The findmore event plugin has a template file, named plugin_findmore.tpl.
You could edit it and add something like this surrounding that files content:

Code: Select all

{if not $dategroup.is_sticky}
    ...
{/if}
That would need the findmore plugin to appear after the entryproperties plugin, I assume.

Re: Findmore plugin inactive for sticky posts?

Posted: Mon Sep 17, 2012 10:52 am
by Fabien
Hi Ian,

Thanks for your message. I tried your solution, but alas no effect !

Cheers, Fabien

Re: Findmore plugin inactive for sticky posts?

Posted: Mon Sep 17, 2012 10:59 am
by garvinhicking
Hi!

Did you maybe check instead for:

Code: Select all

Sticky value: {$entrydata.properties.ep_is_sticky} {$entrydata.properties.is_sticky}
{if NOT $entrydata.properties.ep_is_sticky AND NOT $entrydata.properties.is_sticky}
(I'm not sure if the key is is_sticky or ep_is_sticky, so I added both...)

It could be that $dategroup is not available within this tpl file; currently I don't have my test installation accessible to test it on my own...

HTH,
Garvin

Re: Findmore plugin inactive for sticky posts?

Posted: Mon Sep 17, 2012 11:08 am
by Fabien
Hi Garvin,

Thanks for being here!

No effect also.

Warmly, Fabien

Re: Findmore plugin inactive for sticky posts?

Posted: Mon Sep 17, 2012 11:22 am
by Timbalu
{if NOT $entrydata.properties.ep_is_sticky AND NOT $entrydata.properties.is_sticky} should be much better than mine.
Did you also made sure to have the entryproperties before the findmore plugin in the plugin management?

You could also try to add that sticky check {if ... } {/not} into the entries.tpl of your template, right there where plugins hook in...

Re: Findmore plugin inactive for sticky posts?

Posted: Tue Sep 18, 2012 9:28 am
by Fabien
Yes the findmore plugin is the last event plugin.

Re: Findmore plugin inactive for sticky posts?

Posted: Tue Sep 18, 2012 12:46 pm
by garvinhicking
Hi!

When you use my code, you should see in the plugin an output like this:

Code: Select all

Sticky value: 
Does this appear for you as well? You might want to enhance it to:

Code: Select all

<pre>
Entry data: {$entrydata|@print_r}
Global Entry data: {$entry|@print_r}
Global Entrygroup data: {$dategroup|@print_r}
</pre>
This would give a clue on what variables are there, and how/if/why the seem to be misbehaving. Sorry for this, but currently my devel-webserver is down for maintenance and I can't check it on my own :-/

Regards,
Garvin

Re: Findmore plugin inactive for sticky posts?

Posted: Tue Sep 18, 2012 2:50 pm
by Fabien
Here is what i see above the icons

Code: Select all

Entry data: Array
(
    [url] => http://www.integralpersonality.com/IPBlog/archives/1-Aller-au-cur-de-la-connaissance.html
    [title] => Aller au cœur de la connaissance
    [path] => /IPBlog/plugins/serendipity_event_findmore/img/
)
1
Global Entry data: 1
Global Entrygroup data: 1
 Sticky value: 
Cheers, Fabien

Re: Findmore plugin inactive for sticky posts?

Posted: Tue Sep 18, 2012 4:27 pm
by Timbalu
Where did you try this, in plugin_findmore.tpl or in entries.tpl?
Are there many sticky entries in your blog? If not, you you could try to workaround with

Code: Select all

{if NOT $entrydata.title == 'Aller au cœur de la connaissance' AND  NOT $entrydata.title == 'some other sticky title'} and so on
...
{/if}

Re: Findmore plugin inactive for sticky posts?

Posted: Tue Sep 18, 2012 5:02 pm
by Fabien
I have only one sticky entry. I have tried your solution and also with entrydata.url: no result!

Thanks, Fabien

Re: Findmore plugin inactive for sticky posts?

Posted: Tue Sep 18, 2012 6:00 pm
by Timbalu
Try again in your templates entries.tpl and find this part...

Code: Select all

$entry.plugin_display_dat}
and change it like this

Code: Select all

{if NOT $entry.title == 'Aller au cœur de la connaissance' AND NOT $entry.is_sticky}
{$entry.plugin_display_dat}
{/if}
I am not sure if $entry.is_sticky is available, but you could make the |print_r tests as before

Re: Findmore plugin inactive for sticky posts?

Posted: Tue Sep 18, 2012 6:17 pm
by Don Chambers
Ian - I think you were on the right track before, just not quite the right syntax. if it is only a single sticky entry, try this:

Code: Select all

{if $entrydata.title!='Aller au cœur de la connaissance'}....{/if}

Re: Findmore plugin inactive for sticky posts?

Posted: Tue Sep 18, 2012 6:51 pm
by Timbalu
Sure, that could be as well :wink: I remember I had a fuzzy twilighted feeling with that other syntax... it felt so mysqlish..., but should Smarty not support this too?

Re: Findmore plugin inactive for sticky posts?

Posted: Tue Sep 18, 2012 7:01 pm
by Don Chambers
I think {if NOT $entrydata.title} is a logical true/false test.... whereas {if $entrydata.title!='whatever'} is a string evaluation... or something like that. What do I know?! I just do the occasional template, and I have not had much time for any of this stuff lately! :mrgreen: