Seite 1 von 1

Wichtig / Ankündigungen / Normal - Themen optisch abtrennen

Verfasst: 30.04.2007 01:13
von mgutt
Da mir die bisherigen Mods zu umfangreich waren und ich keine sonstigen ACP-Einstellungen dafür einbauen wollte, habe ich es relativ simpel umgesetzt.

Demo:
http://www.phpbb-de.com/files/unbenannt_1_kopie.jpg

Anleitung:
öffne viewforum_body.tpl und suche nach:

Code: Alles auswählen

	<!-- BEGIN topicrow -->
füge danach ein:

Code: Alles auswählen

	<!-- BEGIN topic_header -->
	<tr>
		<td class="catHead" colspan="6" height="28"><span class="cattitle">{topicrow.topic_header.TOPIC_TYPE}</span></td>
	</tr>
	<!-- END topic_header -->
öffne viewforum.php und suche nach:

Code: Alles auswählen

//
// End header
//
füge danach ein:

Code: Alles auswählen

// add by mgutt
$announce_header = false;
$sticky_header = false;
$topic_header = false;
// end
suche nach:

Code: Alles auswählen

			'U_VIEW_TOPIC' => $view_topic_url)
		);
füge danach ein:

Code: Alles auswählen

// add by mgutt
		if( $topic_rowset[$i]['topic_type'] == POST_ANNOUNCE )
		{
			if ( !$announce_header )
			{
				$template->assign_block_vars('topicrow.topic_header', array(
					'TOPIC_TYPE' => $topic_type
				));
				$announce_header = true;
			}
		}
		else if( $topic_rowset[$i]['topic_type'] == POST_STICKY )
		{
			if ( !$sticky_header )
			{
				$template->assign_block_vars('topicrow.topic_header', array(
					'TOPIC_TYPE' => $topic_type
				));
				$sticky_header = true;
			}
		}
		else
		{
			if ( ($announce_header || $sticky_header) && !$topic_header )
			{
				$template->assign_block_vars('topicrow.topic_header', array(
					'TOPIC_TYPE' => $lang['Topics'] . ':'
				));
				$topic_header = true;
			}
		}
// end
Das wars :D

Verfasst: 30.04.2007 08:01
von Dr.Death
Schick ! Mach doch mal ein kleines mini MOD draus.

Verfasst: 30.04.2007 10:51
von nickvergessen
Dr.Death hat geschrieben:Schick ! Mach doch mal ein kleines mini MOD draus.
*zustimm* und wenn du noch eine Sparte für geschlossene Beiträge dazumachst wär top *thumbs up*

Verfasst: 30.04.2007 13:23
von Swat
Hab das jetzt mal angepasst für die Globalen Mitteilungen

öffne viewforum_body.tpl und suche :

Code: Alles auswählen

// add by mgutt
$announce_header = false;
$sticky_header = false;
$topic_header = false;
// end
ersetze mit :

Code: Alles auswählen

// add by mgutt
$global_header = false;
$announce_header = false;
$sticky_header = false;
$topic_header = false;
// end
suche:

Code: Alles auswählen

// add by mgutt
      if( $topic_rowset[$i]['topic_type'] == POST_ANNOUNCE )
      {
         if ( !$announce_header )
         {
            $template->assign_block_vars('topicrow.topic_header', array(
               'TOPIC_TYPE' => $topic_type
            ));
            $announce_header = true;
         }
      }
      else if( $topic_rowset[$i]['topic_type'] == POST_STICKY )
      {
         if ( !$sticky_header )
         {
            $template->assign_block_vars('topicrow.topic_header', array(
               'TOPIC_TYPE' => $topic_type
            ));
            $sticky_header = true;
         }
      }
      else
      {
         if ( ($announce_header || $sticky_header) && !$topic_header )
         {
            $template->assign_block_vars('topicrow.topic_header', array(
               'TOPIC_TYPE' => $lang['Topics'] . ':'
            ));
            $topic_header = true;
         }
      }
// end
ersetze mit :

Code: Alles auswählen

// add by mgutt
	if( $topic_rowset[$i]['topic_type'] == POST_GLOBAL_ANNOUNCE )
      {
         if ( !$global_header )
         {
            $template->assign_block_vars('topicrow.topic_header', array(
               'TOPIC_TYPE' => $topic_type
            ));
            $global_header = true;
         }
      }
     else if( $topic_rowset[$i]['topic_type'] == POST_ANNOUNCE )
      {
         if ( !$announce_header )
         {
            $template->assign_block_vars('topicrow.topic_header', array(
               'TOPIC_TYPE' => $topic_type
            ));
            $announce_header = true;
         }
      }
      else if( $topic_rowset[$i]['topic_type'] == POST_STICKY )
      {
         if ( !$sticky_header )
         {
            $template->assign_block_vars('topicrow.topic_header', array(
               'TOPIC_TYPE' => $topic_type
            ));
            $sticky_header = true;
         }
      }
      else
      {
         if ( ($announce_header || $sticky_header || $global_header) && !$topic_header )
         {
            $template->assign_block_vars('topicrow.topic_header', array(
               'TOPIC_TYPE' => $lang['Topics'] . ':'
            ));
            $topic_header = true;
         }
      }
// end
somit nun auch für die Globalen Mitteilungen :-)