PDA

View Full Version : vB Staff Titles


Logikos
08-06-2005, 10:00 PM
vB Staff Title
Show your support and vote this hack for HotM September!! (https://vborg.vbsupport.ru/showthread.php?t=96300)

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 (https://vborg.vbsupport.ru/showpost.php?p=751222&postcount=21)


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 (https://vborg.vbsupport.ru/showthread.php?s=&threadid=71447). 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!
https://vborg.vbsupport.ru/ (https://vborg.vbsupport.ru/vborg_miscactions.php?do=installhack&threadid=93783)

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

Blam Forumz
08-07-2005, 10:39 AM
i like!

Logikos
08-07-2005, 10:40 AM
Thanks!

Neal-UK
08-07-2005, 10:41 AM
very good, installing thank you

Logikos
08-07-2005, 10:43 AM
No problem, Let me know if everything goes well.

Neal-UK
08-07-2005, 10:48 AM
No problem, Let me know if everything goes well.

How do I find the setting for this?

Logikos
08-07-2005, 10:52 AM
When you enter a new user, or edit a user in the Admin Control Panel.

Neal-UK
08-07-2005, 10:53 AM
When you enter a new user, or edit a user in the Admin Control Panel.

10-4 on that, thanks.

RoryF
08-07-2005, 11:03 AM
Thanks Live wire, thanks for taking my request for this also ^^.

TTG
08-07-2005, 11:03 AM
Very useful, thanks Live Wire.
Clicked install.

Logikos
08-07-2005, 11:09 AM
Thanks Limewire, thanks for taking my request for this also ^^.

LiveWire ;)

RoryF
08-07-2005, 11:17 AM
Sorry :P, edited :).

Boofo
08-07-2005, 11:37 AM
Looks good, sir. Been waiting for this. ;)

RoryF
08-07-2005, 11:47 AM
<if condition="$post['staffrank_closetag']">$post[staffrank_cloestag]</if>
</div>
</if>


Small typo that needs to fix, it causes the HTML Colors to carry on throughout the templates you edit. Change it to : -


<if condition="$post['staffrank_closetag']">$post[staffrank_closetag]</if>
</div>
</if>


Thanks, fantastic addon!

Boofo
08-07-2005, 11:50 AM
<if condition="$post['staffrank_closetag']">$post[staffrank_cloestag]</if>
</div>
</if>


Small typo that needs to fix, it causes the HTML Colors to carry on throughout the templates you edit. Change it to : -


<if condition="$post['staffrank_closetag']">$post[staffrank_closetag]</if>
</div>
</if>


Thanks, fantastic addon!

What did you change? They look the same to me.

Logikos
08-07-2005, 11:51 AM
I don't see a diffrence in the code you just posted...

RoryF
08-07-2005, 11:53 AM
What did you change? They look the same to me.

There is a typo in the closetag bit, i think he said "cloestag" or something like that.

Logikos
08-07-2005, 11:56 AM
Your example code doesn't show that. But I looked at my readme.txt file and there is a small typo.

In your postbit/postbit_legacy template Find:

$post[staffrank_cloestag]


Replace With:

$post[staffrank_closetag]


Thanks for reporting! ZIP updated! :)

RoryF
08-07-2005, 11:59 AM
Yes it did, it show the typo with "es" at the close section in the first php code and the second one corrected it. I see it, no one eles does?

I'm really new to this, so i'll forget about it lol. Again, fantastic hack.

Logikos
08-07-2005, 12:01 PM
Your right, to eairly to be paying attention.. :p

Logikos
08-07-2005, 12:02 PM
To show the rank in your users profile

In template 'memberinfo' Find:

<if condition="$userinfo['usertitle']"><div class="smallfont">$userinfo[usertitle]</div></if>

Add Under:

<if condition="$userinfo['isstaffrank']">
<div class="smallfont">
<if condition="$userinfo['staffrank_opentag']">$userinfo[staffrank_opentag]</if>
<if condition="$userinfo['staffrank']">$userinfo[staffrank]</if>
<if condition="$userinfo['staffrank_closetag']">$userinfo[staffrank_closetag]</if>
</div>
</if>

bigcurt
08-07-2005, 12:47 PM
Good job on the port LiveWire..so when you expect to hit "Master Coder"?? :).


~Curt

Logikos
08-07-2005, 12:49 PM
When the funds go threw to Stefans offshore account. :p

Boofo
08-07-2005, 01:35 PM
When the funds go threw to Stefans offshore account. :p

They've been diverted. Thanks. ;)

ThePimp
08-07-2005, 01:48 PM
*installs

