
BlueDevil23
Members-
Posts
328 -
Joined
-
Last visited
Content Type
Profiles
Forums
Events
Everything posted by BlueDevil23
-
Re: viewuser.php help which one do i need closeing i cant see it :s The one containing the display pic. lol gatherd that much but they are closed, thats what i dont get XD <th width='21%'>Display Pic</th> </tr> <tr> <td>"; if($r['display_pic']) { print "[img={$r[]"; } else { print "This user has no display pic!"; } $sh=($ir['user_level'] >1) ? "Staff Info" : " "; print "</td> </tr> Umm... yeah about that lol. Sorry about that, it snuck past me :P
-
Re: viewuser.php help which one do i need closeing i cant see it :s The one containing the display pic.
-
Re: viewuser.php help Try closing the table data cell.
-
Re: [mccode v2] Anolog Clock Lol, exactly what i was thinking when i read it haha... Come on now... Thats like saying... Wow dude this mod really blows, why even try? but..... ya know, no offence man ...
-
Re: [Other]Game login page[$9.99] Small suggestion... on the login button try something like <input class="loginbutton" type="submit" value="LOGIN" style="cursor:pointer;" /> .... as that as what most would expect, when you hover over it, instead of the normal mouse button btw, im using FF 3
-
Re: Please help What mods did you add before getting this?
-
Re: [mccode v2] Preferences Will probably do it Karlos' way, easy enough.
-
Re: [mccode v2] Preferences I know, I feel stupid, for not even thinking about that lol, I'll have to change the pass later, and disable the password fields.
-
Re: tutorial? Theres a site out there, that focuses on PHP game development, that includes (I believe) all of that, let me see if I can find it.
-
Re: [mccode V2] Attack :) You are in a Battle with ".$attack_person['username']." </center>"; Looks like username to me :)
-
Re: Referal in HOF print "$refwin"; its still gona be the same lol You need.. $refwin = mysql_num_rows(mysql_query("SELECT * FROM referals WHERE refREFER={$r['userid']}")); Lol, I didn't take a look at the code, and assumed he had it right, just glanced at the echo and noticed the single quotes :P
-
Re: Referal in HOF print "$refwin";
-
Re: [mccode v2] Preferences When i click on a link in mainmenu it keeps going back to ajaxprefs.php Good ;) As that is what it is meant to do, the demo account can only navigate to mods that are being shown, and this one being the only one on there, that is the only place you can go :P
-
Re: [Any Mccodes] Mailbox UPDATE! Zebra striping tables is not a new idea ZA :P
-
Re: [mccode v2] Preferences :) Good to hear.
-
Re: [mccode v2] Preferences Thanks, and thanks for helping me on the restrictions ;)
-
Re: [mccode v2] Preferences Ive now got a test site online (with ej.am unfortunately, lol, but thats alright, i develop on localhost, and then move the finished products for demo). So if anyone would like to check out the AJAX version of this mod they can do so by going to ... Here Username: demo Pass: demo I am still refining the mod, and making it even better, and will post that on CE when finished. Ive added progress bars to all the options (except name change, and forum changes(havent got to those yet)), since the last one posted on CE.
-
Re: [mccode v2] User Search Thank you all, I was not aware this did not work in IE :\ very sorry about that all...
-
Re: [REVIEW] Crime-Network.com - Please review! Oh wow.... its easy to tell its the GRPG engine, its looks just like the standard one....I knew it was was the GRPG when I first said, I was simply trying to get some convo going about your game...
-
Re: [mccode v2] Av Bank Well said :lol:
-
Re: [mccode v2] Preferences Thanks ZA :)
-
Re: [mccode v2] Preferences [Continued...] Now for the second file, save this as prefchanges.php (this does matter, so make sure to save it under that exact name.) <?php /*------------------------------------------------ -- Made by BlueDevil23 -- Free mod for the CE Community -- Do not sell! ------------------------------------------------*/ //This top part taken from globals.php /*--------------------------------- -- MCCodes 2.0 -- By Dabomstew ---------------------------------*/ session_start(); ob_start(); if(get_magic_quotes_gpc() == 0) { foreach($_POST as $k => $v) { $_POST[$k]=addslashes($v); } foreach($_GET as $k => $v) { $_GET[$k]=addslashes($v); } } require "global_func.php"; if($_SESSION['loggedin']==0) { header("Location: login.php");exit; } $userid=$_SESSION['userid']; include "config.php"; global $_CONFIG; define("MONO_ON", 1); require "class/class_db_{$_CONFIG['driver']}.php"; $db=new database; $db->configure( $_CONFIG['hostname'], $_CONFIG['username'], $_CONFIG['password'], $_CONFIG['database'], $_CONFIG['persistent']); $db->connect(); $c=$db->connection_id; $set=array(); $settq=$db->query("SELECT * FROM settings"); while($r=$db->fetch_row($settq)) { $set[$r['conf_name']]=$r['conf_value']; } $domain=$_SERVER['HTTP_HOST']; $is=$db->query("SELECT u.*,us.* FROM users u LEFT JOIN userstats us ON u.userid=us.userid WHERE u.userid=$userid"); $ir=$db->fetch_row($is); if($ir['force_logout']) { $db->query("UPDATE users SET force_logout=0 WHERE userid=$userid"); session_unset(); session_destroy(); header("Location: login.php"); exit; } //End Globals if($ir['gender'] == "Male") { $g="Female"; $b="female"; } else { $g="Male"; $b="male"; } //Start name change if ($_POST['key'] == "1111name1111") { if($_POST['newname'] == "") { print "[b]You did not enter a new name.[/b]"; } else { $_POST['newname']=str_replace(array("<", ">", "\\\'"), array("<", ">", "'"), $_POST['newname']); $db->query("UPDATE users SET username='{$_POST['newname']}' WHERE userid=$userid"); print "<big>[b]Username changed![/b]</big> [b]New Name: [/b][i]{$_POST['newname']}"; } } //End name change //Start pass change if ($_POST['key'] == "2222pass2222") { if(md5($_POST['oldpw']) != $ir['userpass']) { print "[b]The current password you entered was wrong.[b]"; } else if($_POST['newpw'] !== $_POST['newpw2']) { print "[b]The new passwords you entered did not match![/b]"; } else { $db->query("UPDATE users SET userpass=md5('{$_POST['newpw']}') WHERE userid=$userid"); print "<big>[b]Password changed![/b]</big>"; } } //End pass change //Start pass change if ($_POST['key'] == "3333sex3333") { if($_POST['yesNo'] == "yes") { $db->query("UPDATE users SET gender='$g' WHERE userid=$userid"); print "[b]<big>You are now a $b.</big>[/b]"; } else if ($_POST['yesNo'] == "no") { print "[b]Please come back if you ever change your mind.[/b]"; } } //End pass change //Start display pic change if ($_POST['key'] == "4444pic4444") { if($_POST['newpic'] == "") { print "<strong style='padding: 0 5px 0 5px;'>You did not enter a new pic URL.[/b]"; } else { $_POST['newpic']=str_replace('\\\'',''', $_POST['newpic']); $db->query("UPDATE users SET display_pic='{$_POST['newpic']}' WHERE userid=$userid"); print "[img={$_POST[]"; } } //End display pic change //Start forum avatar change if ($_POST['key'] == "5555av5555") { $_POST['forums_avatar']=str_replace(array("<", ">"), array("<", ">"), $_POST['forums_avatar']); $db->query("UPDATE users SET forums_avatar='{$_POST['forums_avatar']}' WHERE userid=$userid"); print "[img={$_POST[]"; } //End forum avatar change //Start forum signature change if ($_POST['key'] == "6666sig6666") { if ($_POST['forums_signature'] == "") { $db->query("UPDATE users SET forums_signature='{$_POST['forums_signature']}' WHERE userid=$userid"); print "[b]<big>You cleared your forum signature</big>[/b]"; } else { $db->query("UPDATE users SET forums_signature='{$_POST['forums_signature']}' WHERE userid=$userid"); print "[b]<big>Here is your new forum signature:</big>[/b] [i]{$_POST['forums_signature']}[/i]"; } } //End forum signature change ?> Enjoy! :)
-
Re: [mccode v2] Preferences Ok here it is AJAX'orized (:lol:) It still looks the same, so I'm not going to post screenshots for this, but you'll have to upload and mess around with it to see it in action. Save this as ajaxprefs.php (doesnt really matter, thats what I called it, while working on it.) <?php /*------------------------------------------------ -- Made by BlueDevil23 -- Free mod for the CE Community -- Do not sell! ------------------------------------------------*/ include "globals.php"; $link = "preferences.php"; //Change this to your old preferences page url print "<noscript> <div style='padding-top: 50px;'></div> <big> [b] You have either turned off Javscript, or your browser doesn't support it. Please go to this link to use the non-Javascript preferences page. [url='$link']Preferences[/url] [/b] </big> <div style='padding-bottom: 500px;'></div> </noscript>"; print <<<EOF1 <html> <head> <style type="text/css"> @import "http://ajax.googleapis.com/ajax/libs/dojo/1.2/dojo/resources/dojo.css"; @import "http://ajax.googleapis.com/ajax/libs/dojo/1.2/dijit/themes/tundra/tundra.css"; @import "http://ajax.googleapis.com/ajax/libs/dojo/1.2/dijit/themes/soria/soria.css"; @import "http://ajax.googleapis.com/ajax/libs/dojo/1.2/dijit/themes/nihilo/nihilo.css"; </style> <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/dojo/1.2/dojo/dojo.xd.js" djConfig="parseOnLoad: true"></script> <script type="text/javascript"> dojo.require("dojo.parser"); dojo.require("dijit.Dialog"); dojo.require("dijit.form.TextBox"); dojo.require("dijit.form.Button"); dojo.require("dijit.form.ValidationTextBox"); dojo.require("dojox.validate.regexp"); dojo.require("dijit.form.Textarea"); dojo.require("dijit.TitlePane"); dojo.require("dijit.form.CheckBox"); </script> <script type="text/javascript"> function changeName() { dojo.xhrPost({ url: "prefchanges.php", load: function(response, ioArgs){ dojo.byId("newName").innerHTML = response; return response; }, error: function(response, ioArgs){ dojo.byId("newName").innerHTML = "An error occurred, with response: " + response; return response; }, form:"namechangeform" }); } </script> <script type="text/javascript"> function changePass() { dojo.xhrPost({ url: "prefchanges.php", load: function(response, ioArgs){ dojo.byId("NewPass").innerHTML = response; return response; }, error: function(response, ioArgs){ dojo.byId("NewPass").innerHTML = "An error occurred, with response: " + response; return response; }, form:"passchangeform" }); } </script> <script type="text/javascript"> function changeSex() { dojo.xhrPost({ url: "prefchanges.php", load: function(response, ioArgs){ dojo.byId("newsex").innerHTML = response; return response; }, error: function(response, ioArgs){ dojo.byId("newsex").innerHTML = "An error occurred, with response: " + response; return response; }, form:"sexchangeform" }); } </script> <script type="text/javascript"> function changePic() { dojo.xhrPost({ url: "prefchanges.php", load: function(response, ioArgs){ dojo.byId("newpic").innerHTML = response; return response; }, error: function(response, ioArgs){ dojo.byId("newpic").innerHTML = "An error occurred, with response: " + response; return response; }, form:"picchangeform" }); } </script> <script type="text/javascript"> function changeAvatar() { dojo.xhrPost({ url: "prefchanges.php", load: function(response, ioArgs){ dojo.byId("newav").innerHTML = response; return response; }, error: function(response, ioArgs){ dojo.byId("newav").innerHTML = "An error occurred, with response: " + response; return response; }, form:"avchangeform" }); } </script> <script type="text/javascript"> function changeSignature() { dojo.xhrPost({ url: "prefchanges.php", load: function(response, ioArgs){ dojo.byId("newsig").innerHTML = response; return response; }, error: function(response, ioArgs){ dojo.byId("newsig").innerHTML = "An error occurred, with response: " + response; return response; }, form:"sigchangeform" }); } </script> <script type="text/javascript"> function stopRKey(evt) { var evt = (evt) ? evt : ((event) ? event : null); var node = (evt.target) ? evt.target : ((evt.srcElement) ? evt.srcElement : null); if ((evt.keyCode == 13) && (node.type=="text")) {return false;} } document.onkeypress = stopRKey; </script> <style type="text/css"> .black {color: #000;} </style> </head> <body class="nihilo"> EOF1; if($ir['gender'] == "Male") { $g="female"; $b="male"; } else { $g="male"; $b="female"; } print <<<EOF2 <div class="black"> <div dojoType='dijit.TitlePane' title='Preferences' style='width:500px; padding-top:25px;'> <div dojoType='dijit.form.DropDownButton'> <span>Sex Change</span> <div dojoType='dijit.TooltipDialog' id='tooltipDlg1' title='Would you like a sex change?'> You are now a $b. Would you like to become a $g instead? <form id='sexchangeform'> <input dojoType='dijit.form.RadioButton' id='yes' name='yesNo' checked='checked' value='yes' type='radio' /> <label for='yes'> Yes </label> <input dojotype='dijit.form.RadioButton' id='no' name='yesNo' value='no' type='radio' /> <label for='no'> No </label> <button dojoType='dijit.form.Button' onClick='changeSex()' style='padding-left:3px;'>Submit</button> <input name='key' type='hidden' value='3333sex3333' onFocus='this.blur()'/> </form> <div id='newsex'></div> </div> </div> <div dojoType="dijit.form.DropDownButton"> <span>Password Change</span> <div dojoType="dijit.TooltipDialog" id="tooltipDlg2" title="Do you need to change your password?"> <form id="passchangeform"> <table> <tr> <td><label for="cpassword">Current Password</label></td> <td><input dojoType=dijit.form.TextBox type="password" name="oldpw" id="cpassword"></td> </tr> <tr> <td><label for="npassword">New Password</label></td> <td><input dojoType=dijit.form.TextBox type="password" name="newpw" id="npassword"></td> </tr> <tr> <td><label for="conpassword">Confirm Password</label></td> <td><input dojoType=dijit.form.TextBox type="password" name="newpw2" id="conpassword"></td> </tr> <tr> <td colspan="2" align="center"> <button dojoType="dijit.form.Button" onClick="changePass()" style="text-align: center;">Submit</button> </td> </tr> </table> <input name="key" type="hidden" value="2222pass2222" onFocus="this.blur()" /> </form> <div id="NewPass"></div> </div> </div> <div dojoType='dijit.form.DropDownButton'> <span>Name Change</span> <div dojoType='dijit.TooltipDialog' id='tooltipDlg3' title='Do you need to change your username?'> <form id='namechangeform'> <table> <tr> <td><label for='nname'>New Name</label></td> <td><input dojoType=dijit.form.TextBox type='text' name='newname' id='newname' /></td> </tr> <tr> <td colspan='2' align='center'> <div dojoType='dijit.form.Button' onClick='changeName()'>Submit</div> </td> </tr> </table> <input name='key' type='hidden' value='1111name1111' onFocus='this.blur()' /> </form> <div style='width: 300px;'> Note: Please note that you still use the same name to login, this procedure simply changes the name that is displayed. </div> <div id='newName'></div> </div> </div> <div dojoType="dijit.form.DropDownButton"> <span>Display Pic Change</span> <div dojoType="dijit.TooltipDialog" id="tooltipDlg4" title="So you wanna new pic, huh?"> <table> <tr> <td><div id="newpic">[img={$ir['display_pic']}]</div></td> <td> <form id="picchangeform"> <table> <tr> <td><label for="picchange">New Pic </label></td> <td><input id="picchange" type="text" name="newpic" class="long" dojoType="dijit.form.ValidationTextBox" regExpGen="dojox.regexp.url" trim="true" required="true" invalidMessage="Invalid URL." /> </td> </tr> <tr> <td colspan="2" align="center"> <button dojoType=dijit.form.Button onClick="changePic()">Submit</button> </td> </tr> </table> <input name="key" type="hidden" value="4444pic4444" onFocus="this.blur()" /> </form> </td> </tr> </table> <div style="width: 400px;"> Note: Please note that this must be externally hosted, [url="http://imageshack.us"]ImageShack[/url] is our recommendation. Any images that are not 150x150 will be automatically resized. </div> </div> </div> <div dojoType="dijit.form.DropDownButton"> <span>Forum Info Change</span> <div dojoType="dijit.TooltipDialog" id="tooltipDlg5" title="Change up your forum info"> <table> <tr> <td><div id="newav">[img={$ir['forums_avatar']}]</div></td> <td> <table> <tr> <td> <label for="navatar">New Avatar</label> </td> <td> <form id="avchangeform"> <input id="navatar" type="text" name="forums_avatar" class="long" dojoType="dijit.form.ValidationTextBox" regExpGen="dojox.regexp.url" trim="true" required="true" invalidMessage="Invalid URL." /> <input name="key" type="hidden" value="5555av5555" onFocus="this.blur()" /> </form> </td> </tr> <tr> <td> <label for="nsignature">New Signature</label> </td> <td> <form id="sigchangeform"> <textarea dojoType="dijit.form.Textarea" style="width:300px;" name="forums_signature" id="forumsSig"></textarea> <div dojoType="dijit.Tooltip" connectId="forumsSig" label="You may use BBCode..."></div> <input name="key" type="hidden" value="6666sig6666" onFocus="this.blur()" /> </form> </td> </tr> <tr> <td colspan="2" align="center"> <button dojoType=dijit.form.Button onClick="changeAvatar()" style="padding-left: 75px;">Change Avatar</button> <button dojoType=dijit.form.Button onClick="changeSignature()">Change Signature</button> </td> </tr> </table> </td> </tr> </table> <div style="width: 550px;"> Please note that the avatar must be externally hosted, [url='http://imageshack.us']ImageShack[/url] is our recommendation. Any avatars that are not 100x100 will be automatically resized. </div> <div id="newsig"></div> </div> </div> </div> <div style="text-align: center;"> [size="1"] Made by BlueDevil23[/size] </div> </div> </body> </html> EOF2; $h->endpage(); ?> All I ask is that you leave the "Made by BlueDevil23" in there. (too long for one post...) Contined in next post....
-
[mccode] NEW USERS IMAGE GALLERY FREE!!!!!
BlueDevil23 replied to canibalstew's topic in Free Modifications
Re: [mccode] NEW USERS IMAGE GALLERY FREE!!!!! Very first line, of the very first post.... -
Re: [mccode v2] Preferences Getting back on track here.... I have finished implementing AJAX into this, and it is quite nice, if anyone wants me to post it up, let me know, I'm not going to do it now, as I'm busy.