View Full Version : End-User Options - Username Font Selection Per User (Light) By BOP5 VB4
BirdOPrey5
10-11-2011, 10:00 PM
Version 1.0 - Initial Release
Version 1.1 - Bugfix for vB 4.1.4 and above
Version 1.7.7 - Critical Security Update
Version 1.8.0 - Added post count setting / Added existing Markup setting
Live Demo: Qapla.com Forums Demo (http://www.qapla.com/mods/showthread.php/90-Demo-Username-Color-Size-amp-Font-Mod) (Gold Version).
The purpose of this mod is to let users pick a custom font (either from a list you specify or optionally, a custom font they choose) to show up wherever username markup is allowed. (The postbit, profiles, who's online, blogs, CMS, etc...)
This is the free version, you can let users choose a font.
The GOLD version allows users to to choose a font, a font size, and/or a font color- each permission with independent usergroup control.
Gold version available at: Qapla.com Forums - Username Color, Size, & Font Selection. (http://www.qapla.com/mods/showthread.php/91-Username-Color-Size-and-Font-selection-per-User)
Both versions include a "Live Preview" option allowing users to instantly see the effect of their changes before saving.
Both versions automatically add the options in Settings -> General Settings page, at the bottom, for users with permission.
In both versions all options font (and color/ size in gold) are independently controllable by usergroup permissions, so for example you could let registered users pick a font, mods pick a font AND color, and VIP users pick a font, color, and size.
You can add or remove available fonts from the list in Admin CP.
In the Gold version you can add/remove available colors and you can set a range of allowable font sizes.
See Screenshots for more details.
Screenshots are of free version only. See the GOLD thread, above, for screenshots of GOLD version.
Anyone running VB 4.1.4 to 4.1.8 please see the bug notice in the next post.
------------------------------------------------------
Please "Mark as Installed" if you use this. :)
Donations always appreciated. :up:
Nominate MOTM if you LOVE it! ;)
BirdOPrey5
10-12-2011, 02:19 PM
It looks like a bug was introduced in VB 4.1.4 where they accidentally re-used the same variable for new query causing this database error.
This is a vBulletin bug, not a bug with this mod.
Currently affected versions are VB 4.1.4 - 4.1.7 and even though it's not out yet, 4.1.8 will probably have it too.
To fix the problem you will have to manually edit your file: online.php
Find the code (around line 277- may vary by version):
//VBIV-5766 get the count of members and guests online.
$userscount = $db->query_read_slave("
SELECT IF(userid > 0, 1, 0) as isuser, COUNT(session.userid) as online_users
$hook_query_fields
FROM " . TABLE_PREFIX . "session as session
$hook_query_joins
WHERE session.lastactivity > $datecut
". iif(!$showmembers, " AND session.userid < 1", "") ."
$hook_query_where
$where
GROUP BY isuser
");
and delete the line $hook_query_fields so you make it:
//VBIV-5766 get the count of members and guests online.
$userscount = $db->query_read_slave("
SELECT IF(userid > 0, 1, 0) as isuser, COUNT(session.userid) as online_users
FROM " . TABLE_PREFIX . "session as session
$hook_query_joins
WHERE session.lastactivity > $datecut
". iif(!$showmembers, " AND session.userid < 1", "") ."
$hook_query_where
$where
GROUP BY isuser
");
And save and upload the fixed file. (Save a backup of the original of course.)
This will fix the database error on who's online.
I realize it is a pain to do a manual file edit so I added an option to simply disable the mod on "Who's Online" to avoid this bug.
Just to reiterate- VB versions below 4.1.4 are not affected by this bug.
Sunka
10-12-2011, 04:29 PM
Working good!
installed.
Small bug in info.txt:
*****COMPATIBILITY******
This mod is tested and working on vB 3.8.6 and 3.8.7 and should work on all VB 3.8 forums, possibly earlier versions as well.
It will NOT work on VB 4.x.
BirdOPrey5
10-12-2011, 05:24 PM
oh thank you, I put the wrong readme file. Will fix ASAP.
Sunka
10-12-2011, 05:40 PM
Some database error...
Notification via e-mail..
Database error in vBulletin 4.1.5:
Invalid SQL:
SELECT IF(userid > 0, 1, 0) as isuser, COUNT(session.userid) as online_users
, user.bop5_userfont AS bop5_userfont
FROM session as session
WHERE session.lastactivity > 1318442418
GROUP BY isuser;
MySQL Error : Unknown column 'user.bop5_userfont' in 'field list'
Error Number : 1054
Request Date : Wednesday, October 12th 2011 @ 08:30:18 PM
Error Date : Wednesday, October 12th 2011 @ 08:30:18 PM
Script : http://www.pijanitvor.com/online.php
Referrer : http://www.pijanitvor.com/forum.php
IP Address : xxxxxxxxx
Username : xxxx
Classname : vB_Database
MySQL Version :
BirdOPrey5
10-12-2011, 06:09 PM
For some reason it looks like the field wasn't added to your database during the install, you could try installing again. If it still gives an error I could give instructions on how to manually add the field to the database.
Sunka
10-12-2011, 06:16 PM
I have to uninstall...
It's deleted my custom modification (little icon before username)..
mitch84
10-12-2011, 06:17 PM
hi, gold version is free? thx
BirdOPrey5
10-12-2011, 06:27 PM
I have to uninstall...
It's deleted my custom modification (little icon before username)..
If the icon was added through Username Markup in Usergroup settings then yes this mod will override it. This mod overrides the default markup in favor of the options the user chooses. It isn't really deleted, but hidden.
hi, gold version is free? thx
No, the gold version is not free.
Sunka
10-12-2011, 08:31 PM
If the icon was added through Username Markup in Usergroup settings then yes this mod will override it. This mod overrides the default markup in favor of the options the user chooses. It isn't really deleted, but hidden.
Yep...
It's added via Username Markup, and with some CSS styling...
But it is not the end of the world...
Keep creating MODs, it is awesome how you tweak vBulletin! :D:up:
Edit: you can see it here: http://www.pijanitvor.com/showthread.php?t=802&page=12&p=186026#post186026
BirdOPrey5
10-12-2011, 08:44 PM
Thanks. :up:
I know when I was making this (which was actually weeks ago) I considered an option to keep any existing HTML markup present and just add to it, instead of replace it... but I don't remember why I didn't include it. I will have to check it out when I get time, might be something I can add in.
rob39
10-13-2011, 02:14 AM
Getting weird error, and my Who's Online don't work with this....Is there a quick fix?....seems to Not like the UserNames listed in Who's online....much the same error as in above post by Sunka...or will it Not work in VB4.x at all?
BirdOPrey5
10-13-2011, 02:23 AM
Getting weird error, and my Who's Online don't work with this....Is there a quick fix?....seems to Not like the UserNames listed in Who's online....much the same error as in above post by Sunka...or will it Not work in VB4.x at all?
I would need to see the exact error to make a diagnosis...
The "quick fix" is to uninstall or disable for now until I can see the error.
You could UNINSTALL and attempt re-installing as well if you are up for it. If it is indeed the same error your board might have timed out making the database update.
rob39
10-13-2011, 03:09 AM
Here's the error i got...the mod works in postbit, ect....just renders Who's online inoperable...???
Had the Mod running for about two hours, and never noticed anything wrong until i tried to go to Who's online....and the error shows then...who's online doesn't load
https://vborg.vbsupport.ru/external/2011/10/41.jpg
BirdOPrey5
10-13-2011, 10:39 AM
I am seeing it now.
Sorry about that.
The "quick fix" is to go to plugin manager and disable the plugin "Who's Online Query" for this mod, the errors should stop but I still need to fix whosonline so the markup works.
BirdOPrey5
10-13-2011, 11:11 AM
OK, very sorry about this but it looks like a bug was introduced in VB 4.1.4 where they accidentally re-used the same variable for new query causing this database error.
Currently affected versions are VB 4.1.4 - 4.1.7 and even though it's not out yet, 4.1.8 will probably have it too.
To fix the problem you will have to manually edit your file: online.php
Find the code (around line 277- may vary by version):
//VBIV-5766 get the count of members and guests online.
$userscount = $db->query_read_slave("
SELECT IF(userid > 0, 1, 0) as isuser, COUNT(session.userid) as online_users
$hook_query_fields
FROM " . TABLE_PREFIX . "session as session
$hook_query_joins
WHERE session.lastactivity > $datecut
". iif(!$showmembers, " AND session.userid < 1", "") ."
$hook_query_where
$where
GROUP BY isuser
");
and delete the line $hook_query_fields so you make it:
//VBIV-5766 get the count of members and guests online.
$userscount = $db->query_read_slave("
SELECT IF(userid > 0, 1, 0) as isuser, COUNT(session.userid) as online_users
FROM " . TABLE_PREFIX . "session as session
$hook_query_joins
WHERE session.lastactivity > $datecut
". iif(!$showmembers, " AND session.userid < 1", "") ."
$hook_query_where
$where
GROUP BY isuser
");
And save and upload the fixed file. (Save a backup of the original of course.)
This will fix the database error on who's online.
I realize it is a pain to do a manual file edit so I release an update soon that will give you the option to disable display on who's online so you don't have to worry about the file edit.
Just to reiterate- VB versions below 4.1.4 are not affected by this bug.
rob39
10-13-2011, 11:15 AM
Thanks for the fix....this is a nice mod....:)
BirdOPrey5
10-13-2011, 11:52 AM
Thank You. :up:
Erica1977
10-13-2011, 03:46 PM
Since i have't installed this yet do i have to still edit the online.php i am running 4.1.7 or the update you made today should be good to go?
BirdOPrey5
10-13-2011, 04:01 PM
If you want the mod to work on "Who's Online" you will need to edit the file. That will not go away until vBulletin fixes the bug in the future version.
OR you can just install the mod and leave the option to use it on "Who's Online" off and the mod will work everywhere else without issue, but it won't show the custom usernames on Who's Online.
FReeSTER
10-17-2011, 04:06 AM
This is great and is a keeper but it killed my HTML username color markup. :-(
BirdOPrey5
10-17-2011, 10:25 AM
This is great and is a keeper but it killed my HTML username color markup. :-(
It's still there if you disable this mod- but this mod is overriding it.
FReeSTER
10-17-2011, 09:51 PM
It's still there if you disable this mod- but this mod is overriding it.
Can you make it please to at least use the HTML markup we already have on the usergroup options? lol
Is just that i like to have the Mods as green and SM as blue, admins as red ect... :D:o
BirdOPrey5
10-17-2011, 11:39 PM
I will see what I can do. :)
snowlion
10-18-2011, 09:39 AM
Can you make it please to at least use the HTML markup we already have on the usergroup options? lol
Is just that i like to have the Mods as green and SM as blue, admins as red ect... :D:o
Edit plugin Username Markup Override at hook fetch_musername and change $bop_username .= '">'.$user['username'].'</span>';
to
$bop_username .= '">'.$user['musername'].'</span>';
FReeSTER
10-18-2011, 01:59 PM
Edit plugin Username Markup Override at hook fetch_musername and change $bop_username .= '">'.$user['username'].'</span>';
to
$bop_username .= '">'.$user['musername'].'</span>';
thank you mate it worked. lol
LLent
10-19-2011, 12:06 PM
instead of downloading different fonts and keeping them on PC with the option of custom font is there a way i can put these somehow on the font list ....thanks in advance
FReeSTER
10-19-2011, 12:45 PM
instead of downloading different fonts and keeping them on PC with the option of custom font is there a way i can put these somehow on the font list ....thanks in advance
You can add as many fonts you want from the Mod Settings, but if users dont have the fonts installed in their PC is useless to have them listed unless you force them to install the custom fonts
BirdOPrey5
10-19-2011, 01:52 PM
To expand a bit on what FReeSTER said- Available fonts aren't stored by this mod or on your server. You literally just add or remove the Names of fonts from the list. The included list is basically the same as the standard vBulletin font list which are very common fonts.
If the person viewing your site had "Arial Black" installed, and the font chosen is "Arial Black" then the user will see the font in "Arial Black." If they don't have Arial Black installed they will see a default font instead.
You do not need to download any fonts.
snowlion
10-19-2011, 02:52 PM
You can use Google Web Font to get more fonts but user don't have to install any font on there computers. I tested and it works fine :D.
But Using many font styles can slow down your webpage, so only select the font styles that you actually need on your webpage.
**Template issue at General Settings
Edit modifyoptions_bop5usernamefont (Modify User Option Templates > modifyoptions_bop5usernamefont) and then delete </div> at the top of the template will fix it.
FReeSTER
10-19-2011, 07:29 PM
You can use Google Web Font to get more fonts but user don't have to install any font on there computers. I tested and it works fine :D.
But Using many font styles can slow down your webpage, so only select the font styles that you actually need on your webpage.
**Template issue at General Settings
Edit modifyoptions_bop5usernamefont (Modify User Option Templates > modifyoptions_bop5usernamefont) and then delete </div> at the top of the template will fix it.
hmmm I tried few fonts from google web fonts and they dont seen to be working :(
BirdOPrey5
10-20-2011, 09:57 AM
I just played with Google Web Fonts - very interesting.
Google will give you code like:
<link href='http://fonts.googleapis.com/css?family=Vast+Shadow' rel='stylesheet' type='text/css'>
Put that in your headinclude template.
Then add the font to your font list in the mod settings, changing the plus signs (+) into spaces. So "Vast Shadow" from this example.
Kraxell
01-17-2012, 05:21 PM
Hello,
do u can add the option for colors?
CharlieDelta
01-18-2012, 01:35 AM
Edit plugin Username Markup Override at hook fetch_musername and change $bop_username .= '">'.$user['username'].'</span>';
to
$bop_username .= '">'.$user['musername'].'</span>';
Thank you. Worked great!
BirdOPrey5
01-18-2012, 11:08 PM
Hello,
do u can add the option for colors?
Font Color is only an option in the Gold version as talked about in the top/first post. It will not be part of the free/light version.
hacker_
03-28-2012, 08:48 PM
Its work in 4.1.11? and with google fonts?
BirdOPrey5
03-28-2012, 10:25 PM
It works in 4.1.11 yes.
It can work with Google Fonts but you have to add the code for the Google Fonts to the templates yourself- this doesn't automatically fetch a google font.
Nirjonadda
04-20-2012, 04:18 PM
Posts count Required to Username Color, Size, and Font selection per User...you can add This Options in gold version ?
BirdOPrey5
04-20-2012, 05:26 PM
A separate post count for each option, or just a post count to use the mod at all?
Nirjonadda
04-20-2012, 05:39 PM
"Option based on Post Count" Permissions Based on Post Count...Post count user must have before can Username Color, Size, and Font selection .
BirdOPrey5
04-20-2012, 05:45 PM
Sounds simple enough- I'll put it in the next update. (Both versions)
Nirjonadda
04-20-2012, 05:51 PM
Ok i am waiting for next update.I also really need it . I will Buy gold version.
Pm or replay me for how much you can do this and for how fast?
BirdOPrey5
07-09-2013, 12:54 AM
Critical Update - Version 1.7.7 (Security Update Only)
Please upgrade as soon as possible.
CharlieDelta
07-09-2013, 05:07 PM
Hi BOP,
Since the last update I now have some html color markups missing in areas that were visible prior to the update. The color changes I am doing through usergroup username html markup and additional.css
BirdOPrey5
07-09-2013, 05:51 PM
If you previous made the manual edit before to add the font in addition to your custom HTML markup as opposed to instead of you must re-make it after the update.
To re-do the edit,
Go to the Admin CP -> Plugin Manager.
Go to this mod and edit the Username Markup Override plugin.
Find this line near the bottom:
$bop_username .= '">'.$user['username'].'</span>';
and just add an m in front of username as so:
$bop_username .= '">'.$user['musername'].'</span>';
And it will apply both your HTML markup and the font customization.
I still owe an updated to make this a proper option in Admin CP, will get to is soon. Also will update with a post count permission. Both will be part of 1.8.0.
BirdOPrey5
07-15-2013, 04:36 PM
Updated to version 1.8.0
Added option for minimum post count to use mod (if you want to make users have 100 posts for example, in addition to usergroup restrictions)
Added option to use existing username HTML markup, if any, provided in the Usergroup Manager, in addition to the customization chosen via this mod. Previous this mod would replace any existing HTML markup completely. Now you can choose.
ForceHSS
10-16-2013, 01:16 AM
After testing this all fonts seem to just make the letters in the name a bit smaller that's it tested in 4.2.1 and 4.2.2 so going to remove
Dwarden
10-31-2013, 08:08 PM
after update to vB 4.2.2 the setting for group rights ceased to work
(i select groups, push save and it auto cleans any group and that's it)
so i was forced to disable it
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.