rinkrat
08-07-2005, 02:00 PM
Does this have to be used for staff? I'd like to use it for my subscribers and give them a custom title automatically when they subscribe. This would require it recognizing their secondary usergroup as being "Subscriber". Can this be done with this hack?

Logikos
08-07-2005, 02:07 PM
Does this have to be used for staff? I'd like to use it for my subscribers and give them a custom title automatically when they subscribe. This would require it recognizing their secondary usergroup as being "Subscriber". Can this be done with this hack?

No it cannot, but if they are being changed to the appropriate user group after subscribing then you can use the custom title field in the usergroup options. Or a simple condition as this:


<if condition="$bbuserinfo[usergroupid] == X"><i>Site Subscriber</i></if>


Changing X to the subscriber usergroupid :)

Mike Gaidin
08-07-2005, 03:50 PM
Nice, I like this. Thanks!

twoseven
08-07-2005, 04:02 PM
staffrank_cloestag to staffrank_closetag

Jedi Blaze
08-07-2005, 04:03 PM
Thanks, very nice. :D *clicks install*

Logikos
08-07-2005, 04:25 PM
staffrank_cloestag to staffrank_closetag

https://vborg.vbsupport.ru/showpost.php?p=751217&postcount=18

Snake
08-07-2005, 07:08 PM
What a hack!

Installs and thanks! :)

KURTUL
08-08-2005, 06:25 AM
Thanks

Brinnie
08-08-2005, 11:29 AM
Thank you... Would be cool to show in Forums Leaders page. :)

Logikos
08-08-2005, 11:41 AM
Thank you... Would be cool to show in Forums Leaders page. :)

There are 2 ways of doing this:

1) Hack the existing query in the showgroup.php
2) Add an additional query via a plugin

I don't like either way. Untill vBulletin comes up with a way to hack pre-existing queries via a plugin, then those way above would have to do.

Brinnie
08-08-2005, 12:10 PM
There are 2 ways of doing this:

1) Hack the existing query in the showgroup.php
2) Add an additional query via a plugin

I don't like either way. Untill vBulletin comes up with a way to hack pre-existing queries via a plugin, then those way above would have to do.

just HOW many people sit there on the leaders page all day saying "Damn, everytime I come to this page, it goes so slow."

utw-Mephisto
08-08-2005, 07:05 PM
I get the following error when uploading the plugin :

http://img309.imageshack.us/img309/8475/untitled8bu.jpg

Boofo
08-08-2005, 07:13 PM
That's because you need to import it in the product manager, not as a plug-in. ;)

Logikos
08-08-2005, 07:18 PM
Read the readme.txt file. I explained in detail how to import it. ;)

This is my template for ALL of my hacks.

// - Log into you Admin Control Panel -
// #############################################
-----------------------------------------------
1.) Find 'Plugin System';
2.) Click 'Manage Products';
3.) Click '[Add/Import Product]';
4.) Under 'Import Product';
5.) Click browse and point to '.xml' which was provided in this .zip file;
6.) Allow Overwrite should be 'off';
7.) Press Import
-----------------------------------------------

utw-Mephisto
08-08-2005, 07:24 PM
SHAME on me :D :D

Logikos
08-08-2005, 07:26 PM
SHAME on me :D :D

It happens :)

utw-Mephisto
08-08-2005, 07:27 PM
On question though


// - Template Change -
// - You have to edit your postbit, or postbit_legacy template, which ever you use. -


How do I know which one I use ? :D :D

Logikos
08-08-2005, 07:29 PM
Does your postbit look like vBulletin.org's, or like vBulletin.com's? Minus the colors.

If your postbit looks like vB.org then its postbit_legacy. If it looks like vB.com then its postbit. :) Diablo Player?

utw-Mephisto
08-08-2005, 07:31 PM
Ok, chinese to me :)

I installed the default 3.5RC2 + VbAdvanced RC2 .. thats it ..

I just changed it in both, imported the product but in the Userprofile fields I cannot see the Staff Title settings like in your screenshot

Logikos
08-08-2005, 07:33 PM
Ok, chinese to me :)

I installed the default 3.5RC2 + VbAdvanced RC2 .. thats it ..

I just changed it in both, imported the product but in the Userprofile fields I cannot see the Staff Title settings like in your screenshot

if you did import the file, then go here:

http://www.yoursite.com/forum/admincp/user.php?do=modify&u=1


Replace with your URL: You will see the setting there.

