Thread: Add-On Releases - [USML] Staff Application
View Single Post
  #134  
Old 09-28-2011, 11:48 PM
HMBeaty's Avatar
HMBeaty HMBeaty is offline
 
Join Date: Sep 2005
Posts: 4,141
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by ibeteck View Post
Is there a way to remove the feature "applying to". I actually want to remove the selectable forums.
In the file /includes/functions_staff-application.php, find and remove the following:
PHP Code:
function usml_construct_forum_chooser()
{
    global 
$vbulletin;

    
$forumids = array();

    foreach (
$vbulletin->forumcache AS $forumid => $forum)
    {
        
$forumperms $vbulletin->userinfo['forumpermissions']["$forumid"];

        if (
            
$forum['displayorder'] > 0
            
AND verify_forum_password($forum['forumid'], $forum['password'], false)
            AND (
$forum['options'] & $vbulletin->bf_misc_forumoptions['active'])
            AND (
$forumperms $vbulletin->bf_ugp_forumpermissions['canview'])
        )
        {
            
$forumids["$forumid"] = usml_construct_forum_depth($forum['depth']) . ' ' $forum['title'];
        }
    }
    return 
$forumids;
}

function 
usml_construct_forum_depth($depth)
{
    
$depthmark '';

    for (
$i 0$i $depth$i++)
    {
        
$depthmark .= '--';
    }
    return 
$depthmark;
}

function 
usml_construct_forum_options($forumids)
{
    
$options '';

    foreach (
$forumids AS $key => $val)
    {
        
$options .= render_option_template($val$key'');
    }
    return 
$options;

In the file /staff-application.php, find and remove the following (these are in the same order as they are in the file (unless already modified)):
PHP Code:
        'forumids'         => ''
PHP Code:
    $forumids usml_construct_forum_options(usml_construct_forum_chooser()); 
PHP Code:
        $templater->register('forumids'$forumids); 
PHP Code:
        'forumids'         => TYPE_ARRAY_UINT
PHP Code:
    $forumids usml_construct_forum_options(usml_construct_forum_chooser()); 
PHP Code:
    if (empty($vbulletin->GPC['forumids'])) { $errors[] = fetch_error('usml_staffapp_forumids'); } 
PHP Code:
    if (!empty($vbulletin->GPC['forumids']))
    {
        foreach (
$vbulletin->GPC['forumids'] AS $forumid)
        {
            
$applyingto[] = $vbulletin->forumcache["$forumid"]['title_clean'];
        }
        
$applyingto implode(', '$applyingto);
    } 
PHP Code:
$vbphrase[usml_staffapp_applyingto]:
$applyingto 
PHP Code:
[b]$vbphrase[usml_staffapp_applyingto]:[/b]
$applyingto 
PHP Code:
        $templater->register('forumids'$forumids); 
In the template usml_staff_application, find and remove the following:
HTML Code:
<!-- START FORUMS APPLYING TO -->
        <div class="blockrow">
            <div class="colrow">
                <div class="col1">
                            <select class="primary" id="sel_forumids" name="forumids[]" multiple="multiple" tabindex="1" size="5">{vb:raw forumids}</select>
                            <p class="staffappdescription">{vb:rawphrase usml_staffapp_selectforumsdesc}</p>
                </div>
                <div class="col2">
                    <label for="applyingto">{vb:rawphrase usml_staffapp_applyingto}</label>
                </div>
            </div>
        </div>
<!-- END FORUMS APPLYING TO -->
Reply With Quote
 
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01396 seconds
  • Memory Usage 1,837KB
  • Queries Executed 11 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD_SHOWPOST
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_html
  • (11)bbcode_php
  • (1)bbcode_quote
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_box
  • (1)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (1)post_thanks_postbit_info
  • (1)postbit
  • (1)postbit_onlinestatus
  • (1)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • reputationlevel
  • showthread
Included Files:
  • ./showpost.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showpost_start
  • bbcode_fetch_tags
  • bbcode_create
  • postbit_factory
  • showpost_post
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • showpost_complete