Deine Stimme gegen Armut - Banner

Knowledge Base » Ankündigung und Topics trennen

Um die Ankündigungen und die als wichtig markierte Themen von den restlichen Beiträgen optisch zu trennen, kannst du folgenden Code benutzen. Da bei diesem Snippet PHP in den Template-Dateien verwendet wird, muss der eXtreme Styles Mod installiert sein:

Code:  [ Download ] [ Erweitern
#
#-----[ OPEN ]------------------------------------------
#
viewforum.php

#
#-----[ FIND ]------------------------------------------
#
             'TOPIC_TYPE' => $topic_type,

#
#-----[ AFTER, ADD ]------------------------------------------
#
            'TOPIC_TYPE_NUM' => $topic_rowset[$i]['topic_type'] + 1,

#
#-----[ OPEN ]------------------------------------------
#
templates/<style name>/viewforum_body.tpl

#
#-----[ FIND ]------------------------------------------
#
        <!-- BEGIN topicrow -->
        
#
#-----[ BEFORE, ADD ]------------------------------------------
#
        <!-- DEFINE $LAST_TYPE = 1 -->  

#
#-----[ AFTER, ADD ]------------------------------------------
#
        <!-- 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 -->

#
#-----[ SAVE/CLOSE ALL FILES ]------------------------------------------
#
# EoM

Deutsche Übersetzung. Original bei phpBBStyles.com