[REL] [HoloCMS Addon] Updated avatar badge script
This script will give the user the http://hfdxer.co.uk/images/hosting/ACH_AvatarLooks1.gif(ACH_AvatarLooks1) badge when they change their avatar for the first time.
1
Open account.php from your holoCMS directory
2
Search for:
Code:
mysql_query("UPDATE users SET figure = '".$new_figure."', sex = '".$new_gender."' WHERE name = '".$rawname."' LIMIT 1") or die(mysql_error());
Then add this after it:
Code:
$badge_rows = mysql_query("SELECT * FROM users_badges WHERE userid = '".$my_id."' AND badgeid = 'ACH_AvatarLooks1'") or die(mysql_error());
if(mysql_num_rows($badge_rows) == 0) {
mysql_query("INSERT INTO users_badges (userid,badgeid,badge) VALUES ('".$my_id."','ACH_AvatarLooks1','ACH_AvatarLooks1')") or die(mysql_error());
@SendMUSData('UPRS' . $my_id); }
Now whenever the user update their avatar they will receive the avatar looks badge
Re: [ADDON] Updated avatar badge script for HoloCMS
Quote:
Originally Posted by
Superszzz
Ehm this give you evertime that badge,, when you update your figure? You'll should make a checker.
There is one..
$badge_rows = mysql_query("SELECT * FROM users_badges WHERE userid = '".$my_id."' AND badgeid = 'ACH_AvatarLooks1'") or die(mysql_error());
if(mysql_num_rows($badge_rows) == 0) { If there is 0 rows (user dosent allready have a badge) then we will proceed
Re: [ADDON] Updated avatar badge script for HoloCMS
Awesome, thanks for this.
Might use when my hotel is up and runnin' :)
Re: [ADDON] Updated avatar badge script for HoloCMS
Hey whats up dude,
Welcome back,
Still making hotel?
Also,
Nice job on this release.
Re: [ADDON] Updated avatar badge script for HoloCMS
Re: [ADDON] Updated avatar badge script for HoloCMS
Even if the code was useful (why code one achievement without coding them all (which is also pointless because Holograph doesn't support achievements last time I checked)), it would be much faster to do SELECT COUNT(id) FROM tables WHERE item = value then SELECT * and then mysql_num_rows
Re: [ADDON] Updated avatar badge script for HoloCMS
Thanks im using this it seems good
Re: [ADDON] Updated avatar badge script for HoloCMS
Thank's Nice Relase, I'm using in the my hotel.
Re: [ADDON] Updated avatar badge script for HoloCMS
Quote:
Originally Posted by
latest07
There is one..
$badge_rows = mysql_query("SELECT * FROM users_badges WHERE userid = '".$my_id."' AND badgeid = 'ACH_AvatarLooks1'") or die(mysql_error());
if(mysql_num_rows($badge_rows) == 0) { If there is 0 rows (user dosent allready have a badge) then we will proceed
It gives a error:
Parse error: parse error in C:\xampp\htdocs\account.php on line 60 :glare:
Re: [ADDON] Updated avatar badge script for HoloCMS
This Won't Work in V26 or Lower!
Make a tut for Version 26 (Tip Check Tut For info about the Badge fix)
Re: [ADDON] Updated avatar badge script for HoloCMS
iJames already released this ages ago.
good job though
Re: [ADDON] Updated avatar badge script for HoloCMS
LOL give him cred for the script
Re: [ADDON] Updated avatar badge script for HoloCMS
Maybe you should make all the karmabadges work? Or is that a too big question/project :p
Re: [ADDON] Updated avatar badge script for HoloCMS
Re: [ADDON] Updated avatar badge script for HoloCMS
Quote:
Originally Posted by
NitroHabbz
iJames already released this ages ago.
good job though
Quote:
Originally Posted by
xfix
LOL give him cred for the script
This has been made 100% by me..
Re: [ADDON] Updated avatar badge script for HoloCMS
Is it going when you save. I put the code in phpMyAdmin and account.php could help me ...
It appears this code:
Duplicate entry '190-ACH_A' for key 1
Re: [ADDON] Updated avatar badge script for HoloCMS
and for mission:
$badge_rows = mysql_query("SELECT * FROM users_badges WHERE userid = '".$my_id."' AND badgeid = 'ACH_Motto1'") or die(mysql_error());
if(mysql_num_rows($badge_rows) == 0) {
mysql_query("INSERT INTO users_badges (userid,badgeid) VALUES ('".$my_id."','ACH_Motto1')") or die(mysql_error());
}
:D
Re: [REL] [HoloCMS Addon] Updated avatar badge script
Whow! That sounds realy, realy good!
Keep up the good work!