utw-Mephisto
08-08-2005, 07:36 PM
Nope :(

http://img323.imageshack.us/img323/9951/untitled0gb.th.jpg (http://img323.imageshack.us/my.php?image=untitled0gb.jpg)

Logikos
08-08-2005, 07:38 PM
If you want, Create a test account that has super admin perrmissions and I can look at it (PM me the user/pass). If you uploaded the xml file, then i don't see why you would have a problem. I just upload my file from my zip here and it worked as expected. :)

utw-Mephisto
08-08-2005, 07:38 PM
never mind, got it :D

Logikos
08-08-2005, 07:39 PM
Glad you got! :)

utw-Mephisto
08-08-2005, 07:39 PM
Big THX !!!

Pion
08-08-2005, 08:23 PM
I did everything exactly like provided in the directions and nothing happened. I've added the staff title but it doesn't show in the postbit legacy.

Logikos
08-08-2005, 08:29 PM
I see a phrase isn't being inserted. Minor bug that I will fix. I don't understand, if you did everything correct it will work. Please make sure that your plugins are on, and all hooks are active.

Pion
08-08-2005, 08:49 PM
Nevermind, I'm a moron. I got it. I installed on 1 style but was viewing another. ;)

Logikos
08-08-2005, 09:53 PM
Nevermind, I'm a moron. I got it. I installed on 1 style but was viewing another. ;)

No problem, glad you figured it out :)

vBintense
08-08-2005, 09:56 PM
Thanks, one my staff members where asking for this back.

/me licks and drools on the install button.

Logikos
08-08-2005, 11:34 PM
Thanks, one my staff members where asking for this back.

* insane-topics licks and drools on the install button.

Hey now, you could possibly malfunction the install system like that.

* Logikos hands insane-topics a bone instead. :p

vBintense
08-09-2005, 12:20 AM
* vBintense runs after the bone............

Besides I think they water proofed the install system :)

Xplorer4x4
08-19-2005, 07:10 AM
All this work to do that? No thanks. This can be done much easier by simply going to the user ranks and setting up a rank corresponding to that user group. For example type in Moderator as the rank name and apply it to the moderators user group. Same principal your tying to achieve (I believe)without the hustle.

All the same not tryign to bash the hack, as I like the concept just seems much easier to do it my way. ;)

Snake
08-25-2005, 01:35 PM
To show the rank in your users profile

In template 'memberinfo' Find:

<if condition="$userinfo['usertitle']"><div class="smallfont">$userinfo[usertitle]</div></if>

Add Under:

<if condition="$userinfo['isstaffrank']">
<div class="smallfont">
<if condition="$userinfo['staffrank_opentag']">$userinfo[staffrank_opentag]</if>
<if condition="$userinfo['staffrank']">$userinfo[staffrank]</if>
<if condition="$userinfo['staffrank_closetag']">$userinfo[staffrank_closetag]</if>
</div>
</if>


Live when I place an image next to the staff title, I get this wierd error.

The following error occurred when attempting to evaluate this template:

Parse error: parse error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING in /home/mgsz/public_html/forums/includes/adminfunctions_template.php(3510) : eval()'d code on line 227

This is likely caused by a malformed conditional statement. It is highly recommended that you fix this error before continuing, but you may continue as-is if you wish.

Logikos
08-25-2005, 04:52 PM
@Snake:
Hmmm, thats strange. This is whats in my memberinfo template:

<if condition="$userinfo['isstaffrank']">
<div class="smallfont">
<if condition="$userinfo['staffrank_opentag']">$userinfo[staffrank_opentag]</if>
<if condition="$userinfo['staffrank']">$userinfo[staffrank]</if>
<if condition="$userinfo['staffrank_closetag']">$userinfo[staffrank_closetag]</if>
</div>
</if>


Is it possiable you have another condition inside that template that could be causeing this?

Snake
08-25-2005, 06:11 PM
Well yeah I guess. I have inputted the <IMG> tags which causes that error. I think I'll have to add a slash somewhere but I am not sure where exactly.

Logikos
08-25-2005, 06:46 PM
You add that condtion to the templates then In the staff feild you just add.


<img border="0" src="your_path_to_the_image.gif" alt="" />

Snake
08-25-2005, 07:44 PM
Ding ding ding!

Works now, thanks.

slank
09-12-2005, 03:32 AM
cheers for this - installs

hostthebest
09-29-2005, 01:25 AM
Can I use this with the later version also

Capricia
09-30-2005, 11:22 AM
Great hack, thanks alot :)

*installed*

Btw it works perfectly with VB 3.5.0 Gold ;)

MissKalunji
10-01-2005, 12:44 AM
is it possible to switch the title to an image?
Thanks

Logikos
10-01-2005, 12:50 AM
Just put the HTML code in the box in the admincp. :)

dreck
10-01-2005, 02:24 AM
Installed fine on 3.5 gold.

Thanks

*install*

MissKalunji
10-01-2005, 04:56 AM
Just put the HTML code in the box in the admincp. :)

"doh" shoulda thought of that thx!

Pramodinfo
10-01-2005, 06:37 PM
Wht to do if i want to have the same title to the whole group.
Like if there is are 150 VIP members & i want to give all of them a Title as VIP Member... how can i do it ?

MissKalunji
10-01-2005, 09:04 PM
Dat doesnt work with gold?

MissKalunji
10-03-2005, 02:14 PM
Just put the HTML code in the box in the admincp. :)

i looked and i dont know where im supposed to put it.....

ForeverForums
10-03-2005, 04:20 PM
it would be cool to be able to place a small image for the staff title.

MissKalunji
10-06-2005, 08:19 PM
Just put the HTML code in the box in the admincp. :)

n e oone???

wacodep
10-07-2005, 03:23 AM
clicks *install*

Kila_Bite
10-07-2005, 11:52 AM
Wow, great hack! Thanks a lot for this.

smokering
10-08-2005, 02:16 AM
nice hack clicks install

wolfyman
10-08-2005, 08:24 PM
This hack will work for vBulletin Version 3.5.0 RC-1 and RC-2 ONLY!

not on gold?

MissKalunji
10-08-2005, 10:39 PM
not on gold?

It does i have it installed just trying to figure out how to put an image instead of a title

wolfyman
10-08-2005, 11:03 PM
AH that would rock, please do that. I haven't voted for september yet... ;)

TheProphet
10-09-2005, 09:20 AM
Works great Ken, thx and ofcourse clicks install :ermm:

Colejo
10-09-2005, 09:27 AM
All this work to do that? No thanks. This can be done much easier by simply going to the user ranks and setting up a rank corresponding to that user group. For example type in Moderator as the rank name and apply it to the moderators user group. Same principal your tying to achieve (I believe)without the hustle.

All the same not tryign to bash the hack, as I like the concept just seems much easier to do it my way. ;)

That's how I have mine set also.

Quillz
10-09-2005, 01:47 PM
Can't user ranks be used to accomplish the same thing? And can span tags be used for the markup?

:Judge:
10-10-2005, 04:17 AM
All this work to do that? No thanks. This can be done much easier by simply going to the user ranks and setting up a rank corresponding to that user group. For example type in Moderator as the rank name and apply it to the moderators user group. Same principal your tying to achieve (I believe)without the hustle.

All the same not tryign to bash the hack, as I like the concept just seems much easier to do it my way. ;)
This is how I have mine as well and like he said not saying anything bad about the hack, just pointing out another "option".

ManagerJosh
10-10-2005, 05:08 AM
i like!

Any advantages in using this over User Ranks?

akanevsky
10-11-2005, 08:13 PM
This is nice! I was actually thinking about making something like this myself.
Installed. And guess what? I voted this for HOTM :)

Cheerz,
DV

MissKalunji
10-11-2005, 08:48 PM
Just put the HTML code in the box in the admincp. :)


anyone ???????????????????

akanevsky
10-11-2005, 09:04 PM
Any advantages in using this over User Ranks?
Yes. This is not a user rank and is displayed below it :)

hendri
10-14-2005, 10:42 PM
Yes. This is not a user rank and is displayed below it :)

how to show the staff title in memberlist ? please help !

akanevsky
10-14-2005, 11:05 PM
how to show the staff title in memberlist ? please help !

Why you asking me? Ask LiveWire :)

FROGGYJ
10-15-2005, 05:32 PM
umm a little off topic here....but I noticed in the screenshot....how do you get the user info on the left side of the post?

wolfyman
10-15-2005, 05:36 PM
umm a little off topic here....but I noticed in the screenshot....how do you get the user info on the left side of the post?

vbulletin options>forum display> use lagacy postbit


Or something very close to that.

FROGGYJ
10-15-2005, 05:43 PM
thanks wolfy

bigmonay2k
10-15-2005, 07:47 PM
thanks dude

one9er
10-19-2005, 11:17 AM
Installed nice work.

d2sector
10-21-2005, 08:14 AM
Will this eventually allow images to be used instead of the text?

LauraFL
10-21-2005, 12:25 PM
I have this installed on my 3.5 Gold. It worked great until I added the paypal donations mod. Now I cannot get it to work. I uninstalled it and did it again, but no luck. Any idea why?

PsiNyde
10-28-2005, 12:22 AM
forgive my ignorance, but can't all this be done with a simple usergroup combo? multiple usergroup memberships = multiple titles under the user's name. [post count usergroup, custom usergroup x, custom usergroup y = 3 titles under their name]

Will this eventually allow images to be used instead of the text?

any usergroup can be associated with a graphical image [rank]. go to admincp and add new rank...pick the usergroup it should belong to.

mrsbuzzy
11-05-2005, 01:17 AM
is there any way to move this so it's above the user rank?

PsiNyde
11-05-2005, 01:19 AM
yes there is. id have to hunt it down but it can be done

d2sector
11-05-2005, 06:18 AM
forgive my ignorance, but can't all this be done with a simple usergroup combo? multiple usergroup memberships = multiple titles under the user's name. [post count usergroup, custom usergroup x, custom usergroup y = 3 titles under their name]



any usergroup can be associated with a graphical image [rank]. go to admincp and add new rank...pick the usergroup it should belong to.

Thankyou. *slaps forehead*

mrsbuzzy
11-12-2005, 12:30 PM
Were you able to figure this one out?

Thanks, Dawn

yes there is. id have to hunt it down but it can be done

optrex
11-12-2005, 07:07 PM
is there any way to move this so it's above the user rank?


in readme.txt instead of add under, add above ;)

optrex
11-12-2005, 07:11 PM
how to show the staff title in memberlist ? please help !


in memberlist_resultsbit

find:

<if condition="$show['usertitlecol']"><div class="smallfont">$userinfo[usertitle]</div></if>

