How To Display Plugins On The Index Page Only

Random stuff about serendipity. Discussion, Questions, Paraphernalia.
Post Reply
Maccsta
Regular
Posts: 77
Joined: Mon Feb 19, 2007 6:07 am
Location: Leeds, England

How To Display Plugins On The Index Page Only

Post by Maccsta »

Hi!

Is there any way of controlling a plugin so it only displays on the index page?

In particular I wanted to do this for the ‘External PHP Application’ and ‘HTML Nugget’ - I don't want particular plugins site wide.

Thanks in advance :)
Check out this blog today!
Buy Eye Secrets strips.
Best devices reviewed at http://www.penisstretchers.org/.
Order Capsiplex slimming pills today.
Buy Meratol diet pills online.
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: How To Display Plugins On The Index Page Only

Post by garvinhicking »

Hi!

I think the HTML nugget should have an option for that?! External PHP doesn't, one would need over the PHP code for those checks there...

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/
Don Chambers
Regular
Posts: 3657
Joined: Mon Feb 13, 2006 2:40 am
Location: Chicago, IL, USA
Contact:

Re: How To Display Plugins On The Index Page Only

Post by Don Chambers »

garvinhicking wrote:I think the HTML nugget should have an option for that?!
No, it does not..... but I think it would be a nice addition. Current options for the HTML nugget are extended entry only, overview pages, and all times.
=Don=
Maccsta
Regular
Posts: 77
Joined: Mon Feb 19, 2007 6:07 am
Location: Leeds, England

Re: How To Display Plugins On The Index Page Only

Post by Maccsta »

Yeah the ability to disable any plugin site wide would be a great addition to Serendipity.

I've set certain HTML nuggets to show on overview pages only which it better, but not perfect.

Is there a quick fix I could use to achieve the "overview page only" on the External PHP application?

Thanks for any help :)
Check out this blog today!
Buy Eye Secrets strips.
Best devices reviewed at http://www.penisstretchers.org/.
Order Capsiplex slimming pills today.
Buy Meratol diet pills online.
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: How To Display Plugins On The Index Page Only

Post by garvinhicking »

Hi!

Yes, you can edit the sidebar.tpl template file, and inside the foreach loop make a check for if $startpage and pluginname == BLABLA then do nothing, else show the plugin.

Hope that gets the idea, I don't have the time for actual code right now :)

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/
Maccsta
Regular
Posts: 77
Joined: Mon Feb 19, 2007 6:07 am
Location: Leeds, England

Re: How To Display Plugins On The Index Page Only

Post by Maccsta »

garvinhicking wrote:Hi!

Yes, you can edit the sidebar.tpl template file, and inside the foreach loop make a check for if $startpage and pluginname == BLABLA then do nothing, else show the plugin.

Hope that gets the idea, I don't have the time for actual code right now :)

Regards,
Garvin
Thanks Gavin, celebrating the Germany win I guess ;)

Programming isn't my strong point, I'll try it on a test blog, I have a feeling I won't get it working without the actual code though!
Check out this blog today!
Buy Eye Secrets strips.
Best devices reviewed at http://www.penisstretchers.org/.
Order Capsiplex slimming pills today.
Buy Meratol diet pills online.
Maccsta
Regular
Posts: 77
Joined: Mon Feb 19, 2007 6:07 am
Location: Leeds, England

Re: How To Display Plugins On The Index Page Only

Post by Maccsta »

Any idea what code I should be implementing into the sidebar.tpl?

I'm stuck and it's not working :(
Check out this blog today!
Buy Eye Secrets strips.
Best devices reviewed at http://www.penisstretchers.org/.
Order Capsiplex slimming pills today.
Buy Meratol diet pills online.
Don Chambers
Regular
Posts: 3657
Joined: Mon Feb 13, 2006 2:40 am
Location: Chicago, IL, USA
Contact:

Re: How To Display Plugins On The Index Page Only

Post by Don Chambers »

I'll take a look at this when I get back this afternoon. Should be simple.
=Don=
Don Chambers
Regular
Posts: 3657
Joined: Mon Feb 13, 2006 2:40 am
Location: Chicago, IL, USA
Contact:

Re: How To Display Plugins On The Index Page Only

Post by Don Chambers »

I was thinking each html nugget had a unique identifier... but that does not seem to be the case. They all have the same class of container_serendipity_html_nugget_plugin (container_ is a prefix).... are you using nuggets on any other pages, or just the front page?
=Don=
tpelia
Regular
Posts: 10
Joined: Sun Jun 13, 2010 1:30 am

Re: How To Display Plugins On The Index Page Only

Post by tpelia »

I'm searching answers to this very problem -- I'm pretty sure I'm the least knowledgeable person in programming matters on this thread, as well as the other one I started asking this same question!

I think there a way to do this in HTML on Word Press -- but I can't seem to do the same on Serendipity. Or is there?
Maccsta
Regular
Posts: 77
Joined: Mon Feb 19, 2007 6:07 am
Location: Leeds, England

Re: How To Display Plugins On The Index Page Only

Post by Maccsta »

Don Chambers wrote:I was thinking each html nugget had a unique identifier... but that does not seem to be the case. They all have the same class of container_serendipity_html_nugget_plugin (container_ is a prefix).... are you using nuggets on any other pages, or just the front page?
Ok what I am trying to achieve is being able to select which plugins appear on each page such as on an individual blog post, static pages, and category pages or even page 2 or 3 of the main blog.

Obviously I want the plugins that are going to make me money on every page i.e. advertisements, links to sponsors etc (I can nofollow these links no problem) but for SEO reasons I would like the plugins for link trades and blog directory submissions to just appear on the front index page.

So if I could apply this flexibility to the external PHP application and html nugget that would be perfect!
Check out this blog today!
Buy Eye Secrets strips.
Best devices reviewed at http://www.penisstretchers.org/.
Order Capsiplex slimming pills today.
Buy Meratol diet pills online.
Maccsta
Regular
Posts: 77
Joined: Mon Feb 19, 2007 6:07 am
Location: Leeds, England

Re: How To Display Plugins On The Index Page Only

Post by Maccsta »

ny solution to this problem?
Check out this blog today!
Buy Eye Secrets strips.
Best devices reviewed at http://www.penisstretchers.org/.
Order Capsiplex slimming pills today.
Buy Meratol diet pills online.
Don Chambers
Regular
Posts: 3657
Joined: Mon Feb 13, 2006 2:40 am
Location: Chicago, IL, USA
Contact:

Re: How To Display Plugins On The Index Page Only

Post by Don Chambers »

Didn't Garvin already answer this here?
=Don=
Post Reply