Thread: Add-On Releases - World of Warcraft Recruitment Form
View Single Post
  #159  
Old 01-07-2009, 05:16 PM
Zhin Jio's Avatar
Zhin Jio Zhin Jio is offline
 
Join Date: Mar 2003
Location: Colorado
Posts: 36
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Since noone seems to be contributing real fixes to this, I will explain in a bit of detail how to go about making changes to this "correctly". I'll use two examples, level changes (non-hack way as opposed to what is suggested above), and adding "Death Knight".
  • Adding new levels to the dropdown
    • Part ONE : Modifying the plugin code
      1. Plugins & Products -> Plugin Manager
      2. Click on [Edit] next to your formname under the Elricstorm product
      3. Find the following line:
        Code:
        $dropdownchoice270 = "70";
      4. Add the following after:
        Code:
        $dropdownchoice271 = "71";
        $dropdownchoice272 = "72";
        $dropdownchoice273 = "73";
        $dropdownchoice274 = "74";
        $dropdownchoice275 = "75";
        $dropdownchoice276 = "76";
        $dropdownchoice277 = "77";
        $dropdownchoice278 = "78";
        $dropdownchoice279 = "79";
        $dropdownchoice280 = "80";
      5. Please note, NEW values are used in this example, unlike the example a few posts up. For those new to this... its important that variable names here are unique.
    • Part TWO - Adding in phrases
      • Ok, in this case, we can skip this step since we didn't add any new phrases in. Proceed below...
    • Part THREE - Modify the template
      1. Styles & Templates -> Style Manager
      2. In your style, select 'Edit Templates'
      3. Scroll to the bottom, find 'wow_form', double_click
      4. Find the following block:
        Code:
        <option value="$dropdownchoice270" <if condition="$dropdownchoice270 == $dropdownanswer2">selected="selected"</if>>$dropdownchoice270</option>
      5. After it, add in a similar line for every level above 70 you're adding. For example, to add in level 71, you'd put in:
        Code:
        <option value="$dropdownchoice271" <if condition="$dropdownchoice271 == $dropdownanswer2">selected="selected"</if>>$dropdownchoice271</option>
  • Adding the Death Knight Class
    • Part ONE : Modifying the plugin code
      1. Plugins & Products -> Plugin Manager
      2. Click on [Edit] next to your formname under the Elricstorm product
      3. Find the following line:
        Code:
        $dropdownchoice1i = $vbphrase[wow_form_warrior];
      4. After it, add the following:
        Code:
        $dropdownchoice1j = $vbphrase[wow_form_deathknight];
      5. Note, that in THIS case, the new variable is incremented using a letter instead of a number (dropdownchoice1j) AND we *are*, in fact, using a new phrase (wow_form_deathknight)
    • Part TWO - Add the new phrase(s)
      1. Languages & Phrases -> Phrase Manager
      2. "Add New Phrase" button
        Code:
        Phrase Type : GLOBAL
        Product : Elricstorm's World of Warcraft Recruitment Form
        Varname : wow_form_deathknight
        Text : Death Knight
      3. Note that in the above example, the "Varname" *MUST* match the new vbphrase that you added above
      4. Click "Save"
    • Part THREE - Modify the template
      1. Styles & Templates -> Style Manager
      2. In your style, select 'Edit Templates'
      3. Scroll to the bottom, find 'wow_form', double_click
      4. Find the following block:
        Code:
        <option value="$dropdownchoice1i" <if condition="$dropdownchoice1i == $dropdownanswer1">selected="selected"</if>>$dropdownchoice1i</option>
      5. After it, add:
        Code:
        <option value="$dropdownchoice1j" <if condition="$dropdownchoice1j == $dropdownanswer1">selected="selected"</if>>$dropdownchoice1j</option>
      6. Note that the block you're searching for will contain the variable name we added in the above step (Modifying the code), namely 'dropdownchoice1i'
      7. Save

The above method(s) can be used for adding other fields as well, including Inscription or whatever else. I leave those examples as an exercise to the reader.

PS - No offense meant to other submitted fixes... they just weren't working.
Reply With Quote
 
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01325 seconds
  • Memory Usage 1,792KB
  • 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
  • (9)bbcode_code
  • (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