and above or below (depending where you want it add:

<if condition="$show['usertitlecol']"><div class="smallfont">$userinfo[staffrank]</div></if>

optrex
11-12-2005, 07:24 PM
If you want it to show when viewing user profile

in memberinfo find:

<if condition="$userinfo['usertitle']"><div class="smallfont">$userinfo[usertitle]</div></if>

above add:



<if condition="$post['isstaffrank']">
<div class="smallfont">
<if condition="$post['staffrank_opentag']">$post[staffrank_opentag]</if>
<if condition="$post['staffrank']">$post[staffrank]</if>
<if condition="$post['staffrank_closetag']">$post[staffrank_closetag]</if>
</div>
</if>

Jenkins
12-05-2005, 04:04 AM
nothing happens when I give them a staff title. I'm running 3.5.1 http://www.okgmp.com/forums

any suggestions?

BiReL41r
12-16-2005, 08:14 PM
Couldn't you do this with a simple code edit in the navbar template of the forums?

BiReL41r
12-16-2005, 08:18 PM
Does this make it so there are basically 2 titles, apposed to 1?

Smiry Kin's
12-17-2005, 02:29 AM
How do i add this to vbulletin 3.5.2 i would really like a release,

thanks

MissKalunji
12-17-2005, 02:50 AM
How do i add this to vbulletin 3.5.2 i would really like a release,

thanks

install then go to user / search the user uw anna add the title to (or you can do it through usergroup
you gon have : something that says custome user title (should be around the bottom

add the custom title or html for images and your good 2 go

Smiry Kin's
12-17-2005, 01:55 PM
install then go to user / search the user uw anna add the title to (or you can do it through usergroup
you gon have : something that says custome user title (should be around the bottom

add the custom title or html for images and your good 2 go

wha?! :(

Could you make installer man??

vBSEO
12-25-2005, 03:21 AM
Excellent! Installed (with member info mod (https://vborg.vbsupport.ru/showpost.php?p=751222&postcount=21)) ;)

MissKalunji
12-25-2005, 03:46 AM
wha?! :(

Could you make installer man??

get the pluging / upload it in product....then go to user profile....and set it there...

Xplorer4x4
01-05-2006, 08:12 AM
I seemed to get this error when attemptin to use on my new server which makes me thinkg it is a PHP/MySQL conflict.

MySQL V5
PHP v4.4.1 & PHP v5.1.1

Not sure which is in effect.

Database error in vBulletin 3.5.3:

Invalid SQL:
UPDATE user SET
passworddate = FROM_UNIXTIME(1136455772),
password = 'fb98a3830432d6ff9ad9ac5a5a1b7d4e',
### Bitfield: user.options ###
options = IF(options & 8, options - 8, options),
options = IF(options & 1024, options - 1024, options),
options = IF(options & 16, options, options + 16),
options = IF(options & 256, options - 256, options),
options = IF(options & 512, options - 512, options),
options = IF(options & 32, options - 32, options),
options = IF(options & 2048, options, options + 2048),
options = IF(options & 4096, options - 4096, options),
options = IF(options & 1, options, options + 1),
options = IF(options & 2, options, options + 2),
options = IF(options & 4, options, options + 4),
options = IF(options & 64, options, options + 64),
options = IF(options & 128, options - 128, options),
options = IF(options & 32768, options - 32768, options),
usertitle = 'Administrator',
customtitle = 0,
username = 'Xplorer4x4',
email = '',
languageid = 0,
homepage = '',
birthday_search = '1984-10-22',
birthday = '10-22-1984',
showbirthday = 2,
icq = '',
aim = '',
yahoo = '',
msn = '',
skype = '',
parentemail = '',
posts = 592,
referrerid = 0,
ipaddress = '',
vbookie_cash = 500,
ucash = '2230.54',
isstaffrank = '0',
staffrank = '',
staffrank_opentag = '',
staffrank_closetag = '',
alerts = 0,
warnings = 0,
warning_level = 0,
warning_bans = 0,
usergroupid = 6,
reputationlevelid = 5,
reputation = 23,
pmpopup = 1,
autosubscribe = -1,
threadedmode = 0,
showvbcode = 2,
styleid = 0,
timezoneoffset = '-6',
daysprune = 0,
joindate = 1132099380,
lastactivity = 1136455740,
lastpost = 1136455620,
membergroupids = ''
WHERE userid = 1;

MySQL Error : Unknown column 'isstaffrank' in 'field list'
Error Number : 1054
Date : Thursday, January 5th 2006 @ 10:09:32 AM
Script : /admincp/user.php
Referrer : /admincp/user.php?do=edit&u=1
IP Address :
Username : Xplorer4x4
Classname : vb_database

Breath
01-05-2006, 10:44 AM
I've just tried it on a mysql5 forum. Seems to be an issue directly with mysql5.

Breath
01-05-2006, 10:58 AM
After some further playing it seems the hack is no longer installing the isstaffrank field in the db.

Breath
01-05-2006, 11:15 AM
Ok heres's a fix for it.

Open the xml file and change


$db->query_write("ALTER TABLE " . TABLE_PREFIX . "user ADD (isstaffrank INT(6) UNSIGNED NOT NULL DEFAULT '')");


to


$db->query_write("ALTER TABLE " . TABLE_PREFIX . "user ADD (isstaffrank INT(6) UNSIGNED NOT NULL)");


This does the trick on mysql5

sinaluna
01-05-2006, 02:50 PM
I would like members to be able to use this. Is there any way this can be set in the User CP? Thanks!

Breath
01-05-2006, 02:53 PM
I would like members to be able to use this. Is there any way this can be set in the User CP? Thanks!

What would be the point of that are members can use custom titles anyway?

scootman
01-05-2006, 03:47 PM
Install great job :) Thanks

sinaluna
01-05-2006, 11:11 PM
What would be the point of that are members can use custom titles anyway?The same reason that staff need it. Custom titles are already being used and a separate line is needed for other purposes.

Xplorer4x4
01-19-2006, 03:04 PM
Ok heres's a fix for it.

Open the xml file and change


$db->query_write("ALTER TABLE " . TABLE_PREFIX . "user ADD (isstaffrank INT(6) UNSIGNED NOT NULL DEFAULT '')");


to


$db->query_write("ALTER TABLE " . TABLE_PREFIX . "user ADD (isstaffrank INT(6) UNSIGNED NOT NULL)");


This does the trick on mysql5
Just a warning that I got a datbase error when I did this and now I get one when i try to add any product.

Here is the error:

MySQL Error : You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '-End Error Mess = 'a:4:{s:17:\"custom_link_added\";s:44:\"The custom link has su' at line 1
Error Number : 1064

Logikos
01-20-2006, 02:10 AM
I seemed to get this error when attemptin to use on my new server which makes me thinkg it is a PHP/MySQL conflict.

MySQL V5
PHP v4.4.1 & PHP v5.1.1

Not sure which is in effect.

Database error in vBulletin 3.5.3:

Invalid SQL:
UPDATE user SET
passworddate = FROM_UNIXTIME(1136455772),
password = 'fb98a3830432d6ff9ad9ac5a5a1b7d4e',
### Bitfield: user.options ###
options = IF(options & 8, options - 8, options),
options = IF(options & 1024, options - 1024, options),
options = IF(options & 16, options, options + 16),
options = IF(options & 256, options - 256, options),
options = IF(options & 512, options - 512, options),
options = IF(options & 32, options - 32, options),
options = IF(options & 2048, options, options + 2048),
options = IF(options & 4096, options - 4096, options),
options = IF(options & 1, options, options + 1),
options = IF(options & 2, options, options + 2),
options = IF(options & 4, options, options + 4),
options = IF(options & 64, options, options + 64),
options = IF(options & 128, options - 128, options),
options = IF(options & 32768, options - 32768, options),
usertitle = 'Administrator',
customtitle = 0,
username = 'Xplorer4x4',
email = '',
languageid = 0,
homepage = '',
birthday_search = '1984-10-22',
birthday = '10-22-1984',
showbirthday = 2,
icq = '',
aim = '',
yahoo = '',
msn = '',
skype = '',
parentemail = '',
posts = 592,
referrerid = 0,
ipaddress = '',
vbookie_cash = 500,
ucash = '2230.54',
isstaffrank = '0',
staffrank = '',
staffrank_opentag = '',
staffrank_closetag = '',
alerts = 0,
warnings = 0,
warning_level = 0,
warning_bans = 0,
usergroupid = 6,
reputationlevelid = 5,
reputation = 23,
pmpopup = 1,
autosubscribe = -1,
threadedmode = 0,
showvbcode = 2,
styleid = 0,
timezoneoffset = '-6',
daysprune = 0,
joindate = 1132099380,
lastactivity = 1136455740,
lastpost = 1136455620,
membergroupids = ''
WHERE userid = 1;

MySQL Error : Unknown column 'isstaffrank' in 'field list'
Error Number : 1054
Date : Thursday, January 5th 2006 @ 10:09:32 AM
Script : /admincp/user.php
Referrer : /admincp/user.php?do=edit&u=1
IP Address :
Username : Xplorer4x4
Classname : vb_database


hmmm, I've just installed on 3.5.3 and everything works fine.

Logikos
01-20-2006, 02:15 AM
The only problem I saw was a incorrect phrase. Fixed and updated.

Guest210212002
01-20-2006, 02:52 AM
/tag

LincolnForums
01-31-2006, 08:59 PM
doesnt work on mysql5 or php5 not sure which

Xplorer4x4
02-03-2006, 08:10 PM
Ok heres's a fix for it.

Open the xml file and change


$db->query_write("ALTER TABLE " . TABLE_PREFIX . "user ADD (isstaffrank INT(6) UNSIGNED NOT NULL DEFAULT '')");


to


$db->query_write("ALTER TABLE " . TABLE_PREFIX . "user ADD (isstaffrank INT(6) UNSIGNED NOT NULL)");


This does the trick on mysql5

Now I get a datbase error everytime i install ANY plug in. The error is to large to fit in this thread, so canb some one please help me repair the problem.
https://vborg.vbsupport.ru/attachment.php?attachmentid=42063

Dark s.s. Trunk
02-03-2006, 09:47 PM
I like but i get one error it overrides the admin titles doesnt add a second.. and everything was dune to the instructions..

craiovaforum
02-04-2006, 07:24 PM
can this be modified to do it per usergroup?

Wild-Wing
02-06-2006, 12:43 AM
yea thats would be nice man if you did that.

amadergaan
02-06-2006, 01:09 AM
are you bringing this out for 3.53 ?

Also...is there anyway to have multiple fields be displayed if the user gives inputs?

Xplorer4x4
02-06-2006, 01:30 AM
are you bringing this out for 3.53 ?

Also...is there anyway to have multiple fields be displayed if the user gives inputs?
This is compatible with 3.5.3.

As in multiple titles? No but just use HTML to add multiple, for example, "Off Topic Mod<br />Sports Mod"

And that will pirnt out like:
Off topic Mod
Sports Mod

amadergaan
02-06-2006, 01:34 AM
This is compatible with 3.5.3.

As in multiple titles? No but just use HTML to add multiple, for example, "Off Topic Mod<br />Sports Mod"

And that will pirnt out like:
Off topic Mod
Sports Mod


thanks for the reply..i'll try it out..

Well...I have this problem...I'm trying to add group specefic custom profile fields to be displayed like this....Basically..different groups will have different custom profile field options...with input...it will be displayed in the postbit..

i hope i made some sense with the post..

Xplorer4x4
02-06-2006, 01:49 AM
thanks for the reply..i'll try it out..

Well...I have this problem...I'm trying to add group specefic custom profile fields to be displayed like this....Basically..different groups will have different custom profile field options...with input...it will be displayed in the postbit..

i hope i made some sense with the post..

I think I understand. You want this feature but you want to apply one specific title to an entire user groups.

Try using the stock Rank System. I used to do something similar to what your asking using it.

craiovaforum
02-06-2006, 09:36 AM
I think I understand. You want this feature but you want to apply one specific title to an entire user groups.

Try using the stock Rank System. I used to do something similar to what your asking using it.

I saw a board using this but since I have some big pictures as ranks and I don't want to change them a text for each usergroup could be nice ;)

HaMaDa4eVeR
02-06-2006, 10:58 AM
well done live wire

Installed :)

craiovaforum
02-06-2006, 01:55 PM
I managed to do something abut it, maybe I will post a hack ;)

an example attached



see the forum: www.craiovaforum.ro

amadergaan
02-06-2006, 11:03 PM
I think I understand. You want this feature but you want to apply one specific title to an entire user groups.

Try using the stock Rank System. I used to do something similar to what your asking using it.

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

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...

Wild-Wing
02-08-2006, 01:59 AM
well ive achieved that i think. but cant post hack till i get approval from live wire

Xplorer4x4
02-08-2006, 02:20 AM
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...

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.

Wild-Wing
02-08-2006, 02:45 PM
ill release the code here
admin cp 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
$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
<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>

Nathan L
02-12-2006, 10:04 AM
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?




in memberlist_resultsbit

find:

<if condition="$show['usertitlecol']"><div class="smallfont">$userinfo[usertitle]</div></if>

and above or below (depending where you want it add:

<if condition="$show['usertitlecol']"><div class="smallfont">$userinfo[staffrank]</div></if>

The_Rayman
02-20-2006, 08:23 PM
Very very nice Hack m8!

Works like a charm

Xplorer4x4
02-21-2006, 05:26 PM
Database error in vBulletin 3.5.3:

Invalid SQL:
UPDATE user SET
### Bitfield: user.options ###
options = IF(options & 8, options - 8, options),
options = IF(options & 1024, options, options + 1024),
options = IF(options & 16, options, options + 16),
options = IF(options & 256, options - 256, options),
options = IF(options & 512, options, options + 512),
options = IF(options & 32, options - 32, options),
options = IF(options & 2048, options, options + 2048),
options = IF(options & 4096, options - 4096, options),
options = IF(options & 1, options, options + 1),
options = IF(options & 2, options, options + 2),
options = IF(options & 4, options, options + 4),
options = IF(options & 64, options, options + 64),
options = IF(options & 128, options - 128, options),
options = IF(options & 32768, options - 32768, options),
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 : Tuesday, February 21st 2006 @ 06:35:04 PM
Script : http://www.domsforums.net/admincp/user.php
Referrer : http://www.domsforums.net/admincp/user.php?do=edit&u=1
IP Address :
Username : Xplorer4x4
Classname : vb_database

For some reason it is not adding the "isstaffrank" table under the users table.

Xplorer4x4
03-03-2006, 10:33 PM
bump

kira
03-05-2006, 10:59 PM
Great plugin, thank you very much, LiveWire! :)

kizzmet
03-06-2006, 04:06 AM
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.

TPOCJames
03-16-2006, 11:55 PM
so this will not work for vB 3.5.x?

Jordan17
03-28-2006, 05:46 PM
Thank you very much! Great hack, just what i've been looking for!

Nathan2006
03-28-2006, 07:40 PM
Thank you LiveWire

This is really cool :cool:

Install:D

rareclownfish
04-04-2006, 01:30 AM
when will this be working on 3.5.4?

Logikos
04-04-2006, 02:33 AM
It Should

rareclownfish
04-04-2006, 02:42 AM
It Should

Has anyone here tried it on that version?

rareclownfish
04-04-2006, 03:01 AM
Works great installed

Saskia
04-04-2006, 02:27 PM
Has anyone here tried it on that version?Works fine for me on my vB 3.5.4 :).

Thanks for this nice feature, really helpful!

EdQ
04-04-2006, 04:14 PM
Works for me on 3.5.4

wideopen
04-05-2006, 07:11 PM
It works for me ..but I have one problem ..I can't edit my my user title now?? Any clue??

On Edit: I can't change my user title in the Admin CP but I can through the Used CP

Logikos
04-05-2006, 07:25 PM
Make sure your config.php file allows you to. Do you get an error message?

wideopen
04-05-2006, 07:30 PM
No it just won't let me change it?? I'm not saying this Hack did it , I just noticed it after installing it.. I'll check the Config.php..Thanks

O.K. Sil;ly question ..what exacly am I looking for in the Config.php

TPOCJames
04-16-2006, 08:24 PM
I have a question, is there a way to set Staff Titles for Usergroups?

cOuNtErFiET
05-28-2006, 06:49 PM
so this will not work with 3.5.4 if not can somone port it for that version cause i would really like to use this, if this is done then just point me to the thread....ty

tony adams
05-30-2006, 11:58 AM
can someone confirm they have this working with 3.5.4 - i cannot get it to work, may well be me but insructions seem clear enough

EdQ
05-30-2006, 12:27 PM
Works fine on 3.5.4

tony adams
05-30-2006, 12:30 PM
thanks EdQ

will have another look, maybe i am missing something, where are the settings shown, as far as i can see there is nothing there