vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 2.x Beta Releases (https://vborg.vbsupport.ru/forumdisplay.php?f=5)
-   -   User Default Font/Color/Size hack (https://vborg.vbsupport.ru/showthread.php?t=49398)

Zelda-King 02-27-2003 03:34 PM

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.

TalkHardRandy 02-27-2003 03:58 PM

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.

TalkHardRandy 02-27-2003 04:57 PM

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

Zelda-King 02-27-2003 05:31 PM

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

TalkHardRandy 02-27-2003 05:36 PM

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';

Zelda-King 02-27-2003 05:54 PM

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

TalkHardRandy 02-27-2003 06:21 PM

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.

Zelda-King 02-27-2003 06:26 PM

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.

Boofo 02-27-2003 07:44 PM

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.

TalkHardRandy 02-27-2003 08:27 PM

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.


All times are GMT. The time now is 02:40 AM.

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.01091 seconds
  • Memory Usage 1,757KB
  • 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_code_printable
  • (4)bbcode_php_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)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