PDA

View Full Version : Coding neatly in vbulletin's postbit


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 :)

HMBeaty
05-20-2011, 01:53 AM
You could do something like this....

https://vborg.vbsupport.ru/showthread.php?t=119933&highlight=template*+plugin*

cowcowcow
05-25-2011, 12:52 PM
thanks mate that should do the trick :)