vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 4.x Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=245)
-   -   End-User Options - Username Font Selection Per User (Light) By BOP5 VB4 (https://vborg.vbsupport.ru/showthread.php?t=271892)

BirdOPrey5 10-11-2011 10:00 PM

Username Font Selection Per User (Light) By BOP5 VB4
 
1 Attachment(s)
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 (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.

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):

PHP Code:

//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:

PHP Code:

//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:

Quote:

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


HTML Code:

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

Quote:

Originally Posted by Sunka (Post 2256409)
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.

Quote:

Originally Posted by mitch84 (Post 2256410)
hi, gold version is free? thx

No, the gold version is not free.

Sunka 10-12-2011 08:31 PM

Quote:

Originally Posted by BirdOPrey5 (Post 2256413)
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...026#post186026


All times are GMT. The time now is 10:05 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01074 seconds
  • Memory Usage 1,759KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_html_printable
  • (2)bbcode_php_printable
  • (4)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.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/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.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
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete