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

Reply
 
Thread Tools
Username Font Colour Details »»
Username Font Colour
Version: 1.00, by flame flame is offline
Developer Last Online: Jan 2016 Show Printable Version Email this Page

Version: 2.2.x Rating:
Released: 02-15-2003 Last Update: Never Installs: 21
 
No support by the author.

This addon was requested Here

Basically wot this addon does is allow the user to buy a different font colour for his their Username.

It can also be mixed with the current "glow" and "italic" features that Lesane has already added to the store.

upload storeupdate.php to you admin dir and run via browser this will make the necessary database changes.
ive included a updated store.php with all the file changes involved ready to go. Remember and add the templates (preferably with Firefly's TBS)

Also Read the instructions.txt file as it has a file edit to be done before this addon will work.

Hope you enjoy

Flame

Show Your Support

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

Comments
  #2  
Old 02-16-2003, 07:07 AM
Savant's Avatar
Savant Savant is offline
 
Join Date: Oct 2002
Posts: 24
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

well it.. doesn't crash, but so far the only color that shows up is my default forum text color (a light blue) even if i put in #ffffff or #000000

and the hex color chooser dilly doesn't work... it pops up but clicking on the colors doesnt do much. Actually does nuthin heh. Not that it matters since the only available color at this point is my text color, but another lil bug

Anyhow, nothing terrible happens, but its not workin fer me yet :P :bunny:
Reply With Quote
  #3  
Old 02-16-2003, 03:42 PM
flame flame is offline
 
Join Date: Jan 2002
Posts: 28
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Did you run the file edit in the instructions.txt?

This is the only problem i can figure out it can be

Flame
Reply With Quote
  #4  
Old 02-16-2003, 05:11 PM
LightBringer's Avatar
LightBringer LightBringer is offline
 
Join Date: Oct 2001
Posts: 138
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I'm getting a database error when trying to run the script, is there any way you can give me the sql query so I can make the changes by hand? Thanks
Reply With Quote
  #5  
Old 02-16-2003, 07:01 PM
mx3's Avatar
mx3 mx3 is offline
 
Join Date: Nov 2002
Location: prescott valley, az
Posts: 278
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

could you like include in the instructions what to do to store.php? i already have changed it for other addons and i don't want to lose those...
Reply With Quote
  #6  
Old 02-16-2003, 07:48 PM
Savant's Avatar
Savant Savant is offline
 
Join Date: Oct 2002
Posts: 24
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

yup, i did all the instructions... went back over em, everything looks in order.. but still no colors if anyone gets this workin, lemme know and il try over again :laugh:
Reply With Quote
  #7  
Old 02-18-2003, 02:01 PM
JHSoundZ's Avatar
JHSoundZ JHSoundZ is offline
 
Join Date: Sep 2002
Posts: 41
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

cool for making this hack for us....
but doesnt seem to be working for ppl

also as mx3 sed if yaz fix it or whatever cud you please include insturctions on changes to store.php ... cause mine has quite a few of addons.
Reply With Quote
  #8  
Old 02-18-2003, 02:07 PM
Dean C's Avatar
Dean C Dean C is offline
 
Join Date: Jan 2002
Location: England
Posts: 9,071
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

How come i never saw these hacks two days ago?

THis is odd. Nice hack nevertheless buddy

Regards

- miSt
Reply With Quote
  #9  
Old 02-18-2003, 09:49 PM
flame flame is offline
 
Join Date: Jan 2002
Posts: 28
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

k here are all the file changes needed.

in store.php find
PHP Code:
store_sticky,store_italic'; 
And replace with
PHP Code:
store_sticky,store_italic,store_fcolour,store_fcolour_verify,store_fcolour_changed'; 
Find:
PHP Code:
global $points$usertitle$username$userid$storename$pointname$glow$italic
And replace with
PHP Code:
global $points$usertitle$username$userid$storename$pointname$glow$italic$fcolour
Find:
PHP Code:
$username=$user[username]; 
And Below it Add
PHP Code:
$fcolour=$user[fcolour]; 
Find:
PHP Code:
if ($glow!="" AND $italic=="1") {
       
$username="<font style=\"filter:glow(color=$glow, strength=3);height=1px\"><i>$username</i></font>";
       } elseif (
$glow!="") {
       
$username="<font style=\"filter:glow(color=$glow, strength=3);height=1px\">$username</font>";
       } elseif (
$italic=="1") {
       
$username="<i>$username</i>";
       } else {
        echo 
"";
       } 
And replace with:
PHP Code:
if ($glow!="" AND $italic=="1" AND $fcolour!="") {
       
$username="<font color=\"$fcolour\" style=\"filter:glow(color=$glow, strength=3);height=1px\"><i>$username</i></font>";
       } elseif (
$glow!="" AND $fcolour!="") {
       
$username="<font color=\"$fcolour\" style=\"filter:glow(color=$glow, strength=3);height=1px\">$username</font>";
       } elseif (
$italic=="1" AND $fcolour!="") {
       
$username="<font color=\"$fcolour\"<i>$username</i></font>";
        } elseif (
$glow!="" AND $italic=="1") {
        
$username="<font style=\"filter:glow(color=$glow, strength=3);height=1px\"><i>$username</i></font>";
          } elseif (
$glow!="") {
        
$username="<font style=\"filter:glow(color=$glow, strength=3);height=1px\">$username</font>";
} elseif (
$fcolour!="") {
        
$username="<font color=\"$fcolour\">$username</font>";
} elseif (
$italic=="1") {
        
$username="<i>$username</i>";
} else {
        echo 
"";
       } 
Find:
PHP Code:
// oweee, 1252 Lines Of Code And It keeps Growing...... 
And Above it add:
PHP Code:
// ###################### Start font colour ###########
if ($action=="fcolour") {

$contest $DB_site->query_first("SELECT * FROM store WHERE action='fcolour'");
$title=$contest[title];
$cost=$contest[costs];

if (
$cost>$points) {
eval(
"standarderror(\"".gettemplate('store_error')."\");");
}

if (
$glow!="") {
       eval(
"dooutput(\"".gettemplate("store_fcolour_change")."\");"); 
       } else {
eval(
"dooutput(\"".gettemplate("store_fcolour")."\");");
}

}
// ###################### Start font colour Verify #######################
if ($action=="fcolourverify") {

  
$contest $DB_site->query_first("SELECT * FROM store WHERE action='fcolour'");
  
$storeid=$contest[id];
  
$cost=$contest[costs];
  
$need=$points $cost;
  
if (
$cost>$points) {
eval(
"standarderror(\"".gettemplate('store_error')."\");");
}

eval(
"dooutput(\"".gettemplate("store_fcolour_verify")."\");");
}

// ###################### Start font colour Change #######################
if ($action=="fcolourchanged") {

if (
$fcolour!="") {
$changeusernow $DB_site->query("UPDATE user SET storep=storep-$cost, fcolour='$nfcolour' WHERE userid='$bbuserinfo[userid]'");
$changestorenow $DB_site->query("UPDATE store SET sold=sold+1 WHERE id='$storeid'");
$storequant $DB_site->query_first("SELECT * FROM store");
if (
$storequant[quantity]=='0') {
$ilove++++++s="";
} elseif (
$storequant[quantity]=='1') {
$closequan $DB_site->query("UPDATE store SET quantity='0', ok='N' WHERE id='$storeid'");
} else {
$updatequan $DB_site->query("UPDATE store SET quantity=quantity-1 WHERE id='$storeid'");
}
$moneycheck $DB_site->query_first("SELECT storep FROM user WHERE userid='$bbuserinfo[userid]'");
$money $moneycheck[storep];
$whath="Changed";
$what="changed";
eval(
"dooutput(\"".gettemplate("store_fcolour_changed")."\");");
} else {
$changeusernow $DB_site->query("UPDATE user SET storep=storep-$cost, fcolour='$nfcolour' WHERE userid='$bbuserinfo[userid]'");
$changestorenow $DB_site->query("UPDATE store SET sold=sold+1 WHERE id='$storeid'");
$storequant $DB_site->query_first("SELECT * FROM store");
if (
$storequant[quantity]=='0') {
$ilove++++++s="";
} elseif (
$storequant[quantity]=='1') {
$closequan $DB_site->query("UPDATE store SET quantity='0', ok='N' WHERE id='$storeid'");
} else {
$updatequan $DB_site->query("UPDATE store SET quantity=quantity-1 WHERE id='$storeid'");
}
$moneycheck $DB_site->query_first("SELECT storep FROM user WHERE userid='$bbuserinfo[userid]'");
$money $moneycheck[storep];
$whath="Added";
$what="added";
eval(
"dooutput(\"".gettemplate("store_fcolour_changed")."\");");
}
}

// ###################### Start font colour Delete Verify #######################
if ($action=="fcolourdelete") {

  
$contest $DB_site->query_first("SELECT id,costs FROM store WHERE action='fcolour'");
  
$storeid=$contest[id];
  
$cost=$contest[costs];
  
$need=$points $cost;

if (
$cost>$points) {
eval(
"standarderror(\"".gettemplate('store_error')."\");");
}

eval(
"dooutput(\"".gettemplate("store_fcolour_delete")."\");");
}

// ###################### Start Delete font colour #######################
if ($action=="deletefcolour") {

$changeusernow $DB_site->query("UPDATE user SET storep=storep-$cost, fcolour='' WHERE userid='$bbuserinfo[userid]'");
$moneycheck $DB_site->query_first("SELECT storep FROM user WHERE userid='$bbuserinfo[userid]'");
$money $moneycheck[storep];
eval(
"dooutput(\"".gettemplate("store_fcolour_deleted")."\");");

Thats All for Store.php

In admin/functions.php
Find:
PHP Code:
if ($post[glow]!="" AND $post[italic]=="1") {
       eval(
"\$storeextraglow = \"".gettemplate('store_extra_glow_italic')."\";");  
       } elseif (
$post[glow]!="") {
       eval(
"\$storeextraglow = \"".gettemplate('store_extra_glow')."\";");
       } elseif (
$post[italic]=="1") {
       
$storeextraglow="<i>$post[username]</i>";
       } else {
        
$storeextraglow="$post[username]";
       } 
And Replace with:
PHP Code:
if ($post[glow]!="" AND $post[italic]=="1" AND $post[fcolour]!="") {
       eval(
"\$storeextraglow = \"".gettemplate('store_extra_glow_italic_fcolour')."\";");
          } elseif (
$post[glow]!="" AND $post[fcolour]!="") {
             eval(
"\$storeextraglow = \"".gettemplate('store_extra_glow_fcolour')."\";");
          } elseif (
$post[italic]=="1" AND $post[fcolour]!="") {
             eval(
"\$storeextraglow = \"".gettemplate('store_extra_italic_fcolour')."\";");
          } elseif (
$post[glow]!="" AND $post[italic]=="1") {
             eval(
"\$storeextraglow = \"".gettemplate('store_extra_glow_italic')."\";");  
          } elseif (
$post[glow]!="") {
         eval(
"\$storeextraglow = \"".gettemplate('store_extra_glow')."\";");
      } elseif (
$post[fcolour]!="") {
         eval(
"\$storeextraglow = \"".gettemplate('store_extra_fcolour')."\";");
      } elseif (
$post[italic]=="1") {
       
$storeextraglow="<i>$post[username]</i>";
       } else {
        
$storeextraglow="$post[username]";
       } 
Save and upload Both Files.

The database queries as requested are:
PHP Code:
ALTER TABLE user ADD fcolour varchar(255NOT NULL DEFAULT '' 
And
PHP Code:
INSERT INTO store VALUES (20'fcolour''Add A Font Colour To Username''200''0''colour.gif''With this action you can add an attractive Font color to your username wich you can define yourself. If you have already a Font Colour then you can change it here aswell.''Y','0' 
And obviously upload the templates from post #1 of this thread

Hope this helps thoses ppl that couldnt get the install file to work

Flame
Reply With Quote
  #10  
Old 02-19-2003, 01:19 PM
Limitter Limitter is offline
 
Join Date: Aug 2002
Location: Germany
Posts: 28
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Must edit the "Picker.html" ???

I could not select, i had the file with the Varuiable

PHP Code:
function passColor(color) {
    
window.opener.document.name.elements.nfcolour.value color
again provides

Greetz and thx for this nice addon

L.
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 06:23 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.05130 seconds
  • Memory Usage 2,393KB
  • Queries Executed 23 (?)
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
  • (15)bbcode_php
  • (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
  • (2)pagenav_pagelink
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (9)postbit
  • (10)postbit_onlinestatus
  • (10)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