Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 2.x > vBulletin 2.x Beta Releases
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
User Default Font/Color/Size hack Details »»
User Default Font/Color/Size hack
Version: 1.00, by TalkHardRandy TalkHardRandy is offline
Developer Last Online: Nov 2004 Show Printable Version Email this Page

Version: 2.2.x Rating:
Released: 02-25-2003 Last Update: Never Installs: 22
Is in Beta Stage  
No support by the author.

First hack... please be gentle :

WHAT IT DOES:

It allows the user to specify in their profile what size, color and font that they wish to use in all their posts. This is esentially the same as surrounding stuff with SIZE, COLOR, FONT, but makes it easier.

It also uses the vbcode templates already in the system, so users can select from any of the fonts & colors you have already defined. This avoids users inputing colors that don't exist and fonts that no one else has on their systems.

INSTALLABLES

3 file mods
4 template adds
3 template mods

PROPS

Palmer ofShinra inspired the original version here, so massive props to him. I wanted to take his idea and make it more user friendly (and was tired of trying to explain to people why 'puke green' didn't work as a color).

Also, every other hacker out here (Lesane, Erwin, FireFly, Xenon, C.Birch, futureal, and a hundred others) for busting their butts and putting hacks out and for saying that if you want to do something, learn to do it. Inspiration at its finest.

BUGS

If you run TomBot, TomBot has a problem with the FONT/COLOR/SIZE tags. The fix is two posts below

Okay... let me know

FIXES

1) Fixed Spelling of 'Verdana' - Thanks Vivi!
2) Fixed for Multiple Styles - Thanks Zelda!
3) Added & fixed user ability to use default via ON/OFF - Again, Thanks Zelda!
4) Added ability to remember defaults.

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #12  
Old 02-27-2003, 03:34 PM
Zelda-King's Avatar
Zelda-King Zelda-King is offline
 
Join Date: Nov 2002
Location: London, England
Posts: 674
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
I'm going to put an on/off button in there so people can select which features they wish to use.
As long as the default for the ON/OFF button is 'OFF' so people's posts don't override various theme colour defaults unless they actually update their profile to do so, then that'd suit me fine.

Actually my default theme text colour IS black so it's not much problem for me personally.
Reply With Quote
  #13  
Old 02-27-2003, 03:58 PM
TalkHardRandy's Avatar
TalkHardRandy TalkHardRandy is offline
 
Join Date: Jan 2002
Posts: 69
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Danke Mist...

For the sake of sanity, it's an either or deal... you can use the defaults or you can specify your own... default will be set to 'ON', so all it does is post the $message w/o the extras.
Reply With Quote
  #14  
Old 02-27-2003, 04:57 PM
TalkHardRandy's Avatar
TalkHardRandy TalkHardRandy is offline
 
Join Date: Jan 2002
Posts: 69
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Okay... I've updated the hack.

It now give an option to use the forum defaults via an ON/OFF. If you have multiple styles, this should clean it up. But, I don't run multiple styles, so I can't be 100% sure. Plus, I think I'm figuring out how to keep the default values from reseting...
Reply With Quote
  #15  
Old 02-27-2003, 05:31 PM
Zelda-King's Avatar
Zelda-King Zelda-King is offline
 
Join Date: Nov 2002
Location: London, England
Posts: 674
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I'm getting this database error when I update my profile:

Database error in vBulletin 2.2.9:

Invalid SQL: UPDATE user SET birthday='0',signature='(Sig)',customtitle='1',use rtitle='(Rank)',email='(email)',parentemail='',cop pauser='0',homepage='homepage',icq='',aim='',yahoo ='',usergroupid='6',default_fcs='1',post_size='2', post_font='times new roman',post_color='black' WHERE userid='1'
mysql error: Unknown column 'default_fcs' in 'field list'

mysql error number: 1054

Date: Thursday 27th of February 2003 12:20:27 PM
Script: http://www.gamercrossfire.net/bb/bb/member.php
Referer:


Seems to be requesting the wrong URL. :/

