von AmigaLink » 31. Dez 2004 13:04
Ersetzt die 3 Auswahlfelder für den Topic-Typ gegen eine Dropdown-Box!
- Code: Alles auswählen
#
#----------[ OPEN ]-------------------------------------
#
posting.php
#
#----------[ FIND ]-------------------------------------
#
//
// 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;
}
}
#
#----------[ REPLACE WITH ]-----------------------------
#
// BEGIN Dropdown Topic Type selection 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>';
}
$topic_type_toggle .= '</select>';
$topic_type_toggle = $lang['Post_topic_as'] . ': '. $topic_type_toggle;
}
// END Dropdown Topic Type selection MOD
Die deutsche Sprache ist Freeware, du kannst sie benutzen, ohne dafür zu bezahlen. Sie ist aber nicht Open Source, also darfst du sie nicht verändern, wie es dir gerade passt.