The Arcive of vBulletin Modifications Site. |
|
[Mini-Hack] Make select function for admin functions. Details »»
|
|||||||||||||||||||||||||||
|
[Mini-Hack] Make select function for admin functions.
Developer Last Online: Nov 2023
I recently installed the gender hack on my version 2.2.9 forum and looked through adminfunction.php and couldnt find a function to make a select menu si i made my own and figured I'll release it in case it would be helpful to others, any ways, here it is:
PHP Code:
Heres an example on how to use it: PHP Code:
array("Name" => "Value"); and you can have all you want for example: array("Name" => "Value","Name" => "Value","Name" => "Value"); and the forth and final param is the value of the select menu, as it creates the select menu, if the value in the array matches the value param, it selected it like: <option value="$Value" selected>$Name</select> so in: array("foo1" => "bar1","foo2" => "bar2","foo3" => "bar3"); and you set the function value parameter to bar2 like: PHP Code:
<option value="bar2" selected>foo2</select> I hoped I explained it well enough, also If a function similar to this exsists, can a mod please delete this thread, thank you. Ill post an attachment below to show the outcome in admin users for the gender hack I installed. Show Your Support
|
|||||||||||||||||||||||||||
| Comments |
|
#2
|
||||
|
||||
|
Could this be made to use in other areas of the board, too, and not just the Admin area?
|
|
#3
|
||||
|
||||
|
Indeed this looks very nice but would be nice to use anywhere
![]() Would we just add it to functions.php? - miSt |
|
#4
|
|||
|
|||
|
Quote:
PHP Code:
PHP Code:
|
|
#5
|
|||
|
|||
|
Note: The function in the first post goes in adminfunctions.php the one i just posted above can go in functions.php to use any where on the forum.
|
|
#6
|
||||
|
||||
|
Great! Thanks! I'll play with it a little and see what I can make with it.
|
|
#7
|
||||
|
||||
|
Can you put your code in a text document to stop unlicensed members from viewing the code please?
Thanks |
|
#8
|
||||
|
||||
|
Slynderdale, check your PM =)
|
![]() |
|
|