Set article preferences: footer for article/article style?

Random stuff about serendipity. Discussion, Questions, Paraphernalia.
Post Reply
Nicola
Regular
Posts: 48
Joined: Wed May 25, 2005 5:08 pm
Contact:

Set article preferences: footer for article/article style?

Post by Nicola »

Hi!

I'm quite sure, I've been told someday that it is possible to create
templates for articles eg. to implement a special individual 'signature'
for different authors.

I just can't find out how :-(

TIA
Nicola Straub
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: Set article preferences: footer for article/article styl

Post by garvinhicking »

Hi!

Can you please describe what you mean?

You can edit the entries.tpl template to alter the layout of an entry, if you use {if $author == XX} queries you can abstract between the display.

Best 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/
Nicola
Regular
Posts: 48
Joined: Wed May 25, 2005 5:08 pm
Contact:

Re: Set article preferences: footer for article/article styl

Post by Nicola »

garvinhicking wrote:Can you please describe what you mean?
You can edit the entries.tpl template to alter the layout of an entry, if you use {if $author == XX} queries you can abstract between the display.
Ah no - I'd rather not add individual 'signature-stuff' into the entry.tpl. First this isn't a nice thing to do, second every author will use a signature for his articles as he likes (and might sometimes want to alter the 'normal text' or delete it and so on.

For example, I end all my writings with

"Herzlich aus Hürth
Nicola Straub"

I always type that under each of my entrys but I'd rather have Serendipity to put this text into the (second) input-field of the RTEs. OR that I can specify a 'signature' in my preferences and this would be added to all my entrys like a mail client does so with signatures. Great would be, if I could 'design' my sig with formattings and pics as I can format Text with the RTEs.

So much for the signatures...

Furthermore I'd love to have 'Templates' for Entries. For Example, sometimes I create entries with a lot of citing. Then I mark this citing by setting other background-color and a border* and so on. Now, When I start creating a new entry, I'd love to have the choice (eg by a pulldown) if I'd lie to create a 'normal entry' (empty) or an entry from a template in which eg the 'coloured div' would already be in.

So much for templates (while signatures would also be easy to realize with templates)

Herzliche Gruesse
Nicola
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: Set article preferences: footer for article/article styl

Post by garvinhicking »

Hi!

Funny. This was just requested on a smiliar topic.

You can use the plugin "Markup: Include entry data/templa
tes/blocks". This allows you to start entries from previous templates. Also serendipity in its latest nightly now offers the possibility to use templated entry forms. One can write a plugin that would choose different editing forms based on what kind of entry you would like.

But I must say that adding signatures to blog entries is kind of strange. :-)

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/
Nicola
Regular
Posts: 48
Joined: Wed May 25, 2005 5:08 pm
Contact:

Re: Set article preferences: footer for article/article styl

Post by Nicola »

Hi Garv!

Thanks for your hints!
garvinhicking wrote: But I must say that adding signatures to blog entries is kind of strange. :-)
Garvin
Not really - if one wins guest-authors these want some benefit for their work.
Like a 'signature' that links to their own projects...

Thanks
Nicola
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: Set article preferences: footer for article/article styl

Post by garvinhicking »

Hi!

Why not simply edit the entries.tpl template so that the authors name is more prominently formatted? IMHO this does not belong INSIDE an entry, because it's metadata that's already available.

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/
Nicola
Regular
Posts: 48
Joined: Wed May 25, 2005 5:08 pm
Contact:

Re: Set article preferences: footer for article/article styl

Post by Nicola »

garvinhicking wrote:IMHO this does not belong INSIDE an entry, because it's metadata that's already available.
IMHO it's more like a banner advertising, as the author wants (may want) some pic (logo) and the link to his homepage under his articles. Something like this here:
http://www.handelskraft.de/2007/05/31/y ... -probleme/

It's both - disclaimer for the blog, ad for the guest author...

Thanks
Nicola
garvinhicking
Core Developer
Posts: 30022
Joined: Tue Sep 16, 2003 9:45 pm
Location: Cologne, Germany
Contact:

Re: Set article preferences: footer for article/article styl

Post by garvinhicking »

Hi!

Okay, that I now understand. :)

You can do it as described, but maybe the better idea would be to create a custom plugin for that using a custom event hook that will get as input the author-id and produce the appropriate HTML output for that author. But of course that involves Plugin-Creation, so you'd need to use PHP for that.

Best 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/
Post Reply