View Full Version : Username Font Colour
flame
02-15-2003, 10:00 PM
This addon was requested Here (https://vborg.vbsupport.ru/showthread.php?s=&threadid=47577)
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
Savant
02-16-2003, 07:07 AM
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:
flame
02-16-2003, 03:42 PM
Did you run the file edit in the instructions.txt?
This is the only problem i can figure out it can be
Flame
LightBringer
02-16-2003, 05:11 PM
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 :)
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...
Savant
02-16-2003, 07:48 PM
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:
JHSoundZ
02-18-2003, 02:01 PM
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.
Dean C
02-18-2003, 02:07 PM
How come i never saw these hacks two days ago?
THis is odd. Nice hack nevertheless buddy :)
Regards
- miSt
flame
02-18-2003, 09:49 PM
k here are all the file changes needed.
in store.php find
store_sticky,store_italic';
And replace with
store_sticky,store_italic,store_fcolour,store_fcol our_verify,store_fcolour_changed';
Find:
global $points, $usertitle, $username, $userid, $storename, $pointname, $glow, $italic;
And replace with
global $points, $usertitle, $username, $userid, $storename, $pointname, $glow, $italic, $fcolour;
Find:
$username=$user[username];
And Below it Add
$fcolour=$user[fcolour];
Find:
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:
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:
// oweee, 1252 Lines Of Code And It keeps Growing......
And Above it add:
// ###################### 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:
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:
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:
ALTER TABLE user ADD fcolour varchar(255) NOT NULL DEFAULT ''
And
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
Limitter
02-19-2003, 01:19 PM
Must edit the "Picker.html" ???
I could not select, i had the file with the Varuiable
function passColor(color) {
window.opener.document.name.elements.nfcolour.valu e = color;
again provides
Greetz and thx for this nice addon
L.
flame
02-19-2003, 01:52 PM
Thx Limitter, i fogot to add that part :)
Glad you like it
my members are trying to save their points for all the features lol (doesnt help that they have to use their points to post new threads in certain forums :)
Flame
sabret00the
02-27-2003, 11:45 AM
does this work now?
Originally posted by sabret00the
does this work now?
coudn't run the second database queiry
Error
SQL-query :
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'
MySQL said:
You have an error in your SQL syntax near '' at line 1
Ice Effect69
04-01-2003, 09:48 PM
I cant get the colors to show up in the posts, i got the ticker to work though.. Would it be because I use a style?
sabret00the
04-02-2003, 09:08 AM
the query you need is on the recode of this hack i done you can find it in help me finish, just do a search for my posts and you'll find it
sabret00the
04-02-2003, 09:14 AM
Yesterday at 11:48 PM Ice Effect69 said this in Post #15 (https://vborg.vbsupport.ru/showthread.php?postid=376575#post376575)
I cant get the colors to show up in the posts, i got the ticker to work though.. Would it be because I use a style?
did you make the specified changes to the post bit?
Weasel
04-11-2003, 02:56 PM
What are all the references to vag-inas for in store.php?
This code breaks because this forum replaces it with plus signs???
Weasel
04-11-2003, 03:09 PM
The person who wrote this should be ashamed, it doesn't even work out of the box. I had to go and change this:
<fontcolor="blablah">
to this:
<font color="blahblah">
everywhere :(
Zelda-King
04-22-2003, 03:44 PM
I'd like this hack once it's released with a fully functional 'HTML colour' box and the above error is remedied. At the moment I click on it and nothing happens.
this is a HORRIBLY coded hack, anyone who hasn't installed it, dont!!!!
Its not worth the trouble.
why is it still here then? Someone needs to move this to beta or something..
sabret00the
08-06-2003, 05:07 PM
i agree, i've waited for it to be fixed for ages, and it still don't work -_-"
MaDCaT75
08-06-2003, 10:51 PM
Still waiting......
MaDCaT75
08-12-2003, 02:55 AM
and still waiting.....
MaDCaT75
08-15-2003, 04:07 AM
where is Flame!?!?
MaDCaT75
08-16-2003, 08:48 AM
i give up
Floris
08-16-2003, 08:50 AM
madcat, no need to uselessly bump the thread.
MaDCaT75
08-16-2003, 06:27 PM
but I bumped it when it fell off page 1!!
jayneblaze
08-21-2003, 03:48 PM
so no luck with this one?
MaDCaT75
08-22-2003, 04:14 AM
Yesterday at 05:48 PM jayneblaze said this in Post #30 (https://vborg.vbsupport.ru/showthread.php?postid=427654#post427654)
so no luck with this one?
Nope looks like the author abandoned us for good.
MaDCaT75
09-22-2003, 08:22 AM
I'm still waiting for a new release......
MaDCaT75
09-23-2003, 05:16 AM
and still waiting.....
mfacer
11-04-2003, 08:23 AM
booger... just installed this and read all the threads complaining AFTERWARDS!!
gonna have to undo everything now
:(
dstruct2k
11-18-2003, 06:36 PM
Hey it works fine... Just replace all the "++++++" in the php with "v.a.g.i.n.a" (no periods) and add a ) to the end of that broken query... I think I might fix the bugs and repack this hack in a new zip with WORKING instructions.
MaDCaT75
11-19-2003, 03:11 AM
Meh.... I paid $10 to have someone professionally make me one.
dave777
12-02-2003, 02:09 AM
Can someone please write a 100% working version of this hack?
MaDCaT75
12-02-2003, 06:08 AM
Can someone please write a 100% working version of this hack?
I got one working but I paid $10 to get mine done :p
MaDCaT75
12-21-2003, 05:24 PM
Will this be updated for the store 3.0? Please I need it!
dstruct2k
03-17-2004, 04:59 PM
Must edit the "Picker.html" ???
I could not select, i had the file with the Varuiable
function passColor(color) {
window.opener.document.name.elements.nfcolour.valu e = color;
again provides
Greetz and thx for this nice addon
L.Now you won't have a picker for nameglow.
Better....
Replacefunction passColor(color) {
window.opener.document.name.elements.nglow.value = color;
}Withfunction passColor(color) {
window.opener.document.name.elements.nglow.value = color;
window.opener.document.name.elements.nfcolour.valu e = color;
}
You might get Java errors, but it'll work for both Nameglow and Namecolor! :)
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.