Seite 1 von 1

Suche Mod für Abgrenzung von wichtig/ankündigung

Verfasst: 22.08.2005 01:15
von ATARI
Welcher Mod ist das? Siehe Bild

thx



[ externes Bild ]

Verfasst: 22.08.2005 02:35
von ATARI
okay, habs schon gefunden und funzt auch.


nur eins noch:
es geht um diesen code (in der viewforum.php):
//
// Okay, lets dump out the page ...
//
if( $total_topics )
{
for($i = 0; $i < $total_topics; $i++)
{
$topic_id = $topic_rowset[$i]['topic_id'];

$topic_title = ( count($orig_word) ) ? preg_replace($orig_word, $replacement_word, $topic_rowset[$i]['topic_title']) : $topic_rowset[$i]['topic_title'];

$replies = $topic_rowset[$i]['topic_replies'];

$topic_type = $topic_rowset[$i]['topic_type'];

if( $topic_type == POST_ANNOUNCE )
{
$topic_type = $lang['Topic_Announcement'] . ' ';
}
else if( $topic_type == POST_STICKY )
{
$topic_type = $lang['Topic_Sticky'] . ' ';
}
else
{
$topic_type = '';
}


if( $topic_rowset[$i]['topic_vote'] )
{
$topic_type .= $lang['Topic_Poll'] . ' ';
}
der ist, bzw war dafür zuständig dass eben wenn man ein thema als wichtig oder ankündigung geschrieben hat, davor das wort "wichtig" oder eben "ankündigung" geschrieben wurde.
durch die neue aufteilung ist das nicht mehr notwendig, wäre ja doppelt gemoppelt.

wenn ich ihn aber entferne, als den fetten text, schreibt mir vor jedes topic ne nummer: 0 bei normale, 1 bei wichtigen, und 2 bei ankündigungen.


habs nun mit einem kleinen trick gelöst, aber ganz sauber ist es nicht.
//
// Okay, lets dump out the page ...
//
if( $total_topics )
{
for($i = 0; $i < $total_topics; $i++)
{
$topic_id = $topic_rowset[$i]['topic_id'];

$topic_title = ( count($orig_word) ) ? preg_replace($orig_word, $replacement_word, $topic_rowset[$i]['topic_title']) : $topic_rowset[$i]['topic_title'];

$replies = $topic_rowset[$i]['topic_replies'];

$topic_type = $topic_rowset[$i]['topic_type'];

if( $topic_type == POST_ANNOUNCE )
{
$topic_type = $lang['Platzhalter'] . ' ';
}
else if( $topic_type == POST_STICKY )
{
$topic_type = $lang['Platzhalter'] . ' ';
}
else
{
$topic_type = '';
}


if( $topic_rowset[$i]['topic_vote'] )
{
$topic_type .= $lang['Topic_Poll'] . ' ';
}
der language-eintrag für $lang['Platzhalter'] ist halt einfach dann leer, also sieht so aus:
$lang['Platzhalter'] = '';

hm.. aber ganz sauber ist die lösung wie gesagt nicht..