thread sections


  -----  
Author Message

Mikecp421
Member

Thu Jul 28, 2005 3:21 pm   Post subject: thread sections
I have a question. I used this code below to split Stickies and Announcements from the regular old threads, is there a way to split it one more time so that Announcements and Stickies are seperate and maybe to title each section as what they are, they are currently both called 'Topics", thanks.


Open viewforum.php, find this:

Code:

         'TOPIC_TYPE' => $topic_type,
and add after it:

Code:

         'TOPIC_TYPE_NUM' => $topic_rowset[$i]['topic_type'] + 1,
then open viewforum_body.tpl, find this:

Code:

   <!-- BEGIN topicrow -->
and add before it:

Code:

   <!-- DEFINE $LAST_TYPE = 1 -->
and then add after <!-- BEGIN topicrow -->:

Code:

   <!-- IF topicrow.TOPIC_TYPE_NUM < $LAST_TYPE -->
   <!-- DEFINE $LAST_TYPE = topicrow.TOPIC_TYPE_NUM -->
   <tr>
     <th colspan="2" align="center" height="25" nowrap="nowrap">&nbsp;{L_TOPICS}&nbsp;</th>
     <th width="50" align="center" nowrap="nowrap">&nbsp;{L_REPLIES}&nbsp;</th>
     <th width="100" align="center" nowrap="nowrap">&nbsp;{L_AUTHOR}&nbsp;</th>
     <th width="50" align="center" nowrap="nowrap">&nbsp;{L_VIEWS}&nbsp;</th>
     <th align="center" nowrap="nowrap">&nbsp;{L_LASTPOST}&nbsp;</th>
   </tr>
   <!-- ELSEIF topicrow.TOPIC_TYPE_NUM > 1 -->
   <!-- DEFINE $LAST_TYPE = 2 -->
   <!-- ENDIF -->
[/quote]
 

Thoul
Administrator

Fri Jul 29, 2005 5:41 am   Post subject: re: thread sections
If you change this:

Code:

   <!-- DEFINE $LAST_TYPE = 1 -->


to:

Code:

   <!-- DEFINE $LAST_TYPE = 2 -->


That should split the announcements and stickies from each other.

Quote:

and maybe to title each section as what they are, they are currently both called 'Topics", thanks.


I don't think that would be possible with this approach, but I'm not an expert on using the IF/ENDIF template code.
 

Page 1 of 1
Display posts from previous: