Okay, I made this hack of a plug-in lets you put an HTML nugget on top
of a page (on the entry page for the moment, not main page, sorry). No
need to edit the .tpl file if you're gonna place a banner or nav bar on the
top, I guess. I'll need to put the option of having this work on the main
page as well later on.
Big thanks to Garvin Hicking. The code is largely based on HTML Nugget
plug-in and Links to Next/Previous Entry plug-in, actually. I have close to
ZERO experience on PHP.
The plug-in should appear on the SourceForce CVS web view in a couple
of hours. It's labeled 'serendipity_event_topnugget'.
You can see how it's working at my blog. Click on a blog entry to see the
ad banner on top of the page being shown by this plug-in.
Man, I hope it doesn't mess up other stuff.
Plug-in to put HTML Nugget on top of the page
Plug-in to put HTML Nugget on top of the page
I make s9y plugins, too.
My s9y blog depends on them.
My s9y blog depends on them.
-
- Regular
- Posts: 146
- Joined: Tue Jul 12, 2005 9:12 pm
- Location: Ottawa, Canada
- Contact:
-
- Core Developer
- Posts: 30022
- Joined: Tue Sep 16, 2003 9:45 pm
- Location: Cologne, Germany
- Contact:
Before someone adds a "bottom_nugget" plugin, may I please propose this:
Combine the "topnugget", "headnugget" and "bottomnugget" plugins into one single plugin and change the propertiy back attribute 'stackable' to 'true'. So people can add more than one of those nuggets.
Then add a config select option to toggle where to display the nugget: "top", "bottom", "head". Depending on that option, the plugin emits the code at the appropriate hook.
How's that?
Regards,
Garvin
Combine the "topnugget", "headnugget" and "bottomnugget" plugins into one single plugin and change the propertiy back attribute 'stackable' to 'true'. So people can add more than one of those nuggets.
Then add a config select option to toggle where to display the nugget: "top", "bottom", "head". Depending on that option, the plugin emits the code at the appropriate hook.
How's that?
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/
# 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/
I did it!
The plug-in is now renamed to 'HTML Nugget on Page' and is listed as
'serendipity_event_page_nugget'.
You have the choice of putting the HTML nugget inside the HEAD tag, on
top of the page, or on bottom of the page. It is stackable, so you can put
as many of them as you like. You can apply markup transformation if
you want, like the original HTML nugget plug-in. I have, however, disabled
markup transformation if you use HEAD tag option, because it's not needed
there. Also, like the original HTML nugget plug-in you can have the nugget
appear all the time, only show up in the extended entry, or only show up
in the overview page.
I think this plug-in would be quite useful now. Enjoy!
One thing, though... I wish there was a hook on the default template
that's placed right under the 'Posted by...' line which follows the article
main body. It might be a good place for an ad or even for the
event_entrypaging plug-in. Could it be done for the 0.9 version of s9y,
I wonder.
The plug-in is now renamed to 'HTML Nugget on Page' and is listed as
'serendipity_event_page_nugget'.
You have the choice of putting the HTML nugget inside the HEAD tag, on
top of the page, or on bottom of the page. It is stackable, so you can put
as many of them as you like. You can apply markup transformation if
you want, like the original HTML nugget plug-in. I have, however, disabled
markup transformation if you use HEAD tag option, because it's not needed
there. Also, like the original HTML nugget plug-in you can have the nugget
appear all the time, only show up in the extended entry, or only show up
in the overview page.
I think this plug-in would be quite useful now. Enjoy!
One thing, though... I wish there was a hook on the default template
that's placed right under the 'Posted by...' line which follows the article
main body. It might be a good place for an ad or even for the
event_entrypaging plug-in. Could it be done for the 0.9 version of s9y,
I wonder.
I make s9y plugins, too.
My s9y blog depends on them.
My s9y blog depends on them.
-
- Regular
- Posts: 146
- Joined: Tue Jul 12, 2005 9:12 pm
- Location: Ottawa, Canada
- Contact:
Actually, BerliOS is used for the s9y's main trunk. SourceForge is still used
for the external plug-ins. Note how the Plug-ins page on s9y's main website
still points to SourceForge. BerliOS SVN does not have the external plug-ins
listed or updated. It seems to be used for the trunk development only at
this point. In fact Garvin himself updates his external plug-ins at SF. Hence
my plug-ins are also available at SF.
Wait about two hours for the SF's web CVS to update, then go here.
event_topnugget is now deprecated so don't download that. Just wait for
event_page_nugget to appear.
for the external plug-ins. Note how the Plug-ins page on s9y's main website
still points to SourceForge. BerliOS SVN does not have the external plug-ins
listed or updated. It seems to be used for the trunk development only at
this point. In fact Garvin himself updates his external plug-ins at SF. Hence
my plug-ins are also available at SF.
Wait about two hours for the SF's web CVS to update, then go here.
event_topnugget is now deprecated so don't download that. Just wait for
event_page_nugget to appear.
I make s9y plugins, too.
My s9y blog depends on them.
My s9y blog depends on them.
-
- Regular
- Posts: 146
- Joined: Tue Jul 12, 2005 9:12 pm
- Location: Ottawa, Canada
- Contact: