Name Change Limit

GhostEU

Hail the king.
Jul 19, 2012
169
18
Hi DevBest,

I want to be able to put a limit on the name change, meaning I coded my page with the name change html, from Navicat > users, + my theme's html coding, but I don't want users keep changing their username everyday or every minute of the day, I want like 3-5 name changes per user,


Thank you if you could help me with this problem
 

Weasel

👄 I'd intercept me
Nov 25, 2011
4,135
2,461
Add a column called "current_changes" or something like that with default value 0.
In the script, add a if statement where you do "if $currentUsernameChangesAmount < 5", otherwise it will not work.

When someone changes his name, get the value from the current_changes colum and do it +1.
 

GhostEU

Hail the king.
Jul 19, 2012
169
18
Holmes, Hold on, what you said 'Add a column called "current_changes" or something like that with default value 0.
In the script, add a if statement where you do "if $currentUsernameChangesAmount < 5", otherwise it will not work." I don't really get what you mean?, are you trying to say me to go into Navicat > Users, then make a new column 'current_changes' and default it with value 0, then what do you mean by script?
 

Weasel

👄 I'd intercept me
Nov 25, 2011
4,135
2,461
Holmes, Hold on, what you said 'Add a column called "current_changes" or something like that with default value 0.
In the script, add a if statement where you do "if $currentUsernameChangesAmount < 5", otherwise it will not work." I don't really get what you mean?, are you trying to say me to go into Navicat > Users, then make a new column 'current_changes' and default it with value 0, then what do you mean by script?
Exactly like I said. Let someone only change his name when the amount of changes is lower then 5, and when they change their name let it set the value of the current_changes column from its previous value with 1 extra (for example from 2 to 3).
 

GhostEU

Hail the king.
Jul 19, 2012
169
18
Okay, so what I got from what you're trying to say is:
1) go to navicat > users. Make new column 'current_changes'
2) make the default to number 0? (or does it need to be 3 due to how many changes that I want to let them have)
3) put the if script into the 'Account Settings' code underneath 'Name Change',
Then all done?
 

GhostEU

Hail the king.
Jul 19, 2012
169
18
Holmes:




Code:
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<title>Jinx - Home</title>
 
<link rel="stylesheet" href="{url}/app/tpl/skins/Habbo/styles/common.css" type="text/css">
<script type="text/javascript" src="{url}/app/tpl/skins/Habbo/js/libs2.js"></script>
<script type="text/javascript" src="{url}/app/tpl/skins/Habbo/js/visual.js"></script>
<script type="text/javascript" src="{url}/app/tpl/skins/Habbo/js/libs.js"></script>
<script type="text/javascript" src="{url}/app/tpl/skins/Habbo/js/common.js"></script>
<script type="text/javascript" src="{url}/app/tpl/skins/Habbo/js/fullcontent.js"></script>
 
<script type="text/javascript">
document.habboLoggedIn = true;
var habboName = "{username}";
var habboId = {userid};
var habboReqPath = "";
var habboStaticFilePath = "{url}/app/tpl/skins/Habbo";
var habboImagerUrl = "[URL]http://www.habbo.com/habbo-imaging/[/URL]";
var habboPartner = "";
var habboDefaultClientPopupUrl = "{url}/client";
window.name = "habboMain";
if (typeof HabboClient != "undefined") {
HabboClient.windowName = "eac955c8dbc88172421193892a3e98fc7402021a";
HabboClient.maximizeWindow = true;
}
</script>
 
<script type="text/javascript" src="{url}/app/tpl/skins/Habbo/js/settings.js"></script>
<link rel="stylesheet" href="{url}/app/tpl/skins/Habbo/styles/settings.css" type="text/css">
 
<!--[if IE 8]>
<link rel="stylesheet" href="{url}/app/tpl/skins/Habbo/styles/ie8.css" type="text/css">
<![endif]-->
<!--[if lt IE 8]>
<link rel="stylesheet" href="{url}/app/tpl/skins/Habbo/styles/ie.css" type="text/css" />
<![endif]-->
<!--[if lt IE 7]>
<link rel="stylesheet" href="{url}/app/tpl/skins/Habbo/styles/ie6.css" type="text/css" />
<script type="text/javascript" src="{url}/app/tpl/skins/Habbo/js/pngfix.js"></script>
<script type="text/javascript">
try { document.execCommand('BackgroundImageCache', false, true); } catch(e) {}
</script>
<style type="text/css">
body { behavior: url({url}/app/tpl/skins/Habbo/js/csshover.htc); }
</style>
<![endif]-->
</head>
 
<body id="profile">
 
<div id="overlay"></div>
<div id="header-container">
<div id="header" class="clearfix">
<h1><a href="{url}/"></a></h1>
<div id="subnavi">
<div id="subnavi-user">
 
</div>
<div id="subnavi-search">
<div id="subnavi-search-upper">
<ul id="subnavi-search-links">
<li><a href="{url}/logout" style="color:#000">Sign Out</a></li>
</ul>
</div>
</div>
<div id="to-hotel">
<a href="{url}/api.php" class="new-button green-button" target="eac955c8dbc88172421193892a3e98fc7402021a" onclick="HabboClient.openOrFocus(this); return false;"><b>Enter Habbot Hotel</b><i></i></a>
</div>
</div>
<ul id="navi">
<li class="metab selected"><strong>{username}</strong><span></span></li>
<li><a href="{url}/community">Community</a><span></span></li>
<li><a href="{url}/credits">Credits</a><span></span></li>
<li><a href="{url}/vip">VIP</a><span></span></li>
</ul>
<div id="habbos-online"><div class="rounded"><span>{online} members online</span></div></div>
</div>
</div>
<div id="content-container">
<div id="navi2-container" class="pngbg">
<div id="navi2" class="pngbg clearfix">
<ul>
<li class=" "><a href="{url}/me">Home</a></li>
<li><a href="{url}/home">My Page</a></li>
<li class=" selected last">Account Settings</li>
</ul>
</div>
</div>
<div id="container">
<div id="content" style="position: relative" class="clearfix">
<div>
<div class="content">
<div class="habblet-container" style="float:left; width:210px;">
<div class="cbb settings">
<h2 class="title">Account Settings</h2>
<div class="box-content">
<div id="settingsNavigation">
<ul>
<li class="selected">My Preferences</li>
</ul>
</div>
</div>
</div>
<div class="cbb habboclub-tryout">
<h2 class="title">Join Habbot Club</h2>
<div class="box-content">
<div class="habboclub-banner-container habboclub-clothes-banner"></div>
<p class="habboclub-header">{hotelName} Club is our VIP members-only club: absolutely no riff-raff admitted! Members enjoy a wide range of benefits, including exclusive clothes, free gifts and an extended Friend List.</p>
<p class="habboclub-link"><a href="{url}/club">Check out {hotelName} Club &gt;&gt;</a></p>
</div>
</div>
</div>
<div class="habblet-container " style="float:left; width: 560px;">
<div class="cbb clearfix settings">
<h2 class="title">Change your profile</h2>
<div class="box-content">
<form method="post" id="profileForm">
<form method="post" id="profileForm">
<h3>Change your username!</h3>
<p>This will allow you to change your username to whatever you pick!</p>
<p><label>Setting:<input type="text" name="username" size="32" maxlength="32" value="{username}" id="avatarmotto"></label></p>
 
 
<h3>Your motto</h3>
<p>Your motto is what other users will see on your {hotelName} Home page and when clicking your user in the Hotel.</p>
<p><label>Motto:<input type="text" name="acc_motto" size="32" maxlength="32" value="{motto}" id="avatarmotto"></label></p>
 
<h3>Block Trading</h3>
<p>Setting to "0" will not allow any user to trade you. Setting to "1" will allow any user to trade you.</p>
<p><label>Setting:<input type="text" name="acc_trade" size="32" maxlength="32" value="{acc_trade}" id="avatarmotto"></label></p>
 
<h3>Block New Friends</h3>
<p>Setting to "1" will not allow any user to add you. Setting to "0" will allow any user to add you.</p>
<p><label>Setting:<input type="text" name="acc_frndreq" size="32" maxlength="32" value="{acc_frndreq}" id="avatarmotto"></label></p>
 
<h3>Online Visibility</h3>
<p>Setting to "1" will not allow other users to notice your online status. Setting to "0" will allow other users to notice your online status. <br/> 0 = ON | 1 = OFF</p>
<p><label>Setting:<input type="text" name="acc_online" size="32" maxlength="32" value="{acc_online}" id="avatarmotto"></label></p>
 
<h3>Follow Ability</h3>
<p>Setting to "1" will not allow your friends to Follow you. Setting to "0" will allow your friends to follow you.<br/> 0 = ON | 1 = OFF</p>
<p><label>Setting:<input type="text" name="acc_follow" size="32" maxlength="32" value="{acc_follow}" id="avatarmotto"></label></p>
 
<h3>Your email address</h3>
<p>Your email address is what you may need to reset your password incase you forget it.</p>
<p><label>Email:<input type="text" name="acc_email" size="32" value="{email}" id="avatarmotto"></p>
<h3>Current Password</h3>
<p>Your current password is the password you use to login to the main website. Only fill this in if you wish to change your login password.</p>
<p><label>Password:<input type="password" name="acc_old_password" value="" id="avatarmotto"></p>
<h3>New Password</h3>
<p>Please only change this field if you wish to change your login password.</p>
<p><label>New Password:<input type="password" name="acc_new_password" value="" id="avatarmotto"></p>
 
<div class="settings-buttons">
<input type="submit" value="Save changes" name="account" class="submit" style="float:right">
</div>
</form>
 
 
 
</div>
</div>
</div>
</div>
</div>
</div>
<script type="text/javascript">
document.observe('dom:loaded', function() {
CurrentRoomEvents.init();
});
</script>
</div>
<script type="text/javascript">if (!$(document.body).hasClassName('process-template')) { Rounder.init(); }</script>
<script type="text/javascript">
HabboView.run();
</script>
<!--[if lt IE 7]>
<script type="text/javascript">
Pngfix.doPngImageFix();
</script>
<![endif]-->
</div>
 
<div id="footer" >
 
</div>
 
</body>
</html>
 

GhostEU

Hail the king.
Jul 19, 2012
169
18
Oh, it wasn't being executed, that is the account.php, to where the 'if' thing should go, I don't know where to put it, I am very confused..
 

Users who are viewing this thread

Top