Various elements used in default templates

Skinning and designing Serendipity (CSS, HTML, Smarty)
Post Reply
yellowled
Regular
Posts: 7111
Joined: Fri Jan 13, 2006 11:46 am
Location: Eutin, Germany
Contact:

Various elements used in default templates

Post by yellowled »

Hi.

I keep stumbling upon elements in template files (default template or plugin .tpls) which I consider to be redundant or unnecessary, mostly because they're empty. But I'm not sure whether they're not actually used by some core functions and therefore need to be kept in place.

Here's a list:

commentform.tpl/plugin_contactform.tpl:
* <div id="serendipityCommentFormC">
* <div id="serendipity_replyform_0">
* <a id="serendipity_CommentForm">

entries.tpl:
* <a id="feedback">

sidebar.tpl:
* {if $is_raw_mode}<div id="serendipity{$pluginside}SideBar">{/if}

Any hints on these?

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

Re: Various elements used in default templates

Post by garvinhicking »

Hi!

#serendipity_CommentForm is used as a URL anchor in some places. The "C" thing is used for the livecomment preview. Same for replyform.

#feedback is also an anchor for form submissions.

Code: Select all

* {if $is_raw_mode}<div id="serendipity{$pluginside}SideBar">{/if}
For embedd mode.

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/
yellowled
Regular
Posts: 7111
Joined: Fri Jan 13, 2006 11:46 am
Location: Eutin, Germany
Contact:

Re: Various elements used in default templates

Post by yellowled »

garvinhicking wrote:#serendipity_CommentForm is used as a URL anchor in some places. The "C" thing is used for the livecomment preview. Same for replyform.

#feedback is also an anchor for form submissions.
I guess my actual question is: Do they have to be used the way they are used in default? I.e. does the core rely on the presence of an empty a element with the id serendipity_CommentFrom -- or does it just look for any element with that particular id? (If there's a simple way for me to find this out for all those elements myself, just point me in that direction.)

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

Re: Various elements used in default templates

Post by garvinhicking »

Hi!

Yes, I believe as for the commentform things, the ID must be an empty div, because the livecommentstuff etc. puts content into it.

You might want to play with it by using the livecomment plugin and testing it? Also it might help to checkout the whole spartacus CVS tree and make a search/grep on all files for those element ID strings.

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