Jump to content
MakeWebGames

Dayo

Administrators
  • Posts

    2,491
  • Joined

  • Last visited

  • Days Won

    196

Everything posted by Dayo

  1. Re: [Mccodes][V2] SMF Registration Intergration!!!!! post updated :-D
  2. SMF Registration Intergration for Mccodes V2 NOTE: ONLY USE IF YOU ARE INSTALLING ON NEW GAME AS IT DONT IMPORT EXISTING USERS STAFF IN YOUR GAME DONT AUTOMATICLY GET PRIVS TESTED WITH SMF 1.1.8 you need to download smf 1.1.8 from the smf website if you delet your forum account it DONT delet your game account This mod automaticly registers a user for the smf forum when they register for your game You will need to Upload smf 1.1.8 edit 2 php file step 1 download smf and upload all files to your site step 2 install smf (Table prefix needs to be forum_ !!!!!) self explanatory step 3 open register.php find $db->query("INSERT INTO users (username, login_name, userpass, level, money, crystals, donatordays, user_level, energy, maxenergy, will, maxwill, brave, maxbrave, hp, maxhp, location, gender, signedup, email, bankmoney, lastip, lastip_signup) VALUES( '{$username}', '{$username}', md5('{$_POST['password']}'), 1, $sm, 0, 0, 1, 12, 12, 100, 100, 5, 5, 100, 100, 1, '{$_POST['gender']}', unix_timestamp(), '{$_POST['email']}', -1, '$IP', '$IP')"); $i=$db->insert_id(); $db->query("INSERT INTO userstats VALUES($i, 10, 10, 10, 10, 10)"); and add this after: //add forum user $db->query("INSERT INTO forum_members (is_activated, memberName, passwd, emailAddress, gender, dateRegistered, realName) VALUES ('1', '{$username}', sha1('{$_POST['password']}'), '{$_POST['email']}', '{$_POST['gender']}', unix_timestamp(),'{$username}' )"); step 4 open mainmenu.php find the link to the forum and replave the link with new link to your forum step 5 go to your forum then admin --> Registration --> Settings --> then change 'Method of registration employed for new members' to registration disabled. this disables users from registering on forum and not game (auto register still works when you register for ur mccodes game) Enjoy :D please note if you have any errors post here and ill try to fix it :-)
  3. Re: Mccodes V2 Request Name Changes lol how would it make it easier :? :roll: ill attempt this tomoro 1st proper mod i would of made :D :S
  4. Re: New explore city (HTML) the text could be bigger/have headers plus just the table to have the bg other then that its good
  5. Re: [McCodes][v2] Event Layout Mod ill see what i can do, tell me what u woukld like n ill try it :-)
  6. Re: [McCodes][v2] Event Layout Mod yea i adapted it to mccodes, but im a newb at php (only been learning 4-5 weeks) so i will go onto better scripts later on :D
  7. Re: [McCodes][v2] Mailbox Layout Mod i cant today in quite busy but ill try do it within the next week
  8. Re: [McCodes][v2] Mailbox Layout Mod woops :oops: thanks for that, god sake i cant edit post :(
  9. Re: [McCodes][v2] Staff Menu Mod (1st Mod ive made) http://www.cddesigns.org/Mccode%20v2%20mod/color.php that genorates the css file to your liking so if you wanted it to roll over color to be white/grey it will be
  10. Re: [McCodes][v2] Mailbox Layout Mod BUG FIX Mailbox.php should be <?php include "globals.php"; if($ir['mailban']) { die("<font color=red><h3>! ERROR</h3> You have been mail banned for {$ir['mailban']} days. [b]Reason: {$ir['mb_reason']}</font>[/b]"); } $_GET['ID'] = abs((int) $_GET['ID']); print "<table width=85% class='table' cellspacing='1'><tr><td>[url='mailbox.php?action=inbox']Inbox[/url]</td> <td>[url='mailbox.php?action=outbox']Sent Messages[/url]</td> <td>[url='mailbox.php?action=compose']Compose Message[/url]</td> <td>[url='mailbox.php?action=delall']Delete All Messages[/url]</td> <td>[url='mailbox.php?action=archive']Archive Messages[/url]</td><td>[url='contactlist.php']My Contacts[/url]</td></tr> </table> "; switch($_GET['action']) { case 'inbox': mail_inbox(); break; case 'outbox': mail_outbox(); break; case 'compose': mail_compose(); break; case 'delete': mail_delete(); break; case 'send': mail_send(); break; case 'delall': mail_delall(); break; case 'delall2': mail_delall2(); break; case 'archive': mail_archive(); break; default: mail_inbox(); break; } function mail_inbox() { global $db,$ir,$c,$userid,$h; print <<<OUT OUT; $q=$db->query("SELECT m.*,u.* FROM mail m LEFT JOIN users u ON m.mail_from=u.userid WHERE m.mail_to=$userid ORDER BY mail_time DESC LIMIT 25"); print "<script src='SpryCollapsiblePanel.js' type='text/javascript'></script> <link href='SpryCollapsiblePanel.css' rel='stylesheet' type='text/css' />"; while($r=$db->fetch_row($q)) { $sent=date('F j, Y, g:i:s a',$r['mail_time']); print "<div id='CollapsiblePanel{$r['mail_time']}' class='CollapsiblePanel'> <div class='CollapsiblePanelTab' tabindex='0'> <table width='100%' border='0' cellspacing='0' cellpadding='0'> <tr> <td>From: [url='viewuser.php?u={$r[']{$r['username']}[/url] [{$r['userid']}] </td> <td>Subject: {$r['mail_subject']}</td> <td>Sent at: $sent</td> </tr> </table> </div> <div class='CollapsiblePanelContent'>{$r['mail_text']} <table width='100%' border='0' cellspacing='0' cellpadding='0'> <tr> <td valign='top'><div align='center'>[url='mailbox.php?action=compose&ID={$r[']Reply[/url] | [url='mailbox.php?action=delete&ID={$r[']Delete[/url] | [url='preport.php?ID={$r[']Report[/url]</div></td> </tr> </table> </div> </div>"; EOF; print " <script type='text/javascript'> <!-- var CollapsiblePanel1 = new Spry.Widget.CollapsiblePanel('CollapsiblePanel{$r['mail_time']}', {contentIsOpen:false}); //--> </script>"; } if($ir['new_mail'] > 0) { $db->query("UPDATE mail SET mail_read=1 WHERE mail_to=$userid"); $db->query("UPDATE users SET new_mail=0 WHERE userid=$userid"); } } function mail_outbox() { global $db,$ir,$c,$userid,$h; print "Only the last 25 messages you have sent are visible. <table width=500px cellspacing=1 class='table'><tr style='background:gray'><th>To</th><th></th></tr>"; $q=$db->query("SELECT m.*,u.* FROM mail m LEFT JOIN users u ON m.mail_to=u.userid WHERE m.mail_from=$userid ORDER BY mail_time DESC LIMIT 25"); while($r=$db->fetch_row($q)) { $sent=date('F j, Y, g:i:s a',$r['mail_time']); print "<tr><td>[url='viewuser.php?u={$r[']{$r['username']}[/url] [{$r['userid']}]</td><td>{$r['mail_subject']}</td></tr><tr><td>Sent at: $sent </td><td>{$r['mail_text']}</td></tr></table>"; } } function mail_compose() { global $db,$ir,$c,$userid,$h; print "<form action='mailbox.php?action=send' method='post'> <table width=75% cellspacing=1 class='table'> <tr> <td>Contact to send to:</td> <td>"; $q=$db->query("SELECT c.*, u.username FROM contactlist c LEFT JOIN users u ON c.cl_ADDED=u.userid WHERE c.cl_ADDER={$userid} ORDER BY u.username ASC"); if($db->num_rows($q) == 0) { print "You have no contacts!"; } else { print "<select name='user1' type='dropdown'><option value=''><select a contact...></option>"; while($r=$db->fetch_row($q)) { print "<option value='{$r['username']}'>{$r['username']}</option>"; } print "</select>"; } if($_GET['ID']) { $user=$db->fetch_single($db->query("SELECT username FROM users WHERE userid={$_GET['ID']}")); } print "</td></tr><tr> <td>[b]OR[/b] Enter a username to send to:</td><td><input type='text' name='user2' value='{$user}' /></td></tr><tr> <td>Subject:</td> <td><input type='text' name='subject' /></td></tr><tr> <td>Message:</td> <td><textarea rows=5 cols=40 name='message'></textarea></td></tr><tr> <td colspan=2><input type='submit' value='Send' /></td></tr></table></form>"; if($_GET['ID']) { print " <table width=75% border=2><tr><td colspan=2>[b]Your last 5 mails to/from this person:[/b]</td></tr>"; $q=$db->query("SELECT m.*,u1.username as sender from mail m left join users u1 on m.mail_from=u1.userid WHERE (m.mail_from=$userid AND m.mail_to={$_GET['ID']}) OR (m.mail_to=$userid AND m.mail_from={$_GET['ID']}) ORDER BY m.mail_time DESC LIMIT 5"); while($r=$db->fetch_row($q)) { $sent=date('F j, Y, g:i:s a',$r['mail_time']); print "<tr><td>$sent</td> <td>[b]{$r['sender']} wrote:[/b] {$r['mail_text']}</td></tr>"; } print "</table>"; } } function mail_send() { global $db,$ir,$c,$userid,$h; $subj=str_replace(array("\n"),array(" "),strip_tags($_POST['subject'])); $msg=str_replace(array("\n"),array(" "),strip_tags($_POST['message'])); if($_POST['user1'] && $_POST['user2']) { die("Please do not select a contact AND enter a username, only do one. [url='mailbox.php']> Back[/url]"); } if(!$_POST['user1'] && !$_POST['user2']) { die("You must select a contact or enter a username. [url='mailbox.php']> Back[/url]"); } $sendto=($_POST['user1']) ? $_POST['user1'] : $_POST['user2']; $q=$db->query("SELECT userid FROM users WHERE username='{$sendto}'"); if($db->num_rows($q)==0) { die("You cannot send mail to nonexistant users. [url='mailbox.php']> Back[/url]"); } $to=$db->fetch_single($q); $db->query("INSERT INTO mail VALUES ('',0,$userid,$to,unix_timestamp(),'$subj','$msg')"); $db->query("UPDATE users SET new_mail=new_mail+1 WHERE userid={$to}"); print "Message sent. [url='mailbox.php']> Back[/url]"; } function mail_delete() { global $db,$ir,$c,$userid,$h; $db->query("DELETE FROM mail WHERE mail_id={$_GET['ID']} AND mail_to=$userid"); print "Message deleted. [url='mailbox.php']> Back[/url]"; } function mail_delall() { global $ir,$c,$userid,$h; print "This will delete all the messages in your inbox. There is [b]NO[/b] undo, so be sure. [url='mailbox.php?action=delall2']> Yes, delete all messages[/url] [url='mailbox.php']> No, go back[/url]"; } function mail_delall2() { global $db,$ir,$c,$userid,$h; $db->query("DELETE FROM mail WHERE mail_to=$userid"); print "All ".$db->affected_rows()." mails in your inbox were deleted. [url='mailbox.php']> Back[/url]"; } function mail_archive() { global $ir,$c,$userid,$h; print "This tool will download an archive of all your messages. [url='dlarchive.php?a=inbox']> Download Inbox[/url] [url='dlarchive.php?a=outbox']> Download Outbox[/url]"; } $h->endpage(); ?> when you went to sent messages it would go all weird, thiss fixes that
  11. Re: MCCODE V2 LOGIN PAGE i shall be creating full layouts throghout the next few weeks ill PM you them once im done (btw this will be login, register, header, login/register menu, template page so you can add TOS, contact us etc...)
  12. Re: [McCodes][v2] Mailbox Layout Mod well i cant do it today, my mum has got all my cousins around and needs help looking after them :|
  13. Re: [McCodes][v2] Mailbox Layout Mod not sure try the steps again, also are the JS and CSS files in the same directory as the mailbox.php ill see if i can add smilies today
  14. Re: [McCodes][v2] Mailbox Layout Mod Step 3 upload SpryCollapsiblePanel2.css to the main where mailbox.php is located @charset "UTF-8"; /* SpryCollapsiblePanel.css */ .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; } Enjoy :-D PRINT SCREEN
  15. Mailbox Layout Mod This Mod Will make your Mail Box look better, i was gona do this tomoro but i done it just now, enjoy :D What you will need to do Edit 1 file Add 1 CSS file Add 1 JS file Step 1 Open mailbox.php and delet all coding and replace with <?php include "globals.php"; if($ir['mailban']) { die("<font color=red><h3>! ERROR</h3> You have been mail banned for {$ir['mailban']} days. [b]Reason: {$ir['mb_reason']}</font>[/b]"); } $_GET['ID'] = abs((int) $_GET['ID']); print "<table width=85% class='table' cellspacing='1'><tr><td>[url='mailbox.php?action=inbox']Inbox[/url]</td> <td>[url='mailbox.php?action=outbox']Sent Messages[/url]</td> <td>[url='mailbox.php?action=compose']Compose Message[/url]</td> <td>[url='mailbox.php?action=delall']Delete All Messages[/url]</td> <td>[url='mailbox.php?action=archive']Archive Messages[/url]</td><td>[url='contactlist.php']My Contacts[/url]</td></tr> </table> "; switch($_GET['action']) { case 'inbox': mail_inbox(); break; case 'outbox': mail_outbox(); break; case 'compose': mail_compose(); break; case 'delete': mail_delete(); break; case 'send': mail_send(); break; case 'delall': mail_delall(); break; case 'delall2': mail_delall2(); break; case 'archive': mail_archive(); break; default: mail_inbox(); break; } function mail_inbox() { global $db,$ir,$c,$userid,$h; print <<<OUT OUT; $q=$db->query("SELECT m.*,u.* FROM mail m LEFT JOIN users u ON m.mail_from=u.userid WHERE m.mail_to=$userid ORDER BY mail_time DESC LIMIT 25"); print "<script src='SpryCollapsiblePanel.js' type='text/javascript'></script> <link href='SpryCollapsiblePanel.css' rel='stylesheet' type='text/css' />"; while($r=$db->fetch_row($q)) { $sent=date('F j, Y, g:i:s a',$r['mail_time']); print "<div id='CollapsiblePanel{$r['mail_time']}' class='CollapsiblePanel'> <div class='CollapsiblePanelTab' tabindex='0'> <table width='100%' border='0' cellspacing='0' cellpadding='0'> <tr> <td>From: [url='viewuser.php?u={$r[']{$r['username']}[/url] [{$r['userid']}] </td> <td>Subject: {$r['mail_subject']}</td> <td>Sent at: $sent</td> </tr> </table> </div> <div class='CollapsiblePanelContent'>{$r['mail_text']} <table width='100%' border='0' cellspacing='0' cellpadding='0'> <tr> <td valign='top'><div align='center'>[url='mailbox.php?action=compose&ID={$r[']Reply[/url] | [url='mailbox.php?action=delete&ID={$r[']Delete[/url] | [url='preport.php?ID={$r[']Report[/url]</div></td> </tr> </table> </div> </div>"; EOF; print " <script type='text/javascript'> <!-- var CollapsiblePanel1 = new Spry.Widget.CollapsiblePanel('CollapsiblePanel{$r['mail_time']}', {contentIsOpen:false}); //--> </script>"; } if($ir['new_mail'] > 0) { $db->query("UPDATE mail SET mail_read=1 WHERE mail_to=$userid"); $db->query("UPDATE users SET new_mail=0 WHERE userid=$userid"); } } function mail_outbox() { global $db,$ir,$c,$userid,$h; print "Only the last 25 messages you have sent are visible. <table width=75% cellspacing=1 class='table'><tr style='background:gray'><th>To</th><th></th></tr>"; $q=$db->query("SELECT m.*,u.* FROM mail m LEFT JOIN users u ON m.mail_to=u.userid WHERE m.mail_from=$userid ORDER BY mail_time DESC LIMIT 25"); while($r=$db->fetch_row($q)) { $sent=date('F j, Y, g:i:s a',$r['mail_time']); print "<tr><td>[url='viewuser.php?u={$r[']{$r['username']}[/url] [{$r['userid']}]</td><td>{$r['mail_subject']}</td></tr><tr><td>Sent at: $sent </td><td>{$r['mail_text']}</td></tr>"; } } function mail_compose() { global $db,$ir,$c,$userid,$h; print "<form action='mailbox.php?action=send' method='post'> <table width=75% cellspacing=1 class='table'> <tr> <td>Contact to send to:</td> <td>"; $q=$db->query("SELECT c.*, u.username FROM contactlist c LEFT JOIN users u ON c.cl_ADDED=u.userid WHERE c.cl_ADDER={$userid} ORDER BY u.username ASC"); if($db->num_rows($q) == 0) { print "You have no contacts!"; } else { print "<select name='user1' type='dropdown'><option value=''><select a contact...></option>"; while($r=$db->fetch_row($q)) { print "<option value='{$r['username']}'>{$r['username']}</option>"; } print "</select>"; } if($_GET['ID']) { $user=$db->fetch_single($db->query("SELECT username FROM users WHERE userid={$_GET['ID']}")); } print "</td></tr><tr> <td>[b]OR[/b] Enter a username to send to:</td><td><input type='text' name='user2' value='{$user}' /></td></tr><tr> <td>Subject:</td> <td><input type='text' name='subject' /></td></tr><tr> <td>Message:</td> <td><textarea rows=5 cols=40 name='message'></textarea></td></tr><tr> <td colspan=2><input type='submit' value='Send' /></td></tr></table></form>"; if($_GET['ID']) { print " <table width=75% border=2><tr><td colspan=2>[b]Your last 5 mails to/from this person:[/b]</td></tr>"; $q=$db->query("SELECT m.*,u1.username as sender from mail m left join users u1 on m.mail_from=u1.userid WHERE (m.mail_from=$userid AND m.mail_to={$_GET['ID']}) OR (m.mail_to=$userid AND m.mail_from={$_GET['ID']}) ORDER BY m.mail_time DESC LIMIT 5"); while($r=$db->fetch_row($q)) { $sent=date('F j, Y, g:i:s a',$r['mail_time']); print "<tr><td>$sent</td> <td>[b]{$r['sender']} wrote:[/b] {$r['mail_text']}</td></tr>"; } print "</table>"; } } function mail_send() { global $db,$ir,$c,$userid,$h; $subj=str_replace(array("\n"),array(" "),strip_tags($_POST['subject'])); $msg=str_replace(array("\n"),array(" "),strip_tags($_POST['message'])); if($_POST['user1'] && $_POST['user2']) { die("Please do not select a contact AND enter a username, only do one. [url='mailbox.php']> Back[/url]"); } if(!$_POST['user1'] && !$_POST['user2']) { die("You must select a contact or enter a username. [url='mailbox.php']> Back[/url]"); } $sendto=($_POST['user1']) ? $_POST['user1'] : $_POST['user2']; $q=$db->query("SELECT userid FROM users WHERE username='{$sendto}'"); if($db->num_rows($q)==0) { die("You cannot send mail to nonexistant users. [url='mailbox.php']> Back[/url]"); } $to=$db->fetch_single($q); $db->query("INSERT INTO mail VALUES ('',0,$userid,$to,unix_timestamp(),'$subj','$msg')"); $db->query("UPDATE users SET new_mail=new_mail+1 WHERE userid={$to}"); print "Message sent. [url='mailbox.php']> Back[/url]"; } function mail_delete() { global $db,$ir,$c,$userid,$h; $db->query("DELETE FROM mail WHERE mail_id={$_GET['ID']} AND mail_to=$userid"); print "Message deleted. [url='mailbox.php']> Back[/url]"; } function mail_delall() { global $ir,$c,$userid,$h; print "This will delete all the messages in your inbox. There is [b]NO[/b] undo, so be sure. [url='mailbox.php?action=delall2']> Yes, delete all messages[/url] [url='mailbox.php']> No, go back[/url]"; } function mail_delall2() { global $db,$ir,$c,$userid,$h; $db->query("DELETE FROM mail WHERE mail_to=$userid"); print "All ".$db->affected_rows()." mails in your inbox were deleted. [url='mailbox.php']> Back[/url]"; } function mail_archive() { global $ir,$c,$userid,$h; print "This tool will download an archive of all your messages. [url='dlarchive.php?a=inbox']> Download Inbox[/url] [url='dlarchive.php?a=outbox']> Download Outbox[/url]"; } $h->endpage(); ?> Step 2 upload SpryCollapsiblePanel2.js to the main where mailbox.php is located /* SpryCollapsiblePanel.js */ 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"; } }; Continued ...
  16. Re: [McCodes][v2] Event Layout Mod ill do/attempt that tomoro
  17. Re: [McCodes][v2] Event Layout Mod its a pic of the print screen, freeimagehosting is a slow host just wait a few extra seconds 4 it to load :wink:
  18. Re: [McCodes][v2] Event Layout Mod there is one
  19. Event Layout Mod this will make all events colapsable it also says if the msg is new or not new. You will need to: Edit 1 php file Add 1 directory Add 1 JS File Add 1 CSS File Print Screen Step 1 Make Directory SpryAssets Step 2 Make File SpryAccordion.JS save in spryassets directory /* SpryAccordion.js */ var Spry; if (!Spry) Spry = {}; if (!Spry.Widget) Spry.Widget = {}; Spry.Widget.Accordion = function(element, opts) { this.element = this.getElement(element); this.defaultPanel = 0; this.hoverClass = "AccordionPanelTabHover"; this.openClass = "AccordionPanelOpen"; this.closedClass = "AccordionPanelClosed"; this.focusedClass = "AccordionFocused"; this.enableAnimation = true; this.enableKeyboardNavigation = true; this.currentPanel = null; this.animator = null; this.hasFocus = null; this.duration = 500; this.previousPanelKeyCode = Spry.Widget.Accordion.KEY_UP; this.nextPanelKeyCode = Spry.Widget.Accordion.KEY_DOWN; this.useFixedPanelHeights = true; this.fixedPanelHeight = 0; Spry.Widget.Accordion.setOptions(this, opts, true); // Unfortunately in some browsers like Safari, the Stylesheets our // page depends on may not have been loaded at the time we are called. // This means we have to defer attaching our behaviors until after the // onload event fires, since some of our behaviors rely on dimensions // specified in the CSS. if (Spry.Widget.Accordion.onloadDidFire) this.attachBehaviors(); else Spry.Widget.Accordion.loadQueue.push(this); }; Spry.Widget.Accordion.onloadDidFire = false; Spry.Widget.Accordion.loadQueue = []; Spry.Widget.Accordion.addLoadListener = function(handler) { if (typeof window.addEventListener != 'undefined') window.addEventListener('load', handler, false); else if (typeof document.addEventListener != 'undefined') document.addEventListener('load', handler, false); else if (typeof window.attachEvent != 'undefined') window.attachEvent('onload', handler); }; Spry.Widget.Accordion.processLoadQueue = function(handler) { Spry.Widget.Accordion.onloadDidFire = true; var q = Spry.Widget.Accordion.loadQueue; var qlen = q.length; for (var i = 0; i < qlen; i++) q[i].attachBehaviors(); }; Spry.Widget.Accordion.addLoadListener(Spry.Widget.Accordion.processLoadQueue); Spry.Widget.Accordion.prototype.getElement = function(ele) { if (ele && typeof ele == "string") return document.getElementById(ele); return ele; }; Spry.Widget.Accordion.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.Accordion.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.Accordion.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.Accordion.prototype.onPanelTabMouseOver = function(panel) { if (panel) this.addClassName(this.getPanelTab(panel), this.hoverClass); }; Spry.Widget.Accordion.prototype.onPanelTabMouseOut = function(panel) { if (panel) this.removeClassName(this.getPanelTab(panel), this.hoverClass); }; Spry.Widget.Accordion.prototype.openPanel = function(panel) { var panelA = this.currentPanel; var panelB = panel; if (!panelB || panelA == panelB) return; var contentA; if( panelA ) contentA = this.getPanelContent(panelA); var contentB = this.getPanelContent(panelB); if (! contentB) return; if (this.useFixedPanelHeights && !this.fixedPanelHeight) { this.fixedPanelHeight = (contentA.offsetHeight) ? contentA.offsetHeight : contentA.scrollHeight; } if (this.enableAnimation) { if (this.animator) this.animator.stop(); this.animator = new Spry.Widget.Accordion.PanelAnimator(this, panelB, { duration: this.duration }); this.animator.start(); } else { if(contentA) contentA.style.height = "0px"; contentB.style.height = (this.useFixedPanelHeights ? this.fixedPanelHeight : contentB.scrollHeight) + "px"; } if(panelA) { this.removeClassName(panelA, this.openClass); this.addClassName(panelA, this.closedClass); } this.removeClassName(panelB, this.closedClass); this.addClassName(panelB, this.openClass); this.currentPanel = panelB; }; Spry.Widget.Accordion.prototype.openNextPanel = function() { var panels = this.getPanels(); var curPanelIndex = this.getCurrentPanelIndex(); if( panels && curPanelIndex >= 0 && (curPanelIndex+1) < panels.length ) this.openPanel(panels[curPanelIndex+1]); }; Spry.Widget.Accordion.prototype.openPreviousPanel = function() { var panels = this.getPanels(); var curPanelIndex = this.getCurrentPanelIndex(); if( panels && curPanelIndex > 0 && curPanelIndex < panels.length ) this.openPanel(panels[curPanelIndex-1]); }; Spry.Widget.Accordion.prototype.openFirstPanel = function() { var panels = this.getPanels(); if( panels ) this.openPanel(panels[0]); }; Spry.Widget.Accordion.prototype.openLastPanel = function() { var panels = this.getPanels(); if( panels ) this.openPanel(panels[panels.length-1]); }; Spry.Widget.Accordion.prototype.onPanelClick = function(panel) { // if (this.enableKeyboardNavigation) // this.element.focus(); if (panel != this.currentPanel) this.openPanel(panel); this.focus(); }; Spry.Widget.Accordion.prototype.onFocus = function(e) { // this.element.focus(); this.hasFocus = true; this.addClassName(this.element, this.focusedClass); }; Spry.Widget.Accordion.prototype.onBlur = function(e) { // this.element.blur(); this.hasFocus = false; this.removeClassName(this.element, this.focusedClass); }; Spry.Widget.Accordion.KEY_UP = 38; Spry.Widget.Accordion.KEY_DOWN = 40; Spry.Widget.Accordion.prototype.onKeyDown = function(e) { var key = e.keyCode; if (!this.hasFocus || (key != this.previousPanelKeyCode && key != this.nextPanelKeyCode)) return true; var panels = this.getPanels(); if (!panels || panels.length < 1) return false; var currentPanel = this.currentPanel ? this.currentPanel : panels[0]; var nextPanel = (key == this.nextPanelKeyCode) ? currentPanel.nextSibling : currentPanel.previousSibling; while (nextPanel) { if (nextPanel.nodeType == 1 /* Node.ELEMENT_NODE */) break; nextPanel = (key == this.nextPanelKeyCode) ? nextPanel.nextSibling : nextPanel.previousSibling; } if (nextPanel && currentPanel != nextPanel) this.openPanel(nextPanel); if (e.stopPropagation) e.stopPropagation(); if (e.preventDefault) e.preventDefault(); return false; }; Spry.Widget.Accordion.prototype.attachPanelHandlers = function(panel) { if (!panel) return; var tab = this.getPanelTab(panel); if (tab) { var self = this; Spry.Widget.Accordion.addEventListener(tab, "click", function(e) { return self.onPanelClick(panel); }, false); Spry.Widget.Accordion.addEventListener(tab, "mouseover", function(e) { return self.onPanelTabMouseOver(panel); }, false); Spry.Widget.Accordion.addEventListener(tab, "mouseout", function(e) { return self.onPanelTabMouseOut(panel); }, false); } }; Spry.Widget.Accordion.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.Accordion.prototype.initPanel = function(panel, isDefault) { var content = this.getPanelContent(panel); if (isDefault) { this.currentPanel = panel; this.removeClassName(panel, this.closedClass); this.addClassName(panel, this.openClass); } else { this.removeClassName(panel, this.openClass); this.addClassName(panel, this.closedClass); content.style.height = "0px"; } this.attachPanelHandlers(panel); }; Spry.Widget.Accordion.prototype.attachBehaviors = function() { var panels = this.getPanels(); for (var i = 0; i < panels.length; i++) { this.initPanel(panels[i], i == this.defaultPanel); } 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. var tabIndexAttr = this.element.attributes.getNamedItem("tabindex"); // if (!tabIndexAttr) this.element.tabindex = 0; if (tabIndexAttr) { var self = this; Spry.Widget.Accordion.addEventListener(this.element, "focus", function(e) { return self.onFocus(e); }, false); Spry.Widget.Accordion.addEventListener(this.element, "blur", function(e) { return self.onBlur(e); }, false); Spry.Widget.Accordion.addEventListener(this.element, "keydown", function(e) { return self.onKeyDown(e); }, false); } } }; Spry.Widget.Accordion.prototype.getPanels = function() { return this.getElementChildren(this.element); }; Spry.Widget.Accordion.prototype.getCurrentPanel = function() { return this.currentPanel; }; Spry.Widget.Accordion.prototype.getCurrentPanelIndex = function() { var panels = this.getPanels(); for( var i = 0 ; i < panels.length; i++ ) { if( this.currentPanel == panels[i] ) return i; } return 0; }; Spry.Widget.Accordion.prototype.getPanelTab = function(panel) { if (!panel) return null; return this.getElementChildren(panel)[0]; }; Spry.Widget.Accordion.prototype.getPanelContent = function(panel) { if (!panel) return null; return this.getElementChildren(panel)[1]; }; Spry.Widget.Accordion.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.Accordion.prototype.focus = function() { if (this.element && this.element.focus) this.element.focus(); }; ///////////////////////////////////////////////////// Spry.Widget.Accordion.PanelAnimator = function(accordion, panel, 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.panelToOpen = accordion.getElement(panel); this.panelData = []; Spry.Widget.Accordion.setOptions(this, opts, true); // 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; // Set up the array of panels we want to animate. var panels = accordion.getPanels(); for (var i = 0; i < panels.length; i++) { var p = panels[i]; var c = accordion.getPanelContent(p); if (c) { var h = c.offsetHeight; if (h == undefined) h = 0; if (p == panel || h > 0) { var obj = new Object; obj.panel = p; obj.content = c; obj.fromHeight = h; obj.toHeight = (p == panel) ? (accordion.useFixedPanelHeights ? accordion.fixedPanelHeight : c.scrollHeight) : 0; obj.increment = (obj.toHeight - obj.fromHeight) / this.steps; obj.overflow = c.style.overflow; this.panelData.push(obj); c.style.overflow = "hidden"; c.style.height = h + "px"; } } } }; Spry.Widget.Accordion.PanelAnimator.prototype.start = function() { var self = this; this.timer = setTimeout(function() { self.stepAnimation(); }, this.interval); }; Spry.Widget.Accordion.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) { for (i = 0; i < this.panelData.length; i++) { obj = this.panelData[i]; obj.content.style.overflow = obj.overflow; } } } this.timer = null; }; Spry.Widget.Accordion.PanelAnimator.prototype.stepAnimation = function() { ++this.stepCount; this.animate(); if (this.stepCount < this.steps) this.start(); else if (this.onComplete) this.onComplete(); }; Spry.Widget.Accordion.PanelAnimator.prototype.animate = function() { var i, obj; if (this.stepCount >= this.steps) { for (i = 0; i < this.panelData.length; i++) { obj = this.panelData[i]; if (obj.panel != this.panel) obj.content.style.height = "0px"; obj.content.style.overflow = obj.overflow; obj.content.style.height = obj.toHeight + "px"; } } else { for (i = 0; i < this.panelData.length; i++) { obj = this.panelData[i]; obj.fromHeight += obj.increment; obj.content.style.height = obj.fromHeight + "px"; } } }; Step 3 Make File SpryAccordion.CSS save to spryassets directory @charset "UTF-8"; /* SpryAccordion.css*/ .Accordion { border-left: solid 1px gray; border-right: solid 1px black; border-bottom: solid 1px gray; overflow: hidden; } /* This is the selector for the AccordionPanel container which houses the * panel tab and a panel content area. It doesn't render visually, but we * make sure that it has zero margin and padding. * * The name of the class ("AccordionPanel") used in this selector is not necessary * to make the widget function. You can use any class name you want to style an * accordion panel container. */ .AccordionPanel { margin: 0px; padding: 0px; } /* This is the selector for the AccordionPanelTab. This container houses * the title for the panel. This is also the container that the user clicks * on to open a specific panel. * * The name of the class ("AccordionPanelTab") used in this selector is not necessary * to make the widget function. You can use any class name you want to style an * accordion panel tab container. */ .AccordionPanelTab { background-color: #CCCCCC; border-top: solid 1px black; border-bottom: solid 1px gray; margin: 0px; padding: 2px; cursor: pointer; -moz-user-select: none; -khtml-user-select: none; } /* This is the selector for a Panel's Content area. It's important to note that * you should never put any padding on the panel's content area if you plan to * use the Accordions panel animations. Placing a non-zero padding on the content * area can cause the accordion to abruptly grow in height while the panels animate. * * Anyone who styles an Accordion *MUST* specify a height on the Accordion Panel * Content container. * * The name of the class ("AccordionPanelContent") used in this selector is not necessary * to make the widget function. You can use any class name you want to style an * accordion panel content container. */ .AccordionPanelContent { overflow: auto; margin: 0px; padding: 0px; height: 200px; } /* This is an example of how to change the appearance of the panel tab that is * currently open. The class "AccordionPanelOpen" is programatically added and removed * from panels as the user clicks on the tabs within the Accordion. */ .AccordionPanelOpen .AccordionPanelTab { background-color: #EEEEEE; } /* This is an example of how to change the appearance of the panel tab as the * mouse hovers over it. The class "AccordionPanelTabHover" is programatically added * and removed from panel tab containers as the mouse enters and exits the tab container. */ .AccordionPanelTabHover { color: #555555; } .AccordionPanelOpen .AccordionPanelTabHover { color: #555555; } /* This is an example of how to change the appearance of all the panel tabs when the * Accordion has focus. The "AccordionFocused" class is programatically added and removed * whenever the Accordion gains or loses keyboard focus. */ .AccordionFocused .AccordionPanelTab { background-color: #3399FF; } /* This is an example of how to change the appearance of the panel tab that is * currently open when the Accordion has focus. */ .AccordionFocused .AccordionPanelOpen .AccordionPanelTab { background-color: #33CCFF; } Step 4 open events.php, replace all content with <?php include "globals.php"; $_GET['delete'] = abs((int) $_GET['delete']); if($_GET['delete']) { $db->query("DELETE FROM events WHERE evID={$_GET['delete']} AND evUSER=$userid"); print "[b]Event Deleted[/b] "; } if($_GET['delall']) { print "This will delete all your events. There is [b]NO[/b] undo, so be sure. > [url='events.php?delall2=1']Yes, delete all my events[/url] > [url='events.php']No, go back[/url] "; $h->endpage(); exit; } if($_GET['delall2']) { $am=$db->num_rows($db->query("SELECT * FROM events WHERE evUSER=$userid")); $db->query("DELETE FROM events WHERE evUSER=$userid"); print "All [b]{$am}[/b] events you had were deleted. > [url='events.php']Back[/url] "; $h->endpage(); exit; } print "[b]Latest 10 events[/b]<hr /> > [url='events.php?delall=1']Delete All Events[/url]<hr />"; $q=$db->query("SELECT * FROM events WHERE evUSER=$userid ORDER BY evTIME DESC LIMIT 10;"); while($r=$db->fetch_row($q)) { print "<script src='SpryAssets/SpryCollapsiblePanel.js' type='text/javascript'></script> <link href='SpryAssets/SpryCollapsiblePanel.css' rel='stylesheet' type='text/css'> <div id='CollapsiblePanel{$r['evID']}' class='CollapsiblePanel'> <div class='CollapsiblePanelTab' tabindex='0'> <table width='100%' border='1' cellpadding='0' cellspacing='0' bgcolor='#666666'> <tr> <td>"; if (!$r['evREAD']){ print "[b]New![/b]"; } else { print "[b]NOT NEW![/b]"; } print " </td> <td>";print "".date('F j Y, g:i:s a',$r['evTIME']); print "</td> <td>[url='events.php?delete={$r[']Delete[/url]</td> </tr> </table> </div> <div class='CollapsiblePanelContent'>{$r['evTEXT']}</div> </div> <script type='text/javascript'> <!-- var CollapsiblePanel1 = new Spry.Widget.CollapsiblePanel('CollapsiblePanel{$r['evID']}', {contentIsOpen:false}); //--> </script>"; if($ir['new_events'] > 0) { $db->query("UPDATE events SET evREAD=1 WHERE evUSER=$userid"); $db->query("UPDATE users SET new_events=0 WHERE userid=$userid"); } } $h->endpage(); ?> Enjoy :-D Other Similar Mods Ive Made: Staff Menu
  20. Re: [McCodes][v2] Staff Menu Mod (1st Mod ive made) here you can style the feilds to your liking just add the color code (no #) and the code will be genorated for you Genorator
  21. Re: [McCodes][v2] Staff Menu Mod (1st Mod ive made) EDIT Done size is now bigger, im gona make a download version now DOWNLOAD
  22. Re: [McCodes][v2] Staff Menu Mod (1st Mod ive made) i was thinking of doing a mod similar to this for the events and the mail system the mail system will show the message sender and subject. it will then have the msg inside it. the events would just be colapsable. should i make that mod or would it be a waste of time?
  23. Re: [McCodes][v2] Staff Menu Mod (1st Mod ive made) Thanx, also here is the demo (not mccodes menu but does same job) http://www.cddesigns.org/Mccode%20v2%20mod/index.php
  24. Re: [McCodes][v2] Staff Menu Mod (1st Mod ive made) nope its not a diffrent layout its just the menue is changed ill make a live version of it to show ya
  25. Re: [McCodes][v2] Staff Menu Mod (1st Mod ive made) Thanx :D also if you want the color scheme changed just ask :D also i just added the Back To Game to the left of Index eg Back To Game | Index + small bug fix time and date is now on bottom of each staff menu
×
×
  • Create New...