Anyway, at least my posts were default colour before I updated it this time.
Reply With Quote
  #16  
Old 02-27-2003, 05:36 PM
TalkHardRandy's Avatar
TalkHardRandy TalkHardRandy is offline
 
Join Date: Jan 2002
Posts: 69
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

The SQL query didn't take. It's because you already have three of the four fields in there. Run this query instead:
Code:
ALTER TABLE `user` ADD `default_fcs` INT( 1 ) DEFAULT '1' NOT NULL AFTER `inforum';
Reply With Quote
  #17  
Old 02-27-2003, 05:54 PM
Zelda-King's Avatar
Zelda-King Zelda-King is offline
 
Join Date: Nov 2002
Location: London, England
Posts: 674
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

OK, I fixed that.

Now everything stays on default regardless. Either I'm doing something wrong or your PHP code needs an } else { for the default_fcs in newreply.php/newthread.php
Reply With Quote
  #18  
Old 02-27-2003, 06:21 PM
TalkHardRandy's Avatar
TalkHardRandy TalkHardRandy is offline
 
Join Date: Jan 2002
Posts: 69
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Okay, you have to go into your profile, turn off the defaults, then select what you want it to change. Save your profile, then try it.

For some reason that I'm still working out, the user selections don't come back as the default values. I'm working on it, however.
Reply With Quote
  #19  
Old 02-27-2003, 06:26 PM
Zelda-King's Avatar
Zelda-King Zelda-King is offline
 
Join Date: Nov 2002
Location: London, England
Posts: 674
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Yeah, whether I turn off the defaults or not now the posts come out default, though before you put the 'default' check in it worked fine.

Then again, if I edit the PHP to
PHP Code:
if ($bbuserinfo[default_fcs]="1") {
        
$message "[color=".$bbuserinfo[post_color]."][font=".$bbuserinfo[post_font]."][size=".$bbuserinfo[post_size]."]".$message."[/size][/font][/color]";

then I get the reverse situation.

I tried putting
PHP Code:
if ($bbuserinfo[default_fcs]="0") {
        
$message "[color=".$bbuserinfo[post_color]."][font=".$bbuserinfo[post_font]."][size=".$bbuserinfo[post_size]."]".$message."[/size][/font][/color]";
} else {
$message "$message";

in newthread/newreply.php but that didn't help.
Reply With Quote
  #20  
Old 02-27-2003, 07:44 PM
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Location: Des Moines, IA (USA)
Posts: 15,776
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Would there be a way to have a testing box so you could compare the board defaults with whatever you picked to see how they look compared to one another? That way you wouldn't have to go all the way to make a post to see how it would look.
Reply With Quote
  #21  
Old 02-27-2003, 08:27 PM
TalkHardRandy's Avatar
TalkHardRandy TalkHardRandy is offline
 
Join Date: Jan 2002
Posts: 69
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

He's right... it doesn't matter if its on or off, it uses whatever you have selected....

EDIT:

Okay, in the newreply & newthread:

change:

PHP Code:
    if ($bbuserinfo['default_fcs']="0") {
        
$message "[color=".$bbuserinfo[post_color]."][font=".$bbuserinfo[post_font]."][size=".$bbuserinfo[post_size]."]".$message."[/size][/font][/color]";
    } 
to

PHP Code:
$usingdefaults="$bbuserinfo[default_fcs]";
if (
$usingdefaults=="0") {
        
$message "[color=".$bbuserinfo[post_color]."][font=".$bbuserinfo[post_font]."][size=".$bbuserinfo[post_size]."]".$message."[/size][/font][/color]";

For some reason, it doesn't like using $bbuserinfo without a variable.

Text file updated... if that gets everyone working, I've got the fix to the defaults.
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 05:31 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.04865 seconds
  • Memory Usage 2,328KB
  • Queries Executed 25 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)bbcode_code
  • (4)bbcode_php
  • (1)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)pagenav_pagelink
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (11)postbit_onlinestatus
  • (11)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.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
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete