Topic type drop down menu?

Makes it posible to post Global announcements, viewble in all forums

Moderator: Moderators

Forum rules
The content in this forum is dated Dec. 21 2005 and can be used as Archive only. This Forum is LOCKED and READ ONLY !

Topic type drop down menu?

Postby mjdimick on Tue 10. Feb, 2004 12:21

Hello, I was wundering if there was a way to change the topic type select in posting from radio buttons to a drop down menu? I want to have just one nice drop down menu where the user can select a topic type like "global announcement" if they have the permission to do so! I think the code below from my posting.php file is what has to be changed but I don't know how to do it? Can someone please show me how to do this? Also is this the only file that would need to be edited? Thank you.
Code: Select all
//
// 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;';
        }

        // Start add - Global announcement MOD
        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 )

                if ( $post_data['topic_type'] == POST_GLOBAL_ANNOUNCE )
                {
                $topic_type_toggle .= ' checked="checked"';
                }
                $topic_type_toggle .= ' /> ' . $lang['Post_global_announcement'] . '&nbsp;&nbsp;';
        }
        // End add - Global announcement MOD

        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;
        }
}
mjdimick
Poster
Poster
 
Posts: 19
Joined: Wed 10. Sep, 2003 23:11

Postby BeaMeR on Thu 08. Apr, 2004 06:19

In the last paragraph find
Code: Select all
<input type="radio"
BeaMeR
Poster
Poster
 
Posts: 10
Joined: Tue 24. Feb, 2004 05:01

Postby BeaMeR on Thu 08. Apr, 2004 06:22

Use
Code: Select all
<input type="checkbox"

To use checkbox
Code: Select all
<input type="select"

For Drop Down
BeaMeR
Poster
Poster
 
Posts: 10
Joined: Tue 24. Feb, 2004 05:01


Return to Global announcement [2.0.6/EM]

Who is online

Users browsing this forum: No registered users and 1 guest

cron