Webmaster общности: Predpriemach.com | SearchEngines.bg

    MOD за сменяне на стиловете на форума ви от индекса

    С този мод ще позволите на потребителите на вашият форум да избират стила му директно от индекса Winking

    #
    #-----[ ОТВОРИ ]------------------------------------------
    #
    common.php
    
    #
    #-----[ НАМЕРИ ]------------------------------------------
    #
    message_die(GENERAL_MESSAGE, 'Board_disable', 'Information');
    }
    
    #
    #-----[ СЛЕД ТОЗИ РЕД, ДОБАВИ ]------------------------------------------
    #
    if ($template)
    {
    $board_config['default_style'] = $template;
    setcookie('default_style',$template , (time()+21600), $board_config['cookie_path'], $board_config['cookie_domain'], $board_config['cookie_secure']);
    } else if (isset($HTTP_COOKIE_VARS['default_style']) )
    $board_config['default_style']=$HTTP_COOKIE_VARS['default_style'];
    
    #
    #-----[ ОТВОРИ ]------------------------------------------
    #
    index.php
    
    #
    #-----[ НАМЕРИ ]------------------------------------------
    #
    include($phpbb_root_path . 'common.'.$phpEx);
    
    #
    #-----[ СЛЕД ТОЗИ РЕД, ДОБАВИ ]------------------------------------------
    #
    include($phpbb_root_path . 'includes/functions_selects.'.$phpEx);
    
    #
    #-----[ НАМЕРИ ]------------------------------------------
    #
    
    //
    // Handle marking posts
    //
    
    #
    #-----[ ПРЕДИ ТОЗИ РЕД, ДОБАВИ ]------------------------------------------
    #
    
    //change theme on index - new code by Smartor (smartor.is-root.com)
    $fpage_style = $userdata['user_style'];
    if(isset($HTTP_POST_VARS['fpage_theme']))
    {
    $fpage_theme = intval($HTTP_POST_VARS['fpage_theme']);
    $fpuser_id = $userdata['user_id'];
    $fp_sql = "UPDATE " . USERS_TABLE . " SET user_style = '$fpage_theme' WHERE
    user_id = $fpuser_id";
    if ( !($fp_result = $db->sql_query($fp_sql)) )
    {
    message_die(GENERAL_ERROR, 'Could not update users table ' . "$user_id
    $fpage_theme", '', __LINE__, __FILE__, $sql);
    }
    else
    {
    $fp_message = $lang['Profile_updated'] . '<br /><br />' .
    sprintf($lang['Click_return_index'], '<a href="' .
    append_sid("index.$phpEx") . '">', '</a>');
    message_die(GENERAL_MESSAGE, $fp_message);
    }
    }
    
    #
    #-----[ НАМЕРИ ]------------------------------------------
    #
    'FORUM_LOCKED_IMG' => $images['forum_locked'],
    
    #
    #-----[ СЛЕД ТОЗИ РЕД, ДОБАВИ ]------------------------------------------
    #
    'TEMPLATE_SELECT' => style_select($board_config['default_style'], 'template'),
    'L_SELECT_STYLE' => $lang['Change_style'],
    'L_CHANGE_NOW' => $lang['Go'],
    'FPAGE_STYLE' => style_select($fpage_style, 'fpage_theme'),
    
    #
    #-----[ ОТВОРИ ]------------------------------------------
    #
    language/lang_english/lang_main.php
    
    #
    #-----[ НАМЕРИ ]------------------------------------------
    #
    
    //
    // That's all, Folks!
    
    #
    #-----[ ПРЕДИ ТОЗИ РЕД, ДОБАВИ ]------------------------------------------
    #
    
    $lang['Change_style'] = "Change Style";
    
    # (THIS ADDS THE NUMBER OF USERS WITH THIS STYLE TO THE DROP DOWN.
    # SKIP TO THE NEXT FILE IF YOU DO NOT WISH TO ADD THIS FEATURE)
    #-----[ OPEN ]------------------------------------------
    #
    includes/functions_selects.php
    
    #
    #-----[ НАМЕРИ ]------------------------------------------
    #
    $selected = ( $row['themes_id'] == $default_style ) ? ' selected="selected"' : '';
    
    $style_select .= '<option value="' . $row['themes_id'] . '"' . $selected . '>' . $row['style_name'] . '</option>';
    
    #
    #-----[ ЗАМЕСТИ С ТОВА ]------------------------------------------
    #
    //begin theme count
    $tcount=0;
    $t_id = $row['themes_id'];
    $tsql = "SELECT user_style FROM " . USERS_TABLE . " WHERE user_style = $t_id";
    if ( !($tresult = $db->sql_query($tsql)) ){
    message_die(GENERAL_ERROR, "Couldn't query user table", "", __LINE__, __FILE__, $sql);}
    while ( $trow = $db->sql_fetchrow($tresult) ) {
    $tcount++; }
    $selected = ( $row['themes_id'] == $default_style ) ? ' selected="selected"' : '';
    $style_select .= '<option value="' . $row['themes_id'] . '"' . $selected . '>' . $row['style_name'] . ' [users: ' . $tcount . ']</option>';
    
    #
    #-----[ ОТВОРИ ]------------------------------------------
    #
    templates/subSilver/index_body.tpl
    #
    #-----[ НАМЕРИ ]------------------------------------------
    #
    {CURRENT_TIME}
    #
    #-----[ НА РЕДА НАМЕРИ ]------------------------------------------
    #
    </td>
    
    #
    #-----[ СЛЕД ТОЗИ РЕД, ДОБАВИ ]------------------------------------------
    #
    
    <td align=center valign=middle><span class="gensmall">
    <!-- BEGIN switch_user_logged_out -->
    <form method="post" action="{U_INDEX}"><b>{L_SELECT_STYLE}:</b>
    <br>{TEMPLATE_SELECT} <input type="submit" class="mainoption" name="cangenow" value="{L_CHANGE_NOW}" />
    </form>
    <!-- END switch_user_logged_out -->
    <!-- BEGIN switch_user_logged_in -->
    <form method="post" action="{U_INDEX}"><b>{L_SELECT_STYLE}:</b>
    <br>{FPAGE_STYLE} <input type="submit" class="mainoption" name="fpcangenow" value="{L_CHANGE_NOW}" />
    </form>
    <!-- END switch_user_logged_in -->
    </span></td>
    #
    #-----[ SAVE И ЗАТВОРИ ВСИЧКИ ФАЙЛОВЕ ]------------------------------------------
    #
    #

    Оставете коментар