serendipity_showPlugin class for Plugin findmore ?

Creating and modifying plugins.
Post Reply
seraphyn
Regular
Posts: 211
Joined: Fri Dec 01, 2006 8:42 am
Contact:

serendipity_showPlugin class for Plugin findmore ?

Post by seraphyn »

It is possible to call the Twitterplugin with:

Code: Select all

{serendipity_showPlugin class="serendipity_plugin_twitter"}
but for the serendipity_event_findmore I need to put everything from the plugin_findmore.tpl into my entries.tpl.
Is there another way to call it like the Twitterplugin?
thx in advance
Chris
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: serendipity_showPlugin class for Plugin findmore ?

Post by garvinhicking »

Hi!

Actually, before you do that, you should simply put the whole CONTENTS of plugin_findmore.tpl into your entries.tpl. This is much more clever due to performance.

Simpyl replace $entrydata with $entry in the copied code.

HTH,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
seraphyn
Regular
Posts: 211
Joined: Fri Dec 01, 2006 8:42 am
Contact:

Re: serendipity_showPlugin class for Plugin findmore ?

Post by seraphyn »

garvinhicking wrote:Hi!

you should simply put the whole CONTENTS of plugin_findmore.tpl into your entries.tpl.
Hi Garvin,
that's what I actually said ;)
I searched another way for that, because I'll try to keep the entries.tpl a little bit cleaner for me.
Is it possible to include the plugin_findmore.tpl in the entries.tpl?
Ae to have if else in the entries.tpl and it is possible to switch findmore on and off in the config of the template, with a small code footprint in entries.tpl?
Chris
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: serendipity_showPlugin class for Plugin findmore ?

Post by garvinhicking »

Hi!

You can do that with include_file etc. But it costs much more performance than when you'd use copy and paste and use {* and *} to turn on/off certain parts of the tpl.

Regards,
Garvin
# Garvin Hicking (s9y Developer)
# Did I help you? Consider making me happy: http://wishes.garv.in/
# or use my PayPal account "paypal {at} supergarv (dot) de"
# My "other" hobby: http://flickr.garv.in/
seraphyn
Regular
Posts: 211
Joined: Fri Dec 01, 2006 8:42 am
Contact:

Re: serendipity_showPlugin class for Plugin findmore ?

Post by seraphyn »

Okay,

Thanks for the answere, I'll give it a try.
Have a nice weekend...
Chris
seraphyn
Regular
Posts: 211
Joined: Fri Dec 01, 2006 8:42 am
Contact:

Re: serendipity_showPlugin class for Plugin findmore ?

Post by seraphyn »

Okay I tested it.
Found another way, I changed {$entry.plugin_display_dat} directly next to {$entry.add_footer} in entries.tpl of the theme
This helps absolutly and let me done the rest with CSS.
Thanks Garvin
Post Reply