How do you place an html entry automatically at the bottom of every new entry. is this a plugin i dont see? thanks for any help. Love the serendipity blog so far!
www.itstillstands.com
bulletproof html question
-
www.itstillstands.com
- Regular
- Posts: 7
- Joined: Sun Dec 09, 2007 11:05 pm
- Contact:
Re: bulletproof html question
I'm sorry, but I have absolutely no idea what you could possibly mean by "an html entry" ..?www.itstillstands.com wrote:How do you place an html entry automatically at the bottom of every new entry.
YL
-
www.itstillstands.com
- Regular
- Posts: 7
- Joined: Sun Dec 09, 2007 11:05 pm
- Contact:
The easiest way is to modify your entries.tpl file. Its location depends on the template you're using. If it's not in the directory for your template, Serendipity will use the one in the templates/default directory instead.
This is a mostly-HTML that's used to output each entry. The part that's not actually HTML is Smarty, a templating language that lets you do a lot more than plain HTML.
Just insert your HTML wherever you'd like it to go.
One place you might like to place it is here:
The first <div> is the entry body; the second <div> is the extended body. The non-HTML stuff is examining or printing out Serendipity data (the entry body and the entry extended body, as if you couldn't tell).
You might also want your signature in the footer; just a few lines down, you'll find:
That's the start of the footer. This includes the "posted by", "in" categories, and "at" date fields. Add your signature anywhere you like.
This is a mostly-HTML that's used to output each entry. The part that's not actually HTML is Smarty, a templating language that lets you do a lot more than plain HTML.
Just insert your HTML wherever you'd like it to go.
One place you might like to place it is here:
Code: Select all
<div class="serendipity_entry_body">
{$entry.body}
</div>
{if $entry.is_extended}
<div class="serendipity_entry_extended"><a id="extended"></a>{$entry.extended}</div>
{/if}
You might also want your signature in the footer; just a few lines down, you'll find:
Code: Select all
<div class='serendipity_entryFooter'>
-
www.itstillstands.com
- Regular
- Posts: 7
- Joined: Sun Dec 09, 2007 11:05 pm
- Contact:
-
Don Chambers
- Regular
- Posts: 3657
- Joined: Mon Feb 13, 2006 2:40 am
- Location: Chicago, IL, USA
- Contact:
I think I suggested this exact functionality my fellow bp teammates.... but before they could even respond, I realized a serious problem... if EVERY entry is going to get this additional footer, or "signature", how do we elect NOT to include this info for specific entries where it might not apply?
For this reason, I honestly think this functionality should be a plugin, with the ability to disable it on a per-entry basis... much like some of the markup plugins can be disabled for a specific entry.
For this reason, I honestly think this functionality should be a plugin, with the ability to disable it on a per-entry basis... much like some of the markup plugins can be disabled for a specific entry.
=Don=
-
garvinhicking
- Core Developer
- Posts: 30022
- Joined: Tue Sep 16, 2003 9:45 pm
- Location: Cologne, Germany
- Contact:
Hi guys!
Have you checked into the "include entry/blocks" plugin? This can attach HTML blocks to entries, also generically to ever Xth entry of a page.
Regards,
Garvin
Have you checked into the "include entry/blocks" plugin? This can attach HTML blocks to entries, also generically to ever Xth entry of a page.
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 actually use the entry blocks plugin for the table of contents on the EV conversion category of my blog. (I'm considering writing a next/prev plugin to replace that functionality, though.)
It would certainly work for this application. However, if you try to add a block every 1 entry, doesn't it put the block between entries? From the description, I thought he wanted something in the entry, and editing the entries.tpl gives the user the finest control.
If multiple signatures are required, then the entry block plugin is highly recommended again. Just use [s9y-include-block:#] to put the signature with the given number into the entry.
It would certainly work for this application. However, if you try to add a block every 1 entry, doesn't it put the block between entries? From the description, I thought he wanted something in the entry, and editing the entries.tpl gives the user the finest control.
If multiple signatures are required, then the entry block plugin is highly recommended again. Just use [s9y-include-block:#] to put the signature with the given number into the entry.