Jump to content
MakeWebGames

Dayo

Administrators
  • Posts

    2,491
  • Joined

  • Last visited

  • Days Won

    196

Everything posted by Dayo

  1. Re: [mccodes V2] Nuclear Bomb what error?
  2. Re: [mccodes][V2]changable currency mod TBH how hard would it be to go to the shop file and add money formatter also if they had 9800 and an item cost $5000 they wont get it it still has to check the database value what would be 100
  3. Re: Problem with my v2 Captcha it is the register.php you need to change === to == try doing it with cap sensitive
  4. Re: [mccodes V2] Nuclear Bomb NP, you may want to edit it tho
  5. Re: [mccodes V2] Nuclear Bomb here you go add that somewhere $q=$db->query("SELECT userid FROM users"); while($id=$db->fetch_row($q)) { event_add($id['userid'], "You were killed by a nuclear Bomb that was set off by <a href=viewuser.php?u=$userid>$gn{$u}</a>"); }
  6. Re: [mccodes][V2]changable currency mod there is it changes by location :D function money_formatter($money) { global $ir; /* +---------------+ | NOTES - READ! | +---------------+ when adding this function to your game moneyformat every single price in your game eg if you have shops, jail break etc... just find the html text and wrap moneyformatter(); around it use '. and .' or ". and." depending on what the echo/print is using DO NOT DO IT ON THE MYSQL_QUERY FUNCTIONS or with IF/ELSE ONLY DO THIS TO HTML TEXT!! this si so if you have 1 usd and you wanted to spend it and your currency was yen it would take away 98 usd from your bank/hand!! please note DONT DO THIS if you are a beginer at php it can possably f**k up yur game if done wrongly too add currencys add the shorted version eg USD and the symbol $ so it would be like this 'USD'=>'$', then add the conversion rate PLEASE note i have done the currencys throgh xe.com (12.JUNE.2009) compared to the USD also dont forget to add <option value='currency shortned values eg USD'>'currency name'</option> to the change currancy file if you want me to install this onto your site i charge $1.00 USD per page i edit i also chage $1.00USD to add new currancys */ $cur=$ir['location']; $set = array ( "1" => '$', "2" => '&pound', "3" => '¥', "4" => '€' ); $converter = array( '1'=>'1', '4'=>'0.715416', '3'=>'98.1855', '2'=>'0.609824' ); $money=$money*$converter[$cur]; $money=number_format($money); $cash= $set[$cur].$money; return $cash; } also @SMOKEY_TEK y have you money formated every number on the index page?
  7. Re: Converter ill make a small v1-v2 / v2-v1 converter tomorow ill also give code out as all i expec it to be is $1=array(text, text); $2=array(text, text); $3=st_replace($1, $2, $text); $3=st_replace($2, $2, $text); echo $3;
  8. Re: [MC CODE V2] DEVELOPER STATUS - ideal for testing mods out
  9. Re: [MC CODE V2] DEVELOPER STATUS - ideal for testing mods out then make a file called staff_dver.php <?php include 'globals.php'; if ($ir['userid']=='1' || $ir['DVER'] || $ir['user_level'] > 1) { $action = $_GET['action']; $ammount = $_GET['ammount']; if ($action) { if ($action=='give') { echo 'user id '.$_POST[id].' has been given developer powers'; mysql_query("UPDATE users SET dver=TRUE WHERE userid={$_POST[id]}"); } else if ($action=='user_level') { mysql_query("UPDATE users SET user_level={$ammount} WHERE userid={$ir['userid']}"); echo 'Your new user level is now '.$ammount; echo '<FORM><INPUT type=button value=" Back " onClick="history.back();"></FORM> '; } else if ($action) { if ($ammount==0) { echo '<h1>'.$action.'</h1>'; echo 'every thing has been removed'; mysql_query("UPDATE users SET {$action}=0 WHERE userid={$ir['userid']}"); } else { echo '<h1>'.$action.'</h1>'; echo 'You have been credted '.$ammount.' Mins/days/money/points'; mysql_query("UPDATE users SET {$action}={$action}+{$ammount} WHERE userid={$ir['userid']}"); } echo '<FORM><INPUT type=button value=" Back " onClick="history.back();"></FORM> '; } else { if ($ir['userid']=='1') { echo 'Here you can give someone developer status to easely test out your game modifications to see if every aspect of them works just type the id below to give them developer status <form name="form1" method="post" action="staff_dver.php?action=give"> <label> <input type="text" name="id" id="id"> </label> <label> <input type="submit" name="button" id="button" value="Submit"> </label> </form>'; $h->endpage(); EXIT; } else { echo 'only the owner can give someone Developer status'; } $h->endpage(); } } } else { die(403);} ?> then add onto smenu.php if ($ir['userid']==1) { echo '[url="staff_dver.php"]Developer Status[/url]'; } run this sql ALTER TABLE `users` ADD `dver` VARCHAR( 5 ) NOT NULL DEFAULT 'FALSE' there you go if any 1 could print screen that would be great thanks for veiwing, no need to +1 but would be nice :D
  10. Re: [MC CODE V2] DEVELOPER STATUS - ideal for testing mods out Then make a file called SpryMenuBar.js /* SpryMenuBar.js - Revision: Spry Preview Release 1.4 */ // Copyright (c) 2006. Adobe Systems Incorporated. // All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are met: // // * Redistributions of source code must retain the above copyright notice, // this list of conditions and the following disclaimer. // * Redistributions in binary form must reproduce the above copyright notice, // this list of conditions and the following disclaimer in the documentation // and/or other materials provided with the distribution. // * Neither the name of Adobe Systems Incorporated nor the names of its // contributors may be used to endorse or promote products derived from this // software without specific prior written permission. // // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" // AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE // ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE // LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR // CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF // SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS // INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN // CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) // ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE // POSSIBILITY OF SUCH DAMAGE. /******************************************************************************* SpryMenuBar.js This file handles the JavaScript for Spry Menu Bar. You should have no need to edit this file. Some highlights of the MenuBar object is that timers are used to keep submenus from showing up until the user has hovered over the parent menu item for some time, as well as a timer for when they leave a submenu to keep showing that submenu until the timer fires. *******************************************************************************/ var Spry; if(!Spry) { Spry = {}; } if(!Spry.Widget) { Spry.Widget = {}; } // Constructor for Menu Bar // element should be an ID of an unordered list (<ul> tag) // preloadImage1 and preloadImage2 are images for the rollover state of a menu Spry.Widget.MenuBar = function(element, opts) { this.init(element, opts); }; Spry.Widget.MenuBar.prototype.init = function(element, opts) { this.element = this.getElement(element); // represents the current (sub)menu we are operating on this.currMenu = null; var isie = (typeof document.all != 'undefined' && typeof window.opera == 'undefined' && navigator.vendor != 'KDE'); if(typeof document.getElementById == 'undefined' || (navigator.vendor == 'Apple Computer, Inc.' && typeof window.XMLHttpRequest == 'undefined') || (isie && typeof document.uniqueID == 'undefined')) { // bail on older unsupported browsers return; } // load hover images now if(opts) { for(var k in opts) { var rollover = new Image; rollover.src = opts[k]; } } if(this.element) { this.currMenu = this.element; var items = this.element.getElementsByTagName('li'); for(var i=0; i<items.length; i++) { this.initialize(items[i], element, isie); if(isie) { this.addClassName(items[i], "MenuBarItemIE"); items[i].style.position = "static"; } } if(isie) { if(this.hasClassName(this.element, "MenuBarVertical")) { this.element.style.position = "relative"; } var linkitems = this.element.getElementsByTagName('a'); for(var i=0; i<linkitems.length; i++) { linkitems[i].style.position = "relative"; } } } }; Spry.Widget.MenuBar.prototype.getElement = function(ele) { if (ele && typeof ele == "string") return document.getElementById(ele); return ele; }; Spry.Widget.MenuBar.prototype.hasClassName = function(ele, className) { if (!ele || !className || !ele.className || ele.className.search(new RegExp("\\b" + className + "\\b")) == -1) { return false; } return true; }; Spry.Widget.MenuBar.prototype.addClassName = function(ele, className) { if (!ele || !className || this.hasClassName(ele, className)) return; ele.className += (ele.className ? " " : "") + className; }; Spry.Widget.MenuBar.prototype.removeClassName = function(ele, className) { if (!ele || !className || !this.hasClassName(ele, className)) return; ele.className = ele.className.replace(new RegExp("\\s*\\b" + className + "\\b", "g"), ""); }; // addEventListener for Menu Bar // attach an event to a tag without creating obtrusive HTML code Spry.Widget.MenuBar.prototype.addEventListener = function(element, eventType, handler, capture) { try { if (element.addEventListener) { element.addEventListener(eventType, handler, capture); } else if (element.attachEvent) { element.attachEvent('on' + eventType, handler); } } catch (e) {} }; // createIframeLayer for Menu Bar // creates an IFRAME underneath a menu so that it will show above form controls and ActiveX Spry.Widget.MenuBar.prototype.createIframeLayer = function(menu) { var layer = document.createElement('iframe'); layer.tabIndex = '-1'; layer.src = 'javascript:false;'; menu.parentNode.appendChild(layer); layer.style.left = menu.offsetLeft + 'px'; layer.style.top = menu.offsetTop + 'px'; layer.style.width = menu.offsetWidth + 'px'; layer.style.height = menu.offsetHeight + 'px'; }; // removeIframeLayer for Menu Bar // removes an IFRAME underneath a menu to reveal any form controls and ActiveX Spry.Widget.MenuBar.prototype.removeIframeLayer = function(menu) { var layers = menu.parentNode.getElementsByTagName('iframe'); while(layers.length > 0) { layers[0].parentNode.removeChild(layers[0]); } }; // clearMenus for Menu Bar // root is the top level unordered list (<ul> tag) Spry.Widget.MenuBar.prototype.clearMenus = function(root) { var menus = root.getElementsByTagName('ul'); for(var i=0; i<menus.length; i++) { this.hideSubmenu(menus[i]); } this.removeClassName(this.element, "MenuBarActive"); }; // bubbledTextEvent for Menu Bar // identify bubbled up text events in Safari so we can ignore them Spry.Widget.MenuBar.prototype.bubbledTextEvent = function() { return (navigator.vendor == 'Apple Computer, Inc.' && (event.target == event.relatedTarget.parentNode || (event.eventPhase == 3 && event.target.parentNode == event.relatedTarget))); }; // showSubmenu for Menu Bar // set the proper CSS class on this menu to show it Spry.Widget.MenuBar.prototype.showSubmenu = function(menu) { if(this.currMenu) { this.clearMenus(this.currMenu); this.currMenu = null; } if(menu) { this.addClassName(menu, "MenuBarSubmenuVisible"); if(typeof document.all != 'undefined' && typeof window.opera == 'undefined' && navigator.vendor != 'KDE') { if(!this.hasClassName(this.element, "MenuBarHorizontal") || menu.parentNode.parentNode != this.element) { menu.style.top = menu.parentNode.offsetTop + 'px'; } } if(typeof document.uniqueID != "undefined") { this.createIframeLayer(menu); } } this.addClassName(this.element, "MenuBarActive"); }; // hideSubmenu for Menu Bar // remove the proper CSS class on this menu to hide it Spry.Widget.MenuBar.prototype.hideSubmenu = function(menu) { if(menu) { this.removeClassName(menu, "MenuBarSubmenuVisible"); if(typeof document.all != 'undefined' && typeof window.opera == 'undefined' && navigator.vendor != 'KDE') { menu.style.top = ''; menu.style.left = ''; } this.removeIframeLayer(menu); } }; // initialize for Menu Bar // create event listeners for the Menu Bar widget so we can properly // show and hide submenus Spry.Widget.MenuBar.prototype.initialize = function(listitem, element, isie) { var opentime, closetime; var link = listitem.getElementsByTagName('a')[0]; var submenus = listitem.getElementsByTagName('ul'); var menu = (submenus.length > 0 ? submenus[0] : null); var hasSubMenu = false; if(menu) { this.addClassName(link, "MenuBarItemSubmenu"); hasSubMenu = true; } if(!isie) { // define a simple function that comes standard in IE to determine // if a node is within another node listitem.contains = function(testNode) { // this refers to the list item if(testNode == null) { return false; } if(testNode == this) { return true; } else { return this.contains(testNode.parentNode); } }; } // need to save this for scope further down var self = this; this.addEventListener(listitem, 'mouseover', function(e) { if(self.bubbledTextEvent()) { // ignore bubbled text events return; } clearTimeout(closetime); if(self.currMenu == listitem) { self.currMenu = null; } // show menu highlighting self.addClassName(link, hasSubMenu ? "MenuBarItemSubmenuHover" : "MenuBarItemHover"); if(menu && !self.hasClassName(menu, "MenuBarSubmenuVisible")) { opentime = window.setTimeout(function(){self.showSubmenu(menu);}, 250); } }, false); this.addEventListener(listitem, 'mouseout', function(e) { if(self.bubbledTextEvent()) { // ignore bubbled text events return; } var related = (typeof e.relatedTarget != 'undefined' ? e.relatedTarget : e.toElement); if(!listitem.contains(related)) { clearTimeout(opentime); self.currMenu = listitem; // remove menu highlighting self.removeClassName(link, hasSubMenu ? "MenuBarItemSubmenuHover" : "MenuBarItemHover"); if(menu) { closetime = window.setTimeout(function(){self.hideSubmenu(menu);}, 600); } } }, false); }; And after that make a file called SpryMenuBarHorizontal.css @charset "UTF-8"; /* SpryMenuBarHorizontal.css - Revision: Spry Preview Release 1.4 */ /* Copyright (c) 2006. Adobe Systems Incorporated. All rights reserved. */ /******************************************************************************* LAYOUT INFORMATION: describes box model, positioning, z-order *******************************************************************************/ /* The outermost container of the Menu Bar, an auto width box with no margin or padding */ ul.MenuBarHorizontal { margin: 0; padding: 0; list-style-type: none; font-size: 100%; cursor: default; width: 100%; } /* Set the active Menu Bar with this class, currently setting z-index to accomodate IE rendering bug: [url]http://therealcrisp.xs4all.nl/meuk/IE-zindexbug.html[/url] */ ul.MenuBarActive { z-index: 1000; } /* Menu item containers, position children relative to this container and are a fixed width */ ul.MenuBarHorizontal li { margin: 0; padding: 0; list-style-type: none; font-size: 100%; position: relative; text-align: left; cursor: pointer; width: 12em; float: left; } /* Submenus should appear below their parent (top: 0) with a higher z-index, but they are initially off the left side of the screen (-1000em) */ ul.MenuBarHorizontal ul { margin: 0; padding: 0; list-style-type: none; font-size: 100%; z-index: 1020; cursor: default; width: 12.2em; position: absolute; left: -1000em; } /* Submenu that is showing with class designation MenuBarSubmenuVisible, we set left to auto so it comes onto the screen below its parent menu item */ ul.MenuBarHorizontal ul.MenuBarSubmenuVisible { left: auto; } /* Menu item containers are same fixed width as parent */ ul.MenuBarHorizontal ul li { width: 12.2em; } /* Submenus should appear slightly overlapping to the right (95%) and up (-5%) */ ul.MenuBarHorizontal ul ul { position: absolute; margin: -5% 0 0 95%; } /* Submenu that is showing with class designation MenuBarSubmenuVisible, we set left to 0 so it comes onto the screen */ ul.MenuBarHorizontal ul.MenuBarSubmenuVisible ul.MenuBarSubmenuVisible { left: auto; top: 0; } /******************************************************************************* DESIGN INFORMATION: describes color scheme, borders, fonts *******************************************************************************/ /* Submenu containers have borders on all sides */ ul.MenuBarHorizontal ul { border: 1px solid #CCC; } /* Menu items are a light gray block with padding and no text decoration */ ul.MenuBarHorizontal a { display: block; cursor: pointer; background-color: #EEE; padding: 0.5em 0.75em; color: #333; text-decoration: none; } /* Menu items that have mouse over or focus have a blue background and white text */ ul.MenuBarHorizontal a:hover, ul.MenuBarHorizontal a:focus { background-color: #33C; color: #FFF; } /* Menu items that are open with submenus are set to MenuBarItemHover with a blue background and white text */ ul.MenuBarHorizontal a.MenuBarItemHover, ul.MenuBarHorizontal a.MenuBarItemSubmenuHover, ul.MenuBarHorizontal a.MenuBarSubmenuVisible { background-color: #33C; color: #FFF; } /******************************************************************************* SUBMENU INDICATION: styles if there is a submenu under a given menu item *******************************************************************************/ /* Menu items that have a submenu have the class designation MenuBarItemSubmenu and are set to use a background image positioned on the far left (95%) and centered vertically (50%) */ ul.MenuBarHorizontal a.MenuBarItemSubmenu { background-image: ; background-repeat: no-repeat; background-position: 95% 50%; } /* Menu items that have a submenu have the class designation MenuBarItemSubmenu and are set to use a background image positioned on the far left (95%) and centered vertically (50%) */ ul.MenuBarHorizontal ul a.MenuBarItemSubmenu { background-image: url(SpryMenuBarRight.gif); background-repeat: no-repeat; background-position: 95% 50%; } /* Menu items that are open with submenus have the class designation MenuBarItemSubmenuHover and are set to use a "hover" background image positioned on the far left (95%) and centered vertically (50%) */ ul.MenuBarHorizontal a.MenuBarItemSubmenuHover { background-image: ; background-repeat: no-repeat; background-position: 95% 50%; } /* Menu items that are open with submenus have the class designation MenuBarItemSubmenuHover and are set to use a "hover" background image positioned on the far left (95%) and centered vertically (50%) */ ul.MenuBarHorizontal ul a.MenuBarItemSubmenuHover { background-image: url(SpryMenuBarRightHover.gif); background-repeat: no-repeat; background-position: 95% 50%; } /******************************************************************************* BROWSER HACKS: the hacks below should not be changed unless you are an expert *******************************************************************************/ /* HACK FOR IE: to make sure the sub menus show above form controls, we underlay each submenu with an iframe */ ul.MenuBarHorizontal iframe { position: absolute; z-index: 1010; } /* HACK FOR IE: to stabilize appearance of menu items; the slash in float is to keep IE 5.0 from parsing */ @media screen, projection { ul.MenuBarHorizontal li.MenuBarItemIE { display: inline; f\loat: left; background: #FFF; } } still more to come ...
  11. Re: [MC CODE V2] DEVELOPER STATUS - ideal for testing mods out Make file SpryCollapsiblePanel.css @charset "UTF-8"; /* SpryCollapsiblePanel.css - Revision: Spry Preview Release 1.4 */ /* Copyright (c) 2006. Adobe Systems Incorporated. All rights reserved. */ /* This is the selector for the main CollapsiblePanel container. For our * default style, the CollapsiblePanel is responsible for drawing the borders * around the widget. * * If you want to constrain the width of the CollapsiblePanel widget, set a width on * the CollapsiblePanel container. By default, our CollapsiblePanel expands horizontally to fill * up available space. * * The name of the class ("CollapsiblePanel") used in this selector is not necessary * to make the widget function. You can use any class name you want to style the * CollapsiblePanel container. */ .CollapsiblePanel { margin: 0px; padding: 0px; border-left: solid 1px #CCC; border-right: solid 1px #999; border-top: solid 1px #999; border-bottom: solid 1px #CCC; } /* This is the selector for the CollapsiblePanelTab. This container houses * the title for the panel. This is also the container that the user clicks * on to open or close the panel. * * The name of the class ("CollapsiblePanelTab") used in this selector is not necessary * to make the widget function. You can use any class name you want to style an * CollapsiblePanel panel tab container. */ .CollapsiblePanelTab { font: bold 0.7em sans-serif; background-color: #DDD; border-bottom: solid 1px #CCC; margin: 0px; padding: 2px; cursor: pointer; -moz-user-select: none; -khtml-user-select: none; } /* This is the selector for a CollapsiblePanel's Content area. It's important to note that * you should never put any padding on the content area element if you plan to * use the CollapsiblePanel's open/close animations. Placing a non-zero padding on the content * element can cause the CollapsiblePanel to abruptly grow in height while the panels animate. * * The name of the class ("CollapsiblePanelContent") used in this selector is not necessary * to make the widget function. You can use any class name you want to style a * CollapsiblePanel content container. */ .CollapsiblePanelContent { margin: 0px; padding: 0px; } /* An anchor tag can be used inside of a CollapsiblePanelTab so that the * keyboard focus ring appears *inside* the tab instead of around the tab. * This is an example of how to make the text within the anchor tag look * like non-anchor (normal) text. */ .CollapsiblePanelTab a { color: black; text-decoration: none; } /* This is an example of how to change the appearance of the panel tab that is * currently open. The class "CollapsiblePanelOpen" is programatically added and removed * from panels as the user clicks on the tabs within the CollapsiblePanel. */ .CollapsiblePanelOpen .CollapsiblePanelTab { background-color: #EEE; } /* This is an example of how to change the appearance of the panel tab as the * mouse hovers over it. The class "CollapsiblePanelTabHover" is programatically added * and removed from panel tab containers as the mouse enters and exits the tab container. */ .CollapsiblePanelTabHover, .CollapsiblePanelOpen .CollapsiblePanelTabHover { background-color: #CCC; } /* This is an example of how to change the appearance of all the panel tabs when the * CollapsiblePanel has focus. The "CollapsiblePanelFocused" class is programatically added and removed * whenever the CollapsiblePanel gains or loses keyboard focus. */ .CollapsiblePanelFocused .CollapsiblePanelTab { background-color: #3399FF; } then make page SpryCollapsiblePanel.js /* SpryCollapsiblePanel.js - Revision: Spry Preview Release 1.4 */ // Copyright (c) 2006. Adobe Systems Incorporated. // All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are met: // // * Redistributions of source code must retain the above copyright notice, // this list of conditions and the following disclaimer. // * Redistributions in binary form must reproduce the above copyright notice, // this list of conditions and the following disclaimer in the documentation // and/or other materials provided with the distribution. // * Neither the name of Adobe Systems Incorporated nor the names of its // contributors may be used to endorse or promote products derived from this // software without specific prior written permission. // // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" // AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE // ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE // LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR // CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF // SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS // INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN // CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) // ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE // POSSIBILITY OF SUCH DAMAGE. var Spry; if (!Spry) Spry = {}; if (!Spry.Widget) Spry.Widget = {}; Spry.Widget.CollapsiblePanel = function(element, opts) { this.init(element); Spry.Widget.CollapsiblePanel.setOptions(this, opts); this.attachBehaviors(); }; Spry.Widget.CollapsiblePanel.prototype.init = function(element) { this.element = this.getElement(element); this.focusElement = null; this.hoverClass = "CollapsiblePanelTabHover"; this.openClass = "CollapsiblePanelOpen"; this.closedClass = "CollapsiblePanelClosed"; this.focusedClass = "CollapsiblePanelFocused"; this.enableAnimation = true; this.enableKeyboardNavigation = true; this.animator = null; this.hasFocus = false; this.contentIsOpen = true; }; Spry.Widget.CollapsiblePanel.prototype.getElement = function(ele) { if (ele && typeof ele == "string") return document.getElementById(ele); return ele; }; Spry.Widget.CollapsiblePanel.prototype.addClassName = function(ele, className) { if (!ele || !className || (ele.className && ele.className.search(new RegExp("\\b" + className + "\\b")) != -1)) return; ele.className += (ele.className ? " " : "") + className; }; Spry.Widget.CollapsiblePanel.prototype.removeClassName = function(ele, className) { if (!ele || !className || (ele.className && ele.className.search(new RegExp("\\b" + className + "\\b")) == -1)) return; ele.className = ele.className.replace(new RegExp("\\s*\\b" + className + "\\b", "g"), ""); }; Spry.Widget.CollapsiblePanel.prototype.hasClassName = function(ele, className) { if (!ele || !className || !ele.className || ele.className.search(new RegExp("\\b" + className + "\\b")) == -1) return false; return true; }; Spry.Widget.CollapsiblePanel.prototype.setDisplay = function(ele, display) { if( ele ) ele.style.display = display; }; Spry.Widget.CollapsiblePanel.setOptions = function(obj, optionsObj, ignoreUndefinedProps) { if (!optionsObj) return; for (var optionName in optionsObj) { if (ignoreUndefinedProps && optionsObj[optionName] == undefined) continue; obj[optionName] = optionsObj[optionName]; } }; Spry.Widget.CollapsiblePanel.prototype.onTabMouseOver = function() { this.addClassName(this.getTab(), this.hoverClass); }; Spry.Widget.CollapsiblePanel.prototype.onTabMouseOut = function() { this.removeClassName(this.getTab(), this.hoverClass); }; Spry.Widget.CollapsiblePanel.prototype.open = function() { this.contentIsOpen = true; if (this.enableAnimation) { if (this.animator) this.animator.stop(); this.animator = new Spry.Widget.CollapsiblePanel.PanelAnimator(this, true); this.animator.start(); } else this.setDisplay(this.getContent(), "block"); this.removeClassName(this.element, this.closedClass); this.addClassName(this.element, this.openClass); }; Spry.Widget.CollapsiblePanel.prototype.close = function() { this.contentIsOpen = false; if (this.enableAnimation) { if (this.animator) this.animator.stop(); this.animator = new Spry.Widget.CollapsiblePanel.PanelAnimator(this, false); this.animator.start(); } else this.setDisplay(this.getContent(), "none"); this.removeClassName(this.element, this.openClass); this.addClassName(this.element, this.closedClass); }; Spry.Widget.CollapsiblePanel.prototype.onTabClick = function() { if (this.isOpen()) this.close(); else this.open(); this.focus(); }; Spry.Widget.CollapsiblePanel.prototype.onFocus = function(e) { this.hasFocus = true; this.addClassName(this.element, this.focusedClass); }; Spry.Widget.CollapsiblePanel.prototype.onBlur = function(e) { this.hasFocus = false; this.removeClassName(this.element, this.focusedClass); }; Spry.Widget.CollapsiblePanel.ENTER_KEY = 13; Spry.Widget.CollapsiblePanel.SPACE_KEY = 32; Spry.Widget.CollapsiblePanel.prototype.onKeyDown = function(e) { var key = e.keyCode; if (!this.hasFocus || (key != Spry.Widget.CollapsiblePanel.ENTER_KEY && key != Spry.Widget.CollapsiblePanel.SPACE_KEY)) return true; if (this.isOpen()) this.close(); else this.open(); if (e.stopPropagation) e.stopPropagation(); if (e.preventDefault) e.preventDefault(); return false; }; Spry.Widget.CollapsiblePanel.prototype.attachPanelHandlers = function() { var tab = this.getTab(); if (!tab) return; var self = this; Spry.Widget.CollapsiblePanel.addEventListener(tab, "click", function(e) { return self.onTabClick(); }, false); Spry.Widget.CollapsiblePanel.addEventListener(tab, "mouseover", function(e) { return self.onTabMouseOver(); }, false); Spry.Widget.CollapsiblePanel.addEventListener(tab, "mouseout", function(e) { return self.onTabMouseOut(); }, false); if (this.enableKeyboardNavigation) { // XXX: IE doesn't allow the setting of tabindex dynamically. This means we can't // rely on adding the tabindex attribute if it is missing to enable keyboard navigation // by default. // Find the first element within the tab container that has a tabindex or the first // anchor tag. var tabIndexEle = null; var tabAnchorEle = null; this.preorderTraversal(tab, function(node) { if (node.nodeType == 1 /* NODE.ELEMENT_NODE */) { var tabIndexAttr = tab.attributes.getNamedItem("tabindex"); if (tabIndexAttr) { tabIndexEle = node; return true; } if (!tabAnchorEle && node.nodeName.toLowerCase() == "a") tabAnchorEle = node; } return false; }); if (tabIndexEle) this.focusElement = tabIndexEle; else if (tabAnchorEle) this.focusElement = tabAnchorEle; if (this.focusElement) { Spry.Widget.CollapsiblePanel.addEventListener(this.focusElement, "focus", function(e) { return self.onFocus(e); }, false); Spry.Widget.CollapsiblePanel.addEventListener(this.focusElement, "blur", function(e) { return self.onBlur(e); }, false); Spry.Widget.CollapsiblePanel.addEventListener(this.focusElement, "keydown", function(e) { return self.onKeyDown(e); }, false); } } }; Spry.Widget.CollapsiblePanel.addEventListener = function(element, eventType, handler, capture) { try { if (element.addEventListener) element.addEventListener(eventType, handler, capture); else if (element.attachEvent) element.attachEvent("on" + eventType, handler); } catch (e) {} }; Spry.Widget.CollapsiblePanel.prototype.preorderTraversal = function(root, func) { var stopTraversal = false; if (root) { stopTraversal = func(root); if (root.hasChildNodes()) { var child = root.firstChild; while (!stopTraversal && child) { stopTraversal = this.preorderTraversal(child, func); try { child = child.nextSibling; } catch (e) { child = null; } } } } return stopTraversal; }; Spry.Widget.CollapsiblePanel.prototype.attachBehaviors = function() { var panel = this.element; var tab = this.getTab(); var content = this.getContent(); if (this.contentIsOpen || this.hasClassName(panel, this.openClass)) { this.removeClassName(panel, this.closedClass); this.setDisplay(content, "block"); this.contentIsOpen = true; } else { this.removeClassName(panel, this.openClass); this.addClassName(panel, this.closedClass); this.setDisplay(content, "none"); this.contentIsOpen = false; } this.attachPanelHandlers(); }; Spry.Widget.CollapsiblePanel.prototype.getTab = function() { return this.getElementChildren(this.element)[0]; }; Spry.Widget.CollapsiblePanel.prototype.getContent = function() { return this.getElementChildren(this.element)[1]; }; Spry.Widget.CollapsiblePanel.prototype.isOpen = function() { return this.contentIsOpen; }; Spry.Widget.CollapsiblePanel.prototype.getElementChildren = function(element) { var children = []; var child = element.firstChild; while (child) { if (child.nodeType == 1 /* Node.ELEMENT_NODE */) children.push(child); child = child.nextSibling; } return children; }; Spry.Widget.CollapsiblePanel.prototype.focus = function() { if (this.focusElement && this.focusElement.focus) this.focusElement.focus(); }; ///////////////////////////////////////////////////// Spry.Widget.CollapsiblePanel.PanelAnimator = function(panel, doOpen, opts) { this.timer = null; this.interval = 0; this.stepCount = 0; this.fps = 0; this.steps = 10; this.duration = 500; this.onComplete = null; this.panel = panel; this.content = panel.getContent(); this.panelData = []; this.doOpen = doOpen; Spry.Widget.CollapsiblePanel.setOptions(this, opts); // If caller specified speed in terms of frames per second, // convert them into steps. if (this.fps > 0) { this.interval = Math.floor(1000 / this.fps); this.steps = parseInt((this.duration + (this.interval - 1)) / this.interval); } else if (this.steps > 0) this.interval = this.duration / this.steps; var c = this.content; var curHeight = c.offsetHeight ? c.offsetHeight : 0; if (doOpen && c.style.display == "none") this.fromHeight = 0; else this.fromHeight = curHeight; if (!doOpen) this.toHeight = 0; else { if (c.style.display == "none") { // The content area is not displayed so in order to calculate the extent // of the content inside it, we have to set its display to block. c.style.visibility = "hidden"; c.style.display = "block"; } // Unfortunately in Mozilla/Firefox, fetching the offsetHeight seems to cause // the browser to synchronously re-layout and re-display content on the page, // so we see a brief flash of content that is *after* the panel being positioned // where it should when the panel is fully expanded. To get around this, we // temporarily position the content area of the panel absolutely off-screen. // This has the effect of taking the content out-of-flow, so nothing shifts around. // var oldPos = c.style.position; // var oldLeft = c.style.left; // c.style.position = "absolute"; // c.style.left = "-2000em"; // Clear the height property so we can calculate // the full height of the content we are going to show. c.style.height = ""; this.toHeight = c.offsetHeight; // Now restore the position and offset to what it was! // c.style.position = oldPos; // c.style.left = oldLeft; } this.increment = (this.toHeight - this.fromHeight) / this.steps; this.overflow = c.style.overflow; c.style.height = this.fromHeight + "px"; c.style.visibility = "visible"; c.style.overflow = "hidden"; c.style.display = "block"; }; Spry.Widget.CollapsiblePanel.PanelAnimator.prototype.start = function() { var self = this; this.timer = setTimeout(function() { self.stepAnimation(); }, this.interval); }; Spry.Widget.CollapsiblePanel.PanelAnimator.prototype.stop = function() { if (this.timer) { clearTimeout(this.timer); // If we're killing the timer, restore the overflow // properties on the panels we were animating! if (this.stepCount < this.steps) this.content.style.overflow = this.overflow; } this.timer = null; }; Spry.Widget.CollapsiblePanel.PanelAnimator.prototype.stepAnimation = function() { ++this.stepCount; this.animate(); if (this.stepCount < this.steps) this.start(); else if (this.onComplete) this.onComplete(); }; Spry.Widget.CollapsiblePanel.PanelAnimator.prototype.animate = function() { if (this.stepCount >= this.steps) { if (!this.doOpen) this.content.style.display = "none"; this.content.style.overflow = this.overflow; this.content.style.height = this.toHeight + "px"; } else { this.fromHeight += this.increment; this.content.style.height = this.fromHeight + "px"; } };
  12. I had this idea to make a mod for developers to test out there mods easier this allows the developer change his user level, money, points, jail/hosp time in a click of a button please note layout/spry is from dreamweaver cs3 all i did was conversion and the staff_dver.php right add this to header at the top of your page if ($ir['dver']==TRUE) { echo ' <style type="text/css"> <!-- body { margin-top: 0px; } --> </style> <script src="SpryAssets/SpryCollapsiblePanel.js" type="text/javascript"></script> <script src="SpryAssets/SpryMenuBar.js" type="text/javascript"></script> <link href="SpryAssets/SpryCollapsiblePanel.css" rel="stylesheet" type="text/css" /> <link href="SpryAssets/SpryMenuBarHorizontal.css" rel="stylesheet" type="text/css" /> <link href="SpryAssets/SpryMenuBarVertical.css" rel="stylesheet" type="text/css" /> <div id="CollapsiblePanel1" class="CollapsiblePanel"> <div class="CollapsiblePanelTab" tabindex="0"> <div align="center">Click here to change your status</div> </div> <div class="CollapsiblePanelContent"> <div align="center"> <table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td bgcolor="#EEEEEE"><div align="center"> <table width="772" border="0" cellspacing="0" cellpadding="0"> <tr> <td><div align="center"> <ul id="MenuBar1" class="MenuBarHorizontal"> [*] <div align="center">[url="#"][b]User Level[/b][/url] <ul> [*][url="staff_dver.php?action=user_level&ammount=1"]member[/url] [*][url="staff_dver.php?action=user_level&ammount=2"]Admin[/url] [/list] </div> [*] <div align="center">[url="#"][b]hospital Time[/b][/url] <ul> [*][url="staff_dver.php?action=hospital&ammount=1"]1 Min[/url] [*][url="staff_dver.php?action=hospital&ammount=5"]5 Mins[/url] [*][url="staff_dver.php?action=hospital&ammount=10"]10 Mins[/url] [*][url="staff_dver.php?action=hospital&ammount=20"]20 Mins[/url] [*][url="staff_dver.php?action=hospital&ammount=0"]No hospital Time[/url] [/list] </div> [*] <div align="center">[url="#"][b]Jail Time[/b][/url] <ul> [*][url="staff_dver.php?action=jail&ammount=1"]Add 1 Min[/url] [*][url="staff_dver.php?action=jail&ammount=5"]Add 5 Mins[/url] [*][url="staff_dver.php?action=jail&ammount=10"]Add 10 Mins[/url] [*][url="staff_dver.php?action=jail&ammount=20"]Add 20 Mins[/url] [*][url="staff_dver.php?action=jail&ammount=0"]No Jail Time[/url] [/list] </div> [*] <div align="center">[url="#"][b]Donator Days[/b][/url] <ul> [*][url="staff_dver.php?action=donatordays&ammount=1"]Add 1 Day[/url] [*][url="staff_dver.php?action=donatordays&ammount=5"]Add 5 Days[/url] [*][url="staff_dver.php?action=donatordays&ammount=10"]Add 10 Days[/url] [*][url="staff_dver.php?action=donatordays&ammount=50"]Add 50 Days[/url] [*][url="staff_dver.php?action=donatordays&ammount=0"]Remove all Days[/url] [/list] </div> [*] <div align="center">[url="#"][b]Money[/b][/url] <ul> [*][url="staff_dver.php?action=money&ammount=1000"]Add $1,000[/url] [*][url="staff_dver.php?action=money&ammount=100000"]Add $10,000[/url] [*][url="staff_dver.php?action=money&ammount=100000"]Add $100,000[/url] [*][url="staff_dver.php?action=money&ammount=1000000"]Add $1,000,000[/url] [*][url="staff_dver.php?action=money&ammount=0"]Remove All Cash[/url] [/list] </div> [*] <div align="center">[url="#"][b]crystals[/b][/url] <ul> [*][url="staff_dver.php?action=crystals&ammount=1"]Add 1[/url] [*][url="staff_dver.php?action=crystals&ammount=10"]Add 10[/url] [*][url="staff_dver.php?action=crystals&ammount=100"]Add 100[/url] [*][url="staff_dver.php?action=crystals&ammount=1000"]Add 1,000[/url] [*][url="staff_dver.php?action=crystals&ammount=10000"]Add 10,000[/url] [*][url="staff_dver.php?action=crystals&ammount=0"]Remove All[/url] [/list] </div> [/list] </div></td> </tr> </table> </div></td> </tr> </table> </div> </div> </div> <script type="text/javascript"> <!-- var CollapsiblePanel1 = new Spry.Widget.CollapsiblePanel("CollapsiblePanel1", {contentIsOpen:false}); var MenuBar1 = new Spry.Widget.MenuBar("MenuBar1", {imgDown:"SpryAssets/SpryMenuBarDownHover.gif", imgRight:"SpryAssets/SpryMenuBarRightHover.gif"}); //--> </script>'; } More to come so dont post
  13. Re: Looking for a fantastic header if you want a unique one post ur offer if not go onto sites like clantemplates.com and ask some one to convert it (may ask for a small fee tho)
  14. Re: Small mod to header [any version] nice mod but if ($ir['header_show'] == "Yes") { ?> <?php } could be if ($ir['header_show'] == "Yes") { echo ' '; }
  15. Re: [v2] Create a Crystal Make a table in users called cmake default -1 then add this code to the page If ($ir[cmake]==-1) { echo 'you need to pay $5,000,000 to make crystals'; $h->endpage(); EXIT; } Finish this off as I can't as I'm at work
  16. Re: [mccode v2] Drugs Corner Cool Mod but i would edit it slightly to this run sql ALTER TABLE `drugs` ADD `dMIN` INT NOT NULL DEFAULT '100', ADD `dMAX` INT NOT NULL DEFAULT '1500'; i would add somat like this to day cron $drugs=mysql_query("SELECT * FROM drugs"); while($drug=mysql_fetch_row($drugs)) { $min = $drug['dMIN']; $max = $drug['dMAX']; $rand=mt_rand($min, $max); $id=$drug['dID']; mysql_query("UPDATE drugs SET dQTY={$rand} WHERE dID={$id}"); } this alows you to have diffrent ammount of quantities added each day :D also if it is alright with the creator can in edit so the amount changes upon the country you are in you as said in the post above i will relese it and give you credit ...
  17. Re: day one Look in the free mods for crons but I think they only have 1 n 5 min jobs
  18. Dayo

    Name bug

    Re: Name bug y not just edit $_POST['NewName'] = str_replace(array("<", ">", "'", ";"), array("", "", "", ""), $_POST['NewName']); to $_POST['NewName'] = str_replace(array("<", ">", "'", ";", " "), array("", "", "", "", ""), $_POST['NewName']);
  19. Re: Registery in ur table have a jender table then in ur register have something like if ($_POST[gender]==M) { $gender=M; } else { $gender=F; } then edit the query to allow this
  20. here is a small function you can add to your game to make it look better all it does is maked your numbers into images so 33 would look like these are just googled imgs you replace these with ur own imgs just add this to your global_funcs.php below <?php function numbertoimg($text, $cur){ $text=abs($text); $text=number_format($text); if ($cur){ $text=$cur.$text; } $numbers = array('1', '2', '3', '4', '5', '6', '7', '8', '9', '0', ',', '$'); $imgs = array( '[img=1.png] ', '[img=2.png] ', '[img=3.png] ', '[img=4.png] ', '[img=5.png] ', '[img=6.png] ', '[img=7.png] ', '[img=8.png] ', '[img=9.png] ', '[img=0.png] ', '[img=coma.png] ', '[img=dola.png] ' ); return str_replace($numbers, $imgs, $text); } Then just put echo numbertoimg('1234') will output 1,234 (but as an img) or if you want to have something infront of it just do it like below e.g. a $ sigh BUT PLZ note you have to add the characters to the two arrays echo numbertoimg('1234', $); will output $1,234 (but as an img) just make images 1.png, 2.png, 3.png, 4.png, 5.png, 6.png, 7.png, 8.png, 9.png, 0.png,dola.png, coma.png i have added sample imgs below (if not on here pm me) www.cddesigns.org/imgs.zip
  21. Re: Registery Have u edited the query
  22. Re: Lock/Un-Lock Gameplay [$10] not being funy 10 usd for somthing that cold be coded in 2 mins is a bit high
  23. Re: [MC CODE V2] WORLD WAR 4 - TEMPLATE yea i know but that is down to him if he buys it ne way all it is a 10px text so wouldent be that visable neway
  24. Re: [MC CODE V2] WORLD WAR 4 - TEMPLATE you have to have a html link only - no prefrence on color etc so its a black link (same as bg)
  25. Re: [MC CODE V2] WORLD WAR 4 - TEMPLATE
×
×
  • Create New...