cowcowcow
05-20-2011, 01:42 AM
In one of my forums im completely replacing the postbit with a table of contents navigation, and ive figured out how to do it already. but basically everytime the forum loads it runs through that postbit code which is not what i want.
i just wanted to code more efficiently so that instead of all that table of contents code being dumped in the postbit, i can dump it somewhere else and recall it. i have little programming knowledge so if anyone can point me in the right direction ill be so grateful!
currently its like this. If it belongs to a certain forum ID, instead of the postbit the table of contents is displayed and ONLY for the first post.
<if condition="$thread[forumid]==42 AND $post['postcount'] == 1">
<div class="bigcatm">TABLE OF CONTENTS</div></br>
<div class="smallfont"></br>
followed by 100 lines of code
what im asking is, is it possible to code is such that it becomes like this
<if condition="$thread[forumid]==42 AND $post['postcount'] == 1">
$tableofcontents </if>
and where do i put the $tableofcontents code!
any help is appreciated :)
i just wanted to code more efficiently so that instead of all that table of contents code being dumped in the postbit, i can dump it somewhere else and recall it. i have little programming knowledge so if anyone can point me in the right direction ill be so grateful!
currently its like this. If it belongs to a certain forum ID, instead of the postbit the table of contents is displayed and ONLY for the first post.
<if condition="$thread[forumid]==42 AND $post['postcount'] == 1">
<div class="bigcatm">TABLE OF CONTENTS</div></br>
<div class="smallfont"></br>
followed by 100 lines of code
what im asking is, is it possible to code is such that it becomes like this
<if condition="$thread[forumid]==42 AND $post['postcount'] == 1">
$tableofcontents </if>
and where do i put the $tableofcontents code!
any help is appreciated :)