UBB.Dev
Posted By: WrÅith [6.0] CustomTitle 1.0 - 06/13/2002 10:41 PM
Name: CustomTitle v1.0

Description: Allows your users to specify a custom title to display beneath their username on their posts. Users can edit their title in their "My Home" settings.

Example: http://www.terranbbs.com/testboard/ubbthreads.php (Username: test / Password: test)

Link: http://www.terranbbs.com/ubb/mods/6.0/CustomTitle.txt

Special Thanks: To the many members of my board who prompted me to create this by constantly asking for custom titles.

Future Improvements: Adding the ability to specify a number of posts that a user must reach before having the ability to change their title with the configuration taking place in the admin control panel.

Posted By: AllenAyres Re: [6.0] CustomTitle 1.0 - 06/13/2002 11:11 PM
Hey, nice

Can you link to an image in there or use html? Just asking
Posted By: WrÅith Re: [6.0] CustomTitle 1.0 - 06/13/2002 11:16 PM
Right now I have it stripping out the HTML, but theoretically you could indeed. I was thinking about that very thing since I frequent a number of Sci-Fi boards that use small rank images underneath the name.

One other possible enhancement would be to allow the use of images below the name and then tie it to a particular group so that a user could pick a particular group such as Klingon and it would display Klingon rank images beneath their name.

I gotta tell 'ya that the new version of this software makes these kind of "tweaks" a breeze. This one took me about 30 minutes. The longest part was just tracing the "path" of the files I'd need to change.
Posted By: stanmo Re: [6.0] CustomTitle 1.0 - 06/13/2002 11:21 PM
umm... it's weird..
i followed all the instructions and the database doesn't update when i try to change the title... i'm using the final copy of 6.0...
Posted By: WrÅith Re: [6.0] CustomTitle 1.0 - 06/13/2002 11:29 PM
I suppose it's possible I missed a line I changed. I've done it on two boards and it's worked fine. Let me do a line-by-line comparrison with a clean copy and see if there's something I missed in the instructions.
Posted By: stanmo Re: [6.0] CustomTitle 1.0 - 06/13/2002 11:31 PM
Writes WrÅith:
I suppose it's possible I missed a line I changed. I've done it on two boards and it's worked fine. Let me do a line-by-line comparrison with a clean copy and see if there's something I missed in the instructions.


Thanks again!
Posted By: WrÅith Re: [6.0] CustomTitle 1.0 - 06/13/2002 11:37 PM
Yep, call me an idiot! I missed the whole part where the info gets added to the database.

I've updated the instructions. You'll want to do Part Two, Steps 3, 4, and 5.
Posted By: stanmo Re: [6.0] CustomTitle 1.0 - 06/13/2002 11:42 PM
ahh... its working now! Thanks!
Posted By: JoshPet Re: [6.0] CustomTitle 1.0 - 06/14/2002 12:49 AM
Very cool.

How difficult would it be to make it so that only certain groups had this power??

We allow members who donate to support our site to have a custom title. Currently the Admins have to make the change now. It would be cool if once they are in the "contributor" usergroup, they could do it themselves... but regular users didnt' have that 'power'.
Posted By: WrÅith Re: [6.0] CustomTitle 1.0 - 06/14/2002 1:11 AM
Wouldn't be hard at all actually. I was already thinking about doing something similar to this only based on the number of posts instead of group.

To do it, you'd want to create some sort of variable in config.inc.php that specifies the group number that you want to grant access to. You'd then modify the query in editbasic.php to extract their group information from the database and assign it to a variable. Then you would create an IF statement in changebasic.php that compares the group variable to the config variable. If they're equal it proceeds, if not, it spits out an error message saying they need to contribute or something.

Really wouldn't take much to be honest with you.
Posted By: JoshPet Re: [6.0] CustomTitle 1.0 - 06/14/2002 1:14 AM
That would be cool. Might need to try my luck at playing around with that.

Thanks!
Posted By: msula Re: [6.0] CustomTitle 1.0 - 06/14/2002 1:15 AM
as soon as you get this to work for only users with X number of posts, I'm in!
Posted By: WrÅith Re: [6.0] CustomTitle 1.0 - 06/14/2002 1:51 AM
That might take a bit. I've got to figure out how the config.inc.php captures and stores the variables that are assigned. I want the post number to be something that you can configure via the admin control panel. I could easily set it up to work with just a statement in the file itself, but that isn't elegant enough for me.

I'll mess around with it some more over the next day or so.
Posted By: omegatron Re: [6.0] CustomTitle 1.0 - 06/14/2002 2:33 AM
Maybe I am asleep but where is the custom title field??

I installed the hack and their is no custom title field in myhome?
Posted By: omegatron Re: [6.0] CustomTitle 1.0 - 06/14/2002 2:41 AM
HMM so this does not create a new custom title field like its UBB counterpart. I see it only writes over your current title which one can change anyway.
Posted By: WrÅith Re: [6.0] CustomTitle 1.0 - 06/14/2002 6:55 AM
It allows the user to specify what they wish to have in the U_Title field. Previously this was something that could only be changed by an Administrator as they were the only ones who could view a complete user profile via the Admin CP. What this hack does is allow the board member to change their own title via the same interface that they already are familiar with for changing their personal settings such as their password and their signature.
Posted By: omegatron Re: [6.0] CustomTitle 1.0 - 06/14/2002 11:01 AM
It would be nice if this was converted to not replacing a title but adding another title A CUSTOM TITLE.

UBB had a hack called this and it did not strip my admin title, So my title was administrator and underneath custom title let me specify something else cool.
Posted By: WrÅith Re: [6.0] CustomTitle 1.0 - 06/14/2002 7:43 PM
It wouldn't be hard. You'd have to add another field to the w3t_Users table. Perhaps calling it U_Title2. You would then follow the same procedure as outlined in my instructions, only substituting U_Title2 for U_Title when it is specified in the query string in editbasic.php.
Posted By: WrÅith Re: [6.0] CustomTitle 1.0 - 06/23/2002 6:38 AM
This mod has been moved to the finished forum at this location. Please close this thread.
© UBB.Developers