ich habe arge Schwierigkeiten den o.g. Mod einzubauen...
Es scheint an 2 Punkten zu haken, einmal dass der Global Announce-Mod drin ist und einemal eine alte Version de Slpit-Mods.
Aber bereits beim Einbau hapert es

Ich hab versucht einzubauen, was einzubauen geht... ich würd mal sagen... 60% hab ich... aber 40% bleiben, wo ich Probleme hab

erstes Problem:
in der Anleitung steht (betrifft: funktions_post.php):
Code: Alles auswählen
#-----[ FIND ]----------------------------------------------
#
$sql =
#-----[ IN-LINE FIND ]----------------------------------------------
#
topic_type = $topic_type
#
#-----[ IN-LINE AFTER, ADD ]----------------------------------------------
#
$topic_type_active
zweites Problem:
lt. Anleitung muss ich dies (in der posting.php)
Code: Alles auswählen
//
// Topic type selection
//
$topic_type_toggle = '';
if ( $mode == 'newtopic' || ( $mode == 'editpost' && $post_data['first_post'] ) )
{
$template->assign_block_vars('switch_type_toggle', array());
if( $is_auth['auth_sticky'] )
{
$topic_type_toggle .= '<input type="radio" name="topictype" value="' . POST_STICKY . '"';
if ( $post_data['topic_type'] == POST_STICKY || $topic_type == POST_STICKY )
{
$topic_type_toggle .= ' checked="checked"';
}
$topic_type_toggle .= ' /> ' . $lang['Post_Sticky'] . ' ';
}
if( $is_auth['auth_announce'] )
{
$topic_type_toggle .= '<input type="radio" name="topictype" value="' . POST_ANNOUNCE . '"';
if ( $post_data['topic_type'] == POST_ANNOUNCE || $topic_type == POST_ANNOUNCE )
{
$topic_type_toggle .= ' checked="checked"';
}
$topic_type_toggle .= ' /> ' . $lang['Post_Announcement'] . ' ';
}
if ( $topic_type_toggle != '' )
{
$topic_type_toggle = $lang['Post_topic_as'] . ': <input type="radio" name="topictype" value="' . POST_NORMAL .'"' . ( ( $post_data['topic_type'] == POST_NORMAL || $topic_type == POST_NORMAL ) ? ' checked="checked"' : '' ) . ' /> ' . $lang['Post_Normal'] . ' ' . $topic_type_toggle;
}
}
Code: Alles auswählen
// BEGIN Advanced Topic Type MOD
//
// Topic type selection
//
$topic_type_toggle = '';
if ( $mode == 'newtopic' || ( $mode == 'editpost' && $post_data['first_post'] ) )
{
$template->assign_block_vars('switch_type_toggle', array());
$topic_type_toggle .= '<select name="topictype">';
$topic_type_toggle .= '<option value="'. POST_NORMAL .'"' . ( ( $post_data['topic_type'] == POST_NORMAL || $topic_type == POST_NORMAL ) ? ' selected' : '' ) . '>'. $lang['Post_Normal'] .'</option>';
if( $is_auth['auth_sticky'] )
{
$topic_type_toggle .= '<option value="' . POST_STICKY . '"';
if ( $post_data['topic_type'] == POST_STICKY || $topic_type == POST_STICKY )
{
$topic_type_toggle .= ' selected';
}
$topic_type_toggle .= '>'. $lang['Post_Sticky'] . '</option>';
}
if( $is_auth['auth_announce'] )
{
$topic_type_toggle .= '<option value="' . POST_ANNOUNCE . '"';
if ( $post_data['topic_type'] == POST_ANNOUNCE || $topic_type == POST_ANNOUNCE )
{
$topic_type_toggle .= ' selected';
}
$topic_type_toggle .= '>'. $lang['Post_Announcement'] . '</option>';
}
$sql_tt = "SELECT * FROM ". TOPIC_ADD_TYPE_TABLE ." ORDER BY topic_type_order DESC";
$result_tt = $db->sql_query($sql_tt);
while( $add_type = $db->sql_fetchrow($result_tt) )
{
if( ( ( $userdata['user_level'] >= $add_type['topic_type_auth'] && $add_type['topic_type_auth'] != ADMIN ) || $userdata['user_level'] == ADMIN ) && ( $add_type['topic_type_name'] != 'announce' && $add_type['topic_type_name'] != 'sticky' ) )
{
$topic_add_type = intval( $add_type['topic_type_order'] + POST_ADD_TYPE );
$topic_type_toggle .= '<option value="' . $topic_add_type . '"';
if ( $post_data['topic_type'] == $topic_add_type || $topic_type == $topic_add_type )
{
$topic_type_toggle .= ' selected';
}
$topic_type_toggle .= '>'. stripslashes($add_type['topic_type_name']) . '</option>';
}
}
$topic_type_toggle .= '</select>';
$topic_type_toggle = $lang['Post_topic_as'] . ': '. $topic_type_toggle;
}
// END Advanced Topic Type MOD
Code: Alles auswählen
//
// Topic type selection
//
$topic_type_toggle = '';
if ( $mode == 'newtopic' || ( $mode == 'editpost' && $post_data['first_post'] ) )
{
$template->assign_block_vars('switch_type_toggle', array());
if( $is_auth['auth_sticky'] )
{
$topic_type_toggle .= '<input type="radio" name="topictype" value="' . POST_STICKY . '"';
if ( $post_data['topic_type'] == POST_STICKY || $topic_type == POST_STICKY )
{
$topic_type_toggle .= ' checked="checked"';
}
$topic_type_toggle .= ' /> ' . $lang['Post_Sticky'] . ' ';
}
if( $is_auth['auth_announce'] )
{
$topic_type_toggle .= '<input type="radio" name="topictype" value="' . POST_ANNOUNCE . '"';
if ( $post_data['topic_type'] == POST_ANNOUNCE || $topic_type == POST_ANNOUNCE )
{
$topic_type_toggle .= ' checked="checked"';
}
$topic_type_toggle .= ' /> ' . $lang['Post_Announcement'] . ' ';
}
if( $is_auth['auth_globalannounce'] )
{
$topic_type_toggle .= '<input type="radio" name="topictype" value="' . POST_GLOBAL_ANNOUNCE . '"';
if ( $post_data['topic_type'] == POST_GLOBAL_ANNOUNCE || $topic_type == POST_GLOBAL_ANNOUNCE )
{
$topic_type_toggle .= ' checked="checked"';
}
$topic_type_toggle .= ' /> ' . $lang['Post_global_announcement'] . ' ';
}
if ( $topic_type_toggle != '' )
{
$topic_type_toggle = $lang['Post_topic_as'] . ': <input type="radio" name="topictype" value="' . POST_NORMAL .'"' . ( ( $post_data['topic_type'] == POST_NORMAL || $topic_type == POST_NORMAL ) ? ' checked="checked"' : '' ) . ' /> ' . $lang['Post_Normal'] . ' ' . $topic_type_toggle;
}
}
Aber wie muss ich das anpassen?
drittes Problem:
diesmal betrifft es die viewforum.php
ich soll dies machen:
Code: Alles auswählen
#-----[ FIND ]----------------------------------------------
#
if( $topic_type == POST_ANNOUNCE )
{
$topic_type = $lang['Topic_Announcement'] . ' ';
}
else if( $topic_type == POST_STICKY )
{
$topic_type = $lang['Topic_Sticky'] . ' ';
}
#
#-----[ REPLACE WITH ]----------------------------------------------
#
// BEGIN Advanced Topic Type MOD
if( $topic_type == POST_ANNOUNCE )
{
$topic_type = '<font color="'. $announce_color .'">'. $lang['Topic_Announcement'] . ' </font>';
}
else if( $topic_type == POST_STICKY )
{
$topic_type = '<font color="'. $sticky_color .'">'. $lang['Topic_Sticky'] . ' </font>';
}
else if( $topic_type > POST_GLOBAL_ANNOUNCE )
{
for($j = 0; $j < count($row); $j++ )
{
if( intval($topic_rowset[$i]['topic_type'] - POST_ADD_TYPE) == $row[$j]['topic_type_order'] )
{
$topic_type = '<font color="#'. $row[$j]['topic_type_color'] .'">'. $row[$j]['topic_type_name'] .':</font> ';
}
}
}
// END Advanced Topic Type MOD
Code: Alles auswählen
if( $topic_type == POST_ANNOUNCE )
{
$topic_type = $lang['Topic_Announcement'] . ' ';
}
else if( $topic_type == POST_GLOBAL_ANNOUNCE )
{
$topic_type = $lang['Topic_global_announcement'] . ' ';
}
else if( $topic_type == POST_STICKY )
{
$topic_type = $lang['Topic_Sticky'] . ' ';
}
Vielen Dank im voraus für Eure Hilfe...