Dropdown Topic Type selection

Kleine Codeänderungen oder Mini-MODs
Keine Anfragen!!! -- No requests!!!

Moderator: Supporter

Dropdown Topic Type selection

Beitragvon 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'] . '&nbsp;&nbsp;';
  }

  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'] . '&nbsp;&nbsp;';
  }

  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'] . '&nbsp;&nbsp;' . $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.
Benutzeravatar
AmigaLink
Administrator
 
Beiträge: 3987
Registriert: 11. Aug 2004 01:06
Wohnort: NRW

Beitragvon SuXx » 4. Jan 2005 21:34

Wie sieht das ganze aus mit dem Global Announcement MOD?
SuXx
User
 
Beiträge: 34
Registriert: 23. Sep 2004 20:17

Beitragvon AmigaLink » 4. Jan 2005 22:14

Code: Alles auswählen
#
#----------[ FIND ]-------------------------------------
#

  $topic_type_toggle .= '</select>';
  $topic_type_toggle = $lang['Post_topic_as'] . ': '. $topic_type_toggle;

#
#----------[ BEFORE, ADD ]------------------------------
#

  if( $is_auth['auth_announce'] )
  {
    $topic_type_toggle .= '<option value="' . POST_GLOBAL_ANNOUNCE . '"';
    if ( $post_data['topic_type'] == POST_GLOBAL_ANNOUNCE || $topic_type == POST_GLOBAL_ANNOUNCE )
    {
      $topic_type_toggle .= ' selected';
    }
    $topic_type_toggle .= '>'. $lang['Post_global_announcement'] . '</option>';
  }
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.
Benutzeravatar
AmigaLink
Administrator
 
Beiträge: 3987
Registriert: 11. Aug 2004 01:06
Wohnort: NRW


Zurück zu phpBB2 Snippets



Wer ist online?

Mitglieder in diesem Forum: 0 Mitglieder und 10 Gäste

cron