Page 1 of 1

Various elements used in default templates

Posted: Fri Nov 12, 2010 3:15 pm
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

Re: Various elements used in default templates

Posted: Fri Nov 12, 2010 3:38 pm
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

Re: Various elements used in default templates

Posted: Fri Nov 12, 2010 6:12 pm
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

Re: Various elements used in default templates

Posted: Sun Nov 14, 2010 11:27 am
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