The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
vB Staff Titles Details »» | |||||||||||||||||||||||||
vB Staff Title Show your support and vote this hack for HotM September!! vBulletin 3.5.0 RC 3 www.vBHackers.com What this does This will give you the option to add an additional title for staff members, or any user you would like to add. This can be done with conditions only, like if userid = X show this. But this will make things much eaiser to edit and manage. And I spend alot of time in the ACP. New Features Since Last Release
Show rank in your members profile To show the rank in your members profile. Please see this post Note: This hack will work for vBulletin Version 3.5.0 RC-1 and RC-2 ONLY! This is a port from my original hack which can be found here. Had a couple of PMs about it so I said why not. To do list...
Please read carefully and make all the necessary changes as stated. This is will work if installed properly. PLEASE REMEMBER TO BACKUP BEFORE YOU BEGIN! If you like this hack Help & Support Before asking for support Please make sure you have done all necessary changes! If you still need support please post a reply here. Please post bugs and errors here. Hope you like, feedback welcomed. Version Info: v1.1: Fixed Missing Phrase v1.0: Released Show Your Support
|
Comments |
#142
|
|||
|
|||
Quote:
Well....I'm not looking to add group specific "user titles"..i already have the default User Title system... Quote:
|
#143
|
|||
|
|||
ill release the code here
admin cp code Code:
<?php /*======================================================================*\ || #################################################################### || || # Staff Titles Hack Version 1.0.0 # || || # ---------------------------------------------------------------- # || || # # || || # PHP Code by: Wild-Wing # || || # || || # # || || #################################################################### || \*======================================================================*/ // ######################## SET PHP ENVIRONMENT ########################### error_reporting(E_ALL & ~E_NOTICE); // ##################### DEFINE IMPORTANT CONSTANTS ####################### define('THIS_SCRIPT', 'staff_titles_admin'); define('STAFFTITLE_VERSION', '1.0.0'); // #################### PRE-CACHE TEMPLATES AND DATA ###################### // get special phrase groups $phrasegroups = array(); // get special data templates from the datastore $specialtemplates = array(''); // ########################## REQUIRE BACK-END ############################ require_once('./global.php'); // ############################# LOG ACTION ############################### //log_admin_action(); log_admin_action(($_REQUEST['usergroupid'] != 0 ? "usergroupid = ".$_REQUEST['usergroupid'] : '')); print_cp_header("Staff Title ".STAFFTITLE_VERSION." Admin"); if (!isset($_REQUEST['do']) || empty($_REQUEST['do'])) { $_REQUEST['do'] = "dotitles"; } // ##################### LIST ALL STAFF TITLES ######################## if ($_REQUEST['do'] == "dotitles") { print_form_header('staff_titles_admin', 'nowhere'); print_table_header("Staff Titles Admin"); print_description_row("You can change usergroup staff titles here."); $grouptitle = $db->query_read("SELECT usergroupid, title, staffrank AS stafftitle, staffrank_opentag AS opentag, staffrank_closetag AS closetag FROM ".TABLE_PREFIX."usergroup order by usergroupid asc"); while ($groupstitle = $db->fetch_array($grouptitle)) { print_form_header('staff_titles_admin', 'set_update'); construct_hidden_code('usergroupid', $groupstitle['usergroupid']); construct_hidden_code('usergroup', $groupstitle['title']); print_table_header($groupstitle['title']." ID: ". $groupstitle['usergroupid']); // print_yes_no_row($vbphrase['enable_staff_title'], 'groupstitle[isstaffrank]', $groupstitle['isstaffrank']); print_input_row($vbphrase['staff_title'], 'staffrank', $groupstitle['stafftitle']); print_label_row($vbphrase['staff_title_markup'], '<span style="white-space:nowrap"> <input size="15" type="text" class="bginput" name="opentag" value="' . htmlspecialchars_uni($groupstitle['opentag']) . '" tabindex="1" /> <input size="15" type="text" class="bginput" name="closetag" value="' . htmlspecialchars_uni($groupstitle['closetag']) . '" tabindex="1" /> </span>', '', 'top', 'htmltags'); print_submit_row("Set Usergroup Staff Title"); } print_table_footer(); } if ($_REQUEST['do'] == "set_update") { $staffrank = $_REQUEST['staffrank']; $opentag = $_REQUEST['opentag']; $closetag = $_REQUEST['closetag']; if ($opentag == ""){ $opentag ="";} else{ $opentag =", staffrank_opentag='".$opentag."',";} if ($closetag == ""){ $closetag ="";} else{ $closetag ="staffrank_closetag='".$closetag."'";} $db->query_write("UPDATE ".TABLE_PREFIX."usergroup SET staffrank='$staffrank' $opentag $closetag where usergroupid =$_REQUEST[usergroupid]");//usergroup update $uStaff = $db->query_read("SELECT usergroupid, username, isstaffrank, staffrank AS stafftitle, staffrank_opentag AS opentag, staffrank_closetag AS closetag FROM ".TABLE_PREFIX."user where usergroupid = $_REQUEST[usergroupid]"); while ($uStaffT = $db->fetch_array($uStaff)) { if ($uStaffT['isstaffrank']==0){ $db->query_write("UPDATE ".TABLE_PREFIX."user SET staffrank='$staffrank' $opentag $closetag");//user update } else{ $uStaffTs .= "<b>$uStaffT[username]</b>: could not be updated you have chosen to give them their own Staff Title.<br />\n"; } } print "$_REQUEST[usergroup] Staff Title Updated and Users"; print "<br />\n$uStaffTs"; $_REQUEST['do'] = "dotitles"; } //################## LIST ALL CUSTOM STAFF TITLES ###################### if ($_REQUEST['do'] == "custom") { print_form_header('staff_titles_admin', 'set_update'); print_table_header("View Custom Admin Set Staff Titles"); $userstaff = $db->query_read("SELECT userid, username, staffrank AS stafftitle, staffrank_opentag AS opentag, staffrank_closetag AS closetag FROM ".TABLE_PREFIX."user where isstaffrank = 1 order by userid asc"); while ($userstafftitle = $db->fetch_array($userstaff)) { $userstafftitles .= "$userstafftitle[username] has the Staff Title of : ".$userstafftitle['opentag'].$userstafftitle['stafftitle'].$userstafftitle['closetag']."<br />\n"; } print_description_row("$userstafftitles"); print_table_footer(); } //print_description_row(); print_cp_footer(); ?> Code:
$db->query_write("ALTER TABLE " . TABLE_PREFIX . "usergroup ADD (staffrank VARCHAR(250) NOT NULL DEFAULT '')"); $db->query_write("ALTER TABLE " . TABLE_PREFIX . "usergroup ADD (staffrank_opentag VARCHAR(250) NOT NULL DEFAULT '')"); $db->query_write("ALTER TABLE " . TABLE_PREFIX . "usergroup ADD (staffrank_closetag VARCHAR(250) NOT NULL DEFAULT '')"); Code:
<navgroups product="livewires_staff_titles"> <navgroup text="Staff Titles" permissions="canadminpermissions" displayorder="121"> <navoption displayorder="10"> <text>Set Usergroup Staff Titles</text> <link>staff_titles_admin.php?do=dotitles</link> </navoption> <navoption displayorder="20"> <text>View Custom Set Staff Titles</text> <link>staff_titles_admin.php?do=custom</link> </navoption> </navgroup> </navgroups> |
#144
|
|||
|
|||
Great hack, installed today and working fine
Also added this code below so the name shows up on the memberlist, however it only shows up in the forum text colour. Not the colour chosen in the html fields. Is there anyway to make this showup in the memberlist, with the chosen colour? Quote:
|
#145
|
||||
|
||||
Very very nice Hack m8!
Works like a charm |
#146
|
|||
|
|||
PHP Code:
|
#147
|
|||
|
|||
bump
|
#148
|
|||
|
|||
Great plugin, thank you very much, LiveWire!
|
#149
|
|||
|
|||
This is an awesome hack, I edited the default font and color so I don't have to add tags each time. This is going to save me sooo much time since most of my members have more than one title to set for different reasons. Thank you.
|
#150
|
||||
|
||||
so this will not work for vB 3.5.x?
|
#151
|
|||
|
|||
Thank you very much! Great hack, just what i've been looking for!
|
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|