Go Back   vb.org Archive > vBulletin Modifications > Archive > Modification Graveyard
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
vB Staff Titles Details »»
vB Staff Titles
Version: 1.00, by Logikos Logikos is offline
Developer Last Online: Sep 2023 Show Printable Version Email this Page

Version: 3.5.0 RC2 Rating:
Released: 08-06-2005 Last Update: 01-19-2006 Installs: 349
DB Changes Uses Plugins Template Edits
 
No support by the author.

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
  • Option to turn the staff title on/off per user.
    This is good so if you want to temporarily disable someones staff title, but don't want to lose the settings.
  • HTML Mark Available now
    This will make it more customizable

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...
  • Time to install: 3 minutes
  • Queries to run: 4
  • File Mods: 0
  • Templates to edit: 1
  • Templates to add: 0
  • New Phrases: 4
  • New Plugins: 2

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

Click It For Support!

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

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #142  
Old 02-08-2006, 02:20 AM
Xplorer4x4 Xplorer4x4 is offline
 
Join Date: Apr 2005
Posts: 938
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Wild-Wing
well ive achieved that i think. but cant post hack till i get approval from live wire
As long as your not releasing it on your own(like in a new thread) you can post it in this thread.


Well....I'm not looking to add group specific "user titles"..i already have the default User Title system...

Quote:
Let me give you the example through my orum...I run a big Music forum and I have a group for "Musicians"...What i'm trying to do is lets say...add 2-3 additional custom profile fields such as "Instrument Played", "Band Name"..etc etc...the idea is..when they give an input of these fields from their UserCP, the fields will be displayed in the postbit (doesn't matter where in postbit). The only problem I'm having is that the fields are UNIVERSAL and not group specefic...anyone and add the input and it will be showed...I want to have different criteria for different groups..

Any kind of help would be appriciated...
Just had an idea. Set up multiple user groups, and then allow them to be publicly joinable, and set ranks(inturment title) per usergroup.
Reply With Quote
  #143  
Old 02-08-2006, 02:45 PM
Wild-Wing Wild-Wing is offline
 
Join Date: Dec 2005
Posts: 86
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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();


?>
sql note:this is comming from straight from the xml file
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 '')");
oh yea the nav group
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>
Reply With Quote
  #144  
Old 02-12-2006, 10:04 AM
Nathan L Nathan L is offline
 
Join Date: Sep 2005
Posts: 16
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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:
Originally Posted by optrex
in memberlist_resultsbit

find:

Code:
<if condition="$show['usertitlecol']"><div class="smallfont">$userinfo[usertitle]</div></if>
and above or below (depending where you want it add:

Code:
<if condition="$show['usertitlecol']"><div class="smallfont">$userinfo[staffrank]</div></if>
Reply With Quote
  #145  
Old 02-20-2006, 08:23 PM
The_Rayman's Avatar
The_Rayman The_Rayman is offline
 
Join Date: Jul 2005
Location: Amsterdam - Netherlands
Posts: 65
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Very very nice Hack m8!

Works like a charm
Reply With Quote
  #146  
Old 02-21-2006, 05:26 PM
Xplorer4x4 Xplorer4x4 is offline
 
Join Date: Apr 2005
Posts: 938
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

PHP Code:
Database error in vBulletin 3.5.3:

Invalid SQL:
UPDATE user SET
    
### Bitfield: user.options ###
        
options = IF(options 8options 8options),
        
options = IF(options 1024optionsoptions 1024),
        
options = IF(options 16optionsoptions 16),
        
options = IF(options 256options 256options),
        
options = IF(options 512optionsoptions 512),
        
options = IF(options 32options 32options),
        
options = IF(options 2048optionsoptions 2048),
        
options = IF(options 4096options 4096options),
        
options = IF(options 1optionsoptions 1),
        
options = IF(options 2optionsoptions 2),
        
options = IF(options 4optionsoptions 4),
        
options = IF(options 64optionsoptions 64),
        
options = IF(options 128options 128options),
        
options = IF(options 32768options 32768options),
    
usertitle 'Administrator',
    
customtitle 0,
    
username 'Xplorer4x4',
    
email '',
    
languageid 0,
    
homepage 'http://www.domsforums.net/',
    
birthday_search '1984-10-22',
    
birthday '10-22-1984',
    
showbirthday 2,
    
icq '',
    
aim '',
    
yahoo '',
    
msn '',
    
skype '',
    
parentemail '',
    
posts 1097,
    
referrerid 0,
    
ipaddress '',
    
isstaffrank '1',
    
staffrank 'Tech Admin',
    
staffrank_opentag '<b>',
    
staffrank_closetag '</B>',
    
vbookie_cash 500,
    
alerts 0,
    
warnings 0,
    
warning_level 0,
    
warning_bans 0,
    
ucash '11242.37',
    
usergroupid 6,
    
displaygroupid 6,
    
membergroupids '25',
    
reputationlevelid 7,
    
reputation 167,
    
pmpopup 1,
    
autosubscribe = -1,
    
threadedmode 0,
    
showvbcode 2,
    
styleid 0,
    
timezoneoffset '-6',
    
daysprune 0,
    
joindate 1132099380,
    
lastactivity 1140546840,
    
lastpost 1140540000
WHERE userid 
1;

MySQL Error  Unknown column 'isstaffrank' in 'field list'
Error Number 1054
Date         
TuesdayFebruary 21st 2006 06:35:04 PM
Script       
: [url]http://www.domsforums.net/admincp/user.php[/url]
Referrer     : [url]http://www.domsforums.net/admincp/user.php?do=edit&u=1[/url]
IP Address   
Username     Xplorer4x4
Classname    
vb_database 
For some reason it is not adding the "isstaffrank" table under the users table.
Reply With Quote
  #147  
Old 03-03-2006, 10:33 PM
Xplorer4x4 Xplorer4x4 is offline
 
Join Date: Apr 2005
Posts: 938
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

bump
Reply With Quote
  #148  
Old 03-05-2006, 10:59 PM
kira kira is offline
 
Join Date: Oct 2001
Location: NYC
Posts: 160
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Great plugin, thank you very much, LiveWire!
Reply With Quote
  #149  
Old 03-06-2006, 04:06 AM
kizzmet kizzmet is offline
 
Join Date: Sep 2004
Posts: 31
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #150  
Old 03-16-2006, 11:55 PM
TPOCJames's Avatar
TPOCJames TPOCJames is offline
 
Join Date: Dec 2005
Posts: 117
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

so this will not work for vB 3.5.x?
Reply With Quote
  #151  
Old 03-28-2006, 05:46 PM
Jordan17 Jordan17 is offline
 
Join Date: Mar 2006
Location: Teesside, UK
Posts: 73
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thank you very much! Great hack, just what i've been looking for!
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 08:14 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04960 seconds
  • Memory Usage 2,358KB
  • Queries Executed 25 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (5)bbcode_code
  • (1)bbcode_php
  • (3)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (4)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)pagenav_pagelinkrel
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (11)postbit_onlinestatus
  • (11)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • 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
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete