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(255) NOT 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