The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
![]()
When a user with a Custom Title is moved to a Usergroup that doesn't allow Custom Titles, the user's original Custom Title is reset to the default Usergroup Title.
e.g. John is part of Primary Usergroup: Members, which has a default user title "Member" Members do not have permission to edit Custom Title John is then added to a Secondary Usergroup: Premium Member John can now change his Custom Title from "Member" to anything else John changes his Custom Title to "King" John is subsequently removed from Secondary Usergroup: Premium Member, but remains in Primary Usergroup: Members John's user title is now automatically reset to "Member" because Primary Usergroup: Members does not allow Custom Titles The only way I've found to override this is to set "Custom User Title: Yes, admin set (HTML allowed)" from the user's profile in the Admin Control Panel. If this option is set, then the the user retains their Custom Title even after being moved to a Usergroup that doesn't allow Custom Titles. But this requires me to manually make this change for each user. Is there a script or a hack that can do this for me automatically? Any ideas? Thanks you in advance for your suggestions. |
#2
|
|||
|
|||
![]()
That is really how it is supposed to work.
But to answer your question, no i have never seen a modification for this. |
#3
|
|||
|
|||
![]()
Thanks for your response, Marco. Yes, I know that's by design, but I'm looking for a way to override it.
On further research, I think what I need is to create a cron job with an sql query that does the following: UPDATE user SET customtitle = 1 WHERE usergroupid = X I gleaned this info from here and here. Customtitle data values are: 0 = No Custom User Title 1 = Admin Set 2 = User Set and X would be the usergroup ID of the Secondary Usergroup: Premium Member. So, essentially, the above sql query would set all customtitle datavalues to Admin Set for the usergroup Premium Member, which is what I need. Is my understanding of the above correct? Can usergroupid be used in the sql query to specify users whose secondary usergroup matches the usergroupid? How do I create a cron job with the above sql query? I know how to add a new task using "Schedule Task Manager" in Admin CP, but what code do I need in the .php file to run the above query? If someone could point me in the right direction, or provide a link to an example .php file with an sql query, I would much appreciate it. Thanks. --------------- Added [DATE]1265416347[/DATE] at [TIME]1265416347[/TIME] --------------- No one here knows how to run this sql query in php? : UPDATE user SET customtitle = 1 WHERE usergroupid = X All I need is a small .php script which runs this single query. Thanks in advance for your time. |
#4
|
|||
|
|||
![]()
OK, I think I found a solution that should work in theory. Apparently, I don't need to create a cron job at all. What I need instead is to create a plugin with my PHP code. I'm posting here for anyone searching for a similar solution.
Instead of a php script, all I need to do is: 1. "Add New Plugin" from the Admin Control Panel 2. Choose Product as "vBulletin" 3. Set the hook location to paidsub_complete 4. Enter the PHP code directly into the "Plugin PHP Code" text box |
![]() |
Thread Tools | |
Display Modes | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|