Jump to content
MakeWebGames

Uridium

Members
  • Posts

    2,686
  • Joined

  • Last visited

  • Days Won

    81

Everything posted by Uridium

  1. Re: [Mccodes V2] improved schooling works off clicks not days I may have taken on more than i can chew with this one. it wont beat me however the problems im having are.. 1 = if a session is started after a previous session then they both are renewed after an hour.. Example course 1 started at 1:34 and course 2 started at 1:59 soon as 2:34 is up both sessions are renewed.. but the 1:59 shouldnt be available until 2:59. I dont want to use different types of cron sessions for each so how would i get round this...
  2. Re: [Mccodes V2] improved schooling works off clicks not days   yep the idea came from RV i cant deny that :)
  3. Re: [Mccodes V2] improved schooling works off clicks not days   Thats quite true.. But my way of thinking is a user starts a course for say 15 days them goes away comes back and the course they started has finished which doesnt appeal to me in a way where by you can make users more active if they have tobe online in the game to finish the course...
  4. Whats it do ? I was fed up of waiting days to complete a education course and wanted to make it better or improve on it. The old version had the use of DAYS and if they were long it was a pain in the butt,, so i made this version to work off Clicks you can attend upto 5 schooling sessions and you have 25 clicks perday at your disposal one a session has been clicked it cant be clicked again for an hour. You dont have to take 5 courses you can just take 1 and use the 25 clicks per day on that session. ADMIN PANEL... The Schooling via the admin panel Does the usual things the old one did but now includes Clicks per session instead of days. example you can set a course for 50 clicks so that would be 50 hours before the course was over. However if a users doesnt click on a session it will be as it was before there last click which could last longer if they are not active... Ive got a few bugs to attend to and im adding some more stuff the admin section has been done and the tables for the SQL have also been set out... Will repost on this post with working copy
  5. Re: Ravan Game Engine would be nice to campre dabomstews paypal figures to the amount of mcc's sold ;) that would rectify things
  6. Re: [mccode v2] Themecreator 100% Completed Working Copy heres the delete Theme part taken from the staff_users.php file Ive used this part from the staff_users as it also gives you an option to secure themes so they cannot be deleted and also the confirmation to delete... after the very last ) from the staff_themecreator.php add this..   function deltheme() { global $ir,$c,$h,$ThemeID,$db; if($ir['user_level'] != 2) { die("403"); } $undeletable = array('1','2'); // add more Theme IDs here that cannot be deleted switch ($_GET['step']) { default: echo "<h3>Deleteing Theme</h3> Here you can delete a Theme. <form action='staff_themecreator.php?action=deltheme&step=2' method='post'> Theme: ".Theme_dropdown($c,'Theme')." <input type='submit' value='Delete Theme' /></form> OR enter a Theme ID to Delete: <form action='staff_themecreator.php?action=deltheme&step=2' method='post'> Theme: <input type='text' name='Theme' value='0' /> <input type='submit' value='Delete Theme' /></form>"; break; case 2: $target = $_POST['Theme']; if (!is_numeric($target)) exit; if (in_array($target,$undeletable)) { die(' <center><h1><font color=red>! ATTENTION !</center></font></h1> <center><h2>You have Requested that this theme Cannot be deleted.</h2></center> <h2>Edit the ID number in your staff_themecreator file in order to delete this theme.</h2>'); } $d=$db->query("SELECT ThemeDATA FROM Theme WHERE ThemeID='$target'"); $itemi=$db->fetch_row($d); print "<h3>Confirm</h3> Delete Theme ".$itemi["Theme"]."? <form action='staff_themecreator.php?action=deltheme&step=3' method='post'> <input type='hidden' name='ThemeID' value='$target' /> <input type='submit' name='yesorno' value='Yes' /> <input type='submit' name='yesorno' value='No' onclick=\"window.location='staff_themecreator.php?action=deltheme';\" /></form>"; break; case 3: $target = $_POST['ThemeID']; if (!is_numeric($target)) exit; if (in_array($target,$undeletable)) { die('You cannot delete this Theme.'); } if($_POST['yesorno']=='No') { die("Theme not deleted. [url='staff_themecreator.php?action=deltheme']>Back to main Delete Theme page.[/url]"); } if ($_POST['yesorno'] != ("No" || "Yes")) die('Eh'); $d=$db->query("SELECT ThemeDATA FROM Theme WHERE ThemeID='$target'"); $itemi=$db->fetch_row($d); $db->query("DELETE FROM Theme WHERE ThemeID='$target'"); $db->query("UPDATE users SET ThemeID = '1' where ThemeID='$target'"); echo "Theme {$itemi['Theme']} Deleted. [url='staff_themecreator.php?action=deltheme']>Back to main Delete Theme page.[/url]"; stafflog_add("Deleted Theme {$itemi['Theme']} [{$_POST['ThemeID']}]"); } }   in the above you will notice,,, $undeletable = array('1','2'); // add more Theme IDs here that cannot be deleted you can add the theme ID's that you want to secure... Just underneath   case 'editthemesub': edit_theme_sub(); break;   ADD   case 'deltheme': deltheme(); break;   Now open up smenu.php and add this with the other theme links...   > [url='staff_themecreator.php?action=deltheme']Delete A Theme[/url]   Just to Note this part $db->query("UPDATE users SET ThemeID = '1' WHERE ThemeID='$target'"); Will ensure that when you delete a theme that a user is currently using they will be reset to the Default theme...
  7. Re: [MOD] V2 Drag n Drop User and Admin System... I have released it.. http://criminalexistence.com/ceforums/i ... ic=27161.0
  8. Re: [mccode v2] Banner image selector In the Banner DATA field put the number of the jpg your wanting to use... Example Banner ID = 1 Banner Name = Main image Banner DATA = 1
  9. Re: [mccodes V2] Drag n Drop User Menu + Staff Menus [WORKING COPY] Thanks for that pog but i had issues adding any " after the print statement so reluctantly left it as it was. I also removed your addition to our site IE the youtube posting.
  10. Re: [mccodes V2] Drag n Drop User Menu + Staff Mens   DEMO www.slave-traders.net the NAVIGATION menu is drag n droppable
  11. Re: [mccodes V2] Drag n Drop User Menu + Staff Mens PART 2 Whilst still in mainmenu or smenu add this insdie the first PRINT " statement,   <div id='buttonsStatus' class='statusbox' valign='top'> </div> <ul id='buttons' class='sortable boxy clickable'>   Now usually your menu links woud look like this   > [url='index.php']Back To Game[/url]   but from now on whilst adding a link they will need to be changed,,,   <li itemID='indexpage'>[url='index.php']Home[/url]   NOTE the itemID will need to be altered for each link where the return true; si you can turn your links off by setting it to false.. Your members can now drag and drop their links into any Preference they want. Also as it works of cookies they will stay there until a user decides to alter them..
  12. lets get the cod out of the way first :) Create a folder on your FTP called common call this file lists.css and upload to your common folder,,   ul.sortable li { position: relative; } ul.boxy { list-style-type: none; padding: 0px; margin: 0px; width: 10em; font-size: 13px; font-family: Arial, sans-serif; } ul.boxy li { cursor:move; padding: 2px 2px; border: 1px solid #ccc; background-color: #eee; } .clickable a { display: block; text-decoration: none; cursor: pointer; cursor: hand; } .clickable li:hover { background-color: #f6f6f6; }   Download this ZIP and when unzipped just send the whole folder to your FTP http://www.slave-traders.net/javascript.zip Now open up mainmenu.php or smenu.php and after the first global command add this   echo <<<EOF <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"> <html> <head> <link rel="stylesheet" type="text/css" href="common/lists.css"/> <style type="text/css"> </style> <script language="JavaScript" type="text/javascript" src="javascript/core.js"></script> <script language="JavaScript" type="text/javascript" src="javascript/events.js"></script> <script language="JavaScript" type="text/javascript" src="javascript/css.js"></script> <script language="JavaScript" type="text/javascript" src="javascript/coordinates.js"></script> <script language="JavaScript" type="text/javascript" src="javascript/drag.js"></script> <script language="JavaScript" type="text/javascript" src="javascript/dragsort.js"></script> <script language="JavaScript" type="text/javascript" src="javascript/cookies.js"></script> <script language="JavaScript" type="text/javascript"><!-- var dragsort = ToolMan.dragsort() var junkdrawer = ToolMan.junkdrawer() window.onload = function() { junkdrawer.restoreListOrder("buttons") //junkdrawer.restoreListOrder("twolists1") //junkdrawer.restoreListOrder("twolists2") dragsort.makeListSortable(document.getElementById("buttons"), saveOrder) /* dragsort.makeListSortable(document.getElementById("twolists1"), saveOrder) dragsort.makeListSortable(document.getElementById("twolists2"), saveOrder) */ } function verticalOnly(item) { item.toolManDragGroup.verticalOnly() } function speak(id, what) { var element = document.getElementById(id); //element.innerHTML = 'Clicked ' + what; } function saveOrder(item) { var group = item.toolManDragGroup var list = group.element.parentNode var id = list.getAttribute("id") if (id == null) return group.register('dragend', function() { ToolMan.cookies().set("list-" + id, junkdrawer.serializeList(list), 365) }) } //--> </script> </head> <body> <ul id="numeric"> [/list] </p> <table id="phonetics"> <tr> <td> <ul id="phonetic1" class="boxy"> [/list] </td> <td> <ul id="phonetic2" class="boxy"> [/list] </td> <td> <ul id="phonetic3" class="boxy"> [/list] </td> </tr> </table> <ul id="phoneticlong" class="boxy"> [/list] <ul id="boxes"> [/list] EOF;   Now that youve done that i'll start PART 2
  13. Re: [MOD] V2 Banner image selector   Okies will do
  14. Re: [MOD] V2 Banner image selector FOOTNOTE At the moment only JPG is allowed however you can only use one or the other and you will need to change   [img=banner/{$b['bannerID']}.jpg]   So that it reads gif or png at moment default is JPG. When adding a new banner upload a image as a number example 1.jpg In the creator menu the top and bottom need to be the number of the image youve selected and the center is the title for you image...
  15. Re: [MOD UPDATE} V2 Themecreator 100% Completed Working Copy I was messing around with the CSS files that came with the SMF forums for my theme creator and got some really decent results Granted a few minor adjustments had to be made to the CSS but all in all it Looked a very good layout.....
  16. Re: [MOD] V2 Banner image selector   GOD i could just do with a bacon buttie right now you got my taste buds flowing im off for a fry up lol
  17. Re: [MOD] V2 Banner image selector   Its not just for you to change the banner it also lets the USERS select from different banners that you add to the game.
  18. Coincinding with the theme creator heres the Banner creator version to go with it. SQLS CREATE TABLE IF NOT EXISTS `banner` ( `bannerID` int(11) NOT NULL auto_increment, `bannerTITLE` varchar(255) NOT NULL default 'default', `bannerDATA` varchar(255) NOT NULL default '1', `bannerLOCK` int(11) NOT NULL default '0', PRIMARY KEY (`bannerID`) ) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=19 ; ALTER TABLE `users` ADD `bannerID` varchar(255) NOT NULL default '1' ; Open up global_func and add this after the <? function banner_dropdown($connection,$ddname="banner",$selected=-1) { global $db; $ret="<select name='$ddname' type='dropdown'>"; $q=$db->query("SELECT * FROM banner ORDER BY bannerDATA ASC"); if($selected == -1) { $first=0; } else { $first=1; } while($r=$db->fetch_row($q)) { $ret.="\n<option value='{$r['bannerDATA']}'"; if ($selected == $r['bannerDATA'] || $first == 0) { $ret.=" selected='selected'";$first=1; } $ret.= ">{$r['bannerTITLE']}</option>"; } $ret.="\n</select>"; return $ret; } Now call this file banner.php <?php /* Big Thanks to KILLAH for this Script /* 2008 KILLAH & ILLUSIONS /* Mccodes V2 banner Change */ include("globals.php"); switch($_GET['action']) { case 'accept': accept_banner_begin(); break; default: print "Error: This script requires an action."; break; } function accept_banner_begin() { global $ir,$h; if($_POST['banner']) { $banner = abs(@intval($_POST['banner'])); $rows = mysql_num_rows(mysql_query("SELECT bannerID FROM banner WHERE bannerID=".$banner)); if($rows == 0) { echo 'This banner does not exist. Go AWAY!'; $h->endpage(); exit; } mysql_query("UPDATE users SET bannerID=".$banner." WHERE userid=".$ir['userid']); echo ' <h2>banner Updated </h2> <a href=index.php>[REFRESH banner]</a>'; $h->endpage(); exit; } $q = mysql_query("SELECT bannerID FROM banner"); $r = mysql_fetch_assoc($q); echo ' <h3>Choose Your banner</h3> <form action="banner.php?action=accept" method="post"> banner: '.banner_dropdown($r,'banner').' <input type="submit" value="Choose banner"> </form>'; } $h->endpage(); ?> And call this one staff_bannermaker.php <?php //* V2 banner Maker //* Joint Effort between ILLUSIONS and TONKA //* Free for to those Members of Criminal Existance Forums //* All we ask is that you keep this Notice intact //* BELOW CODES FOR sbanner.php //* > [url='staff_bannermaker.php?action=newbanner']Add banner Link[/url] //* > [url='staff_bannermaker.php?action=editbanner']Edit banner Link[/url] *// include "sglobals.php"; //This contains user stuffs switch($_GET['action']) { case 'newbanner': new_banner_form(); break; case 'newbannersub': new_banner_submit(); break; case 'editbanner': edit_banner_begin(); break; case 'editbannerform': edit_banner_form(); break; case 'editbannersub': edit_banner_sub(); break; default: print "Error: This script requires an action."; break; } function htmlspcl($in) { return str_replace("'", "'", htmlspecialchars($in)); } function new_banner_form() { global $db,$ir, $c; if($ir['user_level'] != 2) { die("403"); } print "Adding a new banner. <form action='staff_bannermaker.php?action=newbannersub' method='post'> banner ID: <input type='text' name='bannerID' /> banner Title: <input type='text' name='bannerTITLE' /> banner DATA <input type='text' name='bannerDATA' /> <input type='submit' value='Create New banner' /></form>"; } function new_banner_submit() { global $db,$ir,$c,$bannerID; if($ir['user_level'] != 2) { die("403"); } if(!isset($_POST['bannerID']) || !isset($_POST['bannerTITLE']) || !isset($_POST['bannerDATA'])) { print "You missed one or more of the required fields. Please go back and try again. [url='staff_bannermaker.php?action=newbanner']> Back[/url]"; $h->endpage(); exit; } $db->query("INSERT INTO banner (bannerID, bannerTITLE, bannerDATA) VALUES( '{$_POST['bannerID']}', '{$_POST['bannerTITLE']}', '{$_POST['bannerDATA']}')"); //$i=mysql_insert_bannerid($c); print " <font size=3>Successfully Created banner {$_POST['bannerTITLE']}</font>"; stafflog_add("Created banner {$_POST['bannerTITLE']} "); } function edit_banner_begin() { global $db,$ir,$c,$h,$userid; if($ir['user_level'] != 2) { die("403"); } print "<h3>Editing banner</h3> <form action='staff_bannermaker.php?action=editbannerform' method='post'> banner: ".banner_dropdown($c,'banner')." <input type='submit' value='Edit banner' /></form> OR enter a banner ID to edit: <form action='staff_bannermaker.php?action=editbannerform' method='post'> banner: <input type='text' name='banner' value='0' /> <input type='submit' value='Edit banner' /></form>"; } function edit_banner_form() { global $db,$ir,$c,$h,$userid; if($ir['user_level'] != 2) { die("403"); } $q = $db->query("SELECT * FROM banner WHERE bannerID='{$_POST['banner']}'"); $r = $db->fetch_row($q); print "<h3>banner Editing System</h3> <form action='staff_bannermaker.php?action=editbannersub' method='post'> banner ID: <input type='text' name='bannerID' value='{$r['bannerID']}' /> banner Title: <input type='text' name='bannerTITLE' value='{$r['bannerTITLE']}' /> banner DATA: <input type='text' name='bannerDATA' value='{$r['bannerDATA']}' /> <input type='submit' value='Edit banner' /></form>"; } function edit_banner_sub() { global $db,$ir,$c,$h,$userid; if($ir['user_level'] != 2) { die("403"); } $go=0; if(!isset($_POST['bannerID'])) { $go=1; } if(!isset($_POST['bannerTITLE'])) { $go=1; } if(!isset($_POST['bannerDATA'])) { $go=1; } if($go) { print "You did not fully fill out the form."; $_POST['banner']=$_POST['bannerID']; edit_banner_form(); } $u=$db->query("SELECT * FROM banner WHERE bannerTITLE='{$_POST['bannerTITLE']}' and bannerID='{$_POST['bannerID']}'"); if($db->num_rows($u) != 0) { print "That banner Name is already in use please choose another."; print " [url='staff_bannermaker.php?action=editbanner']> Back[/url]"; $h->endpage(); exit; } $oq=$db->query("SELECT * FROM banner WHERE bannerID={$_POST['bannerID']}"); $rm=$db->fetch_row($oq); $db->query("UPDATE banner SET bannerTITLE='{$_POST['bannerTITLE']}', bannerDATA='{$_POST['bannerDATA']}' WHERE bannerID={$_POST['bannerID']}"); stafflog_add("Edited banner {$_POST['bannerTITLE']} [{$_POST['bannerID']}]"); print "banner edited...."; } $h->endpage(); ?> Place this link either in your preferences.php or mainmenu.php [url='banner.php?action=accept']Change Banner[/url] and add these 2 to your smenu.php > [url='staff_bannermaker.php?action=newbanner']Add banner Link[/url] > [url='staff_bannermaker.php?action=editbanner']Edit banner Link[/url] Now open up Header.php and look for global $staffpage; and underneath add $q = $db->query("SELECT bannerID FROM users WHERE userid=$userid",$c); $b = $db->fetch_row($q); Still in the header where the [/code] And thats it...
  19. I got bored of altering the layout of menus so it would look right. So i decided to make a Drag n Drop system.... Users and staff can sort their own links out in any order they want.. DEMO http://www.slave-traders.net/heater.php forgot to mention no need for SQLs as the Links will stay as you want them even if you refresh the screen.... UPDATE links can now be disabled and re-enabled by Via the script
  20. Re: [MOD UPDATE} V2 Themecreator 100% Completed Working Copy Once ive picked my Bratt up from school i will post the Banner Creator... Your probably thinking whats the point of it. well in a nutshell The header image is one that is always visible no matter what page is viewed.. so why not show off your header pics for everyone to see and choose from..
  21. Re: if you have a game or have a game in the maiking read on Cheapest hosting ive found is xaamp ;)
  22. Re: [MOD UPDATE} V2 Themecreator 100% Completed Working Copy Hey slow down guys im not that good lol
  23. Re: [MOD UPDATE} V2 Themecreator 100% Completed Working Copy MIX AND MATCH HEADER AND THEME Seeing as the above worked well. I decided to go one step further and Create a Banner editor it does exactly as the script above does but your users can Mix and Match their Theme and Headers to their own Preference... DEMO www.slave-traders.net Click on Preferences then Change Banner.... The Admin System is the same as the Theme Creator,,,,
  24. Re: [MOD UPDATE} V2 Themecreator 100% Completed Working Copy Now that ive had some decent sleep :) and thanks yet again to Killah or otherwise i would still be awake lol I'll be adding some new ADDONS. 1 = Lock Themes 2 = Delete a Theme and reset those that are using that particular theme to one that is available. 3 = View which themes are being used the most by your members. so you can choose to delete or lock those that are not being used,,, 4 = Summary of Current ID's of themes that are in use... And if i think of any others on the way i'll just add them..
  25. Re: [MOD UPDATE} V2 Themecreator 100% Completed Working Copy Most of this script is taken from the Menu Creator that myself and Tonka made sometime ago The enirety of staff_themecreator.php uses the exact same structure...... There is a lock function which i havent added yet.... but over time i will just keep adding to it.....
×
×
  • Create New...