You can subscribe to this list here.
| 2005 |
Jan
|
Feb
|
Mar
(95) |
Apr
(270) |
May
(111) |
Jun
|
Jul
|
Aug
(64) |
Sep
(130) |
Oct
(319) |
Nov
(17) |
Dec
(191) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2006 |
Jan
(53) |
Feb
|
Mar
|
Apr
|
May
(6) |
Jun
(387) |
Jul
(102) |
Aug
(247) |
Sep
(120) |
Oct
(1) |
Nov
(8) |
Dec
(21) |
| 2007 |
Jan
(38) |
Feb
(36) |
Mar
|
Apr
(32) |
May
(135) |
Jun
(523) |
Jul
(192) |
Aug
(103) |
Sep
(533) |
Oct
(77) |
Nov
(23) |
Dec
(203) |
| 2008 |
Jan
(312) |
Feb
(1193) |
Mar
(404) |
Apr
(67) |
May
(62) |
Jun
(497) |
Jul
(297) |
Aug
(110) |
Sep
(335) |
Oct
(256) |
Nov
(50) |
Dec
(118) |
| 2009 |
Jan
(67) |
Feb
(10) |
Mar
(1) |
Apr
(1) |
May
|
Jun
(10) |
Jul
(61) |
Aug
|
Sep
(16) |
Oct
(45) |
Nov
(12) |
Dec
(14) |
| 2010 |
Jan
(30) |
Feb
|
Mar
|
Apr
(4) |
May
|
Jun
|
Jul
(7) |
Aug
(7) |
Sep
(5) |
Oct
(5) |
Nov
|
Dec
|
| 2011 |
Jan
(7) |
Feb
(3) |
Mar
(89) |
Apr
(11) |
May
(5) |
Jun
|
Jul
(8) |
Aug
(1) |
Sep
(2) |
Oct
|
Nov
(2) |
Dec
(89) |
| 2012 |
Jan
(7) |
Feb
(1) |
Mar
(1) |
Apr
|
May
|
Jun
|
Jul
|
Aug
(4) |
Sep
(3) |
Oct
(42) |
Nov
(1) |
Dec
|
| 2013 |
Jan
|
Feb
|
Mar
(19) |
Apr
(90) |
May
(38) |
Jun
(235) |
Jul
(38) |
Aug
(10) |
Sep
|
Oct
(29) |
Nov
|
Dec
|
| 2014 |
Jan
|
Feb
|
Mar
|
Apr
(6) |
May
(52) |
Jun
|
Jul
(7) |
Aug
|
Sep
(17) |
Oct
|
Nov
|
Dec
|
|
From: FlorinCB <ory...@us...> - 2008-09-18 00:44:06
|
Update of /cvsroot/mxbb/mx_music/phpbb2/mx_mod/mx_shared/mygosumenu/1.3/images In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv19367/mx_mod/mx_shared/mygosumenu/1.3/images Added Files: arrow1.gif arrow2.gif button1-click.gif button1.gif tree-leaf-last.gif tree-leaf.gif tree-node-open.gif tree-node.gif Log Message: upgrade --- NEW FILE: tree-leaf-last.gif --- (This appears to be a binary file; contents omitted.) --- NEW FILE: arrow2.gif --- (This appears to be a binary file; contents omitted.) --- NEW FILE: tree-leaf.gif --- (This appears to be a binary file; contents omitted.) --- NEW FILE: button1.gif --- (This appears to be a binary file; contents omitted.) --- NEW FILE: tree-node.gif --- (This appears to be a binary file; contents omitted.) --- NEW FILE: tree-node-open.gif --- (This appears to be a binary file; contents omitted.) --- NEW FILE: button1-click.gif --- (This appears to be a binary file; contents omitted.) --- NEW FILE: arrow1.gif --- (This appears to be a binary file; contents omitted.) |
|
From: FlorinCB <ory...@us...> - 2008-09-18 00:44:06
|
Update of /cvsroot/mxbb/mx_music/phpbb2/mx_mod/mx_shared/mygosumenu/1.4 In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv19367/mx_mod/mx_shared/mygosumenu/1.4 Added Files: XulMenu.js XulMenu.txt example1-cache.html example1-cache.js example1.css example1.html example2.css example2.html Log Message: upgrade --- NEW FILE: example1-cache.js --- document.write('<table cellspacing="0" cellpadding="0" id="menu1" class="XulMenu"><tr><td><a class="button" href="javascript:void(0)">Viewer</a><div class="section"><a class="item" href="example1.html">Home</a><a class="item" href="example1.html">Close</a></div></td><td><a class="button" href="javascript:void(0)">Articles</a><div class="section"><a class="item" href="javascript:void(0)">Advocacy<img class="arrow" src="images/arrow1.gif" width="4" height="7" alt="" /></a><div class="section"><a class="item" href="example1.html">Advocacy One</a><a class="item" href="example1.html">Advocacy Two</a><a class="item" href="example1.html">Advocacy Three</a><a class="item" href="example1.html">Advocacy Four</a><a class="item" href="example1.html">Advocacy Five</a><a class="item" href="example1.html">Advocacy Six</a><a class="item" href="example1.html">Advocacy Seven</a></div><a class="item" href="javascript:void(0)">Blogs<img class="arrow" src="images/arrow1.gif" width="4" height="7" alt="" /></a><div class="section"><a class="item" href="javascript:void(0)">PHP Guru<img class="arrow" src="images/arrow1.gif" width="4" height="7" alt="" /></a><div class="section"><a class="item" href="example1.html">Guru One</a><a class="item" href="example1.html">Guru Two</a><a class="item" href="example1.html">Guru Three</a><a class="item" href="example1.html">Guru Four</a></div></div><a class="item" href="javascript:void(0)">Design<img class="arrow" src="images/arrow1.gif" width="4" height="7" alt="" /></a><div class="section"><a class="item" href="javascript:void(0)">Archive<img class="arrow" src="images/arrow1.gif" width="4" height="7" alt="" /></a><div class="section"><a class="item" href="example1.hmtl">Archive One</a></div><a class="item" href="example1.html">Design One</a><a class="item" href="example1.html">Design Two</a><a class="item" href="example1.html">Design Three</a><a class="item" href="example1.html">Design Four</a><a class="item" href="example1.html">Design Five</a></div><a class="item" href="javascript:void(0)">Develop<img class="arrow" src="images/arrow1.gif" width="4" height="7" alt="" /></a><div class="section"><a class="item" href="example1.html">Develop One</a><a class="item" href="example1.html">Develop Two</a><a class="item" href="example1.html">Develop Three</a><a class="item" href="example1.html">Develop Five</a><a class="item" href="example1.html">Develop Six</a><a class="item" href="example1.html">Develop Seven</a><a class="item" href="example1.html">Develop Eight</a></div><a class="item" href="javascript:void(0)">News<img class="arrow" src="images/arrow1.gif" width="4" height="7" alt="" /></a><div class="section"><a class="item" href="example1.html">News One</a><a class="item" href="example1.html">News Two</a><a class="item" href="example1.html">News Three</a><a class="item" href="example1.html">News Four</a></div><a class="item" href="javascript:void(0)">Reviews<img class="arrow" src="images/arrow1.gif" width="4" height="7" alt="" /></a><div class="section"><a class="item" href="example1.html">Review One</a><a class="item" href="example1.html">Review Two</a></div><a class="item" href="example1.html">File Manager</a></div></td><td><a class="button" href="javascript:void(0)">Links</a><div class="section"><a class="item" href="javascript:void(0)">Advocacy<img class="arrow" src="images/arrow1.gif" width="4" height="7" alt="" /></a><div class="section"><a class="item" href="javascript:void(0)">Interviews<img class="arrow" src="images/arrow1.gif" width="4" height="7" alt="" /></a><div class="section"><a class="item" href="example1.html">Interview One</a><a class="item" href="example1.html">Interview Two</a><a class="item" href="example1.html">Interview Three</a><a class="item" href="example1.html">Interview Four</a><a class="item" href="example1.html">Interview Five</a><a class="item" href="example1.html">Interview Six</a><a class="item" href="example1.html">Interview Seven</a></div><a class="item" href="javascript:void(0)">PHP<img class="arrow" src="images/arrow1.gif" width="4" height="7" alt="" /></a><div class="section"><a class="item" href="example1.html">PHP One</a><a class="item" href="example1.html">PHP Two</a><a class="item" href="example1.html">PHP Three</a></div><a class="item" href="example1.html">Advocacy One</a><a class="item" href="example1.html">Advocacy Two</a><a class="item" href="example1.html">Advocacy Three</a><a class="item" href="example1.html">Advocacy Four</a><a class="item" href="example1.html">Advocacy Five</a></div><a class="item" href="javascript:void(0)">Community<img class="arrow" src="images/arrow1.gif" width="4" height="7" alt="" /></a><div class="section"><a class="item" href="example1.html">Community One</a><a class="item" href="example1.html">Community Two</a><a class="item" href="example1.html">Community Three</a><a class="item" href="example1.html">Community Four</a><a class="item" href="example1.html">Community Five</a></div><a class="item" href="javascript:void(0)">Concepts<img class="arrow" src="images/arrow1.gif" width="4" height="7" alt="" /></a><div class="section"><a class="item" href="javascript:void(0)">Books<img class="arrow" src="images/arrow1.gif" width="4" height="7" alt="" /></a><div class="section"><a class="item" href="example1.html">Book One</a><a class="item" href="example1.html">Book Two</a><a class="item" href="example1.html">Book Three</a><a class="item" href="example1.html">Book Four</a></div><a class="section" href="javascript:void(0)">Patterns<img class="arrow" src="images/arrow1.gif" width="4" height="7" alt="" /></a><div class="section"><a class="item" href="example1.html">Pattern One</a><a class="item" href="example1.html">Pattern Two</a><a class="item" href="example1.html">Pattern Three</a><a class="item" href="example1.html">Pattern Four</a></div><a class="item" href="example1.html">Concept One</a><a class="item" href="example1.html">Concept Two</a><a class="item" href="example1.html">Concept Three</a></div><a class="item" href="javascript:void(0)">Tutorials<img class="arrow" src="images/arrow1.gif" width="4" height="7" alt="" /></a><div class="section"><a class="item" href="javascript:void(0)">Introductory<img class="arrow" src="images/arrow1.gif" width="4" height="7" alt="" /></a><div class="section"><a class="item" href="example1.html">Introductory One</a><a class="item" href="example1.html">IIntroductory Two</a><a class="item" href="example1.html">Introductory Three</a><a class="item" href="example1.html">Introductory Four</a><a class="item" href="example1.html">Introductory Five</a><a class="item" href="example1.html">Introductory Six</a><a class="item" href="example1.html">Introductory Seven</a></div><a class="item" href="example1.html">Tutorial One</a><a class="item" href="example1.html">Tutorial Two</a><a class="item" href="example1.html">Tutorial Three</a><a class="item" href="example1.html">Tutorial Four</a><a class="item" href="example1.html">Tutorial Five</a><a class="item" href="example1.html">Tutorial Six</a><a class="item" href="example1.html">Tutorial Seven</a><a class="item" href="example1.html">Tutorial Eight</a><a class="item" href="example1.html">Tutorial Nine</a></div></div></td><td><a class="button" href="javascript:void(0)">Help</a><div class="section"><a class="item" href="example1.html">About XulMenu</a><a class="item" href="example1.html">About this site</a></div></td></tr></table>'); --- NEW FILE: example1-cache.html --- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <title>#1.4 XulMenu example 1</title> <link rel="stylesheet" type="text/css" href="example1.css" /> <script type="text/javascript" src="../ie5.js"></script> <script type="text/javascript" src="XulMenu.js"></script> <style type="text/css"> body { margin: 0; padding: 0; background: #ffffff; } #bar { background: #ECE9D8; border: 1px solid; border-color: #ffffff #ACA899 #ACA899 #ffffff; padding-top: 3px; padding-bottom: 3px; cursor: default; } #menu1 { padding-left: 5px; } #search { position: absolute; top: 0; right: 5px; } #search input, #search select { font-family: georgia, tahoma, verdana; font-size: 12px; margin-top: 4px; } </style> </head> <body> <script type="text/javscript"> /* preload images */ var arrow1 = new Image(4, 7); arrow1.src = "images/arrow1.gif"; var arrow2 = new Image(4, 7); arrow2.src = "images/arrow2.gif"; </script> <div id="bar"> <script type="text/javascript" src="example1-cache.js"></script> <div id="search"> <input type="text" name="searchField" value="" /> <select name="searchWhat"><option value="">Articles</option><option value="">Links</option><option value="">PHP Manual</option></select> <input type="button" value="Search" /> </div> </div> <script type="text/javascript"> var menu1 = new XulMenu("menu1"); menu1.arrow1 = "images/arrow1.gif"; menu1.arrow2 = "images/arrow2.gif"; menu1.init(); </script> </body> </html> --- NEW FILE: example2.css --- .XulMenu { font-family: georgia, tahoma, verdana; font-size: 11px; -moz-user-select: none; } .XulMenu .button, .XulMenu .button:hover, .XulMenu .button-active, .XulMenu .button-active:hover { line-height: normal; padding: 5px 6px 4px 6px; border: 1px solid #ECE9D8; color: #000000; text-decoration: none; cursor: default; white-space: nowrap; display: block; position: relative; } .XulMenu .button:hover { border-color: #ffffff #ACA899 #ACA899 #ffffff; } .XulMenu .button-active, .XulMenu .button-active:hover { border-color: #ACA899 #ffffff #ffffff #ACA899; } .XulMenu .item, .XulMenu .item:hover, .XulMenu .item-active, .XulMenu .item-active:hover { background: #ffffff; line-height: normal; padding: 3px 30px 3px 20px; color: #000000; text-decoration: none; cursor: default; white-space: nowrap; display: block; position: relative; } .XulMenu .item:hover, .XulMenu .item-active, .XulMenu .item-active:hover { background: #316AC5; color: #ffffff; } .XulMenu .section { background: #ffffff; border: 1px solid; border-color: #F1EFE2 #716F64 #716F64 #F1EFE2; padding: 2px 1px 1px 2px; position: absolute; visibility: hidden; z-index: -1; } .XulMenu .arrow { position: absolute; top: 7px; right: 8px; border: 0; } * html .XulMenu td { position: relative; } /* ie 5.0 fix */ --- NEW FILE: example1.css --- .XulMenu { font-family: georgia, tahoma, verdana; font-size: 11px; -moz-user-select: none; } .XulMenu .button, .XulMenu .button:hover, .XulMenu .button-active, .XulMenu .button-active:hover { line-height: normal; padding: 5px 6px 4px 6px; border: 1px solid #ECE9D8; color: #000000; text-decoration: none; cursor: default; white-space: nowrap; display: block; position: relative; } .XulMenu .button:hover { border-color: #ffffff #ACA899 #ACA899 #ffffff; } .XulMenu .button-active, .XulMenu .button-active:hover { border-color: #ACA899 #ffffff #ffffff #ACA899; } .XulMenu .item, .XulMenu .item:hover, .XulMenu .item-active, .XulMenu .item-active:hover { background: #ffffff; line-height: normal; padding: 3px 30px 3px 20px; color: #000000; text-decoration: none; cursor: default; white-space: nowrap; display: block; position: relative; } .XulMenu .item:hover, .XulMenu .item-active, .XulMenu .item-active:hover { background: #316AC5; color: #ffffff; } .XulMenu .section { background: #ffffff; border: 1px solid; border-color: #F1EFE2 #716F64 #716F64 #F1EFE2; padding: 2px 1px 1px 2px; position: absolute; visibility: hidden; z-index: -1; } .XulMenu .arrow { position: absolute; top: 7px; right: 8px; border: 0; } * html .XulMenu td { position: relative; } /* ie 5.0 fix */ --- NEW FILE: example1.html --- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <script type="text/javascript" src="file://d:/dhtml/dev/debug.js"></script> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <title>#1.4 XulMenu example 1</title> <link rel="stylesheet" type="text/css" href="example1.css" /> <script type="text/javascript" src="../ie5.js"></script> <script type="text/javascript" src="XulMenu.js"></script> <style type="text/css"> body { margin: 0; padding: 0; background: #ffffff; } #bar { background: #ECE9D8; border: 1px solid; border-color: #ffffff #ACA899 #ACA899 #ffffff; padding-top: 3px; padding-bottom: 3px; padding-left: 5px; cursor: default; } #search { position: absolute; top: 0; right: 5px; } #search input, #search select { font-family: georgia, tahoma, verdana; font-size: 12px; margin-top: 4px; } p { font-family: georgia, tahoma, verdana; font-size: 11px; margin: 2em; } </style> </head> <body> <script type="text/javscript"> /* preload images */ var arrow1 = new Image(4, 7); arrow1.src = "images/arrow1.gif"; var arrow2 = new Image(4, 7); arrow2.src = "images/arrow2.gif"; </script> <div id="bar"> <table cellspacing="0" cellpadding="0" id="menu1" class="XulMenu"> <tr> <td> <a class="button" href="javascript:void(0)">Viewer</a> <div class="section"> <a class="item" href="example1.html">Home</a> <a class="item" href="example1.html">Close</a> </div> </td> <td> <a class="button" href="javascript:void(0)">Articles</a> <div class="section"> <a class="item" href="javascript:void(0)">Advocacy<img class="arrow" src="images/arrow1.gif" width="4" height="7" alt="" /></a> <div class="section"> <a class="item" href="example1.html">Advocacy One</a> <a class="item" href="example1.html">Advocacy Two</a> <a class="item" href="example1.html">Advocacy Three</a> <a class="item" href="example1.html">Advocacy Four</a> <a class="item" href="example1.html">Advocacy Five</a> <a class="item" href="example1.html">Advocacy Six</a> <a class="item" href="example1.html">Advocacy Seven</a> </div> <a class="item" href="javascript:void(0)">Blogs<img class="arrow" src="images/arrow1.gif" width="4" height="7" alt="" /></a> <div class="section"> <a class="item" href="javascript:void(0)">PHP Guru<img class="arrow" src="images/arrow1.gif" width="4" height="7" alt="" /></a> <div class="section"> <a class="item" href="example1.html">Guru One</a> <a class="item" href="example1.html">Guru Two</a> <a class="item" href="example1.html">Guru Three</a> <a class="item" href="example1.html">Guru Four</a> </div> </div> <a class="item" href="javascript:void(0)">Design<img class="arrow" src="images/arrow1.gif" width="4" height="7" alt="" /></a> <div class="section"> <a class="item" href="javascript:void(0)">Archive<img class="arrow" src="images/arrow1.gif" width="4" height="7" alt="" /></a> <div class="section"> <a class="item" href="example1.hmtl">Archive One</a> </div> <a class="item" href="example1.html">Design One</a> <a class="item" href="example1.html">Design Two</a> <a class="item" href="example1.html">Design Three</a> <a class="item" href="example1.html">Design Four</a> <a class="item" href="example1.html">Design Five</a> </div> <a class="item" href="javascript:void(0)">Develop<img class="arrow" src="images/arrow1.gif" width="4" height="7" alt="" /></a> <div class="section"> <a class="item" href="example1.html">Develop One</a> <a class="item" href="example1.html">Develop Two</a> <a class="item" href="example1.html">Develop Three</a> <a class="item" href="example1.html">Develop Five</a> <a class="item" href="example1.html">Develop Six</a> <a class="item" href="example1.html">Develop Seven</a> <a class="item" href="example1.html">Develop Eight</a> </div> <a class="item" href="javascript:void(0)">News<img class="arrow" src="images/arrow1.gif" width="4" height="7" alt="" /></a> <div class="section"> <a class="item" href="example1.html">News One</a> <a class="item" href="example1.html">News Two</a> <a class="item" href="example1.html">News Three</a> <a class="item" href="example1.html">News Four</a> </div> <a class="item" href="javascript:void(0)">Reviews<img class="arrow" src="images/arrow1.gif" width="4" height="7" alt="" /></a> <div class="section"> <a class="item" href="example1.html">Review One</a> <a class="item" href="example1.html">Review Two</a> </div> <a class="item" href="example1.html">File Manager</a> </div> </td> <td> <a class="button" href="javascript:void(0)">Links</a> <div class="section"> <a class="item" href="javascript:void(0)">Advocacy<img class="arrow" src="images/arrow1.gif" width="4" height="7" alt="" /></a> <div class="section"> <a class="item" href="javascript:void(0)">Interviews<img class="arrow" src="images/arrow1.gif" width="4" height="7" alt="" /></a> <div class="section"> <a class="item" href="example1.html">Interview One</a> <a class="item" href="example1.html">Interview Two</a> <a class="item" href="example1.html">Interview Three</a> <a class="item" href="example1.html">Interview Four</a> <a class="item" href="example1.html">Interview Five</a> <a class="item" href="example1.html">Interview Six</a> <a class="item" href="example1.html">Interview Seven</a> </div> <a class="item" href="javascript:void(0)">PHP<img class="arrow" src="images/arrow1.gif" width="4" height="7" alt="" /></a> <div class="section"> <a class="item" href="example1.html">PHP One</a> <a class="item" href="example1.html">PHP Two</a> <a class="item" href="example1.html">PHP Three</a> </div> <a class="item" href="example1.html">Advocacy One</a> <a class="item" href="example1.html">Advocacy Two</a> <a class="item" href="example1.html">Advocacy Three</a> <a class="item" href="example1.html">Advocacy Four</a> <a class="item" href="example1.html">Advocacy Five</a> </div> <a class="item" href="javascript:void(0)">Community<img class="arrow" src="images/arrow1.gif" width="4" height="7" alt="" /></a> <div class="section"> <a class="item" href="example1.html">Community One</a> <a class="item" href="example1.html">Community Two</a> <a class="item" href="example1.html">Community Three</a> <a class="item" href="example1.html">Community Four</a> <a class="item" href="example1.html">Community Five</a> </div> <a class="item" href="javascript:void(0)">Concepts<img class="arrow" src="images/arrow1.gif" width="4" height="7" alt="" /></a> <div class="section"> <a class="item" href="javascript:void(0)">Books<img class="arrow" src="images/arrow1.gif" width="4" height="7" alt="" /></a> <div class="section"> <a class="item" href="example1.html">Book One</a> <a class="item" href="example1.html">Book Two</a> <a class="item" href="example1.html">Book Three</a> <a class="item" href="example1.html">Book Four</a> </div> <a class="section" href="javascript:void(0)">Patterns<img class="arrow" src="images/arrow1.gif" width="4" height="7" alt="" /></a> <div class="section"> <a class="item" href="example1.html">Pattern One</a> <a class="item" href="example1.html">Pattern Two</a> <a class="item" href="example1.html">Pattern Three</a> <a class="item" href="example1.html">Pattern Four</a> </div> <a class="item" href="example1.html">Concept One</a> <a class="item" href="example1.html">Concept Two</a> <a class="item" href="example1.html">Concept Three</a> </div> <a class="item" href="javascript:void(0)">Tutorials<img class="arrow" src="images/arrow1.gif" width="4" height="7" alt="" /></a> <div class="section"> <a class="item" href="javascript:void(0)">Introductory<img class="arrow" src="images/arrow1.gif" width="4" height="7" alt="" /></a> <div class="section"> <a class="item" href="example1.html">Introductory One</a> <a class="item" href="example1.html">IIntroductory Two</a> <a class="item" href="example1.html">Introductory Three</a> <a class="item" href="example1.html">Introductory Four</a> <a class="item" href="example1.html">Introductory Five</a> <a class="item" href="example1.html">Introductory Six</a> <a class="item" href="example1.html">Introductory Seven</a> </div> <a class="item" href="example1.html">Tutorial One</a> <a class="item" href="example1.html">Tutorial Two</a> <a class="item" href="example1.html">Tutorial Three</a> <a class="item" href="example1.html">Tutorial Four</a> <a class="item" href="example1.html">Tutorial Five</a> <a class="item" href="example1.html">Tutorial Six</a> <a class="item" href="example1.html">Tutorial Seven</a> <a class="item" href="example1.html">Tutorial Eight</a> <a class="item" href="example1.html">Tutorial Nine</a> </div> </div> </td> <td> <a class="button" href="javascript:void(0)">Help</a> <div class="section"> <a class="item" href="example1.html">About XulMenu</a> <a class="item" href="example1.html">About this site</a> </div> </td> </tr> </table> <div id="search"> <input type="text" name="searchField" value="" /> <select name="searchWhat"><option value="">Articles</option><option value="">Links</option><option value="">PHP Manual</option></select> <input type="button" value="Search" /> </div> </div> <script type="text/javascript"> var menu1 = new XulMenu("menu1"); menu1.arrow1 = "images/arrow1.gif"; menu1.arrow2 = "images/arrow2.gif"; menu1.init(); </script> <p> <b>Project</b>: <a href="http://gosu.pl/dhtml/mygosumenu.html">mygosuMenu</a> <br /> <b>Menu type</b>: #1.4 XulMenu example 1 <br /> <b>Features</b>: <br /> - horizontal or vertical menu <br /> - unlimited nesting <br /> - can be positioned statically or absolutely <br /> - position of submenus can be changed, so they can for example overflow parent elements <br /> - on the same page there can be many menus created <br /> - seperated into 3 layers: behaviour(javascript), structure(html), presentation(css) <br /> - search engine friendly <br /> - free for any use (BSD license) <br /> <b>Compatibility</b>: Tested and works great on: IE 5.0/5.5/6.0, Mozilla 1.4/1.7, Opera 7.11/7.23/7.51, Netscape 7.11, Firefox 0.7/0.8/0.9, Safari 1.2 </p> </body> </html> --- NEW FILE: XulMenu.txt --- ---------------- INSTALL ---------------- 1) include .css file 2) include .js file 3) put html structure 4) initialize menu Html structure is: - XulMenu - button - section - item - item - item - section - item - item - item - item - button - section - item - item - button Example of initializing: var menu = new XulMenu("id_of_the_menu"); menu.init(); Example of initializing and setting additional stuff: var menu1 = new XulMenu("menu1"); menu1.type = "horizontal"; menu1.position.level1.top = 0; menu1.position.level1.left = 0; menu1.position.levelX.top = 0; menu1.position.levelX.left = 0; menu1.arrow1 = "images/arrow.gif"; menu1.arrow2 = "images/arrow-active.gif"; Note: arrow1 & arrow2 set only when you want the arrow image to change when element is active. If you don't want the arrow to change keep both variables empty. ---------------- API ---------------- Controlling the menu: show(id) hide(id) hideAll() hideHigherOrEqualLevels(n) id = id of the element n = level examples: 1) menu1.show("menu1-1"); 2) menu1.show("menu1-1"); menu1.show("menu1-1-2"); menu1.show("menu1-1-2-0"); menu1.hideHigherOrEqualLevels(2); Both examples show the same. ---------------- CACHING ---------------- If the menu is big, for example you want the whole structure of the site in the menu and it is 50 KB then you should cache this data, so the user downloads this code only once and not on each request. See files: example1-cache.html, example1-cache.js example1-cache.html - instead of menu structure put this: <script type="text/javascript" src="example1-cache.js"></script> example1-cache.js - the code with removed whitespace characters and some js code: document.write('... code of the menu with removed spaces and new lines ...'); Advantages: reduce bandwidth, faster page loading Disadvantages: the links won't be visible to search engines Note: Removing whitespace characters from the menu code is easy with this tool: http://gosu.pl/demo/dhtml-tools/String.replace.html 1) In "Before" put the menu code. 2) In "Regexp" put this: \s*(<[^>]*>) 3) In "NewSubStr" put this: $1 Click Replace and it's done ! ---------------- FEATURES ---------------- - horizontal or vertical menu - unlimited nesting - can be positioned statically or absolutely - position of submenus can be changed, so they can for example overflow parent elements - on the same page there can be many menus created - seperated into 3 layers: behaviour(javascript), structure(html), presentation(css) - search engine friendly - free for any use (BSD license) ---------------- COMPATIBILITY ---------------- Tested on: IE, Mozilla, Opera, Safari, Netscape, Firefox ---------------- CHANGELOG ---------------- *** 1.4.2 *** - added support for IE 5.0 & IE 5.5 *** 1.4.1 *** - [js] fixed a minor bug, onclick event --- NEW FILE: XulMenu.js --- /* * DO NOT REMOVE THIS NOTICE * * PROJECT: mygosuMenu * VERSION: 1.4.2 * COPYRIGHT: (c) 2003,2004 Cezary Tomczak * LINK: http://gosu.pl/dhtml/mygosumenu.html * LICENSE: BSD (revised) */ function XulMenu(id) { this.type = "horizontal"; this.position = { "level1": { "top": 0, "left": 0}, "levelX": { "top": 0, "left": 0} } this.zIndex = { "visible": 1, "hidden": -1 } this.arrow1 = null; this.arrow2 = null; // Browser detection this.browser = { "ie": Boolean(document.body.currentStyle), "ie5": (navigator.appVersion.indexOf("MSIE 5.5") != -1 || navigator.appVersion.indexOf("MSIE 5.0") != -1) }; if (!this.browser.ie) { this.browser.ie5 = false; } /* Initialize the menu */ this.init = function() { if (!document.getElementById(this.id)) alert("Element '"+ this.id +"' does not exist in this document. XulMenu cannot be initialized."); if (this.type != "horizontal" && this.type != "vertical") { return alert("XulMenu.init() failed. Unknown menu type: '"+this.type+"'"); } document.onmousedown = click; if (this.browser.ie) { this.fixWrap(); } this.fixSections(); this.parse(document.getElementById(this.id).childNodes, this.tree, this.id); } /* Search for .section elements and set width for them */ this.fixSections = function() { var arr = document.getElementById(this.id).getElementsByTagName("div"); var sections = new Array(); var widths = new Array(); for (var i = 0; i < arr.length; i++) { if (arr[i].className == "section") { sections.push(arr[i]); } } for (var i = 0; i < sections.length; i++) { widths.push(this.getMaxWidth(sections[i].childNodes)); } for (var i = 0; i < sections.length; i++) { sections[i].style.width = (widths[i]) + "px"; } if (self.browser.ie) { for (var i = 0; i < sections.length; i++) { this.setMaxWidth(sections[i].childNodes, widths[i]); } } } this.fixWrap = function() { var elements = document.getElementById(this.id).getElementsByTagName("a"); for (var i = 0; i < elements.length; i++) { if (/item/.test(elements[i].className)) { elements[i].innerHTML = '<div nowrap="nowrap">'+elements[i].innerHTML+'</div>'; } } } /* Search for an element with highest width, return that width */ this.getMaxWidth = function(nodes) { var maxWidth = 0; for (var i = 0; i < nodes.length; i++) { if (nodes[i].nodeType != 1 || nodes[i].className == "section") { continue; } if (nodes[i].offsetWidth > maxWidth) maxWidth = nodes[i].offsetWidth; } return maxWidth; } /* Set width for item elements */ this.setMaxWidth = function(nodes, maxWidth) { for (var i = 0; i < nodes.length; i++) { if (nodes[i].nodeType == 1 && /item/.test(nodes[i].className) && nodes[i].currentStyle) { if (this.browser.ie) { nodes[i].style.width = (maxWidth) + "px"; } else { nodes[i].style.width = (maxWidth - parseInt(nodes[i].currentStyle.paddingLeft) - parseInt(nodes[i].currentStyle.paddingRight)) + "px"; } } } } /* Parse menu structure, create events, position elements */ this.parse = function(nodes, tree, id) { for (var i = 0; i < nodes.length; i++) { if (nodes[i].nodeType != 1) { continue }; switch (nodes[i].className) { case "button": nodes[i].id = id + "-" + tree.length; tree.push(new Array()); nodes[i].onmouseover = buttonOver; nodes[i].onclick = buttonClick; break; case "item": nodes[i].id = id + "-" + tree.length; tree.push(new Array()); nodes[i].onmouseover = itemOver; nodes[i].onmouseout = itemOut; nodes[i].onclick = itemClick; break; case "section": nodes[i].id = id + "-" + (tree.length - 1) + "-section"; var box1 = document.getElementById(id + "-" + (tree.length - 1)); var box2 = document.getElementById(nodes[i].id); var el = new Element(box1.id); if (el.level == 1) { if (this.type == "horizontal") { box2.style.top = (box1.offsetTop + box1.offsetHeight + this.position.level1.top) + "px"; if (this.browser.ie) { box2.style.left = (this.position.level1.left) + "px"; } else { box2.style.left = (box1.offsetLeft + this.position.level1.left) + "px"; } } else if (this.type == "vertical") { box2.style.top = (box1.offsetTop + this.position.level1.top) + "px"; if (this.browser.ie) { box2.style.left = (box1.offsetWidth + this.position.level1.left) + "px"; } else { box2.style.left = (box1.offsetLeft + box1.offsetWidth + this.position.level1.left) + "px"; } } } else { box2.style.top = (box1.offsetTop + this.position.levelX.top) + "px"; box2.style.left = (box1.offsetLeft + box1.offsetWidth + this.position.levelX.left) + "px"; } break; case "arrow": nodes[i].id = id + "-" + (tree.length - 1) + "-arrow"; break; } if (nodes[i].childNodes) { if (nodes[i].className == "section") { this.parse(nodes[i].childNodes, tree[tree.length - 1], id + "-" + (tree.length - 1)); } else { this.parse(nodes[i].childNodes, tree, id); } } } } /* Hide all sections */ this.hideAll = function() { for (var i = this.visible.length - 1; i >= 0; i--) { this.hide(this.visible[i]); } } /* Hide higher or equal levels */ this.hideHigherOrEqualLevels = function(n) { for (var i = this.visible.length - 1; i >= 0; i--) { var el = new Element(this.visible[i]); if (el.level >= n) { this.hide(el.id); } else { return; } } } /* Hide a section */ this.hide = function(id) { var el = new Element(id); document.getElementById(id).className = (el.level == 1 ? "button" : "item"); if (el.level > 1 && this.arrow2) { document.getElementById(id + "-arrow").src = this.arrow1; } document.getElementById(id + "-section").style.visibility = "hidden"; document.getElementById(id + "-section").style.zIndex = this.zIndex.hidden; if (this.visible.contains(id)) { if (this.visible.getLast() == id) { this.visible.pop(); } else { throw "XulMenu.hide("+id+") failed, trying to hide element that is not deepest visible element"; } } else { throw "XulMenu.hide("+id+") failed, cannot hide element that is not visible"; } } /* Show a section */ this.show = function(id) { var el = new Element(id); document.getElementById(id).className = (el.level == 1 ? "button-active" : "item-active"); if (el.level > 1 && this.arrow2) { document.getElementById(id + "-arrow").src = this.arrow2; } document.getElementById(id + "-section").style.visibility = "visible"; document.getElementById(id + "-section").style.zIndex = this.zIndex.visible; this.visible.push(id); } /* event, document.onmousedown */ function click(e) { var el; if (e) { el = e.target.tagName ? e.target : e.target.parentNode; } else { el = window.event.srcElement; if (el.parentNode && /item/.test(el.parentNode.className)) { el = el.parentNode; } } if (!self.visible.length) { return }; if (!el.onclick) { self.hideAll(); } } /* event, button.onmouseover */ function buttonOver() { if (!self.visible.length) { return; } if (self.visible.contains(this.id)) { return }; self.hideAll(); var el = new Element(this.id); if (el.hasChilds()) { self.show(this.id); } } /* event, button.onclick */ function buttonClick() { this.blur(); if (self.visible.length) { self.hideAll(); } else { var el = new Element(this.id); if (el.hasChilds()) { self.show(this.id); } } } /* event, item.onmouseover */ function itemOver() { var el = new Element(this.id); self.hideHigherOrEqualLevels(el.level); if (el.hasChilds()) { self.show(this.id); } } /* event, item.onmouseout */ function itemOut() { var el = new Element(this.id); if (!el.hasChilds()) { document.getElementById(this.id).className = "item"; } } /* event, item.onclick */ function itemClick() { this.blur(); var el = new Element(this.id); self.hideHigherOrEqualLevels(el.level); if (el.hasChilds()) { self.show(this.id); } } function Element(id) { /* Get Level of given id * Examples: menu-1 (1 level), menu-1-4 (2 level) */ this.getLevel = function() { var s = this.id.substr(this.menu.id.length); return s.substrCount("-"); } /* Check whether an element has a sub-section */ this.hasChilds = function() { return Boolean(document.getElementById(this.id + "-section")); } if (!id) { throw "XulMenu.Element(id) failed, id cannot be empty"; } this.menu = self; this.id = id; this.level = this.getLevel(); } this.id = id; var self = this; this.tree = new Array(); /* Multidimensional array, structure of the menu */ this.visible = new Array(); /* Example: Array("menu-0", "menu-0-4", ...), succession is important ! */ } /* Check whether array contains given string */ if (typeof Array.prototype.contains == "undefined") { Array.prototype.contains = function(s) { for (var i = 0; i < this.length; i++) { if (this[i] === s) { return true; } } return false; } } /* Get the last element from the array */ if (typeof Array.prototype.getLast == "undefined") { Array.prototype.getLast = function() { return this[this.length-1]; } } /* Counts the number of substring occurrences */ if (typeof String.prototype.substrCount == "undefined") { String.prototype.substrCount = function(s) { return this.split(s).length - 1; } } --- NEW FILE: example2.html --- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <title>#1.4 XulMenu example 2</title> <link rel="stylesheet" type="text/css" href="example2.css" /> <script type="text/javascript" src="../ie5.js"></script> <script type="text/javascript" src="XulMenu.js"></script> <style type="text/css"> html, body { height: 100%; } body { margin: 0; padding: 0; background: #ffffff; } #bar { background: #ECE9D8; border: 1px solid; border-color: #ffffff #ACA899 #ACA899 #ffffff; padding: 3px; cursor: default; } table td { vertical-align: top; } p { font-family: georgia, tahoma, verdana; font-size: 11px; margin: 2em; } </style> </head> <body> <script type="text/javscript"> /* preload images */ var arrow1 = new Image(4, 7); arrow1.src = "images/arrow1.gif"; var arrow2 = new Image(4, 7); arrow2.src = "images/arrow2.gif"; </script> <table cellspacing="0" cellpadding="0" height="100%"><tr><td id="bar"> <table cellspacing="0" cellpadding="0" id="menu1" class="XulMenu"> <tr> <td> <a class="button" href="javascript:void(0)">Viewer</a> <div class="section"> <a class="item" href="example2.html">Home</a> <a class="item" href="example2.html">Close</a> </div> <a class="button" href="javascript:void(0)">Articles</a> <div class="section"> <a class="item" href="javascript:void(0)">Advocacy<img class="arrow" src="images/arrow1.gif" width="4" height="7" alt="" /></a> <div class="section"> <a class="item" href="example2.html">Advocacy One</a> <a class="item" href="example2.html">Advocacy Two</a> <a class="item" href="example2.html">Advocacy Three</a> <a class="item" href="example2.html">Advocacy Four</a> <a class="item" href="example2.html">Advocacy Five</a> <a class="item" href="example2.html">Advocacy Six</a> <a class="item" href="example2.html">Advocacy Seven</a> </div> <a class="item" href="javascript:void(0)">Blogs<img class="arrow" src="images/arrow1.gif" width="4" height="7" alt="" /></a> <div class="section"> <a class="item" href="javascript:void(0)">PHP Guru<img class="arrow" src="images/arrow1.gif" width="4" height="7" alt="" /></a> <div class="section"> <a class="item" href="example2.html">Guru One</a> <a class="item" href="example2.html">Guru Two</a> <a class="item" href="example2.html">Guru Three</a> <a class="item" href="example2.html">Guru Four</a> </div> </div> <a class="item" href="javascript:void(0)">Design<img class="arrow" src="images/arrow1.gif" width="4" height="7" alt="" /></a> <div class="section"> <a class="item" href="javascript:void(0)">Archive<img class="arrow" src="images/arrow1.gif" width="4" height="7" alt="" /></a> <div class="section"> <a class="item" href="example1.hmtl">Archive One</a> </div> <a class="item" href="example2.html">Design One</a> <a class="item" href="example2.html">Design Two</a> <a class="item" href="example2.html">Design Three</a> <a class="item" href="example2.html">Design Four</a> <a class="item" href="example2.html">Design Five</a> </div> <a class="item" href="javascript:void(0)">Develop<img class="arrow" src="images/arrow1.gif" width="4" height="7" alt="" /></a> <div class="section"> <a class="item" href="example2.html">Develop One</a> <a class="item" href="example2.html">Develop Two</a> <a class="item" href="example2.html">Develop Three</a> <a class="item" href="example2.html">Develop Five</a> <a class="item" href="example2.html">Develop Six</a> <a class="item" href="example2.html">Develop Seven</a> <a class="item" href="example2.html">Develop Eight</a> </div> <a class="item" href="javascript:void(0)">News<img class="arrow" src="images/arrow1.gif" width="4" height="7" alt="" /></a> <div class="section"> <a class="item" href="example2.html">News One</a> <a class="item" href="example2.html">News Two</a> <a class="item" href="example2.html">News Three</a> <a class="item" href="example2.html">News Four</a> </div> <a class="item" href="javascript:void(0)">Reviews<img class="arrow" src="images/arrow1.gif" width="4" height="7" alt="" /></a> <div class="section"> <a class="item" href="example2.html">Review One</a> <a class="item" href="example2.html">Review Two</a> </div> <a class="item" href="example2.html">File Manager</a> </div> <a class="button" href="javascript:void(0)">Links</a> <div class="section"> <a class="item" href="javascript:void(0)">Advocacy<img class="arrow" src="images/arrow1.gif" width="4" height="7" alt="" /></a> <div class="section"> <a class="item" href="javascript:void(0)">Interviews<img class="arrow" src="images/arrow1.gif" width="4" height="7" alt="" /></a> <div class="section"> <a class="item" href="example2.html">Interview One</a> <a class="item" href="example2.html">Interview Two</a> <a class="item" href="example2.html">Interview Three</a> <a class="item" href="example2.html">Interview Four</a> <a class="item" href="example2.html">Interview Five</a> <a class="item" href="example2.html">Interview Six</a> <a class="item" href="example2.html">Interview Seven</a> </div> <a class="item" href="javascript:void(0)">PHP<img class="arrow" src="images/arrow1.gif" width="4" height="7" alt="" /></a> <div class="section"> <a class="item" href="example2.html">PHP One</a> <a class="item" href="example2.html">PHP Two</a> <a class="item" href="example2.html">PHP Three</a> </div> <a class="item" href="example2.html">Advocacy One</a> <a class="item" href="example2.html">Advocacy Two</a> <a class="item" href="example2.html">Advocacy Three</a> <a class="item" href="example2.html">Advocacy Four</a> <a class="item" href="example2.html">Advocacy Five</a> </div> <a class="item" href="javascript:void(0)">Community<img class="arrow" src="images/arrow1.gif" width="4" height="7" alt="" /></a> <div class="section"> <a class="item" href="example2.html">Community One</a> <a class="item" href="example2.html">Community Two</a> <a class="item" href="example2.html">Community Three</a> <a class="item" href="example2.html">Community Four</a> <a class="item" href="example2.html">Community Five</a> </div> <a class="item" href="javascript:void(0)">Concepts<img class="arrow" src="images/arrow1.gif" width="4" height="7" alt="" /></a> <div class="section"> <a class="item" href="javascript:void(0)">Books<img class="arrow" src="images/arrow1.gif" width="4" height="7" alt="" /></a> <div class="section"> <a class="item" href="example2.html">Book One</a> <a class="item" href="example2.html">Book Two</a> <a class="item" href="example2.html">Book Three</a> <a class="item" href="example2.html">Book Four</a> </div> <a class="section" href="javascript:void(0)">Patterns<img class="arrow" src="images/arrow1.gif" width="4" height="7" alt="" /></a> <div class="section"> <a class="item" href="example2.html">Pattern One</a> <a class="item" href="example2.html">Pattern Two</a> <a class="item" href="example2.html">Pattern Three</a> <a class="item" href="example2.html">Pattern Four</a> </div> <a class="item" href="example2.html">Concept One</a> <a class="item" href="example2.html">Concept Two</a> <a class="item" href="example2.html">Concept Three</a> </div> <a class="item" href="javascript:void(0)">Tutorials<img class="arrow" src="images/arrow1.gif" width="4" height="7" alt="" /></a> <div class="section"> <a class="item" href="javascript:void(0)">Introductory<img class="arrow" src="images/arrow1.gif" width="4" height="7" alt="" /></a> <div class="section"> <a class="item" href="example2.html">Introductory One</a> <a class="item" href="example2.html">IIntroductory Two</a> <a class="item" href="example2.html">Introductory Three</a> <a class="item" href="example2.html">Introductory Four</a> <a class="item" href="example2.html">Introductory Five</a> <a class="item" href="example2.html">Introductory Six</a> <a class="item" href="example2.html">Introductory Seven</a> </div> <a class="item" href="example2.html">Tutorial One</a> <a class="item" href="example2.html">Tutorial Two</a> <a class="item" href="example2.html">Tutorial Three</a> <a class="item" href="example2.html">Tutorial Four</a> <a class="item" href="example2.html">Tutorial Five</a> <a class="item" href="example2.html">Tutorial Six</a> <a class="item" href="example2.html">Tutorial Seven</a> <a class="item" href="example2.html">Tutorial Eight</a> <a class="item" href="example2.html">Tutorial Nine</a> </div> </div> <a class="button" href="javascript:void(0)">Help</a> <div class="section"> <a class="item" href="example2.html">About XulMenu</a> <a class="item" href="example2.html">About this site</a> </div> </td> </tr> </table> </td> <td> <p> <b>Project</b>: <a href="http://gosu.pl/dhtml/mygosumenu.html">mygosuMenu</a> <br /> <b>Menu type</b>: #1.4 XulMenu example 2 <br /> <b>Features</b>: <br /> - horizontal or vertical menu <br /> - unlimited nesting <br /> - can be positioned statically or absolutely <br /> - position of submenus can be changed, so they can for example overflow parent elements <br /> - on the same page there can be many menus created <br /> - seperated into 3 layers: behaviour(javascript), structure(html), presentation(css) <br /> - search engine friendly <br /> - free for any use (BSD license) <br /> <b>Compatibility</b>: Tested and works great on: IE 5.0/5.5/6.0, Mozilla 1.4/1.7, Opera 7.11/7.23/7.51, Netscape 7.11, Firefox 0.7/0.8/0.9, Safari 1.2 </p> </td></tr></table> <script type="text/javascript"> var menu1 = new XulMenu("menu1"); menu1.type = "vertical"; menu1.position.level1.left = 2; menu1.arrow1 = "images/arrow1.gif"; menu1.arrow2 = "images/arrow2.gif"; menu1.init(); </script> </body> </html> |
Update of /cvsroot/mxbb/mx_music/phpbb2/mx_mod/mx_shared/mygosumenu/1.3 In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv19367/mx_mod/mx_shared/mygosumenu/1.3 Added Files: ClickShowHideMenu.css ClickShowHideMenu.js ClickShowHideMenu.txt example1.html example2.html example3.html Log Message: upgrade --- NEW FILE: example1.html --- <html> <head> <link rel="stylesheet" type="text/css" href="ClickShowHideMenu.css"> <script type="text/javascript" src="ClickShowHideMenu.js"></script> <style type="text/css"> body { background-color: #111433; } </style> </head> <body> <table cellspacing="0" cellpadding="0" id="click-menu1" class="click-menu"> <tr> <td> <div class="box1">Products <img src="images/arrow1.gif" width="11" height="11" alt=""></div> <div class="section"> <div class="box2"><img src="images/arrow2.gif" width="14" height="9" alt=""><a href="example1.html">Product One</a></div> <div class="box2"><img src="images/arrow2.gif" width="14" height="9" alt=""><a href="example1.html">Product Two</a></div> <div class="box2"><img src="images/arrow2.gif" width="14" height="9" alt=""><a href="example1.html">Product Three</a></div> <div class="box2"><img src="images/arrow2.gif" width="14" height="9" alt=""><a href="example1.html">Product Four</a></div> <div class="box2"><img src="images/arrow2.gif" width="14" height="9" alt=""><a href="example1.html">Product Five</a></div> </div> </td> </tr> <tr><td height="2"></td></tr> <tr> <td> <div class="box1">Downloads <img src="images/arrow1.gif"></div> <div class="section"> <div class="box2"><img src="images/arrow2.gif" width="14" height="9" alt=""><a href="example1.html">Product One</a></div> <div class="box2"><img src="images/arrow2.gif" width="14" height="9" alt=""><a href="example1.html">Product Two</a></div> <div class="box2"><img src="images/arrow2.gif" width="14" height="9" alt=""><a href="example1.html">Product Three</a></div> </div> </td> </tr> <tr><td height="2"></td></tr> <tr> <td> <div class="box1">Support <img src="images/arrow1.gif" width="11" height="11" alt=""></div> <div class="section"> <div class="box2"><img src="images/arrow2.gif" width="14" height="9" alt=""><a href="example1.html">E-mail Support</a></div> </div> </td> </tr> <tr><td height="2"></td></tr> <tr> <td> <div class="box1">Partners <img src="images/arrow1.gif" width="11" height="11" alt=""></div> <div class="section"> <div class="box2"><img src="images/arrow2.gif" width="14" height="9" alt=""><a href="example1.html">Partner Benefits</a></div> <div class="box2"><img src="images/arrow2.gif" width="14" height="9" alt=""><a href="example1.html">Partner Application</a></div> <div class="box2"><img src="images/arrow2.gif" width="14" height="9" alt=""><a href="example1.html">Partner Listing</a></div> </div> </td> </tr> <tr><td height="2"></td></tr> <tr> <td> <div class="box1">Customers <img src="images/arrow1.gif" width="11" height="11" alt=""></div> <div class="section"> <div class="box2"><img src="images/arrow2.gif" width="14" height="9" alt=""><a href="example1.html">Customer One</a></div> <div class="box2"><img src="images/arrow2.gif" width="14" height="9" alt=""><a href="example1.html">Customer Two</a></div> <div class="box2"><img src="images/arrow2.gif" width="14" height="9" alt=""><a href="example1.html">Customer Three</a></div> <div class="box2"><img src="images/arrow2.gif" width="14" height="9" alt=""><a href="example1.html">Customer Four</a></div> <div class="box2"><img src="images/arrow2.gif" width="14" height="9" alt=""><a href="example1.html">Customer Five</a></div> <div class="box2"><img src="images/arrow2.gif" width="14" height="9" alt=""><a href="example1.html">Customer Six</a></div> <div class="box2"><img src="images/arrow2.gif" width="14" height="9" alt=""><a href="example1.html">Customer Seven</a></div> </div> </td> </tr> <tr><td height="2"></td></tr> <tr> <td> <div class="box1">About Us <img src="images/arrow1.gif" width="11" height="11" alt=""></div> <div class="section"> <div class="box2"><img src="images/arrow2.gif" width="14" height="9" alt=""><a href="example1.html">Executive Team</a></div> <div class="box2"><img src="images/arrow2.gif" width="14" height="9" alt=""><a href="example1.html">Investors</a></div> <div class="box2"><img src="images/arrow2.gif" width="14" height="9" alt=""><a href="example1.html">Career</a></div> <div class="box2"><img src="images/arrow2.gif" width="14" height="9" alt=""><a href="example1.html">Press Center</a></div> <div class="box2"><img src="images/arrow2.gif" width="14" height="9" alt=""><a href="example1.html">Success Stories</a></div> <div class="box2"><img src="images/arrow2.gif" width="14" height="9" alt=""><a href="example1.html">Contact Us</a></div> </div> </td> </tr> </table> <script type="text/javascript"> var clickMenu1 = new ClickShowHideMenu('click-menu1'); clickMenu1.init(); </script> </body> </html> --- NEW FILE: example3.html --- <html> <head> <script type="text/javascript" src="ClickShowHideMenu.js"></script> <style type="text/css"> body { background-color: #cccccc; } div.left { width: 190px; height: 100%; background-color: #ffffff; } td.top { background-color: #999999; line-height: 26px; text-indent: 10px; font-size: 13px; font-weight: bold; font-family: tahoma; color: #ffffff; } td.section { padding: 6px 12px; } .click-menu { -moz-user-select: none; } .click-menu .box1 { background: url("images/tree-node.gif") no-repeat; padding-left: 19px; cursor: default; } .click-menu .box1-open { background: url("images/tree-node-open.gif") no-repeat; padding-left: 19px; cursor: default; } .click-menu .box1, .click-menu .box1-open, { color: #000000; font-family: arial; font-size: 12px; } /* mozilla fix */ html>body .click-menu .box1, html>body .click-menu .box1-open { color: #000000; font-family: arial; font-size: 12px; line-height: 16px; padding-bottom: 1px; } /* ie fix */ * html .click-menu .box1, * html .click-menu .box1-open { color: #000000; font-family: arial; font-size: 12px; height: 16px; } .click-menu .section { font-family: arial; font-size: 12px; line-height: 16px; display: none; } .click-menu .section a { color: #000000; text-decoration: none; white-space: nowrap; } .click-menu .section a:hover { color: #0000ff; text-decoration: none; white-space: nowrap; } .click-menu .box2 { background: url("images/tree-leaf.gif") no-repeat; padding-left: 19px; } .click-menu .box2-last { background: url("images/tree-leaf-last.gif") no-repeat; padding-left: 19px; } </style> </head> <body> <script type="text/javascript"> /* preload images, you can remove this code */ img1 = new Image(); img1.src = "images/tree-node.gif"; img2 = new Image(); img2.src = "images/tree-node-open.gif"; img3 = new Image(); img3.src = "images/tree-leaf.gif"; img4 = new Image(); img4.src = "images/tree-leaf-last.gif"; </script> <script type="text/javascript"> window.onload = function() { var ClickMenu3a = new ClickShowHideMenu('click-menu3a'); ClickMenu3a.box1Hover = false; ClickMenu3a.box2Hover = false; ClickMenu3a.init(); var ClickMenu3b = new ClickShowHideMenu('click-menu3b'); ClickMenu3b.box1Hover = false; ClickMenu3b.box2Hover = false; ClickMenu3b.init(); var ClickMenu3c = new ClickShowHideMenu('click-menu3c'); ClickMenu3c.box1Hover = false; ClickMenu3c.box2Hover = false; ClickMenu3c.init(); } </script> <div class="left"> <table cellspacing="0" cellpadding="0" width="100%"> <tr> <td class="top">» Products</td> </tr> <tr> <td class="section"> <div id="click-menu3a" class="click-menu"> <table cellspacing="0" cellpadding="0" width="100%"> <tr> <td> <div><span class="box1">Product One</span></div> <div class="section"> <div class="box2"><a href="example3.html">Overview</a></div> <div class="box2"><a href="example3.html">Features</a></div> <div class="box2-last"><a href="example3.html">Requirements</a></div> </div> </td> </tr> <tr><td height="2"></td></tr> <tr> <td> <div><span class="box1">Product Two</span></div> <div class="section"> <div class="box2"><a href="example3.html">Overwiev</a></div> <div class="box2"><a href="example3.html">Features</a></div> <div class="box2"><a href="example3.html">Requirements</a></div> <div class="box2"><a href="example3.html">Screenshots</a></div> <div class="box2"><a href="example3.html">Flash Demos</a></div> <div class="box2-last"><a href="example3.html">Live Demo</a></div> </div> </td> </tr> <tr><td height="2"></td></tr> <tr> <td> <div><span class="box1">Product Three</span></div> <div class="section"> <div class="box2"><a href="example3.html">Overview</a></div> <div class="box2"><a href="example3.html">Features</a></div> <div class="box2-last"><a href="example3.html">Requirements</a></div> </div> </td> </tr> <tr><td height="2"></td></tr> <tr> <td> <div><span class="box1">Product Four</span></div> <div class="section"> <div class="box2"><a href="example3.html">Overview</a></div> <div class="box2"><a href="example3.html">Features</a></div> <div class="box2"><a href="example3.html">Requirements</a></div> <div class="box2"><a href="example3.html">Screenshots</a></div> <div class="box2-last"><a href="example3.html">Live Demo</a></div> </div> </td> </tr> </table> </div> </td> </tr> <tr> <td class="top">» Downloads</td> </tr> <tr> <td class="section"> <div id="click-menu3b" class="click-menu"> <table cellspacing="0" cellpadding="0" width="100%"> <tr> <td> <div><span class="box1">Program One</span></div> <div class="section"> <div class="box2"><a href="example3.html">Windows Download</a></div> <div class="box2"><a href="example3.html">Solaris Download</a></div> <div class="box2-last"><a href="example3.html">Linux Download</a></div> </div> </td> </tr> <tr><td height="2"></td></tr> <tr> <td> <div><span class="box1">Program Two</span></div> <div class="section"> <div class="box2"><a href="example3.html">Windows Download</a></div> <div class="box2-last"><a href="example3.html">Linux Download</a></div> </div> </td> </tr> <tr><td height="2"></td></tr> <tr> <td> <div><span class="box1">Program Three</span></div> <div class="section"> <div class="box2-last"><a href="example3.html">Linux Download</a></div> </div> </td> </tr> </table> </div> </td> </tr> <tr> <td class="top">» Other</td> </tr> <tr> <td class="section"> <div id="click-menu3c" class="click-menu"> <table cellspacing="0" cellpadding="0" width="100%"> <tr><td height="2"></td></tr> <tr> <td> <div><span class="box1">Partners</span></div> <div class="section"> <div class="box2"><a href="example3.html">Partner Benefits</a></div> <div class="box2"><a href="example3.html">Partner Application</a></div> <div class="box2-last"><a href="example3.html">Partner Listing</a></div> </div> </td> </tr> <tr><td height="2"></td></tr> <tr> <td> <div><span class="box1">Customers</span></div> <div class="section"> <div class="box2"><a href="example3.html">Customer One</a></div> <div class="box2"><a href="example3.html">Customer Two</a></div> <div class="box2"><a href="example3.html">Customer Three</a></div> <div class="box2"><a href="example3.html">Customer Four</a></div> <div class="box2"><a href="example3.html">Customer Five</a></div> <div class="box2"><a href="example3.html">Customer Six</a></div> <div class="box2-last"><a href="example3.html">Customer Seven</a></div> </div> </td> </tr> <tr><td height="2"></td></tr> <tr> <td> <div><span class="box1">About us</span></div> <div class="section"> <div class="box2"><a href="example3.html">Executive Team</a></div> <div class="box2"><a href="example3.html">Investors</a></div> <div class="box2"><a href="example3.html">Career</a></div> <div class="box2"><a href="example3.html">Press Center</a></div> <div class="box2"><a href="example3.html">Success Stories</a></div> <div class="box2-last"><a href="example3.html">Contact Us</a></div> </div> </td> </tr> </table> </div> </td> </tr> </table> </div> </body> </html> --- NEW FILE: ClickShowHideMenu.js --- /* * DO NOT REMOVE THIS NOTICE * * PROJECT: mygosuMenu * VERSION: 1.3.3 * COPYRIGHT: (c) 2003,2004 Cezary Tomczak * LINK: http://gosu.pl/dhtml/mygosumenu.html * LICENSE: BSD (revised) */ function ClickShowHideMenu(id) { this.box1Hover = true; this.box2Hover = true; this.highlightActive = false; this.init_id = -1; this.init = function() { if (!document.getElementById(this.id)) { alert("Element '"+this.id+"' does not exist in this document. ClickShowHideMenu cannot be initialized"); return; } this.parse(document.getElementById(this.id).childNodes, this.tree, this.id); this.load(); if (window.attachEvent) { window.attachEvent("onunload", function(e) { self.save(); }); } else if (window.addEventListener) { window.addEventListener("unload", function(e) { self.save(); }, false); } } this.parse = function(nodes, tree, id) { for (var i = 0; i < nodes.length; i++) { if (nodes[i].nodeType != 1) { continue; } if (nodes[i].className) { if ("box1" == nodes[i].className.substr(0, 4)) { nodes[i].id = id + "-" + tree.length; tree[tree.length] = new Array(); eval('nodes[i].onmouseover = function() { self.box1over("'+nodes[i].id+'"); }'); eval('nodes[i].onmouseout = function() { self.box1out("'+nodes[i].id+'"); }'); eval('nodes[i].onclick = function() { self.box1click("'+nodes[i].id+'"); }'); } if ("section" == nodes[i].className) { id = id + "-" + (tree.length - 1); nodes[i].id = id + "-section"; tree = tree[tree.length - 1]; } if ("box2" == nodes[i].className.substr(0, 4)) { nodes[i].id = id + "-" + tree.length; tree[tree.length] = new Array(); eval('nodes[i].onmouseover = function() { self.box2over("'+nodes[i].id+'", "'+nodes[i].className+'"); }'); eval('nodes[i].onmouseout = function() { self.box2out("'+nodes[i].id+'", "'+nodes[i].className+'"); }'); } } if (this.highlightActive && nodes[i].tagName && nodes[i].tagName == "A") { if (document.location.href == nodes[i].href) { nodes[i].className = (nodes[i].className ? ' active' : 'active') } } if (nodes[i].childNodes) { this.parse(nodes[i].childNodes, tree, id); } } } this.box1over = function(id) { if (!this.box1Hover) return; if (!document.getElementById(id)) return; document.getElementById(id).className = (this.id_openbox == id ? "box1-open-hover" : "box1-hover"); } this.box1out = function(id) { if (!this.box1Hover) return; if (!document.getElementById(id)) return; document.getElementById(id).className = (this.id_openbox == id ? "box1-open" : "box1"); } this.box1click = function(id) { if (!document.getElementById(id)) { return; } var id_openbox = this.id_openbox; if (this.id_openbox) { if (!document.getElementById(id + "-section")) { return; } this.hide(); if (id_openbox == id) { if (this.box1hover) { document.getElementById(id_openbox).className = "box1-hover"; } else { document.getElementById(id_openbox).className = "box1"; } } else { document.getElementById(id_openbox).className = "box1"; } } if (id_openbox != id) { this.show(id); var className = document.getElementById(id).className; if ("box1-hover" == className) { document.getElementById(id).className = "box1-open-hover"; } if ("box1" == className) { document.getElementById(id).className = "box1-open"; } } } this.box2over = function(id, className) { if (!this.box2Hover) return; if (!document.getElementById(id)) return; document.getElementById(id).className = className + "-hover"; } this.box2out = function(id, className) { if (!this.box2Hover) return; if (!document.getElementById(id)) return; document.getElementById(id).className = className; } this.show = function(id) { if (document.getElementById(id + "-section")) { document.getElementById(id + "-section").style.display = "block"; this.id_openbox = id; } } this.hide = function() { document.getElementById(this.id_openbox + "-section").style.display = "none"; this.id_openbox = ""; } this.save = function() { if (this.id_openbox) { this.cookie.set(this.id, this.id_openbox); } else { this.cookie.del(this.id); } } this.load = function() { if (this.init_id == -1) { // Use cookie if no init id is passed var id_openbox = this.cookie.get(this.id); } else { var id_openbox = this.id + '-' + this.init_id; } if (id_openbox) { this.show(id_openbox); document.getElementById(id_openbox).className = "box1-open"; } } function Cookie() { this.get = function(name) { var cookies = document.cookie.split(";"); for (var i = 0; i < cookies.length; i++) { var a = cookies[i].split("="); if (a.length == 2) { a[0] = a[0].trim(); a[1] = a[1].trim(); if (a[0] == name) { return unescape(a[1]); } } } return ""; } this.set = function(name, value) { document.cookie = name + "=" + escape(value); } this.del = function(name) { document.cookie = name + "=; expires=Thu, 01-Jan-70 00:00:01 GMT"; } } var self = this; this.id = id; this.tree = new Array(); this.cookie = new Cookie(); this.id_openbox = ""; } if (typeof String.prototype.trim == "undefined") { String.prototype.trim = function() { var s = this.replace(/^\s*/, ""); return s.replace(/\s*$/, ""); } } --- NEW FILE: ClickShowHideMenu.css --- .click-menu { width: 135px; } .click-menu .box1 { background-color: #202340; color: #99bb99; font-weight: bold; font-size: 12px; font-family: tahoma; padding: 4px 8px; border-width: 1px; border-color: #448882; border-style: solid solid solid solid; cursor: default; position: relative; } .click-menu .box1-hover { background-color: #113344; color: #CCEEEB; font-weight: bold; font-size: 12px; font-family: tahoma; padding: 4px 8px; border-width: 1px; border-color: #99CCAE; border-style: solid solid solid solid; cursor: default; position: relative; } .click-menu .box1-open { background-color: #202340; color: #99bb99; font-weight: bold; font-size: 12px; font-family: tahoma; padding: 4px 8px; border-width: 1px; border-color: #448882; border-style: solid solid none solid; cursor: default; position: relative; } .click-menu .box1-open-hover { background-color: #113344; color: #CCEEEB; font-weight: bold; font-size: 12px; font-family: tahoma; padding: 4px 8px; border-width: 1px; border-color: #99CCAE; border-style: solid solid none solid; cursor: default; position: relative; } .click-menu .box1 img, .click-menu .box1-hover img, .click-menu .box1-open img, .click-menu .box1-open-hover img { position: absolute; top: 6px; right: 6px; } .click-menu .section { background-color: #224441; font-family: arial; font-size: 12px; line-height: 15px; padding: 5px 5px 6px 5px; border-width: 1px; border-color: #448882; border-style: none solid solid solid; display: none; } .click-menu .section a { color: #8BAA88; text-decoration: none; white-space: nowrap; } .click-menu .section a:hover { color: #CCEEEB; text-decoration: none; white-space: nowrap; } .click-menu .box2 { } .click-menu .box2-hover { background: #000000; } .click-menu .section .active, .click-menu .section .active:hover { color: yellow; } --- NEW FILE: example2.html --- <html> <head> <script type="text/javascript" src="ClickShowHideMenu.js"></script> <style type="text/css"> body { background-color: #271D11; } .click-menu { } .click-menu .box1 { background: url("images/button1.gif") no-repeat; color: #f9f9f9; } .click-menu .box1-hover { background: url("images/button1.gif") no-repeat; color: #FFEBA9; } .click-menu .box1-open { background: url("images/button1-click.gif") no-repeat; color: #f9f9f9; } .click-menu .box1-open-hover { background: url("images/button1-click.gif") no-repeat; color: #FFEBA9; } .click-menu .box1, .click-menu .box1-hover, .click-menu .box1-open, .click-menu .box1-open-hover { text-indent: 12px; font-weight: bold; font-size: 14px; line-height: 31px; font-family: arial; cursor: pointer; width: 150px; } .click-menu .section { background-color: #46351F; font-family: arial; font-size: 13px; line-height: 15px; padding: 0 0 5px 10px; display: none; } .click-menu .section a { color: #ffffff; text-decoration: none; white-space: nowrap; } .click-menu .section a:hover { color: #FFFF99; text-decoration: none; white-space: nowrap; } .click-menu .box2 { border-color: #7B6139; border-width: 1px; border-style: none none solid solid; padding: 1px 0 2px 6px; } .click-menu .box2-hover { border-color: #7B6139; border-width: 1px; border-style: none none solid solid; padding: 1px 0 2px 6px; background: #5B4529; } </style> </head> <body> <script type="text/javascript"> /* preload images, you can remove this code */ var img = new Array(); img[0] = new Image(); img[0].src = "images/button1.gif"; img[1] = new Image(); img[1].src = "images/button1-click.gif"; </script> <table><tr><td style="height: 500px; background-color: #46351F; vertical-align: top; padding: 10px;"> <table cellspacing="0" cellpadding="0" id="click-menu2" class="click-menu"> <tr> <td> <div class="box1">Products</div> <div class="section"> <div class="box2"><a href="example2.html">Product One</a></div> <div class="box2"><a href="example2.html">Product Two</a></div> <div class="box2"><a href="example2.html">Product Three</a></div> <div class="box2"><a href="example2.html">Product Four</a></div> <div class="box2"><a href="example2.html">Product Five</a></div> </div> </td> </tr> <tr><td height="8"></td></tr> <tr> <td> <div class="box1">Partners</div> <div class="section"> <div class="box2"><a href="example2.html">Partner Benefits</a></div> <div class="box2"><a href="example2.html">Partner Application</a></div> <div class="box2"><a href="example2.html">Partner Listing</a></div> </div> </td> </tr> <tr><td height="8"></td></tr> <tr> <td> <div class="box1">Customers</div> <div class="section"> <div class="box2"><a href="example2.html">Customer One</a></div> <div class="box2"><a href="example2.html">Customer Two</a></div> <div class="box2"><a href="example2.html">Customer Three</a></div> <div class="box2"><a href="example2.html">Customer Four</a></div> <div class="box2"><a href="example2.html">Customer Five</a></div> <div class="box2"><a href="example2.html">Customer Six</a></div> <div class="box2"><a href="example2.html">Customer Seven</a></div> </div> </td> </tr> <tr><td height="8"></td></tr> <tr> <td> <div class="box1">About Us</div> <div class="section"> <div class="box2"><a href="example2.html">Executive Team</a></div> <div class="box2"><a href="example2.html">Investors</a></div> <div class="box2"><a href="example2.html">Career</a></div> <div class="box2"><a href="example2.html">Press Center</a></div> <div class="box2"><a href="example2.html">Success Stories</a></div> <div class="box2"><a href="example2.html">Contact Us</a></div> </div> </td> </tr> </table> </td></tr></table> <script type="text/javascript"> var clickMenu2 = new ClickShowHideMenu('click-menu2'); clickMenu2.init(); </script> </body> </html> --- NEW FILE: ClickShowHideMenu.txt --- /* * PROJECT: mygosuMenu * VERSION: 1.3.2 * COPYRIGHT: (c) 2003,2004 Cezary Tomczak * LINK: http://gosu.pl/dhtml/mygosumenu.html * LICENSE: BSD (revised) */ ---------------- ! ABOUT ---------------- A drop down click-show-hide menu. ---------------- ! FEATURES ---------------- Use a cookie to remember last state of the menu ---------------- ! COMPATIBILITY ---------------- Tested on IE 6, Mozilla 1.6, Netscape 7.11, Opera 7.23, Firebird 0.7 ---------------- ! CHANGELOG ---------------- *** 1.3.4 *** - /tests/highlightActive.html added [minor changes in .js, added class .active in .css] *** 1.3.3 *** - [js] fixed a bug on Konqueror *** 1.3.2 *** - some fixes in html structure & css to fix a bug that appeared on newest version of Mozilla 1.7 & Firefox 0.9 - [html] moved class & id from DIV to TABLE - [css] removed "width: 100%;" properties from all elements *** 1.3.1 *** - To initialize menu now you only have to specify an onload event on body element (see menu.html) - Fixed a cookie bug - Fixed a few other bugs |
|
From: FlorinCB <ory...@us...> - 2008-09-18 00:44:05
|
Update of /cvsroot/mxbb/mx_music/phpbb2/mx_mod/mx_shared/mygosumenu/1.3/tests In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv19367/mx_mod/mx_shared/mygosumenu/1.3/tests Added Files: highlightActive.html Log Message: upgrade --- NEW FILE: highlightActive.html --- <html> <head> <link rel="stylesheet" type="text/css" href="../ClickShowHideMenu.css"> <script type="text/javascript" src="../ClickShowHideMenu.js"></script> <style type="text/css"> body { background-color: #111433; } </style> </head> <body> <table cellspacing="0" cellpadding="0" id="click-menu1" class="click-menu"> <tr> <td> <div class="box1">Products <img src="../images/arrow1.gif" width="11" height="11" alt=""></div> <div class="section"> <div class="box2"><img src="../images/arrow2.gif" width="14" height="9" alt=""><a href="example1.html">Product One</a></div> <div class="box2"><img src="../images/arrow2.gif" width="14" height="9" alt=""><a href="example1.html">Product Two</a></div> <div class="box2"><img src="../images/arrow2.gif" width="14" height="9" alt=""><a href="highlightActive.html">Product Three</a></div> <div class="box2"><img src="../images/arrow2.gif" width="14" height="9" alt=""><a href="example1.html">Product Four</a></div> <div class="box2"><img src="../images/arrow2.gif" width="14" height="9" alt=""><a href="example1.html">Product Five</a></div> </div> </td> </tr> <tr><td height="2"></td></tr> <tr> <td> <div class="box1">Downloads <img src="../images/arrow1.gif"></div> <div class="section"> <div class="box2"><img src="../images/arrow2.gif" width="14" height="9" alt=""><a href="example1.html">Product One</a></div> <div class="box2"><img src="../images/arrow2.gif" width="14" height="9" alt=""><a href="example1.html">Product Two</a></div> <div class="box2"><img src="../images/arrow2.gif" width="14" height="9" alt=""><a href="example1.html">Product Three</a></div> </div> </td> </tr> <tr><td height="2"></td></tr> <tr> <td> <div class="box1">Support <img src="../images/arrow1.gif" width="11" height="11" alt=""></div> <div class="section"> <div class="box2"><img src="../images/arrow2.gif" width="14" height="9" alt=""><a href="example1.html">E-mail Support</a></div> </div> </td> </tr> <tr><td height="2"></td></tr> <tr> <td> <div class="box1">Partners <img src="../images/arrow1.gif" width="11" height="11" alt=""></div> <div class="section"> <div class="box2"><img src="../images/arrow2.gif" width="14" height="9" alt=""><a href="example1.html">Partner Benefits</a></div> <div class="box2"><img src="../images/arrow2.gif" width="14" height="9" alt=""><a href="example1.html">Partner Application</a></div> <div class="box2"><img src="../images/arrow2.gif" width="14" height="9" alt=""><a href="example1.html">Partner Listing</a></div> </div> </td> </tr> <tr><td height="2"></td></tr> <tr> <td> <div class="box1">Customers <img src="../images/arrow1.gif" width="11" height="11" alt=""></div> <div class="section"> <div class="box2"><img src="../images/arrow2.gif" width="14" height="9" alt=""><a href="example1.html">Customer One</a></div> <div class="box2"><img src="../images/arrow2.gif" width="14" height="9" alt=""><a href="example1.html">Customer Two</a></div> <div class="box2"><img src="../images/arrow2.gif" width="14" height="9" alt=""><a href="example1.html">Customer Three</a></div> <div class="box2"><img src="../images/arrow2.gif" width="14" height="9" alt=""><a href="example1.html">Customer Four</a></div> <div class="box2"><img src="../images/arrow2.gif" width="14" height="9" alt=""><a href="example1.html">Customer Five</a></div> <div class="box2"><img src="../images/arrow2.gif" width="14" height="9" alt=""><a href="example1.html">Customer Six</a></div> <div class="box2"><img src="../images/arrow2.gif" width="14" height="9" alt=""><a href="example1.html">Customer Seven</a></div> </div> </td> </tr> <tr><td height="2"></td></tr> <tr> <td> <div class="box1">About Us <img src="../images/arrow1.gif" width="11" height="11" alt=""></div> <div class="section"> <div class="box2"><img src="../images/arrow2.gif" width="14" height="9" alt=""><a href="example1.html">Executive Team</a></div> <div class="box2"><img src="../images/arrow2.gif" width="14" height="9" alt=""><a href="example1.html">Investors</a></div> <div class="box2"><img src="../images/arrow2.gif" width="14" height="9" alt=""><a href="example1.html">Career</a></div> <div class="box2"><img src="../images/arrow2.gif" width="14" height="9" alt=""><a href="example1.html">Press Center</a></div> <div class="box2"><img src="../images/arrow2.gif" width="14" height="9" alt=""><a href="example1.html">Success Stories</a></div> <div class="box2"><img src="../images/arrow2.gif" width="14" height="9" alt=""><a href="example1.html">Contact Us</a></div> </div> </td> </tr> </table> <script type="text/javascript"> var clickMenu1 = new ClickShowHideMenu('click-menu1'); clickMenu1.highlightActive = true; clickMenu1.init(); </script> </body> </html> |
|
From: FlorinCB <ory...@us...> - 2008-09-18 00:44:02
|
Update of /cvsroot/mxbb/mx_music/phpbb2/mx_mod/mx_shared/mygosumenu/1.2/images In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv19367/mx_mod/mx_shared/mygosumenu/1.2/images Added Files: doc.gif folder-open.gif folder.gif Log Message: upgrade --- NEW FILE: folder.gif --- (This appears to be a binary file; contents omitted.) --- NEW FILE: doc.gif --- (This appears to be a binary file; contents omitted.) --- NEW FILE: folder-open.gif --- (This appears to be a binary file; contents omitted.) |
|
From: FlorinCB <ory...@us...> - 2008-09-18 00:44:00
|
Update of /cvsroot/mxbb/mx_music/phpbb2/mx_mod/mx_shared/mygosumenu/1.2 In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv19367/mx_mod/mx_shared/mygosumenu/1.2 Added Files: TreeMenu.css TreeMenu.js TreeMenu.txt example1.html example1.php Log Message: upgrade --- NEW FILE: example1.html --- <html> <head> <link rel="stylesheet" type="text/css" href="TreeMenu.css"> <script type="text/javascript" src="TreeMenu.js"></script> </head> <body> <script type="text/javascript"> window.onload = function() { new TreeMenu("menu1"); } </script> <ul id="menu1" class="tree-menu"> <li><a href="javascript:void(0)">Products</a> <ul> <li><a href="#">Product One</a></li> <li><a href="javascript:void(0)">Product Two</a> <ul> <li><a href="#">Overview</a></li> <li><a href="#">Features</a></li> <li><a href="#">Requirements</a></li> <li><a href="#">Flash Demos</a></li> </ul> </li> <li><a href="javascript:void(0)">Product Three</a> <ul> <li><a href="#">Overview</a></li> <li><a href="#">Features</a></li> <li><a href="#">Requirements</a></li> <li><a href="#">Screenshots</a></li> <li><a href="#">Flash Demos</a></li> <li><a href="javascript:void(0)">Live Demo</a> <ul> <li><a href="#">Create Account</a></li> <li><a href="javascript:void(0)">Test Drive</a> <ul> <li><a href="#">Test One</a></li> <li><a href="#">Test Two</a></li> <li><a href="#">Test Three</a></li> </ul> </li> </ul> </li> </ul> </li> <li><a href="javascript:void(0)">Product Four</a> <ul> <li><a href="#">Overview</a></li> <li><a href="#">Features</a></li> <li><a href="#">Requirements</a></li> </ul> </li> <li><a href="#">Product Five</a></li> </ul> </li> <li><a href="javascript:void(0)">Downloads</a> <ul> <li><a href="#">30-day Demo Key</a></li> <li><a href="javascript:void(0)">Product One Download</a> <ul> <li><a href="#">Windows Download</a></li> <li><a href="#">Solaris Download</a></li> <li><a href="#">Linux Download</a></li> </ul> </li> <li><a href="javascript:void(0)">Product Two Download</a> <ul> <li><a href="#">Linux Download</a></li> </ul> </li> </ul> </li> <li><a href="javascript:void(0)">Support</a> <ul> <li><a href="#">E-mail Support</a></li> </ul> </li> <li><a href="javascript:void(0)">Partners</a> <ul> <li><a href="#">Partner Benefits</a></li> <li><a href="javascript:void(0)">Partner Application</a> <ul> <li><a href="#">Application One</a></li> <li><a href="#">Application Two</a></li> <li><a href="#">Application Three</a></li> <li><a href="#">Application Four</a></li> <li><a href="#">Application Five</a></li> <li><a href="#">Application Six</a></li> <li><a href="#">Application Seven</a></li> <li><a href="#">Application Eight</a></li> </ul> </li> <li><a href="#">Partner Listing</a></li> </ul> </li> <li><a href="javascript:void(0)">Customers</a> <ul> <li><a href="#">Customer One</a></li> <li><a href="#">Customer Two</a></li> <li><a href="#">Customer Three</a></li> </ul> </li> <li><a href="javascript:void(0)">About Us</a> <ul> <li><a href="#">Executive Team</a></li> <li><a href="#">Investors</a></li> <li><a href="#">Career Opportunities</a></li> <li><a href="javascript:void(0)">Press Center</a> <ul> <li><a href="#">Products Information</a></li> </ul> </li> <li><a href="#">Success Stories</a></li> <li><a href="#">Contact Us</a></li> </ul> </li> </ul> </body> </html> --- NEW FILE: TreeMenu.js --- /* * DO NOT REMOVE THIS NOTICE * * PROJECT: mygosuMenu * VERSION: 1.2.0 * COPYRIGHT: (c) 2003,2004 Cezary Tomczak * LINK: http://gosu.pl/dhtml/mygosumenu.html * LICENSE: BSD (revised) */ function TreeMenu(id) { this.init = function() { if (!document.getElementById(this.id)) { alert("Element '"+this.id+"' does not exist in this document. TreeMenu cannot be initialized"); return; } this.parse(document.getElementById(this.id).childNodes, this.tree, this.id); } this.parse = function(nodes, tree, id) { for (var i = 0; i < nodes.length; i++) { if (nodes[i].nodeType != 1) { continue; } if (nodes[i].tagName.toLowerCase() == "li") { nodes[i].id = id + "-" + tree.length; tree[tree.length] = new Array(); if (nodes[i].childNodes && this.hasUl(nodes[i].childNodes)) { nodes[i].className = "section"; var a; if (a = this.getA(nodes[i].childNodes)) { a.id = nodes[i].id + "-a"; eval("document.getElementById('"+a.id+"').onclick = function() {"+ "self.click('"+nodes[i].id+"');"+ "}"); } } else { nodes[i].className = "box"; } } if (nodes[i].tagName.toLowerCase() == "ul") { nodes[i].style.display = "none"; id = id + "-" + (tree.length - 1); nodes[i].id = id + "-section"; tree = tree[tree.length - 1]; } if (nodes[i].childNodes) { this.parse(nodes[i].childNodes, tree, id); } } } this.hasUl = function(nodes) { for (var i = 0; i < nodes.length; i++) { if (nodes[i].nodeType != 1) { continue; } if (nodes[i].tagName.toLowerCase() == "ul") { return true; } if (nodes[i].childNodes) { if (this.hasUl(nodes[i].childNodes)) { return true; } } } return false; } this.getA = function(nodes) { for (var i = 0; i < nodes.length; i++) { if (nodes[i].nodeType == 1) { if (nodes[i].tagName.toLowerCase() == "a") { return nodes[i]; } return false; } } } this.click = function(id) { e1 = document.getElementById(id + "-section"); e2 = document.getElementById(id); if (e1.style.display == "none") { e1.style.display = ""; e2.className = "section-open"; } else { e1.style.display = "none"; e2.className = "section"; } } var self = this; this.id = id; this.tree = new Array(); this.init(); } --- NEW FILE: example1.php --- <?php /* * PROJECT: mygosuMenu * VERSION: 1.2.0 * COPYRIGHT: (c) 2003,2004 Cezary Tomczak * LINK: http://gosu.pl/software/mygosumenu.html * LICENSE: BSD (revised) */ /** * Note: this function is called recursively * @param array &$a * @param string $id (optional) * @return string */ function generateTreeMenu(&$a, $id = null) { $s = '<ul'; if ($id) $s .= ' id="'.$id.'" class="tree-menu"'; $s .= '>'; foreach ($a as $k => $v) { if (is_array($v)) { $s .= '<li><a href="javascript:void(0)">'.$k.'</a>'; $s .= generateTreeMenu($a[$k]); $s .= '</li>'; } else { $s .= '<li><a href="'.$v.'">'.$k.'</a></li>'; } } $s .= '</ul>'; return $s; } $menu = array( 'Products' => array( 'Product One' => '#', 'Product Two' => array( 'Overview' => '#', 'Features' => '#', 'Requirements' => '#', 'Flash Demos' => '#' ), 'Product Three' => array( 'Overview' => '#', 'Features' => '#', 'Requirements' => '#', 'Screenshots' => '#', 'Flash Demos' => '#', 'Live Demo' => array( 'Create Account' => '#', 'Test Drive' => array( 'Test One' => '#', 'Test Two' => '#', 'Test Three' => '#' ) ) ), 'Product Four' => array( 'Overview' => '#', 'Features' => '#', 'Requirements' => '#' ), 'Product Five' => '#' ), 'Downloads' => array( '30-day Demo Key' => '#', 'Product One Download' => array( 'Windows Download' => '#', 'Solaris Download' => '#', 'Linux Download' => '#' ), 'Product Two Download' => array( 'Linux Download' => '#' ) ), 'Support' => array( 'E-mail Support' => '#' ), 'Partners' => array( 'Partner Benefits' => '#', 'Partner Application' => array( 'Application One' => '#', 'Application Two' => '#', 'Application Three' => '#', 'Application Four' => '#', 'Application Five' => '#', 'Application Six' => '#', 'Application Seven' => '#', 'Application Eight' => '#' ), 'Partner Listing' => '#' ), 'Customers' => array( 'Customer One' => '#', 'Customer Two' => '#', 'Customer Three' => '#' ), 'About Us' => array( 'Executive Team' => '#', 'Investors' => '#', 'Career Opportunities' => '#', 'Press Center' => array( 'Product Information' => '#' ), 'Success Stories' => '#', 'Contact Us' => '#' ) ); ?> <html> <head> <link rel="stylesheet" type="text/css" href="TreeMenu.css"> <script type="text/javascript" src="TreeMenu.js"></script> </head> <body> <script type="text/javascript"> window.onload = function() { new TreeMenu("menu1"); } </script> <?php echo generateTreeMenu($menu, 'menu1'); ?> </body> </html> --- NEW FILE: TreeMenu.css --- ul.tree-menu { font-size: 12px; line-height: 16px; font-family: tahoma; margin: 0; padding: 0; } ul.tree-menu ul { margin: 0 0 0 20px; padding: 2px 0 0 0; } ul.tree-menu li { list-style-type: none; margin: 0; padding: 0; } ul.tree-menu li.section { background-image: url("images/folder.gif"); background-repeat: no-repeat; background-position: top left; padding-top: 1px; padding-bottom: 1px; } ul.tree-menu li.section-open { background-image: url("images/folder-open.gif"); background-repeat: no-repeat; background-position: top left; padding-top: 1px; padding-bottom: 1px; } ul.tree-menu li.box { background-image: url("images/doc.gif"); background-repeat: no-repeat; background-position: top left; padding-top: 1px; padding-bottom: 1px; } ul.tree-menu a { margin-left: 20px; color: #0000ff; text-decoration: none; white-space: nowrap; } ul.tree-menu a:hover { margin-left: 20px; color: #0000ff; text-decoration: underline; white-space: nowrap; } --- NEW FILE: TreeMenu.txt --- /* * PROJECT: mygosuMenu * VERSION: 1.2.0 * COPYRIGHT: (c) 2003,2004 Cezary Tomczak * LINK: http://gosu.pl/dhtml/mygosumenu.html * LICENSE: BSD (revised) */ ---------------- ! ABOUT ---------------- A simple TREE menu. example1.php - auto generating menu from php array ---------------- ! COMPATIBILITY ---------------- Tested on IE 6, Mozilla 1.6, Netscape 7.11, Opera 7.23, Firebird 0.7 |
Update of /cvsroot/mxbb/mx_music/phpbb2/mx_mod/mx_shared/mygosumenu/1.1 In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv19367/mx_mod/mx_shared/mygosumenu/1.1 Added Files: DropDownMenuX.js DropDownMenuX.txt example1.css example1.html example2.css example2.html Log Message: upgrade --- NEW FILE: example2.css --- .ddmx { font: 11px tahoma; } .ddmx .item1, .ddmx .item1:hover, .ddmx .item1-active, .ddmx .item1-active:hover { padding: 3px 10px 3px 10px; border-bottom: 1px solid #cccccc; background: #000000; font: 12px arial; color: #ffffff; font-weight: bold; text-decoration: none; display: block; white-space: nowrap; position: relative; } .ddmx .item2, .ddmx .item2:hover, .ddmx .item2-active, .ddmx .item2-active:hover { padding: 3px 8px 4px 8px; font: 11px tahoma; color: #000000; font-weight: bold; text-decoration: none; display: block; white-space: nowrap; position: relative; z-index: 500; } .ddmx .item2 { background: #e5e1da; } .ddmx .item2:hover, .ddmx .item2-active, .ddmx .item2-active:hover { background: #ffffff; } .ddmx .arrow, .ddmx .arrow:hover { padding: 3px 16px 4px 8px; } .ddmx .item2 img, .ddmx .item2-active img{ position: absolute; top: 4px; right: 1px; border: 0; } .ddmx .section { border: 1px solid #b8b4ae; position: absolute; visibility: hidden; z-index: -1; } .ddmx .bottom, .ddmx .bottom:hover { border-bottom: 1px solid #000000; } * html .ddmx td { position: relative; } /* ie 5.0 fix */ --- NEW FILE: example1.css --- .ddmx { font: 11px tahoma; } .ddmx .item1, .ddmx .item1:hover, .ddmx .item1-active, .ddmx .item1-active:hover { padding: 3px 10px 3px 10px; background: #000000; font: 12px arial; color: #ffffff; font-weight: bold; text-decoration: none; display: block; white-space: nowrap; position: relative; } .ddmx .item2, .ddmx .item2:hover, .ddmx .item2-active, .ddmx .item2-active:hover { padding: 3px 8px 4px 8px; font: 11px tahoma; color: #000000; font-weight: bold; text-decoration: none; display: block; white-space: nowrap; position: relative; z-index: 500; } .ddmx .item2 { background: #e5e1da; } .ddmx .item2:hover, .ddmx .item2-active, .ddmx .item2-active:hover { background: #ffffff; } .ddmx .arrow, .ddmx .arrow:hover { padding: 3px 16px 4px 8px; } .ddmx .item2 img, .ddmx .item2-active img{ position: absolute; top: 4px; right: 1px; border: 0; } .ddmx .section { border: 1px solid #b8b4ae; position: absolute; visibility: hidden; z-index: -1; } * html .ddmx td { position: relative; } /* ie 5.0 fix */ --- NEW FILE: example1.html --- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <title>#1.1 DropDownMenuX example 1</title> <style type="text/css"> body { font: 11px tahoma; background: #ffffff; margin: 0; padding: 50px; } </style> <link rel="stylesheet" type="text/css" href="example1.css" /> <script type="text/javascript" src="../ie5.js"></script> <script type="text/javascript" src="DropDownMenuX.js"></script> </head> <body> <table cellspacing="0" cellpadding="0" id="menu1" class="ddmx"> <tr> <td> <a class="item1" href="javascript:void(0)">Products</a> <div class="section"> <a class="item2" href="example1.html">Product One</a> <a class="item2 arrow" href="javascript:void(0)">Product Two<img src="images/arrow1.gif" width="10" height="12" alt="" /></a> <div class="section"> <a class="item2" href="example1.html">Overview</a> <a class="item2" href="example1.html">Features</a> <a class="item2" href="example1.html">Requirements</a> <a class="item2" href="example1.html">Flash Demos</a> </div> <a class="item2 arrow" href="javascript:void(0)">Product Three<img src="images/arrow1.gif" width="10" height="12" alt="" /></a> <div class="section"> <a class="item2" href="example1.html">Overview</a> <a class="item2" href="example1.html">Features</a> <a class="item2" href="example1.html">Requirements</a> <a class="item2" href="example1.html">Screenshots</a> <a class="item2" href="example1.html">Flash Demos</a> <a class="item2 arrow" href="javascript:void(0)">Live Demo<img src="images/arrow1.gif" width="10" height="12" alt="" /></a> <div class="section"> <a class="item2" href="example1.html">Create Account</a> <a class="item2 arrow" href="javascript:void(0)">Test Drive<img src="images/arrow1.gif" width="10" height="12" alt="" /></a> <div class="section"> <a class="item2" href="example1.html">Test One</a> <a class="item2" href="example1.html">Test Two</a> <a class="item2" href="example1.html">Test Three</a> </div> </div> </div> <a class="item2 arrow" href="javascript:void(0)">Product Four<img src="images/arrow1.gif" width="10" height="12" alt="" /></a> <div class="section"> <a class="item2" href="example1.html">Overview</a> <a class="item2" href="example1.html">Features</a> <a class="item2" href="example1.html">Requirements</a> </div> <a class="item2" href="example1.html">Product Five</a> </div> </td> <td> <a class="item1" href="javascript:void(0)">Downloads</a> <div class="section"> <a class="item2" href="example1.html">30-day Demo Key</a> <a class="item2 arrow" href="javascript:void(0)">Product One Download<img src="images/arrow1.gif" width="10" height="12" alt="" /></a> <div class="section"> <a class="item2" href="example1.html">Linux Download</a> <a class="item2" href="example1.html">Solaris Download</a> <a class="item2" href="example1.html">Windows Download</a> </div> <a class="item2 arrow" href="javascript:void(0)">Product Two Download<img src="images/arrow1.gif" width="10" height="12" alt="" /></a> <div class="section"> <a class="item2" href="example1.html">Linux Download</a> </div> </div> </td> <td> <a class="item1" href="javascript:void(0)">Support</a> <div class="section"> <a class="item2" href="example1.html">E-mail Support</a> <a class="item2" href="example1.html">Phone Support</a> <a class="item2" href="example1.html">WWW support</a> </div> </td> <td> <a class="item1" href="javascript:void(0)">Partners</a> <div class="section"> <a class="item2" href="example1.html">Benefits</a> <a class="item2 arrow" href="javascript:void(0)">Applications<img src="images/arrow1.gif" width="10" height="12" alt="" /></a> <div class="section"> <a class="item2" href="example1.html">Application One</a> <a class="item2" href="example1.html">Application Two</a> <a class="item2" href="example1.html">Application Three</a> <a class="item2" href="example1.html">Application Four</a> <a class="item2" href="example1.html">Application Five</a> <a class="item2" href="example1.html">Application Six</a> <a class="item2" href="example1.html">Application Seven</a> </div> <a class="item2" href="example1.html">Listing</a> </div> </td> <td> <a class="item1" href="javascript:void(0)">Customers</a> <div class="section"> <a class="item2" href="example1.html">Customer One</a> <a class="item2" href="example1.html">Customer Two</a> <a class="item2" href="example1.html">Customer Three</a> </div> </td> <td> <a class="item1" href="javascript:void(0)">About Us</a> <div class="section"> <a class="item2" href="example1.html">Executive Team</a> <a class="item2" href="example1.html">Investors</a> <a class="item2" href="example1.html">Career Opportunities</a> <a class="item2 arrow" href="javascript:void(0)">Press Center<img src="images/arrow1.gif" width="10" height="12" alt="" /></a> <div class="section"> <a class="item2" href="example1.html">Products Information</a> </div> <a class="item2" href="example1.html">Success Stories</a> <a class="item2" href="example1.html">Contact Us</a> </div> </td> </tr> </table> <p> <b>Project</b>: <a href="http://gosu.pl/dhtml/mygosumenu.html">mygosuMenu</a> <br /> <b>Menu type</b>: #1.1 DropDownMenuX example 1 <br /> <b>Features</b>: <br /> - horizontal or vertical menu <br /> - unlimited nesting <br /> - can be positioned statically or absolutely <br /> - delay for showing/hiding menu (can be turned off by setting to 0) <br /> - position of submenus can be changed, so they can for example overflow parent elements <br /> - on the same page there can be many menus created <br /> - seperated into 3 layers: behaviour(javascript), structure(html), presentation(css) <br /> - search engine friendly <br /> - free for any use (BSD license) <br /> - works with selectboxes on IE6 <br /> <b>Compatibility</b>: Tested and works great on: IE 5.0/5.5/6.0, Mozilla 1.4/1.7, Opera 7.11/7.23/7.51, Netscape 7.11, Firefox 0.7/0.8/0.9, Safari 1.2 </p> <script type="text/javascript"> var ddmx = new DropDownMenuX('menu1'); ddmx.delay.show = 0; ddmx.delay.hide = 400; ddmx.position.levelX.left = 2; ddmx.init(); </script> </body> </html> --- NEW FILE: DropDownMenuX.txt --- /* * PROJECT: mygosuMenu * VERSION: 1.1.6 * COPYRIGHT: (c) 2003,2004 Cezary Tomczak * LINK: http://gosu.pl/dhtml/mygosumenu.html * LICENSE: BSD (revised) */ ---------------- ! INSTALL ---------------- 1) include .css file 2) include .js file 3) put html structure 4) initialize menu Html structure is: - ddmx - item1 - section - item2 - item2 - item2 - section - item2 - item2 - item2 - item2 - item1 - section - item2 - item2 - item1 Example of initializing: var menu = new DropDownMenuX("id_of_the_menu"); menu.init(); Example of initializing and setting additional stuff: var ddmx = new DropDownMenuX("menu1"); ddmx.type = "horizontal"; ddmx.delay.show = 0; ddmx.delay.hide = 400; ddmx.position.level1.top = 0; ddmx.position.level1.left = 0; ddmx.position.levelX.top = 0; ddmx.position.levelX.left = 0; ddmx.fixIeSelectBoxBug = true; ddmx.zIndex.visible = 500; ddmx.zIndex.hidden = -1; ddmx.init(); ---------------- ! FEATURES ---------------- - horizontal or vertical menu - unlimited nesting - can be positioned statically or absolutely - delay for showing/hiding menu (can be turned off by setting to 0) - position of submenus can be changed, so they can for example overflow parent elements - on the same page there can be many menus created - seperated into 3 layers: behaviour(javascript), structure(html), presentation(css) - search engine friendly - free for any use (BSD license) ---------------- ! COMPATIBILITY ---------------- Tested on: IE, Mozilla, Opera, Netscape, Firefox, Safari Known CSS problems: * Safari: setting margin > 0 for BODY element causes some positioning problems. Sections in the menu will be placed a few pixels away from the default place. The menu still works and is usable. To avoid these problems set "margin: 0;" for BODY element. * IE: removing doctype causes that IE enables Backward Compatibility Mode and some CSS bugs can appear. Then you will need to edit .css file and make some fixes. * IE: IMG tags (arrows) could be removed from html structure and right aligned background could be set in .arrow class, but .. Internet Explorer has a bug - it doesn't cache CSS images. So if you have 20 arrows in menu ie will load them 20 times on each page request ! That can be annoying for users with slow connection, it also increases your bandwidth unnecessarily. ---------------- ! CHANGELOG ---------------- *** 1.1.6 *** - fixed IE 6 selectbox bug *** 1.1.5 *** - added support for IE 5.0 and IE 5.5 *** 1.1.4 *** - menu has been completely rewritten, some bugs fixed, new features added. The code is based on DropDownMenu1. *** 1.1.3 *** - [menu.js] fixed a bug that appeared on IE browser when doctype was "HTML 4.01 Transitional" *** 1.1.2 *** - [menu.js] fixed a bug that crashed positioning when doctype was specified (only GECKO browsers) - [menu.js] fixed an IE bug that appeared when doctype was specified (backward compatibility mode activated) *** 1.1.1 *** - [menu.css] fixed a minor Opera 7.2.x CSS bug (removed "width: 100%" from #menu .top) *** 1.1.0 *** - first release of tree menu --- NEW FILE: example2.html --- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <title>#1.1 DropDownMenuX example 2</title> <style type="text/css"> body { font: 11px tahoma; background: #ffffff; margin: 0; padding: 50px; } </style> <link rel="stylesheet" type="text/css" href="example2.css" /> <script type="text/javascript" src="../ie5.js"></script> <script type="text/javascript" src="DropDownMenuX.js"></script> </head> <body> <table cellspacing="0" cellpadding="0" id="menu1" class="ddmx"> <tr> <td> <a class="item1" href="javascript:void(0)">Products</a> <div class="section"> <a class="item2" href="example2.html">Product One</a> <a class="item2 arrow" href="javascript:void(0)">Product Two<img src="images/arrow1.gif" width="10" height="12" alt="" /></a> <div class="section"> <a class="item2" href="example2.html">Overview</a> <a class="item2" href="example2.html">Features</a> <a class="item2" href="example2.html">Requirements</a> <a class="item2" href="example2.html">Flash Demos</a> </div> <a class="item2 arrow" href="javascript:void(0)">Product Three<img src="images/arrow1.gif" width="10" height="12" alt="" /></a> <div class="section"> <a class="item2" href="example2.html">Overview</a> <a class="item2" href="example2.html">Features</a> <a class="item2" href="example2.html">Requirements</a> <a class="item2" href="example2.html">Screenshots</a> <a class="item2" href="example2.html">Flash Demos</a> <a class="item2 arrow" href="javascript:void(0)">Live Demo<img src="images/arrow1.gif" width="10" height="12" alt="" /></a> <div class="section"> <a class="item2" href="example2.html">Create Account</a> <a class="item2 arrow" href="javascript:void(0)">Test Drive<img src="images/arrow1.gif" width="10" height="12" alt="" /></a> <div class="section"> <a class="item2" href="example2.html">Test One</a> <a class="item2" href="example2.html">Test Two</a> <a class="item2" href="example2.html">Test Three</a> </div> </div> </div> <a class="item2 arrow" href="javascript:void(0)">Product Four<img src="images/arrow1.gif" width="10" height="12" alt="" /></a> <div class="section"> <a class="item2" href="example2.html">Overview</a> <a class="item2" href="example2.html">Features</a> <a class="item2" href="example2.html">Requirements</a> </div> <a class="item2" href="example2.html">Product Five</a> </div> <a class="item1" href="javascript:void(0)">Downloads</a> <div class="section"> <a class="item2" href="example2.html">30-day Demo Key</a> <a class="item2 arrow" href="javascript:void(0)">Product One Download<img src="images/arrow1.gif" width="10" height="12" alt="" /></a> <div class="section"> <a class="item2" href="example2.html">Linux Download</a> <a class="item2" href="example2.html">Solaris Download</a> <a class="item2" href="example2.html">Windows Download</a> </div> <a class="item2 arrow" href="javascript:void(0)">Product Two Download<img src="images/arrow1.gif" width="10" height="12" alt="" /></a> <div class="section"> <a class="item2" href="example2.html">Linux Download</a> </div> </div> <a class="item1" href="javascript:void(0)">Support</a> <div class="section"> <a class="item2" href="example2.html">E-mail Support</a> <a class="item2" href="example2.html">Phone Support</a> <a class="item2" href="example2.html">WWW support</a> </div> <a class="item1" href="javascript:void(0)">Partners</a> <div class="section"> <a class="item2" href="example2.html">Benefits</a> <a class="item2 arrow" href="javascript:void(0)">Applications<img src="images/arrow1.gif" width="10" height="12" alt="" /></a> <div class="section"> <a class="item2" href="example2.html">Application One</a> <a class="item2" href="example2.html">Application Two</a> <a class="item2" href="example2.html">Application Three</a> <a class="item2" href="example2.html">Application Four</a> <a class="item2" href="example2.html">Application Five</a> <a class="item2" href="example2.html">Application Six</a> <a class="item2" href="example2.html">Application Seven</a> </div> <a class="item2" href="example2.html">Listing</a> </div> <a class="item1" href="javascript:void(0)">Customers</a> <div class="section"> <a class="item2" href="example2.html">Customer One</a> <a class="item2" href="example2.html">Customer Two</a> <a class="item2" href="example2.html">Customer Three</a> </div> <a class="item1 bottom" href="javascript:void(0)">About Us</a> <div class="section"> <a class="item2" href="example2.html">Executive Team</a> <a class="item2" href="example2.html">Investors</a> <a class="item2" href="example2.html">Career Opportunities</a> <a class="item2 arrow" href="javascript:void(0)">Press Center<img src="images/arrow1.gif" width="10" height="12" alt="" /></a> <div class="section"> <a class="item2" href="example2.html">Products Information</a> </div> <a class="item2" href="example2.html">Success Stories</a> <a class="item2" href="example2.html">Contact Us</a> </div> </td> </tr> </table> <p> <b>Project</b>: <a href="http://gosu.pl/dhtml/mygosumenu.html">mygosuMenu</a> <br /> <b>Menu type</b>: #1.1 DropDownMenuX example 2 <br /> <b>Features</b>: <br /> - horizontal or vertical menu <br /> - unlimited nesting <br /> - can be positioned statically or absolutely <br /> - delay for showing/hiding menu (can be turned off by setting to 0) <br /> - position of submenus can be changed, so they can for example overflow parent elements <br /> - on the same page there can be many menus created <br /> - seperated into 3 layers: behaviour(javascript), structure(html), presentation(css) <br /> - search engine friendly <br /> - free for any use (BSD license) <br /> - works with selectboxes on IE 6 <br /> <b>Compatibility</b>: Tested and works great on: IE 5.0/5.5/6.0, Mozilla 1.4/1.7, Opera 7.11/7.23/7.51, Netscape 7.11, Firefox 0.7/0.8/0.9, Safari 1.2 </p> <script type="text/javascript"> var ddmx = new DropDownMenuX('menu1'); ddmx.type = "vertical"; ddmx.delay.show = 0; ddmx.delay.hide = 400; ddmx.position.levelX.left = 2; ddmx.init(); </script> </body> </html> --- NEW FILE: DropDownMenuX.js --- /* * DO NOT REMOVE THIS NOTICE * * PROJECT: mygosuMenu * VERSION: 1.1.6 * COPYRIGHT: (c) 2003,2004 Cezary Tomczak * LINK: http://gosu.pl/dhtml/mygosumenu.html * LICENSE: BSD (revised) */ /* Todo, bugs to fix: - delay.show = 400 , delay.hide = 400 go Product Three -> Live Demo -> Test Drive -> Test Three , go fast to Product Four. Result: 2 elements highlighted in the same section - delay.show = 0 , delay.hide = 400 go Product Three -> Live Demo , section out , section over, seciont out. Result: Live Demo is not highlighted - active className changing, unnecessary blink - opera: hideSection() exceptions are throwed */ function DropDownMenuX(id) { /* Type of the menu: "horizontal" or "vertical" */ this.type = "horizontal"; /* Delay (in miliseconds >= 0): show-hide menu * Hide must be > 0 */ this.delay = { "show": 0, "hide": 400 } /* Change the default position of sub-menu by Y pixels from top and X pixels from left * Negative values are allowed */ this.position = { "level1": { "top": 0, "left": 0}, "levelX": { "top": 0, "left": 0} } /* fix ie selectbox bug ? */ this.fixIeSelectBoxBug = true; /* Z-index property for .section */ this.zIndex = { "visible": 500, "hidden": -1 }; // Browser detection this.browser = { "ie": Boolean(document.body.currentStyle), "ie5": (navigator.appVersion.indexOf("MSIE 5.5") != -1 || navigator.appVersion.indexOf("MSIE 5.0") != -1), "ie6": (navigator.appVersion.indexOf("MSIE 6.0") != -1) }; if (!this.browser.ie) { this.browser.ie5 = false; this.browser.ie6 = false; } /* Initialize the menu */ this.init = function() { if (!document.getElementById(this.id)) { return alert("DropDownMenuX.init() failed. Element '"+ this.id +"' does not exist."); } if (this.type != "horizontal" && this.type != "vertical") { return alert("DropDownMenuX.init() failed. Unknown menu type: '"+this.type+"'"); } if (this.browser.ie && this.browser.ie5) { fixWrap(); } fixSections(); parse(document.getElementById(this.id).childNodes, this.tree, this.id); } /* Search for .section elements and set width for them */ function fixSections() { var arr = document.getElementById(self.id).getElementsByTagName("div"); var sections = new Array(); var widths = new Array(); for (var i = 0; i < arr.length; i++) { if (arr[i].className == "section") { sections.push(arr[i]); } } for (var i = 0; i < sections.length; i++) { widths.push(getMaxWidth(sections[i].childNodes)); } for (var i = 0; i < sections.length; i++) { sections[i].style.width = (widths[i]) + "px"; } if (self.browser.ie) { for (var i = 0; i < sections.length; i++) { setMaxWidth(sections[i].childNodes, widths[i]); } } } function fixWrap() { var elements = document.getElementById(self.id).getElementsByTagName("a"); for (var i = 0; i < elements.length; i++) { if (/item2/.test(elements[i].className)) { elements[i].innerHTML = '<div nowrap="nowrap">'+elements[i].innerHTML+'</div>'; } } } /* Search for an element with highest width among given nodes, return that width */ function getMaxWidth(nodes) { var maxWidth = 0; for (var i = 0; i < nodes.length; i++) { if (nodes[i].nodeType != 1 || /section/.test(nodes[i].className)) { continue; } if (nodes[i].offsetWidth > maxWidth) { maxWidth = nodes[i].offsetWidth; } } return maxWidth; } /* Set width for item2 elements */ function setMaxWidth(nodes, maxWidth) { for (var i = 0; i < nodes.length; i++) { if (nodes[i].nodeType == 1 && /item2/.test(nodes[i].className) && nodes[i].currentStyle) { if (self.browser.ie5) { nodes[i].style.width = (maxWidth) + "px"; } else { nodes[i].style.width = (maxWidth - parseInt(nodes[i].currentStyle.paddingLeft) - parseInt(nodes[i].currentStyle.paddingRight)) + "px"; } } } } /* Parse nodes, create events, position elements */ function parse(nodes, tree, id) { for (var i = 0; i < nodes.length; i++) { if (1 != nodes[i].nodeType) { continue; } switch (true) { // .item1 case /\bitem1\b/.test(nodes[i].className): nodes[i].id = id + "-" + tree.length; tree.push(new Array()); nodes[i].onmouseover = itemOver; nodes[i].onmouseout = itemOut; break; // .item2 case /\bitem2\b/.test(nodes[i].className): nodes[i].id = id + "-" + tree.length; tree.push(new Array()); nodes[i].onmouseover = itemOver; nodes[i].onmouseout = itemOut; break; // .section case /\bsection\b/.test(nodes[i].className): // id, events nodes[i].id = id + "-" + (tree.length - 1) + "-section"; nodes[i].onmouseover = sectionOver; nodes[i].onmouseout = sectionOut; // position var box1 = document.getElementById(id + "-" + (tree.length - 1)); var box2 = document.getElementById(nodes[i].id); var el = new Element(box1.id); if (1 == el.level) { if ("horizontal" == self.type) { box2.style.top = box1.offsetTop + box1.offsetHeight + self.position.level1.top + "px"; if (self.browser.ie5) { box2.style.left = self.position.level1.left + "px"; } else { box2.style.left = box1.offsetLeft + self.position.level1.left + "px"; } } else if ("vertical" == self.type) { box2.style.top = box1.offsetTop + self.position.level1.top + "px"; if (self.browser.ie5) { box2.style.left = box1.offsetWidth + self.position.level1.left + "px"; } else { box2.style.left = box1.offsetLeft + box1.offsetWidth + self.position.level1.left + "px"; } } } else { box2.style.top = box1.offsetTop + self.position.levelX.top + "px"; box2.style.left = box1.offsetLeft + box1.offsetWidth + self.position.levelX.left + "px"; } // sections, sectionsShowCnt, sectionsHideCnt self.sections.push(nodes[i].id); self.sectionsShowCnt.push(0); self.sectionsHideCnt.push(0); if (self.fixIeSelectBoxBug && self.browser.ie6) { nodes[i].innerHTML = nodes[i].innerHTML + '<iframe id="'+nodes[i].id+'-iframe" src="javascript:false;" scrolling="no" frameborder="0" style="position: absolute; top: 0px; left: 0px; display: none; filter:alpha(opacity=0);"></iframe>'; } break; } if (nodes[i].childNodes) { if (/\bsection\b/.test(nodes[i].className)) { parse(nodes[i].childNodes, tree[tree.length - 1], id + "-" + (tree.length - 1)); } else { parse(nodes[i].childNodes, tree, id); } } } } /* event, item:onmouseover */ function itemOver() { //debug("itemOver("+this.id+") , visible = " + self.visible); self.itemShowCnt++; var id_section = this.id + "-section"; if (self.visible.length) { var el = new Element(self.visible.getLast()); el = document.getElementById(el.getParent().id); if (/item\d-active/.test(el.className)) { el.className = el.className.replace(/(item\d)-active/, "$1"); } } if (self.sections.contains(id_section)) { clearTimers(); self.sectionsHideCnt[self.sections.indexOf(id_section)]++; var cnt = self.sectionsShowCnt[self.sections.indexOf(id_section)]; var timerId = setTimeout(function(a, b) { return function() { self.showSection(a, b); } } (id_section, cnt), self.delay.show); self.timers.push(timerId); } else { if (self.visible.length) { clearTimers(); var timerId = setTimeout(function(a, b) { return function() { self.showItem(a, b); } } (this.id, self.itemShowCnt), self.delay.show); self.timers.push(timerId); } } } /* event, item:onmouseout */ function itemOut() { //debug("itemOut("+this.id+") , visible = " + self.visible); self.itemShowCnt++; var id_section = this.id + "-section"; if (self.sections.contains(id_section)) { self.sectionsShowCnt[self.sections.indexOf(id_section)]++; if (self.visible.contains(id_section)) { var cnt = self.sectionsHideCnt[self.sections.indexOf(id_section)]; var timerId = setTimeout(function(a, b) { return function() { self.hideSection(a, b); } }(id_section, cnt), self.delay.hide); self.timers.push(timerId); } } } /* event, section:onmouseover */ function sectionOver() { //debug("sectionOver("+this.id+") , visible = " + self.visible); self.sectionsHideCnt[self.sections.indexOf(this.id)]++; var el = new Element(this.id); var parent = document.getElementById(el.getParent().id); if (!/item\d-active/.test(parent.className)) { parent.className = parent.className.replace(/(item\d)/, "$1-active"); } } /* event, section:onmouseout */ function sectionOut() { //debug("sectionOut("+this.id+") , visible = " + self.visible); self.sectionsShowCnt[self.sections.indexOf(this.id)]++; var cnt = self.sectionsHideCnt[self.sections.indexOf(this.id)]; var timerId = setTimeout(function(a, b) { return function() { self.hideSection(a, b); } }(this.id, cnt), self.delay.hide); self.timers.push(timerId); } /* Show section (1 argument passed) * Try to show section (2 arguments passed) - check cnt with sectionShowCnt */ this.showSection = function(id, cnt) { if (typeof cnt != "undefined") { if (cnt != this.sectionsShowCnt[this.sections.indexOf(id)]) { return; } } //debug("showSection("+id+", "+cnt+") , visible = " + this.visible); this.sectionsShowCnt[this.sections.indexOf(id)]++; if (this.visible.length) { if (id == this.visible.getLast()) { return; } var el = new Element(id); var parents = el.getParentSections(); //debug("getParentSections("+el.id+") = " + parents); for (var i = this.visible.length - 1; i >= 0; i--) { if (parents.contains(this.visible[i])) { break; } else { this.hideSection(this.visible[i]); } } } var el = new Element(id); var parent = document.getElementById(el.getParent().id); if (!/item\d-active/.test(parent.className)) { parent.className = parent.className.replace(/(item\d)/, "$1-active"); } if (document.all) { document.getElementById(id).style.display = "block"; } document.getElementById(id).style.visibility = "visible"; document.getElementById(id).style.zIndex = this.zIndex.visible; if (this.fixIeSelectBoxBug && this.browser.ie6) { var div = document.getElementById(id); var iframe = document.getElementById(id+"-iframe"); iframe.style.width = div.offsetWidth + parseInt(div.currentStyle.borderLeftWidth) + parseInt(div.currentStyle.borderRightWidth); iframe.style.height = div.offsetHeight + parseInt(div.currentStyle.borderTopWidth) + parseInt(div.currentStyle.borderBottomWidth); iframe.style.top = -parseInt(div.currentStyle.borderTopWidth); iframe.style.left = -parseInt(div.currentStyle.borderLeftWidth); iframe.style.zIndex = div.style.zIndex - 1; iframe.style.display = "block"; } this.visible.push(id); } /* Emulating an empty non-existent section, we have to hide elements, works like showSection() */ this.showItem = function(id, cnt) { if (typeof cnt != "undefined") { if (cnt != this.itemShowCnt) { return; } } this.itemShowCnt++; if (this.visible.length) { var el = new Element(id + "-section"); var parents = el.getParentSections(); //debug("showItem() getParentSections("+el.id+") = " + parents); for (var i = this.visible.length - 1; i >= 0; i--) { if (parents.contains(this.visible[i])) { break; } else { this.hideSection(this.visible[i]); } } } } /* Hide section (1 argument passed) * Try to hide section (2 arguments passed) - check cnt with sectionHideCnt */ this.hideSection = function(id, cnt) { if (typeof cnt != "undefined") { if (cnt != this.sectionsHideCnt[this.sections.indexOf(id)]) { return; } if (id == this.visible.getLast()) { //debug("hideSectionAll("+id+", "+cnt+") , visible = " + this.visible); for (var i = this.visible.length - 1; i >= 0; i--) { this.hideSection(this.visible[i]); } return; } } //debug("hideSection("+id+", "+cnt+") , visible = " + this.visible); var el = new Element(id); var parent = document.getElementById(el.getParent().id); if (/item\d-active/.test(parent.className)) { parent.className = parent.className.replace(/(item\d)-active/, "$1"); } document.getElementById(id).style.zIndex = this.zIndex.hidden; document.getElementById(id).style.visibility = "hidden"; if (document.all) { document.getElementById(id).style.display = "none"; } if (this.fixIeSelectBoxBug && this.browser.ie6) { var iframe = document.getElementById(id+"-iframe"); iframe.style.display = "none"; } if (this.visible.contains(id)) { if (id == this.visible.getLast()) { this.visible.pop(); } else { //throw "DropDownMenuX.hideSection('"+id+"', "+cnt+") failed, trying to hide a section that is not the deepest visible section"; return; } } else { //throw "DropDownMenuX.hideSection('"+id+"', "+cnt+") failed, cannot hide element that is not visible"; return; } this.sectionsHideCnt[this.sections.indexOf(id)]++; } /* Element (.section, .item2 etc) */ function Element(id) { this.menu = self; this.id = id; /* Get Level of given id * Examples: menu-1 (1 level), menu-1-4 (2 level) */ this.getLevel = function() { var s = this.id.substr(this.menu.id.length); return s.substrCount("-"); } /* Get parent Element */ this.getParent = function() { var s = this.id.substr(this.menu.id.length); var a = s.split("-"); a.pop(); return new Element(this.menu.id + a.join("-")); } /* Check whether an element has a parent element */ this.hasParent = function() { var s = this.id.substr(this.menu.id.length); var a = s.split("-"); return a.length > 2; } /* Check whether an element has a sub-section */ this.hasChilds = function() { return Boolean(document.getElementById(this.id + "-section")); } /* Get parent section elements for current section */ this.getParentSections = function() { var s = this.id.substr(this.menu.id.length); s = s.substr(0, s.length - "-section".length); var a = s.split("-"); a.shift(); a.pop(); var s = this.menu.id; var parents = []; for (var i = 0; i < a.length; i++) { s += ("-" + a[i]); parents.push(s + "-section"); } return parents; } this.level = this.getLevel(); } /* Clear all timers set with setTimeout() */ function clearTimers() { for (var i = self.timers.length - 1; i >= 0; i--) { clearTimeout(self.timers[i]); self.timers.pop(); } } var self = this; this.id = id; /* menu id */ this.tree = []; /* tree structure of menu */ this.sections = []; /* all sections, required for timeout */ this.sectionsShowCnt = []; this.sectionsHideCnt = []; this.itemShowCnt = 0; this.timers = []; // timeout ids this.visible = []; /* visible section, ex. Array("menu-0-section", ..) , succession is important: top to bottom */ } /* Finds the index of the first occurence of item in the array, or -1 if not found */ if (typeof Array.prototype.indexOf == "undefined") { Array.prototype.indexOf = function(item) { for (var i = 0; i < this.length; i++) { if (this[i] === item) { return i; } } return -1; } } /* Check whether array contains given string */ if (typeof Array.prototype.contains == "undefined") { Array.prototype.contains = function(s) { for (var i = 0; i < this.length; i++) { if (this[i] === s) { return true; } } return false; } } /* Counts the number of substring occurrences */ if (typeof String.prototype.substrCount == "undefined") { String.prototype.substrCount = function(s) { return this.split(s).length - 1; } } /* Get the last element from the array */ if (typeof Array.prototype.getLast == "undefined") { Array.prototype.getLast = function() { return this[this.length-1]; } } |
|
From: FlorinCB <ory...@us...> - 2008-09-18 00:43:59
|
Update of /cvsroot/mxbb/mx_music/phpbb2/mx_mod/mx_shared/mygosumenu/1.1/images In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv19367/mx_mod/mx_shared/mygosumenu/1.1/images Added Files: arrow1.gif arrow3.gif Log Message: upgrade --- NEW FILE: arrow3.gif --- (This appears to be a binary file; contents omitted.) --- NEW FILE: arrow1.gif --- (This appears to be a binary file; contents omitted.) |
|
From: FlorinCB <ory...@us...> - 2008-09-18 00:43:59
|
Update of /cvsroot/mxbb/mx_music/phpbb2/mx_mod/mx_shared/mygosumenu/1.1/tests In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv19367/mx_mod/mx_shared/mygosumenu/1.1/tests Added Files: selectbox.html Log Message: upgrade --- NEW FILE: selectbox.html --- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <title>#1.1 DropDownMenuX example 1</title> <style type="text/css"> body { font: 11px tahoma; background: #ffffff; margin: 0; padding: 50px; } </style> <link rel="stylesheet" type="text/css" href="../example1.css" /> <script type="text/javascript" src="../../ie5.js"></script> <script type="text/javascript" src="../DropDownMenuX.js"></script> </head> <body> <table cellspacing="0" cellpadding="0" id="menu1" class="ddmx"> <tr> <td> <a class="item1" href="javascript:void(0)">Products</a> <div class="section"> <a class="item2" href="selectbox.html">Product One</a> <a class="item2 arrow" href="javascript:void(0)">Product Two<img src="../images/arrow1.gif" width="10" height="12" alt="" /></a> <div class="section"> <a class="item2" href="selectbox.html">Overview</a> <a class="item2" href="selectbox.html">Features</a> <a class="item2" href="selectbox.html">Requirements</a> <a class="item2" href="selectbox.html">Flash Demos</a> </div> <a class="item2 arrow" href="javascript:void(0)">Product Three<img src="../images/arrow1.gif" width="10" height="12" alt="" /></a> <div class="section"> <a class="item2" href="selectbox.html">Overview</a> <a class="item2" href="selectbox.html">Features</a> <a class="item2" href="selectbox.html">Requirements</a> <a class="item2" href="selectbox.html">Screenshots</a> <a class="item2" href="selectbox.html">Flash Demos</a> <a class="item2 arrow" href="javascript:void(0)">Live Demo<img src="../images/arrow1.gif" width="10" height="12" alt="" /></a> <div class="section"> <a class="item2" href="selectbox.html">Create Account</a> <a class="item2 arrow" href="javascript:void(0)">Test Drive<img src="../images/arrow1.gif" width="10" height="12" alt="" /></a> <div class="section"> <a class="item2" href="selectbox.html">Test One</a> <a class="item2" href="selectbox.html">Test Two</a> <a class="item2" href="selectbox.html">Test Three</a> </div> </div> </div> <a class="item2 arrow" href="javascript:void(0)">Product Four<img src="../images/arrow1.gif" width="10" height="12" alt="" /></a> <div class="section"> <a class="item2" href="selectbox.html">Overview</a> <a class="item2" href="selectbox.html">Features</a> <a class="item2" href="selectbox.html">Requirements</a> </div> <a class="item2" href="selectbox.html">Product Five</a> </div> </td> <td> <a class="item1" href="javascript:void(0)">Downloads</a> <div class="section"> <a class="item2" href="selectbox.html">30-day Demo Key</a> <a class="item2 arrow" href="javascript:void(0)">Product One Download<img src="../images/arrow1.gif" width="10" height="12" alt="" /></a> <div class="section"> <a class="item2" href="selectbox.html">Linux Download</a> <a class="item2" href="selectbox.html">Solaris Download</a> <a class="item2" href="selectbox.html">Windows Download</a> </div> <a class="item2 arrow" href="javascript:void(0)">Product Two Download<img src="../images/arrow1.gif" width="10" height="12" alt="" /></a> <div class="section"> <a class="item2" href="selectbox.html">Linux Download</a> </div> </div> </td> <td> <a class="item1" href="javascript:void(0)">Support</a> <div class="section"> <a class="item2" href="selectbox.html">E-mail Support</a> <a class="item2" href="selectbox.html">Phone Support</a> <a class="item2" href="selectbox.html">WWW support</a> </div> </td> <td> <a class="item1" href="javascript:void(0)">Partners</a> <div class="section"> <a class="item2" href="selectbox.html">Benefits</a> <a class="item2 arrow" href="javascript:void(0)">Applications<img src="../images/arrow1.gif" width="10" height="12" alt="" /></a> <div class="section"> <a class="item2" href="selectbox.html">Application One</a> <a class="item2" href="selectbox.html">Application Two</a> <a class="item2" href="selectbox.html">Application Three</a> <a class="item2" href="selectbox.html">Application Four</a> <a class="item2" href="selectbox.html">Application Five</a> <a class="item2" href="selectbox.html">Application Six</a> <a class="item2" href="selectbox.html">Application Seven</a> </div> <a class="item2" href="selectbox.html">Listing</a> </div> </td> <td> <a class="item1" href="javascript:void(0)">Customers</a> <div class="section"> <a class="item2" href="selectbox.html">Customer One</a> <a class="item2" href="selectbox.html">Customer Two</a> <a class="item2" href="selectbox.html">Customer Three</a> </div> </td> <td> <a class="item1" href="javascript:void(0)">About Us</a> <div class="section"> <a class="item2" href="selectbox.html">Executive Team</a> <a class="item2" href="selectbox.html">Investors</a> <a class="item2" href="selectbox.html">Career Opportunities</a> <a class="item2 arrow" href="javascript:void(0)">Press Center<img src="../images/arrow1.gif" width="10" height="12" alt="" /></a> <div class="section"> <a class="item2" href="selectbox.html">Products Information</a> </div> <a class="item2" href="selectbox.html">Success Stories</a> <a class="item2" href="selectbox.html">Contact Us</a> </div> </td> </tr> </table> <select> <option>Works with selectboxes on IE6</option> </select> <p> <b>Project</b>: <a href="http://gosu.pl/dhtml/mygosumenu.html">mygosuMenu</a> <br /> <b>Menu type</b>: #1.1 DropDownMenuX example 1 <br /> <b>Features</b>: <br /> - horizontal or vertical menu <br /> - unlimited nesting <br /> - can be positioned statically or absolutely <br /> - delay for showing/hiding menu (can be turned off by setting to 0) <br /> - position of submenus can be changed, so they can for example overflow parent elements <br /> - on the same page there can be many menus created <br /> - seperated into 3 layers: behaviour(javascript), structure(html), presentation(css) <br /> - search engine friendly <br /> - free for any use (BSD license) <br /> - works with selectboxes on IE6 <br /> <b>Compatibility</b>: Tested and works great on: IE 5.0/5.5/6.0, Mozilla 1.4/1.7, Opera 7.11/7.23/7.51, Netscape 7.11, Firefox 0.7/0.8/0.9, Safari 1.2 </p> <script type="text/javascript"> var ddmx = new DropDownMenuX('menu1'); ddmx.delay.show = 0; ddmx.delay.hide = 400; ddmx.position.levelX.left = 2; ddmx.init(); </script> </body> </html> |
Update of /cvsroot/mxbb/mx_music/phpbb2/mx_mod/mx_shared/mygosumenu/1.0 In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv19367/mx_mod/mx_shared/mygosumenu/1.0 Added Files: DropDownMenu1.js DropDownMenu1.txt example1.css example1.html example2.css example2.html temp.php Log Message: upgrade --- NEW FILE: example2.css --- .ddm1 { font: 11px tahoma; } .ddm1 .item1, .ddm1 .item1:hover, .ddm1 .item1-active, .ddm1 .item1-active:hover { padding: 3px 8px 4px 8px; border: 1px #003366; border-style: solid solid none solid; text-decoration: none; display: block; position: relative; } .ddm1 .item1 { background: #0EA138; color: #ffffff; } .ddm1 .item1:hover, .ddm1 .item1-active, .ddm1 .item1-active:hover { background: #FF6600; color: #ffffff; } .ddm1 .item2, .ddm1 .item2:hover { padding: 3px 8px 4px 8px; text-decoration: none; display: block; white-space: nowrap; } .ddm1 .item2 { background: #3264C7; color: #ffffff; } .ddm1 .item2:hover { background: #6699FF; color: #ffffff; } .ddm1 .section { border: 1px #003366; border-style: solid solid solid solid; position: absolute; visibility: hidden; z-index: -1; } .ddm1 .bottom, .ddm1 .bottom:hover { border-style: solid solid solid solid; } * html .ddm1 td { position: relative; } /* ie 5.0 fix */ --- NEW FILE: DropDownMenu1.txt --- /* * PROJECT: mygosuMenu * VERSION: 1.0.8 * COPYRIGHT: (c) 2003,2004 Cezary Tomczak * LINK: http://gosu.pl/dhtml/mygosumenu.html * LICENSE: BSD (revised) */ ---------------- ! INSTALL ---------------- 1) include .css file 2) include .js file 3) put html structure 4) initialize menu Example of initializing: var menu = new DropDownMenu1("id_of_the_menu"); menu.init(); Example of initializing and setting additional stuff: var ddm1 = new DropDownMenu1("ddm1"); ddm1.type = "horizontal"; ddm1.delay.show = 0; ddm1.delay.hide = 100; ddm1.position.top = -5; ddm1.position.left = 0; ddm1.init(); ---------------- ! FEATURES ---------------- - horizontal or vertical menu - can be positioned statically or absolutely - delay for showing/hiding menu (can be turned off by setting to 0) - position of submenus can be changed, so they can for example overflow parent elements - on the same page there can be many menus created - seperated into 3 layers: behaviour(javascript), structure(html), presentation(css) - search engine friendly - free for any use (BSD license) ---------------- ! COMPATIBILITY ---------------- Tested on: IE, Mozilla, Opera, Netscape, Firefox, Safari Known CSS problems: * Safari: setting margin > 0 for BODY element causes some positioning problems. Sections in the menu will be placed a few pixels away from the default place. The menu still works and is usable. To avoid these problems set "margin: 0;" for BODY element. * IE: removing doctype causes that IE enables Backward Compatibility Mode and some CSS bugs can appear. Then you will need to edit .css file and make some fixes. ---------------- ! CHANGELOG ---------------- *** 1.0.8 *** - added support for IE 5.0/5.5 *** 1.0.7 *** - fixed a bug that appeared on IE 5.5 - [js] modified some code - [css] removed 2 fixes at the end of file *** 1.0.6 *** - Fixed Safari word-spacing bug - Fixed Opera margin bug - Many other bugs fixed, by using table. - Using table again, because while trying to do it completely CSS driven without using tables, I have encountered so many incompatibilites between browsers, so many css bugs that it became nearly impossible to do it. *** 1.0.5 *** - the menu has been completely rewritten, a few bugs fixed, new features added !! *** 1.0.4 *** - [menu.css] fixed a minor Opera 7.2.x CSS bug (removed "width: 100%" from #menu .top) - [menu.css] some other changes - [menu.js] done some optimization *** 1.0.3 *** - fixed a bug on Mozilla (z-index issue) 2 files were modified: * menu.js after line 29 added: "document.getElementById(section).style.zIndex = -1" * menu.css added "z-index: -1;" to #menu div.section - in menu.css , changed position from "static" to "relative" in #menu div.box (probably it caused the menu not working on Safari browser) *** 1.0.2 *** - fixed a bug where the menu disappeared when the mouse was not over a link, but was over the menu - fixed a few minor bugs that affected the construction of the left menu - added an example of the left menu - removed debug tools - size of menu.js reduced from 5kB to 3kB *** 1.0.1 *** - an easier way to put boxes in menu.html *** 1.0.0 *** - first release ! --- NEW FILE: temp.php --- /* * DO NOT REMOVE THIS NOTICE * * PROJECT: mygosuMenu * VERSION: 1.0.8 * COPYRIGHT: (c) 2003,2004 Cezary Tomczak * LINK: http://gosu.pl/dhtml/mygosumenu.html * LICENSE: BSD (revised) */ function DropDownMenu1(id) { /* Type of the menu: "horizontal" or "vertical" */ this.type = "horizontal"; /* Delay (in miliseconds >= 0): show-hide menu */ this.delay = { "show": 0, "hide": 300 } /* Change the default position of sub-menu by Y pixels from top and X pixels from left * Negative values are allowed */ this.position = { "top": 0, "left": 0 } /* Z-index property for .section */ this.zIndex = { "visible": 1, "hidden": -1 }; // Browser detection this.browser = { "ie": Boolean(document.body.currentStyle), "ie5": (navigator.appVersion.indexOf("MSIE 5.5") != -1 || navigator.appVersion.indexOf("MSIE 5.0") != -1) }; if (!this.browser.ie) { this.browser.ie5 = false; } /* Initialize the menu */ this.init = function() { if (!document.getElementById(this.id)) { return alert("DropDownMenu1.init() failed. Element '"+ this.id +"' does not exist."); } if (this.type != "horizontal" && this.type != "vertical") { return alert("DropDownMenu1.init() failed. Unknown menu type: '"+this.type+"'"); } if (this.browser.ie && this.browser.ie5) { fixWrap(); } fixSections(); parse(document.getElementById(this.id).childNodes, this.tree, this.id); } /* Search for .section elements and set width for them */ function fixSections() { var arr = document.getElementById(self.id).getElementsByTagName("div"); var sections = new Array(); var widths = new Array(); for (var i = 0; i < arr.length; i++) { if (arr[i].className == "section") { sections.push(arr[i]); } } for (var i = 0; i < sections.length; i++) { widths.push(getMaxWidth(sections[i].childNodes)); } for (var i = 0; i < sections.length; i++) { sections[i].style.width = (widths[i]) + "px"; } if (self.browser.ie) { for (var i = 0; i < sections.length; i++) { setMaxWidth(sections[i].childNodes, widths[i]); } } } function fixWrap() { var elements = document.getElementById(self.id).getElementsByTagName("a"); for (var i = 0; i < elements.length; i++) { if (/item2/.test(elements[i].className)) { elements[i].innerHTML = '<div nowrap="nowrap">'+elements[i].innerHTML+'</div>'; } } } /* Search for an element with highest width among given nodes, return that width */ function getMaxWidth(nodes) { var maxWidth = 0; for (var i = 0; i < nodes.length; i++) { if (nodes[i].nodeType != 1) { continue; } if (nodes[i].offsetWidth > maxWidth) { maxWidth = nodes[i].offsetWidth; } } return maxWidth; } /* Set width for item2 elements */ function setMaxWidth(nodes, maxWidth) { for (var i = 0; i < nodes.length; i++) { if (nodes[i].nodeType == 1 && /item2/.test(nodes[i].className) && nodes[i].currentStyle) { if (self.browser.ie5) { nodes[i].style.width = (maxWidth) + "px"; } else { nodes[i].style.width = (maxWidth - parseInt(nodes[i].currentStyle.paddingLeft) - parseInt(nodes[i].currentStyle.paddingRight)) + "px"; } } } } /* Parse nodes, create events, position elements */ function parse(nodes, tree, id) { for (var i = 0; i < nodes.length; i++) { if (1 != nodes[i].nodeType) { continue; } switch (true) { // .item1 case /\bitem1\b/.test(nodes[i].className): nodes[i].id = id + "-" + tree.length; tree.push(new Array()); nodes[i].onmouseover = item1over; nodes[i].onmouseout = item1out; break; // .item2 case /\bitem2\b/.test(nodes[i].className): nodes[i].id = id + "-" + tree.length; tree.push(new Array()); break; // .section case /\bsection\b/.test(nodes[i].className): // id, events nodes[i].id = id + "-" + (tree.length - 1) + "-section"; nodes[i].onmouseover = sectionOver; nodes[i].onmouseout = sectionOut; // position var box1 = document.getElementById(id + "-" + (tree.length - 1)); var box2 = document.getElementById(nodes[i].id); if ("horizontal" == self.type) { box2.style.top = box1.offsetTop + box1.offsetHeight + self.position.top + "px"; if (self.browser.ie5) { box2.style.left = self.position.left + "px"; } else { box2.style.left = box1.offsetLeft + self.position.left + "px"; } } else if ("vertical" == self.type) { box2.style.top = box1.offsetTop + self.position.top + "px"; if (self.browser.ie5) { box2.style.left = box1.offsetWidth + self.position.left + "px"; } else { box2.style.left = box1.offsetLeft + box1.offsetWidth + self.position.left + "px"; } } // sections, sectionsShowCnt, sectionsHideCnt self.sections.push(nodes[i].id); self.sectionsShowCnt.push(0); self.sectionsHideCnt.push(0); break; } if (nodes[i].childNodes) { if (/\bsection\b/.test(nodes[i].className)) { parse(nodes[i].childNodes, tree[tree.length - 1], id + "-" + (tree.length - 1)); } else { parse(nodes[i].childNodes, tree, id); } } } } /* event, item1:onmouseover */ function item1over() { var id_section = this.id + "-section"; if (self.visible) { var el = new Element(self.visible); el = document.getElementById(el.getParent().id); if (/item1-active/.test(el.className)) { el.className = el.className.replace(/item1-active/, "item1"); } } if (self.sections.contains(id_section)) { self.sectionsHideCnt[self.sections.indexOf(id_section)]++; var cnt = self.sectionsShowCnt[self.sections.indexOf(id_section)]; setTimeout(function(a, b) { return function() { self.showSection(a, b); } } (id_section, cnt), self.delay.show); } else { if (self.visible) { var cnt = self.sectionsHideCnt[self.sections.indexOf(self.visible)]; setTimeout(function(a, b) { return function() { self.hideSection(a, b); } } (self.visible, cnt), self.delay.show); } } } /* event, item1:onmouseout */ function item1out() { var id_section = this.id + "-section"; if (self.sections.contains(id_section)) { self.sectionsShowCnt[self.sections.indexOf(id_section)]++; if (id_section == self.visible) { var cnt = self.sectionsHideCnt[self.sections.indexOf(id_section)]; setTimeout(function(a, b) { return function() { self.hideSection(a, b); } }(id_section, cnt), self.delay.hide); } } } /* event, section:onmouseover */ function sectionOver() { self.sectionsHideCnt[self.sections.indexOf(this.id)]++; var el = new Element(this.id); el = document.getElementById(el.getParent().id); if (!/item1-active/.test(el.className)) { el.className = el.className.replace(/item1/, "item1-active"); } } /* event, section:onmouseout */ function sectionOut() { self.sectionsShowCnt[self.sections.indexOf(this.id)]++; var cnt = self.sectionsHideCnt[self.sections.indexOf(this.id)]; setTimeout(function(a, b) { return function() { self.hideSection(a, b); } }(this.id, cnt), self.delay.hide); } /* Show section (1 argument passed) * Try to show section (2 arguments passed) - check cnt with sectionShowCnt */ this.showSection = function(id, cnt) { if (typeof cnt != "undefined") { if (cnt != this.sectionsShowCnt[this.sections.indexOf(id)]) { return; } } this.sectionsShowCnt[this.sections.indexOf(id)]++; var el = new Element(id); var parent = document.getElementById(el.getParent().id); if (!/item1-active/.test(parent.className)) { parent.className = parent.className.replace(/item1/, "item1-active"); } if (this.visible) { if (id == this.visible) { return; } this.hideSection(this.visible); } //document.getElementById(id).style.display = "block"; document.getElementById(id).style.visibility = "visible"; document.getElementById(id).style.zIndex = this.zIndex.visible; this.visible = id; } /* Hide section (1 argument passed) * Try to hide section (2 arguments passed) - check cnt with sectionHideCnt */ this.hideSection = function(id, cnt) { if (typeof cnt != "undefined") { if (cnt != this.sectionsHideCnt[this.sections.indexOf(id)]) { return; } } var el = new Element(id); var parent = document.getElementById(el.getParent().id); parent.className = parent.className.replace(/item1-active/, "item1"); document.getElementById(id).style.zIndex = this.zIndex.hidden; document.getElementById(id).style.visibility = "hidden"; //document.getElementById(id).style.display = "none"; if (id == this.visible) { this.visible = ""; } else { //throw "DropDownMenu1.hideSection('"+id+"', "+cnt+") failed, cannot hide element that is not visible"; return; } this.sectionsHideCnt[this.sections.indexOf(id)]++; } /* Necessary when showing section that doesn't exist - hide currently visible section. See: item1over() */ this.hideSelf = function(cnt) { if (this.visible && cnt == this.sectionsHideCnt[this.sections.indexOf(this.visible)]) { this.hideSection(this.visible); } } /* Element (.section, .item2 etc) */ function Element(id) { /* Get parent element */ this.getParent = function() { var s = this.id.substr(this.menu.id.length); var a = s.split("-"); a.pop(); return new Element(this.menu.id + a.join("-")); } this.menu = self; this.id = id; } var self = this; this.id = id; /* menu id */ this.tree = []; /* tree structure of menu */ this.sections = []; /* all sections, required for timeout */ this.sectionsShowCnt = []; this.sectionsHideCnt = []; this.visible = ""; /* visible section, ex. menu-0-section */ } /* Finds the index of the first occurence of item in the array, or -1 if not found */ if (typeof Array.prototype.indexOf == "undefined") { Array.prototype.indexOf = function(item) { for (var i = 0; i < this.length; i++) { if ((typeof this[i] == typeof item) && (this[i] == item)) { return i; } } return -1; } } /* Check whether array contains given string */ if (typeof Array.prototype.contains == "undefined") { Array.prototype.contains = function(s) { for (var i = 0; i < this.length; i++) { if (this[i] === s) { return true; } } return false; } } //--> </script> --- NEW FILE: example1.html --- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <title>#1.0 DropDownMenu1 example 1</title> <style type="text/css"> body { font: 11px tahoma; background: #ffffff; margin: 0; padding: 50px; } </style> <link rel="stylesheet" type="text/css" href="example1.css" /> <script type="text/javascript" src="../ie5.js"></script> <script type="text/javascript" src="DropDownMenu1.js"></script> </head> <body> <table cellspacing="0" cellpadding="0" id="menu1" class="ddm1"> <tr> <td> <a class="item1 left" href="example1.html">Home Page</a> </td> <td> <a class="item1" href="javascript:void(0)">Solutions</a> <div class="section"> <a class="item2" href="example1.html">Category One</a> <a class="item2" href="example1.html">Category Two</a> <a class="item2" href="example1.html">Category Three</a> <a class="item2" href="example1.html">Category Four</a> <a class="item2" href="example1.html">Category Five</a> <a class="item2" href="example1.html">Category Six</a> <a class="item2" href="example1.html">Category Seven</a> </div> </td> <td> <a class="item1" href="javascript:void(0)">Products</a> <div class="section"> <a class="item2" href="example1.html">First Product</a> <a class="item2" href="example1.html">Second Product</a> <a class="item2" href="example1.html">Third Product</a> <a class="item2" href="example1.html">Fourth Product</a> <a class="item2" href="example1.html">Fifth Product</a> <a class="item2" href="example1.html">Sixth Product</a> </div> </td> <td> <a class="item1" href="javascript:void(0)">Company</a> <div class="section"> <a class="item2" href="example1.html">About our Company</a> <a class="item2" href="example1.html">Careers</a> <a class="item2" href="example1.html">Media Center</a> <a class="item2" href="example1.html">News</a> </div> </td> <td> <a class="item1" href="example1.html">Contact Us</a> </td> <td> <a class="item1" href="example1.html">Privacy Policy</a> </td> <td> <a class="item1 right" href="example1.html">Help</a> <div class="section"> <a class="item2" href="example1.html">Help blabla 1</a> <a class="item2" href="example1.html">Help bleble 22</a> <a class="item2" href="example1.html">Help bleble 3</a> <a class="item2" href="example1.html">Help bleble 44444</a> </div> </td> </tr> </table> <p> <b>Project</b>: <a href="http://gosu.pl/dhtml/mygosumenu.html">mygosuMenu</a> <br /> <b>Menu type</b>: #1.0 DropDownMenu1 example 1 <br /> <b>Features</b>: <br /> - horizontal or vertical menu <br /> - can be positioned statically or absolutely <br /> - delay for showing/hiding menu (can be turned off by setting to 0) <br /> - position of submenus can be changed, so they can for example overflow parent elements <br /> - on the same page there can be many menus created <br /> - seperated into 3 layers: behaviour(javascript), structure(html), presentation(css) <br /> - search engine friendly <br /> - free for any use (BSD license) <br /> <b>Compatibility</b>: Tested and works great on: IE 5.0/5.5/6.0, Mozilla 1.4/1.7, Opera 7.11/7.23/7.51, Netscape 7.11, Firefox 0.7/0.8/0.9, Safari 1.2 </p> <script type="text/javascript"> var ddm1 = new DropDownMenu1('menu1'); ddm1.position.top = -1; ddm1.init(); </script> </body> </html> --- NEW FILE: DropDownMenu1.js --- /* * DO NOT REMOVE THIS NOTICE * * PROJECT: mygosuMenu * VERSION: 1.0.8 * COPYRIGHT: (c) 2003,2004 Cezary Tomczak * LINK: http://gosu.pl/dhtml/mygosumenu.html * LICENSE: BSD (revised) */ function DropDownMenu1(id) { /* Type of the menu: "horizontal" or "vertical" */ this.type = "horizontal"; /* Delay (in miliseconds >= 0): show-hide menu */ this.delay = { "show": 0, "hide": 300 } /* Change the default position of sub-menu by Y pixels from top and X pixels from left * Negative values are allowed */ this.position = { "top": 0, "left": 0 } /* Z-index property for .section */ this.zIndex = { "visible": 1, "hidden": -1 }; // Browser detection this.browser = { "ie": Boolean(document.body.currentStyle), "ie5": (navigator.appVersion.indexOf("MSIE 5.5") != -1 || navigator.appVersion.indexOf("MSIE 5.0") != -1) }; if (!this.browser.ie) { this.browser.ie5 = false; } /* Initialize the menu */ this.init = function() { if (!document.getElementById(this.id)) { return alert("DropDownMenu1.init() failed. Element '"+ this.id +"' does not exist."); } if (this.type != "horizontal" && this.type != "vertical") { return alert("DropDownMenu1.init() failed. Unknown menu type: '"+this.type+"'"); } if (this.browser.ie) { fixWrap(); } fixSections(); parse(document.getElementById(this.id).childNodes, this.tree, this.id); } /* Search for .section elements and set width for them */ function fixSections() { var arr = document.getElementById(self.id).getElementsByTagName("div"); var sections = new Array(); var widths = new Array(); for (var i = 0; i < arr.length; i++) { if (arr[i].className == "section") { sections.push(arr[i]); } } for (var i = 0; i < sections.length; i++) { widths.push(getMaxWidth(sections[i].childNodes)); } for (var i = 0; i < sections.length; i++) { sections[i].style.width = (widths[i]) + "px"; } if (self.browser.ie) { for (var i = 0; i < sections.length; i++) { setMaxWidth(sections[i].childNodes, widths[i]); } } } function fixWrap() { var elements = document.getElementById(self.id).getElementsByTagName("a"); for (var i = 0; i < elements.length; i++) { if (/item2/.test(elements[i].className)) { elements[i].innerHTML = '<div nowrap="nowrap">'+elements[i].innerHTML+'</div>'; } } } /* Search for an element with highest width among given nodes, return that width */ function getMaxWidth(nodes) { var maxWidth = 0; for (var i = 0; i < nodes.length; i++) { if (nodes[i].nodeType != 1) { continue; } if (nodes[i].offsetWidth > maxWidth) { maxWidth = nodes[i].offsetWidth; } } return maxWidth; } /* Set width for item2 elements */ function setMaxWidth(nodes, maxWidth) { for (var i = 0; i < nodes.length; i++) { if (nodes[i].nodeType == 1 && /item2/.test(nodes[i].className) && nodes[i].currentStyle) { if (self.browser.ie) { nodes[i].style.width = (maxWidth) + "px"; } else { nodes[i].style.width = (maxWidth - parseInt(nodes[i].currentStyle.paddingLeft) - parseInt(nodes[i].currentStyle.paddingRight)) + "px"; } } } } /* Parse nodes, create events, position elements */ function parse(nodes, tree, id) { for (var i = 0; i < nodes.length; i++) { if (1 != nodes[i].nodeType) { continue; } switch (true) { // .item1 case /\bitem1\b/.test(nodes[i].className): nodes[i].id = id + "-" + tree.length; tree.push(new Array()); nodes[i].onmouseover = item1over; nodes[i].onmouseout = item1out; break; // .item2 case /\bitem2\b/.test(nodes[i].className): nodes[i].id = id + "-" + tree.length; tree.push(new Array()); break; // .section case /\bsection\b/.test(nodes[i].className): // id, events nodes[i].id = id + "-" + (tree.length - 1) + "-section"; nodes[i].onmouseover = sectionOver; nodes[i].onmouseout = sectionOut; // position var box1 = document.getElementById(id + "-" + (tree.length - 1)); var box2 = document.getElementById(nodes[i].id); if ("horizontal" == self.type) { box2.style.top = box1.offsetTop + box1.offsetHeight + self.position.top + "px"; if (self.browser.ie) { box2.style.left = self.position.left + "px"; } else { box2.style.left = box1.offsetLeft + self.position.left + "px"; } } else if ("vertical" == self.type) { box2.style.top = box1.offsetTop + self.position.top + "px"; if (self.browser.ie) { box2.style.left = box1.offsetWidth + self.position.left + "px"; } else { box2.style.left = box1.offsetLeft + box1.offsetWidth + self.position.left + "px"; } } // sections, sectionsShowCnt, sectionsHideCnt self.sections.push(nodes[i].id); self.sectionsShowCnt.push(0); self.sectionsHideCnt.push(0); break; } if (nodes[i].childNodes) { if (/\bsection\b/.test(nodes[i].className)) { parse(nodes[i].childNodes, tree[tree.length - 1], id + "-" + (tree.length - 1)); } else { parse(nodes[i].childNodes, tree, id); } } } } /* event, item1:onmouseover */ function item1over() { var id_section = this.id + "-section"; if (self.visible) { var el = new Element(self.visible); el = document.getElementById(el.getParent().id); if (/item1-active/.test(el.className)) { el.className = el.className.replace(/item1-active/, "item1"); } } if (self.sections.contains(id_section)) { self.sectionsHideCnt[self.sections.indexOf(id_section)]++; var cnt = self.sectionsShowCnt[self.sections.indexOf(id_section)]; setTimeout(function(a, b) { return function() { self.showSection(a, b); } } (id_section, cnt), self.delay.show); } else { if (self.visible) { var cnt = self.sectionsHideCnt[self.sections.indexOf(self.visible)]; setTimeout(function(a, b) { return function() { self.hideSection(a, b); } } (self.visible, cnt), self.delay.show); } } } /* event, item1:onmouseout */ function item1out() { var id_section = this.id + "-section"; if (self.sections.contains(id_section)) { self.sectionsShowCnt[self.sections.indexOf(id_section)]++; if (id_section == self.visible) { var cnt = self.sectionsHideCnt[self.sections.indexOf(id_section)]; setTimeout(function(a, b) { return function() { self.hideSection(a, b); } }(id_section, cnt), self.delay.hide); } } } /* event, section:onmouseover */ function sectionOver() { self.sectionsHideCnt[self.sections.indexOf(this.id)]++; var el = new Element(this.id); el = document.getElementById(el.getParent().id); if (!/item1-active/.test(el.className)) { el.className = el.className.replace(/item1/, "item1-active"); } } /* event, section:onmouseout */ function sectionOut() { self.sectionsShowCnt[self.sections.indexOf(this.id)]++; var cnt = self.sectionsHideCnt[self.sections.indexOf(this.id)]; setTimeout(function(a, b) { return function() { self.hideSection(a, b); } }(this.id, cnt), self.delay.hide); } /* Show section (1 argument passed) * Try to show section (2 arguments passed) - check cnt with sectionShowCnt */ this.showSection = function(id, cnt) { if (typeof cnt != "undefined") { if (cnt != this.sectionsShowCnt[this.sections.indexOf(id)]) { return; } } this.sectionsShowCnt[this.sections.indexOf(id)]++; var el = new Element(id); var parent = document.getElementById(el.getParent().id); if (!/item1-active/.test(parent.className)) { parent.className = parent.className.replace(/item1/, "item1-active"); } if (this.visible) { if (id == this.visible) { return; } this.hideSection(this.visible); } //document.getElementById(id).style.display = "block"; document.getElementById(id).style.visibility = "visible"; document.getElementById(id).style.zIndex = this.zIndex.visible; this.visible = id; } /* Hide section (1 argument passed) * Try to hide section (2 arguments passed) - check cnt with sectionHideCnt */ this.hideSection = function(id, cnt) { if (typeof cnt != "undefined") { if (cnt != this.sectionsHideCnt[this.sections.indexOf(id)]) { return; } } var el = new Element(id); var parent = document.getElementById(el.getParent().id); parent.className = parent.className.replace(/item1-active/, "item1"); document.getElementById(id).style.zIndex = this.zIndex.hidden; document.getElementById(id).style.visibility = "hidden"; //document.getElementById(id).style.display = "none"; if (id == this.visible) { this.visible = ""; } else { //throw "DropDownMenu1.hideSection('"+id+"', "+cnt+") failed, cannot hide element that is not visible"; return; } this.sectionsHideCnt[this.sections.indexOf(id)]++; } /* Necessary when showing section that doesn't exist - hide currently visible section. See: item1over() */ this.hideSelf = function(cnt) { if (this.visible && cnt == this.sectionsHideCnt[this.sections.indexOf(this.visible)]) { this.hideSection(this.visible); } } /* Element (.section, .item2 etc) */ function Element(id) { /* Get parent element */ this.getParent = function() { var s = this.id.substr(this.menu.id.length); var a = s.split("-"); a.pop(); return new Element(this.menu.id + a.join("-")); } this.menu = self; this.id = id; } var self = this; this.id = id; /* menu id */ this.tree = []; /* tree structure of menu */ this.sections = []; /* all sections, required for timeout */ this.sectionsShowCnt = []; this.sectionsHideCnt = []; this.visible = ""; /* visible section, ex. menu-0-section */ } /* Finds the index of the first occurence of item in the array, or -1 if not found */ if (typeof Array.prototype.indexOf == "undefined") { Array.prototype.indexOf = function(item) { for (var i = 0; i < this.length; i++) { if ((typeof this[i] == typeof item) && (this[i] == item)) { return i; } } return -1; } } /* Check whether array contains given string */ if (typeof Array.prototype.contains == "undefined") { Array.prototype.contains = function(s) { for (var i = 0; i < this.length; i++) { if (this[i] === s) { return true; } } return false; } } --- NEW FILE: example1.css --- .ddm1 { font: 11px tahoma; } .ddm1 .item1, .ddm1 .item1:hover, .ddm1 .item1-active, .ddm1 .item1-active:hover { padding: 3px 8px 4px 8px; border: 1px #003366; border-style: solid none solid none; text-decoration: none; display: block; position: relative; } .ddm1 .item1 { background: #0EA138; color: #ffffff; } .ddm1 .item1:hover, .ddm1 .item1-active, .ddm1 .item1-active:hover { background: #FF6600; color: #ffffff; } .ddm1 .item2, .ddm1 .item2:hover { padding: 3px 8px 4px 8px; text-decoration: none; display: block; white-space: nowrap; } .ddm1 .item2 { background: #3264C7; color: #ffffff; } .ddm1 .item2:hover { background: #6699FF; color: #ffffff; } .ddm1 .section { border: 1px #003366; border-style: solid solid solid solid; position: absolute; visibility: hidden; z-index: -1; white-space: nowrap; } .ddm1 .left, .ddm1 .left:hover { border-style: solid none solid solid; } .ddm1 .right, .ddm1 .right:hover { border-style: solid solid solid none; } * html .ddm1 td { position: relative; } /* ie 5.0 fix */ --- NEW FILE: example2.html --- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <title>#1.0 DropDownMenu1 example 2</title> <style type="text/css"> body { font: 11px tahoma; background: #ffffff; margin: 0; padding: 50px; } </style> <link rel="stylesheet" type="text/css" href="example2.css" /> <script type="text/javascript" src="../ie5.js"></script> <script type="text/javascript" src="DropDownMenu1.js"></script> </head> <body> <table cellspacing="0" cellpadding="0" id="menu1" class="ddm1"> <tr> <td> <a class="item1" href="example2.html">Home Page</a> <a class="item1" href="javascript:void(0)">Solutions</a> <div class="section"> <a class="item2" href="example2.html">Category One</a> <a class="item2" href="example2.html">Category Two</a> <a class="item2" href="example2.html">Category Three</a> <a class="item2" href="example2.html">Category Four</a> <a class="item2" href="example2.html">Category Five</a> <a class="item2" href="example2.html">Category Six</a> <a class="item2" href="example2.html">Category Seven</a> </div> <a class="item1" href="javascript:void(0)">Products</a> <div class="section"> <a class="item2" href="example2.html">First Product</a> <a class="item2" href="example2.html">Second Product</a> <a class="item2" href="example2.html">Third Product</a> <a class="item2" href="example2.html">Fourth Product</a> <a class="item2" href="example2.html">Fifth Product</a> <a class="item2" href="example2.html">Sixth Product</a> </div> <a class="item1" href="javascript:void(0)">Company</a> <div class="section"> <a class="item2" href="example2.html">About our Company</a> <a class="item2" href="example2.html">Careers</a> <a class="item2" href="example2.html">Media Center</a> <a class="item2" href="example2.html">News</a> </div> <a class="item1" href="example2.html">Contact Us</a> <a class="item1" href="example2.html">Privacy Policy</a> <a class="item1 bottom" href="example2.html">Help</a> <div class="section"> <a class="item2" href="example2.html">Help blabla 1</a> <a class="item2" href="example2.html">Help bleble 22</a> <a class="item2" href="example2.html">Help bleble 3</a> <a class="item2" href="example2.html">Help bleble 44444</a> </div> </td> </tr> </table> <p> <b>Project</b>: <a href="http://gosu.pl/dhtml/mygosumenu.html">mygosuMenu</a> <br /> <b>Menu type</b>: #1.0 DropDownMenu1 example 2 <br /> <b>Features</b>: <br /> - horizontal or vertical menu <br /> - can be positioned statically or absolutely <br /> - delay for showing/hiding menu (can be turned off by setting to 0) <br /> - position of submenus can be changed, so they can for example overflow parent elements <br /> - on the same page there can be many menus created <br /> - seperated into 3 layers: behaviour(javascript), structure(html), presentation(css) <br /> - search engine friendly <br /> - free for any use (BSD license) <br /> <b>Compatibility</b>: Tested and works great on: IE 5.0/5.5/6.0, Mozilla 1.4/1.7, Opera 7.11/7.23/7.51, Netscape 7.11, Firefox 0.7/0.8/0.9, Safari 1.2 </p> <script type="text/javascript"> var ddm1 = new DropDownMenu1('menu1'); ddm1.type = "vertical"; ddm1.position.left = -1; ddm1.init(); </script> </body> </html> |
|
From: FlorinCB <ory...@us...> - 2008-09-18 00:43:54
|
Update of /cvsroot/mxbb/mx_music/phpbb2/mx_mod/mx_shared/lib In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv19367/mx_mod/mx_shared/lib Added Files: Array.js Common.js Cookie.js Debug.js DynamicOptionList.js DynamicOptionList_comp.js String.js Toggle.js Validate.js index.htm Log Message: upgrade --- NEW FILE: Array.js --- /* * DO NOT REMOVE THIS NOTICE * * PROJECT: js libs * COPYRIGHT: (c) 2003,2004 Cezary Tomczak * LINK: http://gosu.pl * LICENSE: BSD (revised) */ /* Check whether array contains given string */ Array.prototype.contains = function(s) { for (var i = 0; i < this.length; ++i) { if (this[i] === s) { return true; } } return false; }; /* Indicates whether some other array is "equal to" this one */ Array.prototype.equals = function(a) { if (this.length != a.length) { return false; } for (var i = 0; i < this.length; ++i) { if (this[i] !== a[i]) { return false; } } return true; }; /* Finds the index of the first occurence of item in the array, or -1 if not found */ Array.prototype.indexOf = function(item) { for (var i = 0; i < this.length; ++i) { if (this[i] === item) { return i; } } return -1; }; /* Get the last element from the array */ Array.prototype.getLast = function() { return this[this.length-1]; }; /* Remove elements judged 'false' by the passed function (mutates) */ Array.prototype.filter = function(func) { var i, indexes = []; for (i = 0; i < this.length; ++i) { if (!func(this[i])) { indexes.push(i); } } for (i = indexes.length - 1; i >= 0; --i) { this.splice(indexes[i], 1); } }; /* Apply custom function to every element of an array (mutates) */ Array.prototype.map = function(func) { for (var i = 0; i < this.length; ++i) { this[i] = func(this[i]); } }; /* Push an element at specified index */ Array.prototype.pushAtIndex = function(el, index) { this.splice(index, 0, el); }; /* Remove element with given index (mutates) */ Array.prototype.removeByIndex = function(index) { this.splice(index, 1); }; /* Remove elements with such value (mutates) */ Array.prototype.removeByValue = function(value) { var i, indexes = []; for (i = 0; i < this.length; ++i) { if (this[i] === value) { indexes.push(i); } } for (i = indexes.length - 1; i >= 0; --i) { this.splice(indexes[i], 1); } }; /* Remove duplicate values (mutates) * Dependencies: Array.indexOf() */ Array.prototype.removeDuplicates = function() { var i, unique = [], indexes = []; for (i = 0; i < this.length; ++i) { if (unique.indexOf(this[i]) == -1) { unique.push(this[i]); } else { indexes.push(i); } } for (i = indexes.length - 1; i >= 0; --i) { this.splice(indexes[i], 1); } }; /* Returns copy of an array */ Array.prototype.copy = function() { var copy = []; for (var i = 0; i < this.length; ++i) { copy[i] = (typeof this[i].copy != "undefined") ? this[i].copy() : this[i]; } return copy; }; /* Swaps the values of two indicies (mutates) */ Array.prototype.swap = function(index1, index2) { var temp = this[index1]; this[index1] = this[index2]; this[index2] = temp; }; /* Randomly shuffles array (mutates) * Dependencies: Array.swap() */ Array.prototype.shuffle = function() { for (var i = 0; i < this.length; ++i) { var ind1 = Math.floor(Math.random() * this.length); var ind2 = Math.floor(Math.random() * this.length); this.swap(ind1, ind2); } }; --- NEW FILE: String.js --- /* * DO NOT REMOVE THIS NOTICE * * PROJECT: js libs * COPYRIGHT: (c) 2003,2004 Cezary Tomczak * LINK: http://gosu.pl * LICENSE: BSD (revised) */ /* Strip whitespace from the beginning and end of a string */ String.prototype.trim = function() { return this.replace(/^\s*|\s*$/g, ""); }; /* Strip whitespace from the beginning of a string */ String.prototype.ltrim = function() { return this.replace(/^\s*/g, ""); }; /* Strip whitespace from the end of a string */ String.prototype.rtrim = function() { return this.replace(/\s*$/g, ""); }; /* Count the number of substring occurrences */ String.prototype.substrCount = function(s) { return this.split(s).length - 1; }; /* Check if string is an alphanumeric character */ String.prototype.isAlpha = function() { return (/^[a-z]$/i.test(this)); }; /* Check if string is a digit */ String.prototype.isDigit = function() { return (/^\d$/.test(this)); }; /* Check if string is numeric */ String.prototype.isNumeric = function() { return (/^\d+$/.test(this)); }; /* * Replace ? tokens with variables passed as arguments in a string. * When you are joining many strings with variables, this is a good way to keep the code clean * Examples: * var s = '<div id="'+id+'" class="'+className+'">'+innerText+'</div>'; * var s = '<div id="?" class="?">?</div>'.format(id, className, innerText); */ String.prototype.format = function() { if (!arguments.length) { throw "String.format() failed, no arguments passed, this = "+this; } var tokens = this.split("?"); if (arguments.length != (tokens.length - 1)) { throw "String.format() failed, tokens != arguments, this = "+this; } var s = tokens[0]; for (var i = 0; i < arguments.length; ++i) { s += (arguments[i] + tokens[i + 1]); } return s; }; /* Repeat string n times */ String.prototype.repeat = function(n) { var ret = ""; for (var i = 0; i < n; ++i) { ret += this; } return ret; }; --- NEW FILE: Toggle.js --- function mx_toggle(in_buttonSwitch, in_listID, img_expand, img_contract) { if (document.getElementById) { listID = document.getElementById(in_listID); } else { return; } if (listID.style.display == '') { listID.style.display = 'none'; in_buttonSwitch.innerHTML = '<img src="' + img_expand + '" border="0" />'; rollup_record_state(in_listID, 0); } else { listID.style.display = ''; in_buttonSwitch.innerHTML = '<img src="' + img_contract + '" border="0" />'; rollup_record_state(in_listID, 1); } if (window.event) { window.event.cancelBubble=true; } } function mx_toggle_editCP(in_buttonSwitch, in_listID, img_expand, img_contract) { var in_listID; var inc = 0; var listID = document.all ? document.all : document.getElementsByTagName("*"); if (listID == null){ return; } for (var i=0;i<listID.length;i++){ if (listID[i].className==in_listID){ if (listID[i].style.display == '') { listID[i].style.display = 'none'; in_buttonSwitch.innerHTML = '<img src="' + img_expand + '" border="0" />'; var send_cookie = 0; } else { listID[i].style.display = ''; in_buttonSwitch.innerHTML = '<img src="' + img_contract + '" border="0" />'; var send_cookie = 1; } if (window.event) { window.event.cancelBubble=true; } } } if (send_cookie == 1) { rollup_record_state(in_listID, 1); } else { rollup_record_state(in_listID, 0); } } function rollup_record_state(in_listID, status) { var expDate = new Date(); // expires in 1 year expDate.setTime(expDate.getTime() + 31536000000); document.cookie = in_listID + "=" + escape(status) + "; expires=" + expDate.toGMTString(); } function ref(object) { if (document.getElementById) { return document.getElementById(object); } else if (document.all) { return eval('document.all.' + object); } else { return false; } } function expand(object) { object = ref(object); if( !object.style ) { return false; } else { object.style.display = ''; } if (window.event) { window.event.cancelBubble = true; } } function contract(object) { object = ref(object); if( !object.style ) { return false; } else { object.style.display = 'none'; } if (window.event) { window.event.cancelBubble = true; } } function toggle(object, path) { image = ref(object + '_img'); object = ref(object); if( !object.style ) { return false; } if( object.style.display == 'none' ) { object.style.display = ''; image.src = path + 'contract.gif'; } else { object.style.display = 'none'; image.src = path + 'expand.gif'; } } --- NEW FILE: Debug.js --- /* * DO NOT REMOVE THIS NOTICE * * PROJECT: js libs * COPYRIGHT: (c) 2003,2004 Cezary Tomczak * LINK: http://gosu.pl * LICENSE: BSD (revised) */ var debugWindow = null; function debug(s, name) { if (!debugWindow) { debugWindow = window.open("", "debugWindow", "width=400,height=500,scrollbars=yes,resizable=yes"); debugWindow.document.write("<pre>"); } if (name) { debugWindow.document.write('<div style="font: 12px sans-serif; font-weight: bold;">'+name+'</div>'); } debugWindow.document.write(s + "\n"); } function debugObject(obj, name) { var s = ''; for (var i in obj) { if (obj[i] && (typeof obj[i] == "object" || typeof obj[i] == "function") && obj[i].toString) { s += "Object." + i + "=" + obj[i].toString().replace(/\n/g, "") + "\n"; } else { s += "Object." + i + "=" + obj[i] + "\n"; } } debug(s, name); } function debugArray(arr, name) { var s = ''; for (var i = 0; i < arr.length; ++i) { s += "Array[" + i + "]=" + arr[i] + "\n"; } debug(s, name); } --- NEW FILE: index.htm --- <html> <head> <title></title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> </head> <body bgcolor="#FFFFFF" text="#000000"> </body> </html> --- NEW FILE: Common.js --- /* * mxBB - common js */ function newImage(arg) { if (document.images) { rslt = new Image(); rslt.src = arg; return rslt; } } function changeImages() { if (document.images ) { for (var i=0; i<changeImages.arguments.length; i+=2) { document[changeImages.arguments[i]].src = changeImages.arguments[i+1]; } } } function full_img(url) { var url = url; window.open(url,'','scrollbars=1,toolbar=0,resizable=1,menubar=0,directories=0,status=0, width=img.width, height=img.height'); return; } function getCookie(name) { var cookies = document.cookie; var start = cookies.indexOf(name + '='); if( start < 0 ) return null; var len = start + name.length + 1; var end = cookies.indexOf(';', len); if( end < 0 ) end = cookies.length; return unescape(cookies.substring(len, end)); } function setCookie(name, value, expires, path, domain, secure) { document.cookie = name + '=' + escape (value) + ((expires) ? '; expires=' + ( (expires == 'never') ? 'Thu, 31-Dec-2099 23:59:59 GMT' : expires.toGMTString() ) : '') + ((path) ? '; path=' + path : '') + ((domain) ? '; domain=' + domain : '') + ((secure) ? '; secure' : ''); } function delCookie(name, path, domain) { if( getCookie(name) ) { document.cookie = name + '=;expires=Thu, 01-Jan-1970 00:00:01 GMT' + ((path) ? '; path=' + path : '') + ((domain) ? '; domain=' + domain : ''); } } function set_mx_cookie(in_listID, status) { var expDate = new Date(); // expires in 1 year expDate.setTime(expDate.getTime() + 31536000000); document.cookie = in_listID + "=" + escape(status) + "; expires=" + expDate.toGMTString(); } function set_phpbb_cookie(cookieName, cookieValue, lifeTime, path, domain, isSecure) { var expDate = new Date(); // expires in 1 year expDate.setTime(expDate.getTime() + 31536000000); document.cookie = escape( cookieName ) + "=" + escape( cookieValue ) + ";expires=" + expDate.toGMTString() + ( path ? ";path=" + path : "") + ( domain ? ";domain=" + domain : "") + ( isSecure == 1 ? ";secure" : ""); } --- NEW FILE: DynamicOptionList_comp.js --- // =================================================================== // Author: Matt Kruse <ma...@ma...> // WWW: http://www.mattkruse.com/ // // NOTICE: You may use this code for any purpose, commercial or // private, without any further permission from the author. You may // remove this notice from your final code if you wish, however it is // appreciated by the author if at least my web site address is kept. // // You may *NOT* re-distribute this code in any way except through its // use. That means, you can include it in your product, or your web // site, or any other form where the code is actually being used. You // may not put the plain javascript up on your site for download or // include it in your javascript libraries for download. // If you wish to share this code with others, please just point them // to the URL instead. // Please DO NOT link directly to my .js files from your site. Copy // the files to your server and use them there. Thank you. // =================================================================== var dynamicOptionListCount=0;var dynamicOptionListObjects = new Array(); function initDynamicOptionLists(){for(var i=0;i<dynamicOptionListObjects.length;i++){var dol = dynamicOptionListObjects[i];if(dol.formName!=null){dol.form = document.forms[dol.formName];}else if(dol.formIndex!=null){dol.form = document.forms[dol.formIndex];}else{var name = dol.fieldNames[0][0];for(var f=0;f<document.forms.length;f++){if(typeof(document.forms[f][name])!="undefined"){dol.form = document.forms[f];break;}}if(dol.form==null){alert("ERROR: Couldn't find form element "+name+" in any form on the page! Init aborted");return;}}for(var j=0;j<dol.fieldNames.length;j++){for(var k=0;k<dol.fieldNames[j].length-1;k++){var selObj = dol.form[dol.fieldNames[j][k]];if(typeof(selObj)=="undefined"){alert("Select box named "+dol.fieldNames[j][k]+" could not be found in the form. Init aborted");return;}if(k==0){if(selObj.options!=null){for(l=0;l<selObj.options.length;l++){var sopt = selObj.options[l];var m = dol.findMatchingOptionInArray(dol.options,sopt.text,sopt.value,false);if(m!=null){var reselectForNN6 = sopt.selected;var m2 = new Option(sopt.text, sopt.value, sopt.defaultSelected, sopt.selected);m2.selected = sopt.selected;m2.defaultSelected = sopt.defaultSelected;m2.DOLOption = m;selObj.options[l] = m2;selObj.options[l].selected = reselectForNN6;}}}}if(selObj.onchange==null){selObj.onchange = new Function("dynamicOptionListObjects["+dol.index+"].change(this)");}}}}resetDynamicOptionLists();} function resetDynamicOptionLists(theform){for(var i=0;i<dynamicOptionListObjects.length;i++){var dol = dynamicOptionListObjects[i];if(typeof(theform)=="undefined" || theform==null || theform==dol.form){for(var j=0;j<dol.fieldNames.length;j++){dol.change(dol.form[dol.fieldNames[j][0]],true);}}}} function DOLOption(text,value,defaultSelected,selected){this.text = text;this.value = value;this.defaultSelected = defaultSelected;this.selected = selected;this.options = new Array();return this;} function DynamicOptionList(){this.form = null;this.options = new Array();this.longestString = new Array();this.numberOfOptions = new Array();this.currentNode = null;this.currentField = null;this.currentNodeDepth = 0;this.fieldNames = new Array();this.formIndex = null;this.formName = null;this.fieldListIndexes = new Object();this.fieldIndexes = new Object();this.selectFirstOption = true;this.numberOfOptions = new Array();this.longestString = new Array();this.values = new Object();this.forValue = DOL_forValue;this.forText = DOL_forText;this.forField = DOL_forField;this.forX = DOL_forX;this.addOptions = DOL_addOptions;this.addOptionsTextValue = DOL_addOptionsTextValue;this.setDefaultOptions = DOL_setDefaultOptions;this.setValues = DOL_setValues;this.setValue = DOL_setValues;this.setFormIndex = DOL_setFormIndex;this.setFormName = DOL_setFormName;this.printOptions = DOL_printOptions;this.addDependentFields = DOL_addDependentFields;this.change = DOL_change;this.child = DOL_child;this.selectChildOptions = DOL_selectChildOptions;this.populateChild = DOL_populateChild;this.change = DOL_change;this.addNewOptionToList = DOL_addNewOptionToList;this.findMatchingOptionInArray = DOL_findMatchingOptionInArray;if(arguments.length > 0){for(var i=0;i<arguments.length;i++){this.fieldListIndexes[arguments[i].toString()] = this.fieldNames.length;this.fieldIndexes[arguments[i].toString()] = i;}this.fieldNames[this.fieldNames.length] = arguments;}this.index = window.dynamicOptionListCount++;window["dynamicOptionListObjects"][this.index] = this;} function DOL_findMatchingOptionInArray(a,text,value,exactMatchRequired){if(a==null || typeof(a)=="undefined"){return null;}var value_match = null;var text_match = null;for(var i=0;i<a.length;i++){var opt = a[i];if(opt.value==value && opt.text==text){return opt;}if(!exactMatchRequired){if(value_match==null && value!=null && opt.value==value){value_match = opt;}if(text_match==null && text!=null && opt.text==text){text_match = opt;}}}return(value_match!=null)?value_match:text_match;} function DOL_forX(s,type){if(this.currentNode==null){this.currentNodeDepth=0;}var useNode =(this.currentNode==null)?this:this.currentNode;var o = this.findMatchingOptionInArray(useNode["options"],(type=="text")?s:null,(type=="value")?s:null,false);if(o==null){o = new DOLOption(null,null,false,false);o[type] = s;useNode.options[useNode.options.length] = o;}this.currentNode = o;this.currentNodeDepth++;return this;} function DOL_forValue(s){return this.forX(s,"value");} function DOL_forText(s){return this.forX(s,"text");} function DOL_forField(f){this.currentField = f;return this;} function DOL_addNewOptionToList(a, text, value, defaultSelected){var o = new DOLOption(text,value,defaultSelected,false);if(a==null){a = new Array();}for(var i=0;i<a.length;i++){if(a[i].text==o.text && a[i].value==o.value){if(o.selected){a[i].selected=true;}if(o.defaultSelected){a[i].defaultSelected = true;}return a;}}a[a.length] = o;} function DOL_addOptions(){if(this.currentNode==null){this.currentNode = this;}if(this.currentNode["options"] == null){this.currentNode["options"] = new Array();}for(var i=0;i<arguments.length;i++){var text = arguments[i];this.addNewOptionToList(this.currentNode.options,text,text,false);if(typeof(this.numberOfOptions[this.currentNodeDepth])=="undefined"){this.numberOfOptions[this.currentNodeDepth]=0;}if(this.currentNode.options.length > this.numberOfOptions[this.currentNodeDepth]){this.numberOfOptions[this.currentNodeDepth] = this.currentNode.options.length;}if(typeof(this.longestString[this.currentNodeDepth])=="undefined" ||(text.length > this.longestString[this.currentNodeDepth].length)){this.longestString[this.currentNodeDepth] = text;}}this.currentNode = null;this.currentNodeDepth = 0;} function DOL_addOptionsTextValue(){if(this.currentNode==null){this.currentNode = this;}if(this.currentNode["options"] == null){this.currentNode["options"] = new Array();}for(var i=0;i<arguments.length;i++){var text = arguments[i++];var value = arguments[i];this.addNewOptionToList(this.currentNode.options,text,value,false);if(typeof(this.numberOfOptions[this.currentNodeDepth])=="undefined"){this.numberOfOptions[this.currentNodeDepth]=0;}if(this.currentNode.options.length > this.numberOfOptions[this.currentNodeDepth]){this.numberOfOptions[this.currentNodeDepth] = this.currentNode.options.length;}if(typeof(this.longestString[this.currentNodeDepth])=="undefined" ||(text.length > this.longestString[this.currentNodeDepth].length)){this.longestString[this.currentNodeDepth] = text;}}this.currentNode = null;this.currentNodeDepth = 0;} function DOL_child(obj){var listIndex = this.fieldListIndexes[obj.name];var index = this.fieldIndexes[obj.name];if(index <(this.fieldNames[listIndex].length-1)){return this.form[this.fieldNames[listIndex][index+1]];}return null;} function DOL_setDefaultOptions(){if(this.currentNode==null){this.currentNode = this;}for(var i=0;i<arguments.length;i++){var o = this.findMatchingOptionInArray(this.currentNode.options,null,arguments[i],false);if(o!=null){o.defaultSelected = true;}}this.currentNode = null;} function DOL_setValues(){if(this.currentField==null){alert("Can't call setValues() without using forField() first!");return;}if(typeof(this.values[this.currentField])=="undefined"){this.values[this.currentField] = new Object();}for(var i=0;i<arguments.length;i++){this.values[this.currentField][arguments[i]] = true;}this.currentField = null;} function DOL_setFormIndex(i){this.formIndex = i;} function DOL_setFormName(n){this.formName = n;} function DOL_printOptions(name){if((navigator.appName == 'Netscape') &&(parseInt(navigator.appVersion) <= 4)){var index = this.fieldIndexes[name];var ret = "";if(typeof(this.numberOfOptions[index])!="undefined"){for(var i=0;i<this.numberOfOptions[index];i++){ret += "<OPTION>";}}ret += "<OPTION>";if(typeof(this.longestString[index])!="undefined"){for(var i=0;i<this.longestString[index].length;i++){ret += "_";}}document.writeln(ret);}} function DOL_addDependentFields(){for(var i=0;i<arguments.length;i++){this.fieldListIndexes[arguments[i].toString()] = this.fieldNames.length;this.fieldIndexes[arguments[i].toString()] = i;}this.fieldNames[this.fieldNames.length] = arguments;} function DOL_change(obj, usePreselected){if(usePreselected==null || typeof(usePreselected)=="undefined"){usePreselected = false;}var changedListIndex = this.fieldListIndexes[obj.name];var changedIndex = this.fieldIndexes[obj.name];var child = this.child(obj);if(child == null){return;}if(obj.type == "select-one"){if(child.options!=null){child.options.length=0;}if(obj.options!=null && obj.options.length>0 && obj.selectedIndex>=0){var o = obj.options[obj.selectedIndex];this.populateChild(o.DOLOption,child,usePreselected);this.selectChildOptions(child,usePreselected);}}else if(obj.type == "select-multiple"){var currentlySelectedOptions = new Array();if(!usePreselected){for(var i=0;i<child.options.length;i++){var co = child.options[i];if(co.selected){this.addNewOptionToList(currentlySelectedOptions, co.text, co.value, co.defaultSelected);}}}child.options.length=0;if(obj.options!=null){var obj_o = obj.options;for(var i=0;i<obj_o.length;i++){if(obj_o[i].selected){this.populateChild(obj_o[i].DOLOption,child,usePreselected);}}var atLeastOneSelected = false;if(!usePreselected){for(var i=0;i<child.options.length;i++){var m = this.findMatchingOptionInArray(currentlySelectedOptions,child.options[i].text,child.options[i].value,true);if(m!=null){child.options[i].selected = true;atLeastOneSelected = true;}}}if(!atLeastOneSelected){this.selectChildOptions(child,usePreselected);}}}this.change(child,usePreselected);} function DOL_populateChild(dolOption,childSelectObj,usePreselected){if(dolOption!=null && dolOption.options!=null){for(var j=0;j<dolOption.options.length;j++){var srcOpt = dolOption.options[j];if(childSelectObj.options==null){childSelectObj.options = new Array();}var duplicate = false;var preSelectedExists = false;for(var k=0;k<childSelectObj.options.length;k++){var csi = childSelectObj.options[k];if(csi.text==srcOpt.text && csi.value==srcOpt.value){duplicate = true;break;}}if(!duplicate){var newopt = new Option(srcOpt.text, srcOpt.value, false, false);newopt.selected = false;newopt.defaultSelected = false;newopt.DOLOption = srcOpt;childSelectObj.options[childSelectObj.options.length] = newopt;}}}} function DOL_selectChildOptions(obj,usePreselected){var values = this.values[obj.name];var preselectedExists = false;if(usePreselected && values!=null && typeof(values)!="undefined"){for(var i=0;i<obj.options.length;i++){var v = obj.options[i].value;if(v!=null && values[v]!=null && typeof(values[v])!="undefined"){preselectedExists = true;break;}}}var atLeastOneSelected = false;for(var i=0;i<obj.options.length;i++){var o = obj.options[i];if(preselectedExists && o.value!=null && values[o.value]!=null && typeof(values[o.value])!="undefined"){o.selected = true;atLeastOneSelected = true;}else if(!preselectedExists && o.DOLOption!=null && o.DOLOption.defaultSelected){o.selected = true;atLeastOneSelected = true;}else{o.selected = false;}}if(this.selectFirstOption && !atLeastOneSelected && obj.options.length>0){obj.options[0].selected = true;}else if(!atLeastOneSelected && obj.type=="select-one"){obj.selectedIndex = -1;}} --- NEW FILE: Cookie.js --- /* * DO NOT REMOVE THIS NOTICE * * PROJECT: js libs * COPYRIGHT: (c) 2003,2004 Cezary Tomczak * LINK: http://gosu.pl * LICENSE: BSD (revised) */ /* examples: 1) set cookie for an hour var c = new Cookie(); c.set("test", "abc", 3600); 2) delete cookie c.del("test"); 3) get cookie var test = c.get("test"); Dependencies: String.trim() */ function Cookie() { this.get = function(name) { var cookies = document.cookie.split(";"); for (var i = 0; i < cookies.length; ++i) { var a = cookies[i].split("="); if (a.length == 2) { a[0] = a[0].trim(); a[1] = a[1].trim(); if (a[0] == name) { return unescape(a[1]); } } } return ""; }; this.set = function(name, value, seconds, path, domain, secure) { var cookie = (name + "=" + escape(value)); if (seconds) { var date = new Date(new Date().getTime()+seconds*1000); cookie += ("; expires="+date.toGMTString()); } cookie += (path ? "; path="+path : ""); cookie += (domain ? "; domain="+domain : ""); cookie += (secure ? "; secure" : ""); document.cookie = cookie; }; this.del = function(name) { document.cookie = name + "=; expires=Thu, 01-Jan-70 00:00:01 GMT"; }; } --- NEW FILE: Validate.js --- /* * DO NOT REMOVE THIS NOTICE * * PROJECT: js libs * COPYRIGHT: (c) 2003,2004 Cezary Tomczak * LINK: http://gosu.pl * LICENSE: BSD (revised) */ // +----------------------------------------------------------------+ // | Some useful functions for string validation. | // | Author: Cezary Tomczak [www.gosu.pl] | // | Free for any use as long as all copyright messages are intact. | // +----------------------------------------------------------------+ /* yyyy-mm-dd */ function isDate(s) { if (!(/^\d{4,4}-\d{2,2}-\d{2,2}$/.test(s))) { return false; } var a = s.split("-"); var d = new Date(a[0], Number(a[1])-1, a[2]); d = [d.getFullYear().toString(), (d.getMonth()+1).toString(), d.getDate().toString()]; if (!d[0].length || !d[1].length || !d[2].length) { return false; } if (d[1].length == 1) { d[1] = "0"+d[1]; } if (d[2].length == 1) { d[2] = "0"+d[2]; } return a[0] == d[0] && a[1] == d[1] && a[2] == d[2]; } /* hh:mm:ss */ function isHour(s) { if (!(/^\d{2,2}:\d{2,2}:\d{2,2}$/.test(s))) { return false; } var a = s.split(":"); a[0] = Number(a[0]); a[1] = Number(a[1]); a[2] = Number(a[2]); return a[0] >= 0 && a[0] <= 23 && a[1] >= 0 && a[1] <= 59 && a[2] >= 0 && a[2] <= 59; } /* yyyy-mm-dd hh:mm:ss */ function isDateIso(s) { if (!(/^\d{4,4}-\d{2,2}-\d{2,2} \d{2,2}:\d{2,2}:\d{2,2}$/.test(s))) { return false; } var a = s.split(" "); return isDate(a[0]) && isHour(a[1]); } /* ignore whitespace */ function isEmpty(s) { return !Boolean(s.replace(/^\s*|\s*$/g, "").length); } /* ignore whitespace */ function isNonEmpty(s) { return Boolean(s.replace(/^\s*|\s*$/g, "").length); } /* -0.01, 10, 10.45 - ok 01, 00.1, .1, 0.0.0 - bad */ function isNumber(s) { if (s.length && s.charAt(0) == "-") { return isNumber(s.substr(1)); } if (!(/^[\d.]+$/.test(s))) { return false; } if (s.indexOf(".") != -1 && (s.indexOf(".") != s.lastIndexOf("."))) { return false; } if (s.charAt(0) == ".") { return false; } if (s.length >= 2 && s.charAt(0) == "0" && s.charAt(1) != ".") { return false; } return !isNaN(s); } function isEmail(s) { return (/^\w+@\w+\.[\w.]+$/.test(s) && s.charAt(s.length-1) != "."); } /* isHttpAddress("gosu.pl") - true isHttpAddress("www.gosu.pl") - true isHttpAddress("www.gosu.pl", 1) - false isHttpAddress("https://gosu.pl", 1) - true */ function isHttpAddress(s, full) { if (full) { return (/^http(s)?:\/\/(www\.)?\w+\.[\w.]+$/.test(s) && s.charAt(s.length-1) != "."); } else { return (/^(http(s)?:\/\/)?(www\.)?\w+\.[\w.]+$/.test(s) && s.charAt(s.length-1) != "."); } } /* checkSize("12", 4, 16) - true checkSize("12", null, 16) - true checkSize("12", 4, null) - true checkSize("12", 13) - false */ function checkSize(s, min, max) { var n = Number(s); if (typeof min == "number") { if (n < min) { return false; } } if (typeof max == "number") { if (n > max) { return false; } } return true; } /* checkLength("abcdef", 4, 9) - true checkLength("abcdef", null, 9) - true checkLength("abcdef", 4, null) - true checkLength("abcdef", null, 5) - false */ function checkLength(s, min, max) { if (typeof min == "number") { if (s.length < min) { return false; } } if (typeof max == "number") { if (s.length > max) { return false; } } return true; } /* round("12.567", 0) == "13" round("12.567", 1) == "12.6" round("12.567", 2) == "12.57" round("12.565", 2) == "12.56" */ function round(s, n) { return String(Number(s).toFixed(n)); } function isPesel(pesel) { if (pesel.length != 11 || !(/^\d+$/.test(pesel))) { return false; } var steps = [1, 3, 7, 9, 1, 3, 7, 9, 1, 3]; var sum_nb = 0, sum_m, sum_c; for (var x = 0; x < 10; ++x) { sum_nb += steps[x] * pesel[x]; } sum_m = 10 - sum_nb % 10; if (sum_m == 10) { sum_c = 0; } else { sum_c = sum_m; } return (sum_c == pesel[10]); } function isRegon(regon) { var steps = [8, 9, 2, 3, 4, 5, 6, 7]; regon = regon.replace(/-/g, ""); regon = regon.replace(/ /g, ""); if (regon.length != 9) { return false; } var sum_nb = 0, sum_m; for (var x = 0; x < 8; ++x) { sum_nb += steps[x] * regon[x]; } sum_m = sum_nb % 11; if (sum_m == 10) { sum_m = 0; } return (sum_m == regon[8]); } function isNip(nip) { var steps = [6, 5, 7, 2, 3, 4, 5, 6, 7]; nip = nip.replace(/-/g, ""); nip = nip.replace(/ /g, ""); if (nip.length != 10) { return false; } var sum_nb = 0, sum_m; for (var x = 0; x < 9; ++x) { sum_nb += steps[x] * nip[x]; } sum_m = sum_nb % 11; if (sum_m == 10) { sum_m = 0; } return (sum_m == nip[9]); } --- NEW FILE: DynamicOptionList.js --- // Global objects to keep track of DynamicOptionList objects created on the page var dynamicOptionListCount=0; var dynamicOptionListObjects = new Array(); // Init call to setup lists after page load. One call to this function sets up all lists. function initDynamicOptionLists() { // init each DynamicOptionList object for (var i=0; i<dynamicOptionListObjects.length; i++) { var dol = dynamicOptionListObjects[i]; // Find the form associated with this list if (dol.formName!=null) { dol.form = document.forms[dol.formName]; } else if (dol.formIndex!=null) { dol.form = document.forms[dol.formIndex]; } else { // Form wasn't set manually, so go find it! // Search for the first form element name in the lists var name = dol.fieldNames[0][0]; for (var f=0; f<document.forms.length; f++) { if (typeof(document.forms[f][name])!="undefined") { dol.form = document.forms[f]; break; } } if (dol.form==null) { alert("ERROR: Couldn't find form element "+name+" in any form on the page! Init aborted"); return; } } // Form is found, now set the onchange attributes of each dependent select box for (var j=0; j<dol.fieldNames.length; j++) { // For each set of field names... for (var k=0; k<dol.fieldNames[j].length-1; k++) { // For each field in the set... var selObj = dol.form[dol.fieldNames[j][k]]; if (typeof(selObj)=="undefined") { alert("Select box named "+dol.fieldNames[j][k]+" could not be found in the form. Init aborted"); return; } // Map the HTML options in the first select into the options we created if (k==0) { if (selObj.options!=null) { for (l=0; l<selObj.options.length; l++) { var sopt = selObj.options[l]; var m = dol.findMatchingOptionInArray(dol.options,sopt.text,sopt.value,false); if (m!=null) { var reselectForNN6 = sopt.selected; var m2 = new Option(sopt.text, sopt.value, sopt.defaultSelected, sopt.selected); m2.selected = sopt.selected; // For some reason I need to do this to make NN4 happy m2.defaultSelected = sopt.defaultSelected; m2.DOLOption = m; selObj.options[l] = m2; selObj.options[l].selected = reselectForNN6; // Reselect this option for NN6 to be happy. Yuck. } } } } if (selObj.onchange==null) { // We only modify the onChange attribute if it's empty! Otherwise do it yourself in your source! selObj.onchange = new Function("dynamicOptionListObjects["+dol.index+"].change(this)"); } } } } // Set the preselectd options on page load resetDynamicOptionLists(); } // This function populates lists with the preselected values. // It's pulled out into a separate function so it can be hooked into a 'reset' button on a form // Optionally passed a form object which should be the only form reset function resetDynamicOptionLists(theform) { // reset each DynamicOptionList object for (var i=0; i<dynamicOptionListObjects.length; i++) { var dol = dynamicOptionListObjects[i]; if (typeof(theform)=="undefined" || theform==null || theform==dol.form) { for (var j=0; j<dol.fieldNames.length; j++) { dol.change(dol.form[dol.fieldNames[j][0]],true); // Second argument says to use preselected values rather than default values } } } } // An object to represent an Option() but just for data-holding function DOLOption(text,value,defaultSelected,selected) { this.text = text; this.value = value; this.defaultSelected = defaultSelected; this.selected = selected; this.options = new Array(); // To hold sub-options return this; } // DynamicOptionList CONSTRUCTOR function DynamicOptionList() { this.form = null;// The form this list belongs to this.options = new Array();// Holds the options of dependent lists this.longestString = new Array();// Longest string that is currently a potential option (for Netscape) this.numberOfOptions = new Array();// The total number of options that might be displayed, to build dummy options (for Netscape) this.currentNode = null;// The current node that has been selected with forValue() or forText() this.currentField = null;// The current field that is selected to be used for setValue() this.currentNodeDepth = 0;// How far down the tree the currentNode is this.fieldNames = new Array();// Lists of dependent fields which use this object this.formIndex = null;// The index of the form to associate with this list this.formName = null;// The name of the form to associate with this list this.fieldListIndexes = new Object();// Hold the field lists index where fields exist this.fieldIndexes = new Object();// Hold the index within the list where fields exist this.selectFirstOption = true;// Whether or not to select the first option by default if no options are default or preselected, otherwise set the selectedIndex = -1 this.numberOfOptions = new Array();// Store the max number of options for a given option list this.longestString = new Array();// Store the longest possible string this.values = new Object(); // Will hold the preselected values for fields, by field name // Method mappings this.forValue = DOL_forValue; this.forText = DOL_forText; this.forField = DOL_forField; this.forX = DOL_forX; this.addOptions = DOL_addOptions; this.addOptionsTextValue = DOL_addOptionsTextValue; this.setDefaultOptions = DOL_setDefaultOptions; this.setValues = DOL_setValues; this.setValue = DOL_setValues; this.setFormIndex = DOL_setFormIndex; this.setFormName = DOL_setFormName; this.printOptions = DOL_printOptions; this.addDependentFields = DOL_addDependentFields; this.change = DOL_change; this.child = DOL_child; this.selectChildOptions = DOL_selectChildOptions; this.populateChild = DOL_populateChild; this.change = DOL_change; this.addNewOptionToList = DOL_addNewOptionToList; this.findMatchingOptionInArray = DOL_findMatchingOptionInArray; // Optionally pass in the dependent field names if (arguments.length > 0) { // Process arguments and add dependency groups for (var i=0; i<arguments.length; i++) { this.fieldListIndexes[arguments[i].toString()] = this.fieldNames.length; this.fieldIndexes[arguments[i].toString()] = i; } this.fieldNames[this.fieldNames.length] = arguments; } // Add this object to the global array of dynamicoptionlist objects this.index = window.dynamicOptionListCount++; window["dynamicOptionListObjects"][this.index] = this; } // Given an array of Option objects, search for an existing option that matches value, text, or both function DOL_findMatchingOptionInArray(a,text,value,exactMatchRequired) { if (a==null || typeof(a)=="undefined") { return null; } var value_match = null; // Whether or not a value has been matched var text_match = null; // Whether or not a text has been matched for (var i=0; i<a.length; i++) { var opt = a[i]; // If both value and text match, return it right away if (opt.value==value && opt.text==text) { return opt; } if (!exactMatchRequired) { // If value matches, store it until we complete scanning the list if (value_match==null && value!=null && opt.value==value) { value_match = opt; } // If text matches, store it for later if (text_match==null && text!=null && opt.text==text) { text_match = opt; } } } return (value_match!=null)?value_match:text_match; } // Util function used by forValue and forText function DOL_forX(s,type) { if (this.currentNode==null) { this.currentNodeDepth=0; } var useNode = (this.currentNode==null)?this:this.currentNode; var o = this.findMatchingOptionInArray(useNode["options"],(type=="text")?s:null,(type=="value")?s:null,false); if (o==null) { o = new DOLOption(null,null,false,false); o[type] = s; useNode.options[useNode.options.length] = o; } this.currentNode = o; this.currentNodeDepth++; return this; } // Set the portion of the list structure that is to be used by a later operation like addOptions function DOL_forValue(s) { return this.forX(s,"value"); } // Set the portion of the list structure that is to be used by a later operation like addOptions function DOL_forText(s) { return this.forX(s,"text"); } // Set the field to be used for setValue() calls function DOL_forField(f) { this.currentField = f; return this; } // Create and add an option to a list, avoiding duplicates function DOL_addNewOptionToList(a, text, value, defaultSelected) { var o = new DOLOption(text,value,defaultSelected,false); // Add the option to the array if (a==null) { a = new Array(); } for (var i=0; i<a.length; i++) { if (a[i].text==o.text && a[i].value==o.value) { if (o.selected) { a[i].selected=true; } if (o.defaultSelected) { a[i].defaultSelected = true; } return a; } } a[a.length] = o; } // Add sub-options to the currently-selected node, with the same text and value for each option function DOL_addOptions() { if (this.currentNode==null) { this.currentNode = this; } if (this.currentNode["options"] == null) { this.currentNode["options"] = new Array(); } for (var i=0; i<arguments.length; i++) { var text = arguments[i]; this.addNewOptionToList(this.currentNode.options,text,text,false); if (typeof(this.numberOfOptions[this.currentNodeDepth])=="undefined") { this.numberOfOptions[this.currentNodeDepth]=0; } if (this.currentNode.options.length > this.numberOfOptions[this.currentNodeDepth]) { this.numberOfOptions[this.currentNodeDepth] = this.currentNode.options.length; } if (typeof(this.longestString[this.currentNodeDepth])=="undefined" || (text.length > this.longestString[this.currentNodeDepth].length)) { this.longestString[this.currentNodeDepth] = text; } } this.currentNode = null; this.currentNodeDepth = 0; } // Add sub-options to the currently-selected node, specifying separate text and values for each option function DOL_addOptionsTextValue() { if (this.currentNode==null) { this.currentNode = this; } if (this.currentNode["options"] == null) { this.currentNode["options"] = new Array(); } for (var i=0; i<arguments.length; i++) { var text = arguments[i++]; var value = arguments[i]; this.addNewOptionToList(this.currentNode.options,text,value,false); if (typeof(this.numberOfOptions[this.currentNodeDepth])=="undefined") { this.numberOfOptions[this.currentNodeDepth]=0; } if (this.currentNode.options.length > this.numberOfOptions[this.currentNodeDepth]) { this.numberOfOptions[this.currentNodeDepth] = this.currentNode.options.length; } if (typeof(this.longestString[this.currentNodeDepth])=="undefined" || (text.length > this.longestString[this.currentNodeDepth].length)) { this.longestString[this.currentNodeDepth] = text; } } this.currentNode = null; this.currentNodeDepth = 0; } // Find the first dependent list of a select box // If it's the last list in a chain, return null because there are no children function DOL_child(obj) { var listIndex = this.fieldListIndexes[obj.name]; var index = this.fieldIndexes[obj.name]; if (index < (this.fieldNames[listIndex].length-1)) { return this.form[this.fieldNames[listIndex][index+1]]; } return null; } // Set the options which should be selected by default for a certain value in the parent function DOL_setDefaultOptions() { if (this.currentNode==null) { this.currentNode = this; } for (var i=0; i<arguments.length; i++) { var o = this.findMatchingOptionInArray(this.currentNode.options,null,arguments[i],false); if (o!=null) { o.defaultSelected = true; } } this.currentNode = null; } // Set the options which should be selected when the page loads. This is different than the default value and ONLY applies when the page LOADS function DOL_setValues() { if (this.currentField==null) { alert("Can't call setValues() without using forField() first!"); return; } if (typeof(this.values[this.currentField])=="undefined") { this.values[this.currentField] = new Object(); } for (var i=0; i<arguments.length; i++) { this.values[this.currentField][arguments[i]] = true; } this.currentField = null; } // Manually set the form for the object using an index function DOL_setFormIndex(i) { this.formIndex = i; } // Manually set the form for the object using a form name function DOL_setFormName(n) { this.formName = n; } // Print blank <option> objects for Netscape4, since it refuses to grow or shrink select boxes for new options function DOL_printOptions(name) { // Only need to write out "dummy" options for Netscape4 if ((navigator.appName == 'Netscape') && (parseInt(navigator.appVersion) <= 4)){ var index = this.fieldIndexes[name]; var ret = ""; if (typeof(this.numberOfOptions[index])!="undefined") { for (var i=0; i<this.numberOfOptions[index]; i++) { ret += "<OPTION>"; } } ret += "<OPTION>"; if (typeof(this.longestString[index])!="undefined") { for (var i=0; i<this.longestString[index].length; i++) { ret += "_"; } } document.writeln(ret); } } // Add a list of field names which use this option-mapping object. // A single mapping object may be used by multiple sets of fields function DOL_addDependentFields() { for (var i=0; i<arguments.length; i++) { this.fieldListIndexes[arguments[i].toString()] = this.fieldNames.length; this.fieldIndexes[arguments[i].toString()] = i; } this.fieldNames[this.fieldNames.length] = arguments; } // Called when a parent select box is changed. It populates its direct child, then calls change on the child object to continue the population. function DOL_change(obj, usePreselected) { if (usePreselected==null || typeof(usePreselected)=="undefined") { usePreselected = false; } var changedListIndex = this.fieldListIndexes[obj.name]; var changedIndex = this.fieldIndexes[obj.name]; var child = this.child(obj); if (child == null) { return; } // No child, no need to continue if (obj.type == "select-one") { // Treat single-select differently so we don't have to scan the entire select list, which could potentially speed things up if (child.options!=null) { child.options.length=0; // Erase all the options from the child so we can re-populate } if (obj.options!=null && obj.options.length>0 && obj.selectedIndex>=0) { var o = obj.options[obj.selectedIndex]; this.populateChild(o.DOLOption,child,usePreselected); this.selectChildOptions(child,usePreselected); } } else if (obj.type == "select-multiple") { // For each selected value in the parent, find the options to fill in for this list // Loop through the child list and keep track of options that are currently selected var currentlySelectedOptions = new Array(); if (!usePreselected) { for (var i=0; i<child.options.length; i++) { var co = child.options[i]; if (co.selected) { this.addNewOptionToList(currentlySelectedOptions, co.text, co.value, co.defaultSelected); } } } child.options.length=0; if (obj.options!=null) { var obj_o = obj.options; // For each selected option in the parent... for (var i=0; i<obj_o.length; i++) { if (obj_o[i].selected) { // if option is selected, add its children to the list this.populateChild(obj_o[i].DOLOption,child,usePreselected); } } // Now go through and re-select any options which were selected before var atLeastOneSelected = false; if (!usePreselected) { for (var i=0; i<child.options.length; i++) { var m = this.findMatchingOptionInArray(currentlySelectedOptions,child.options[i].text,child.options[i].value,true); if (m!=null) { child.options[i].selected = true; atLeastOneSelected = true; } } } if (!atLeastOneSelected) { this.selectChildOptions(child,usePreselected); } } } // Change all the way down the chain this.change(child,usePreselected); } function DOL_populateChild(dolOption,childSelectObj,usePreselected) { // If this opton has sub-options, populate the child list with them if (dolOption!=null && dolOption.options!=null) { for (var j=0; j<dolOption.options.length; j++) { var srcOpt = dolOption.options[j]; if (childSelectObj.options==null) { childSelectObj.options = new Array(); } // Put option into select list var duplicate = false; var preSelectedExists = false; for (var k=0; k<childSelectObj.options.length; k++) { var csi = childSelectObj.options[k]; if (csi.text==srcOpt.text && csi.value==srcOpt.value) { duplicate = true; break; } } if (!duplicate) { var newopt = new Option(srcOpt.text, srcOpt.value, false, false); newopt.selected = false; // Again, we have to do these two statements for NN4 to work newopt.defaultSelected = false; newopt.DOLOption = srcOpt; childSelectObj.options[childSelectObj.options.length] = newopt; } } } } // Once a child select is populated, go back over it to select options which should be selected function DOL_selectChildOptions(obj,usePreselected) { // Look to see if any options are preselected=true. If so, then set then selected if usePreselected=true, otherwise set defaults var values = this.values[obj.name]; var preselectedExists = false; if (usePreselected && values!=null && typeof(values)!="undefined") { for (var i=0; i<obj.options.length; i++) { var v = obj.options[i].value; if (v!=null && values[v]!=null && typeof(values[v])!="undefined") { preselectedExists = true; break; } } } // Go back over all the options to do the selection var atLeastOneSelected = false; for (var i=0; i<obj.options.length; i++) { var o = obj.options[i]; if (preselectedExists && o.value!=null && values[o.value]!=null && typeof(values[o.value])!="undefined") { o.selected = true; atLeastOneSelected = true; } else if (!preselectedExists && o.DOLOption!=null && o.DOLOption.defaultSelected) { o.selected = true; atLeastOneSelected = true; } else { o.selected = false; } } // If nothing else was selected, select the first one by default if (this.selectFirstOption && !atLeastOneSelected && obj.options.length>0) { obj.options[0].selected = true; } else if (!atLeastOneSelected && obj.type=="select-one") { obj.selectedIndex = -1; } } |
|
From: FlorinCB <ory...@us...> - 2008-09-18 00:43:50
|
Update of /cvsroot/mxbb/mx_music/phpbb2/mx_mod/mx_shared In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv19367/mx_mod/mx_shared Added Files: index.htm Log Message: upgrade --- NEW FILE: index.htm --- <html> <head> <title></title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> </head> <body bgcolor="#FFFFFF" text="#000000"> </body> </html> |
|
From: FlorinCB <ory...@us...> - 2008-09-18 00:43:49
|
Update of /cvsroot/mxbb/mx_music/phpbb2/mx_mod/mx_shared/ajax In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv19367/mx_mod/mx_shared/ajax Added Files: AjaxRequest.js AjaxRequest_comp.js ask.js dhtmlHistory.js index.htm Log Message: upgrade --- NEW FILE: ask.js --- /* Copyright: Robert Nyman, http://www.robertnyman.com Free to use for anyone, for studying or commercial purposes. This text has to be included when used: Concept and code by Robert Nyman, http://www.robertnyman.com */ // --- var ask = new Ask(); addWindowEvent("load", function(){ask.init();}, false); addWindowEvent("unload", function(){ask.clearVariables();}, false); // --- function Ask(){ this.hasXmlHttpSupport = typeof XMLHttpRequest != "undefined" || typeof window.ActiveXObject != "undefined"; this.xmlHttp = null; this.xmlHttpCallComplete = true; this.isIE = document.all && navigator.userAgent.search(/MSIE/i) != -1 && navigator.userAgent.search(/Opera/i) == -1; this.isIE50 = this.isIE && navigator.userAgent.search(/MSIE 5.0/i) != -1; this.iframe = null; this.iframeFakeFile = "blank.htm"; this.hashLocation = location.hash; this.locationInterval = null; this.history = []; this.useSameTargetForSeveralCalls = false; this.linksToGetContentFor = null; this.intUniqueCounter = 0; this.urlExt = "ajax=true"; this.links = []; this.currentLink = null; this.currentLinkIndex = null; this.currentLinkURL = null; this.elmToPresentIn = null; this.responseText = ""; } Ask.prototype.init = AskInit; Ask.prototype.clearVariables = AskClearVariables; Ask.prototype.timerLocationCheck = AskTimerLocationCheck; Ask.prototype.setState = AskSetState; Ask.prototype.createXmlHttp = AskCreateXmlHttp; Ask.prototype.clearXmlHttp = AskClearXmlHttp; Ask.prototype.createHistory = AskCreateHistory; Ask.prototype.addEvents = AskAddEvents; Ask.prototype.getContent = AskGetContent; Ask.prototype.getMultipleContent = AskGetMultipleContent; Ask.prototype.presentContent = AskPresentContent; // --- function AskInit(){ if(this.hasXmlHttpSupport){ this.addEvents(document); if(this.isIE && !this.isIE50){ var oIframe = document.createElement("iframe"); oIframe.style.position = "absolute"; oIframe.style.left = "-999px"; oIframe.setAttribute("id", "fake-history-iframe"); document.body.appendChild(oIframe); this.iframe = window.frames["fake-history-iframe"]; this.iframe.location.href = this.iframeFakeFile; } if(!this.isIE50){ if(this.hashLocation.length > 0){ this.setState(); } else{ this.locationInterval = setInterval("ask.timerLocationCheck()", 100); } } } } // --- function AskClearVariables(){ this.clearXmlHttp(); this.xmlHttpCallComplete = true; this.locationInterval = null; this.iframe = null; this.hashLocation = location.hash; this.history = []; this.intUniqueCounter = 0; this.links = []; clearInterval(this.locationInterva); } // --- function AskTimerLocationCheck(){ if(location.hash != this.hashLocation){ this.hashLocation = location.hash; this.setState(); } } // --- function AskSetState(){ var arrLinkIndexes = (this.hashLocation.length > 1)? this.hashLocation.replace(/#/, "").split(":") : []; if(arrLinkIndexes.length > 0 && this.history.length == 0){ this.linksToGetContentFor = []; try{ for(var i=0; i<arrLinkIndexes.length; i++){ intLinkIndex = arrLinkIndexes[i]; this.linksToGetContentFor.push(this.links[intLinkIndex][0]); } } catch(e){ // To avoid history cache errors in IE } this.getMultipleContent(); } else if(arrLinkIndexes.length > 0 || this.history.length > 0){ var bNavigateBack = (this.history.length > arrLinkIndexes.length)? true : false; var intLinkIndex; if(bNavigateBack){ intLinkIndex = this.history.last(); var strElmToRemoveContentFromId = this.links[intLinkIndex][1]; document.getElementById(strElmToRemoveContentFromId).innerHTML = this.links[intLinkIndex][2]; } else{ intLinkIndex = arrLinkIndexes.last(); var oRegExp = new RegExp((intLinkIndex)); var oLinkToGetContentFor = this.links[intLinkIndex][0]; var strRetrievedContent = this.links[intLinkIndex][3]; var bHasCachedContent = strRetrievedContent && strRetrievedContent.length > 0; if(bHasCachedContent){ this.responseText = strRetrievedContent; } ask.getContent(oLinkToGetContentFor, bHasCachedContent); } this.history = arrLinkIndexes; } } // --- function AskCreateXmlHttp(){ if(typeof XMLHttpRequest != "undefined"){ this.xmlHttp = new XMLHttpRequest(); } else if(typeof window.ActiveXObject != "undefined"){ this.xmlHttp = new ActiveXObject("Msxml2.XMLHTTP"); } } // --- function AskClearXmlHttp(){ this.responseText = ""; if(this.xmlHttp){ this.xmlHttp.onreadystatechange = function(){}; if(typeof this.xmlHttp.abort == "function"){ this.xmlHttp.abort(); } this.xmlHttp = null; this.xmlHttpCallComplete = true; } } // --- function AskCreateHistory(oLink){ this.currentLinkIndex = oLink.getAttribute("rel").replace(/ask-/, ""); if(this.history.toString().search(this.currentLinkIndex) == -1 || this.useSameTargetForSeveralCalls){ this.history.push(this.currentLinkIndex); var strHistoryJoined = this.history.join(":"); if(this.isIE && this.iframe){ this.iframe.location.href = this.iframeFakeFile + "?loadedcontent=" + strHistoryJoined; } else{ location.hash = strHistoryJoined; } } } // --- function AskAddEvents(oContainerElm){ var arrAllAJAXLinks = getElementsByClassName(oContainerElm, "a", "ask"); for(var i=0; i<arrAllAJAXLinks.length; i++){ oLink = arrAllAJAXLinks[i]; oLink.setAttribute("rel", ("ask-" + this.intUniqueCounter++)); arrAllAJAXLinks[i].onclick = function (oEvent){ var oEvent = (typeof oEvent != "undefined")? oEvent : event; oEvent.returnValue = false; if(oEvent.preventDefault){ oEvent.preventDefault(); } if(ask.isIE50){ ask.getContent(this); } else{ ask.createHistory(this); } }; this.links.push([oLink, oLink.className.replace(/.*target-([\w\d\-]+)(\b.*|$)/i, "$1")]); } } // --- function AskGetContent(oLink, bHasCachedContent){ this.currentLink = oLink; var strURL = this.currentLink.getAttribute("href"); this.currentLinkURL = strURL + ((strURL.search(/\?/) != -1)? "&" : "?") + this.urlExt + '&ajaxblock=' + this.currentLink.className.replace(/.*target-([\w\d\-]+)(\b.*|$)/i, "$1"); this.elmToPresentIn = document.getElementById(this.currentLink.className.replace(/.*target-([\w\d\-]+)(\b.*|$)/i, "$1")); if(!bHasCachedContent){ this.createXmlHttp(); this.xmlHttpCallComplete = false; this.xmlHttp.onreadystatechange = function (){ if(ask.xmlHttp && ask.xmlHttp.readyState == 4){ ask.presentContent(); } } this.xmlHttp.open("GET", this.currentLinkURL, true); this.xmlHttp.send(null); } else{ this.presentContent(); } } // --- function AskGetMultipleContent(){ if(this.linksToGetContentFor.length > 0){ if(this.xmlHttpCallComplete){ var oLink = this.linksToGetContentFor.shift(); this.createHistory(oLink); this.getContent(oLink); } setTimeout("ask.getMultipleContent()", 100); } else{ this.locationInterval = setInterval("ask.timerLocationCheck()", 100); } } // --- function AskPresentContent(){ if(this.xmlHttp){ this.responseText = this.xmlHttp.responseText; } if(!this.isIE50){ this.links[this.currentLinkIndex][2] = this.elmToPresentIn.innerHTML; if(typeof this.links[this.currentLinkIndex][3] == "undefined"){ this.links[this.currentLinkIndex][3] = this.responseText; } } this.elmToPresentIn.innerHTML = this.responseText; this.addEvents(this.elmToPresentIn); this.clearXmlHttp(); } // --- function addWindowEvent(strEvent, oFunction, bCapture){ if(window.addEventListener){ window.addEventListener(strEvent, oFunction, bCapture); } else if(window.attachEvent){ window.attachEvent(("on" + strEvent), oFunction) } } // --- function getElementsByClassName(oElm, strTagName, strClassName){ var arrElements = (strTagName == "*" && document.all)? document.all : oElm.getElementsByTagName(strTagName); var arrReturnElements = new Array(); strClassName = strClassName.replace(/\-/g, "\\-"); var oRegExp = new RegExp("(^|\\s)" + strClassName + "(\\s|$)"); var oElement; for(var i=0; i<arrElements.length; i++){ oElement = arrElements[i]; if(oRegExp.test(oElement.className)){ arrReturnElements.push(oElement); } } return (arrReturnElements) } // --- if(typeof Array.prototype.push != "function"){ Array.prototype.push = ArrayPush; function ArrayPush(value){ this[this.length] = value; } } Array.prototype.last = ArrayLast; function ArrayLast(value){ return this[this.length - 1]; } // --- --- NEW FILE: AjaxRequest_comp.js --- // =================================================================== // Author: Matt Kruse <ma...@aj...> // WWW: http://www.AjaxToolbox.com/ // // NOTICE: You may use this code for any purpose, commercial or // private, without any further permission from the author. You may // remove this notice from your final code if you wish, however it is // appreciated by the author if at least my web site address is kept. // // You may *NOT* re-distribute this code in any way except through its // use. That means, you can include it in your product, or your web // site, or any other form where the code is actually being used. You // may not put the plain javascript up on your site for download or // include it in your javascript libraries for download. // If you wish to share this code with others, please just point them // to the URL instead. // Please DO NOT link directly to my .js files from your site. Copy // the files to your server and use them there. Thank you. // =================================================================== function AjaxRequest(){var req =new Object(); req.timeout =null; req.generateUniqueUrl =true; req.url =window.location.href; req.method ="GET"; req.async =true; req.username =null; req.password =null; req.parameters =new Object(); req.requestIndex =AjaxRequest.numAjaxRequests++; req.responseReceived =false; req.groupName =null; req.queryString =""; req.responseText =null; req.responseXML =null; req.status =null; req.statusText =null; req.aborted =false; req.xmlHttpRequest =null; req.onTimeout=null; req.onLoading=null; req.onLoaded=null; req.onInteractive=null; req.onComplete=null; req.onSuccess=null; req.onError=null; req.onGroupBegin=null; req.onGroupEnd=null; req.xmlHttpRequest =AjaxRequest.getXmlHttpRequest(); if(req.xmlHttpRequest==null){return null;}req.xmlHttpRequest.onreadystatechange = function(){if(req==null || req.xmlHttpRequest==null){return;}if(req.xmlHttpRequest.readyState==1){req.onLoadingInternal(req);}if(req.xmlHttpRequest.readyState==2){req.onLoadedInternal(req);}if(req.xmlHttpRequest.readyState==3){req.onInteractiveInternal(req);}if(req.xmlHttpRequest.readyState==4){req.onCompleteInternal(req);}}; req.onLoadingInternalHandled=false; req.onLoadedInternalHandled=false; req.onInteractiveInternalHandled=false; req.onCompleteInternalHandled=false; req.onLoadingInternal= function(){if(req.onLoadingInternalHandled){return;}AjaxRequest.numActiveAjaxRequests++; if(AjaxRequest.numActiveAjaxRequests==1 && typeof(window['AjaxRequestBegin'])=="function"){AjaxRequestBegin();}if(req.groupName!=null){if(typeof(AjaxRequest.numActiveAjaxGroupRequests[req.groupName])=="undefined"){AjaxRequest.numActiveAjaxGroupRequests[req.groupName] =0;}AjaxRequest.numActiveAjaxGroupRequests[req.groupName]++; if(AjaxRequest.numActiveAjaxGroupRequests[req.groupName]==1 && typeof(req.onGroupBegin)=="function"){req.onGroupBegin(req.groupName);}}if(typeof(req.onLoading)=="function"){req.onLoading(req);}req.onLoadingInternalHandled=true;}; req.onLoadedInternal= function(){if(req.onLoadedInternalHandled){return;}if(typeof(req.onLoaded)=="function"){req.onLoaded(req);}req.onLoadedInternalHandled=true;}; req.onInteractiveInternal= function(){if(req.onInteractiveInternalHandled){return;}if(typeof(req.onInteractive)=="function"){req.onInteractive(req);}req.onInteractiveInternalHandled=true;}; req.onCompleteInternal= function(){if(req.onCompleteInternalHandled || req.aborted){return;}req.onCompleteInternalHandled=true; AjaxRequest.numActiveAjaxRequests--; if(AjaxRequest.numActiveAjaxRequests==0 && typeof(window['AjaxRequestEnd'])=="function"){AjaxRequestEnd(req.groupName);}if(req.groupName!=null){AjaxRequest.numActiveAjaxGroupRequests[req.groupName]--; if(AjaxRequest.numActiveAjaxGroupRequests[req.groupName]==0 && typeof(req.onGroupEnd)=="function"){req.onGroupEnd(req.groupName);}}req.responseReceived =true; req.status =req.xmlHttpRequest.status; req.statusText =req.xmlHttpRequest.statusText; req.responseText =req.xmlHttpRequest.responseText; // IE req.responseXML =req.xmlHttpRequest.responseXML; if(typeof(req.onComplete)=="function"){req.onComplete(req);}if(req.xmlHttpRequest.status==200 && typeof(req.onSuccess)=="function"){req.onSuccess(req);}else if(typeof(req.onError)=="function"){req.onError(req);}delete req.xmlHttpRequest['onreadystatechange']; req.xmlHttpRequest =null;}; req.onTimeoutInternal= function(){if(req!=null && req.xmlHttpRequest!=null && !req.onCompleteInternalHandled){req.aborted =true; req.xmlHttpRequest.abort(); AjaxRequest.numActiveAjaxRequests--; if(AjaxRequest.numActiveAjaxRequests==0 && typeof(window['AjaxRequestEnd'])=="function"){AjaxRequestEnd(req.groupName);}if(req.groupName!=null){AjaxRequest.numActiveAjaxGroupRequests[req.groupName]--; if(AjaxRequest.numActiveAjaxGroupRequests[req.groupName]==0 && typeof(req.onGroupEnd)=="function"){req.onGroupEnd(req.groupName);}}if(typeof(req.onTimeout)=="function"){req.onTimeout(req);}delete req.xmlHttpRequest['onreadystatechange']; req.xmlHttpRequest =null;}}; req.process = function(){if(req.xmlHttpRequest!=null){if(req.generateUniqueUrl && req.method=="GET"){req.parameters["AjaxRequestUniqueId"] =new Date().getTime() + "" + req.requestIndex;}var content =null; for(var i in req.parameters){if(req.queryString.length>0){req.queryString +="&";}req.queryString +=escape(i) + "=" + escape(req.parameters[i]);}if(req.method=="GET"){if(req.queryString.length>0){req.url +=((req.url.indexOf("?")>-1)?"&":"?") + req.queryString;}}req.xmlHttpRequest.open(req.method,req.url,req.async,req.username,req.password); if(req.method=="POST"){if(typeof(req.xmlHttpRequest.setRequestHeader)!="undefined"){req.xmlHttpRequest.setRequestHeader('Content-type', 'application/x-www-form-urlencoded');}content =req.queryString;}if(req.timeout>0){setTimeout(req.onTimeoutInternal,req.timeout);}req.xmlHttpRequest.send(content);}}; req.handleArguments = function(args){for(var i in args){if(typeof(req[i])=="undefined"){req.parameters[i] =args[i];}else{req[i] =args[i];}}}; req.getAllResponseHeaders = function(){if(req.xmlHttpRequest!=null){if(req.responseReceived){return req.xmlHttpRequest.getAllResponseHeaders();}alert("Cannot getAllResponseHeaders because a response has not yet been received");}}; req.getResponseHeader = function(headerName){if(req.xmlHttpRequest!=null){if(req.responseReceived){return req.xmlHttpRequest.getResponseHeader(headerName);}alert("Cannot getResponseHeader because a response has not yet been received");}}; return req;}AjaxRequest.getXmlHttpRequest =function(){if(window.XMLHttpRequest){return new XMLHttpRequest();}else if(window.ActiveXObject){/*@cc_on @*/ /*@if(@_jscript_version >=5) try{return new ActiveXObject("Msxml2.XMLHTTP");}catch(e){try{return new ActiveXObject("Microsoft.XMLHTTP");}catch(E){return null;}}@end @*/}else{return null;}}; AjaxRequest.isActive =function(){return(AjaxRequest.numActiveAjaxRequests>0);}; AjaxRequest.get =function(args){AjaxRequest.doRequest("GET",args);}; AjaxRequest.post =function(args){AjaxRequest.doRequest("POST",args);}; AjaxRequest.doRequest =function(method,args){if(typeof(args)!="undefined" && args!=null){var myRequest =new AjaxRequest(); myRequest.method =method; myRequest.handleArguments(args); myRequest.process();}}; AjaxRequest.submit =function(theform, args){var myRequest =new AjaxRequest(); if(myRequest==null){return false;}var serializedForm =AjaxRequest.serializeForm(theform); myRequest.method =theform.method.toUpperCase(); myRequest.url =theform.action; myRequest.handleArguments(args); myRequest.queryString =serializedForm; myRequest.process(); return true;}; AjaxRequest.serializeForm =function(theform){var els =theform.elements; var len =els.length; var queryString =""; this.addField = function(name,value){if(queryString.length>0){queryString +="&";}queryString +=escape(name) + "=" + escape(value);}; for(var i=0;i<len;i++){var el =els[i]; if(!el.disabled){switch(el.type){case 'text': case 'password': case 'hidden': case 'textarea': this.addField(el.name,el.value); break; case 'select-one': if(el.selectedIndex>=0){this.addField(el.name,el.options[el.selectedIndex].value);}break; case 'select-multiple': for(var j=0;j<el.options.length;j++){if(el.options[j].selected){this.addField(el.name,el.options[j].value);}}break; case 'checkbox': case 'radio': if(el.checked){this.addField(el.name,el.value);}break;}}}return queryString;}; AjaxRequest.numActiveAjaxRequests =0; AjaxRequest.numActiveAjaxGroupRequests =new Object(); AjaxRequest.numAjaxRequests =0; --- NEW FILE: dhtmlHistory.js --- /** Copyright (c) 2005, Brad Neuberg, bk...@co... http://codinginparadise.org Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. The JSON class near the end of this file is Copyright 2005, JSON.org */ /** An object that provides DHTML history, history data, and bookmarking for AJAX applications. */ window.dhtmlHistory = { /** Initializes our DHTML history. You should call this after the page is finished loading. */ /** public */ initialize: function() { // only Internet Explorer needs to be explicitly initialized; // other browsers don't have its particular behaviors. // Basicly, IE doesn't autofill form data until the page // is finished loading, which means historyStorage won't // work until onload has been fired. if (this.isInternetExplorer() == false) { return; } // if this is the first time this page has loaded... if (historyStorage.hasKey("DhtmlHistory_pageLoaded") == false) { this.fireOnNewListener = false; this.firstLoad = true; historyStorage.put("DhtmlHistory_pageLoaded", true); } // else if this is a fake onload event else { this.fireOnNewListener = true; this.firstLoad = false; } }, /** Adds a history change listener. Note that only one listener is supported at this time. */ /** public */ addListener: function(callback) { this.listener = callback; // if the page was just loaded and we // should not ignore it, fire an event // to our new listener now if (this.fireOnNewListener == true) { this.fireHistoryEvent(this.currentLocation); this.fireOnNewListener = false; } }, /** public */ add: function(newLocation, historyData) { // most browsers require that we wait a certain amount of time before changing the // location, such as 200 milliseconds; rather than forcing external callers to use // window.setTimeout to account for this to prevent bugs, we internally handle this // detail by using a 'currentWaitTime' variable and have requests wait in line var self = this; var addImpl = function() { // indicate that the current wait time is now less if (self.currentWaitTime > 0) self.currentWaitTime = self.currentWaitTime - self.WAIT_TIME; // remove any leading hash symbols on newLocation newLocation = self.removeHash(newLocation); // IE has a strange bug; if the newLocation // is the same as _any_ preexisting id in the // document, then the history action gets recorded // twice; throw a programmer exception if there is // an element with this ID var idCheck = document.getElementById(newLocation); if (idCheck != undefined || idCheck != null) { var message = "Exception: History locations can not have " + "the same value as _any_ id's " + "that might be in the document, " + "due to a bug in Internet " + "Explorer; please ask the " + "developer to choose a history " + "location that does not match " + "any HTML id's in this " + "document. The following ID " + "is already taken and can not " + "be a location: " + newLocation; throw message; } // store the history data into history storage historyStorage.put(newLocation, historyData); // indicate to the browser to ignore this upcomming // location change self.ignoreLocationChange = true; // indicate to IE that this is an atomic location change // block this.ieAtomicLocationChange = true; // save this as our current location self.currentLocation = newLocation; // change the browser location window.location.hash = newLocation; // change the hidden iframe's location if on IE if (self.isInternetExplorer()) self.iframe.src = "blank.html?" + newLocation; // end of atomic location change block // for IE this.ieAtomicLocationChange = false; }; // now execute this add request after waiting a certain amount of time, so as to // queue up requests window.setTimeout(addImpl, this.currentWaitTime); // indicate that the next request will have to wait for awhile this.currentWaitTime = this.currentWaitTime + this.WAIT_TIME; }, /** public */ isFirstLoad: function() { if (this.firstLoad == true) { return true; } else { return false; } }, /** public */ isInternational: function() { return false; }, /** public */ getVersion: function() { return "0.05"; }, /** Gets the current hash value that is in the browser's location bar, removing leading # symbols if they are present. */ /** public */ getCurrentLocation: function() { var currentLocation = this.removeHash(window.location.hash); return currentLocation; }, /** Our current hash location, without the "#" symbol. */ /** private */ currentLocation: null, /** Our history change listener. */ /** private */ listener: null, /** A hidden IFrame we use in Internet Explorer to detect history changes. */ /** private */ iframe: null, /** Indicates to the browser whether to ignore location changes. */ /** private */ ignoreLocationChange: null, /** The amount of time in milliseconds that we should wait between add requests. Firefox is okay with 200 ms, but Internet Explorer needs 400. */ /** private */ WAIT_TIME: 200, /** The amount of time in milliseconds an add request has to wait in line before being run on a window.setTimeout. */ /** private */ currentWaitTime: 0, /** A flag that indicates that we should fire a history change event when we are ready, i.e. after we are initialized and we have a history change listener. This is needed due to an edge case in browsers other than Internet Explorer; if you leave a page entirely then return, we must fire this as a history change event. Unfortunately, we have lost all references to listeners from earlier, because JavaScript clears out. */ /** private */ fireOnNewListener: null, /** A variable that indicates whether this is the first time this page has been loaded. If you go to a web page, leave it for another one, and then return, the page's onload listener fires again. We need a way to differentiate between the first page load and subsequent ones. This variable works hand in hand with the pageLoaded variable we store into historyStorage.*/ /** private */ firstLoad: null, /** A variable to handle an important edge case in Internet Explorer. In IE, if a user manually types an address into their browser's location bar, we must intercept this by continiously checking the location bar with an timer interval. However, if we manually change the location bar ourselves programmatically, when using our hidden iframe, we need to ignore these changes. Unfortunately, these changes are not atomic, so we surround them with the variable 'ieAtomicLocationChange', that if true, means we are programmatically setting the location and should ignore this atomic chunked change. */ /** private */ ieAtomicLocationChange: null, /** Creates the DHTML history infrastructure. */ /** private */ create: function() { // get our initial location var initialHash = this.getCurrentLocation(); // save this as our current location this.currentLocation = initialHash; // write out a hidden iframe for IE and // set the amount of time to wait between add() requests if (this.isInternetExplorer()) { document.write("<iframe style='border: 0px; width: 1px; " + "height: 1px; position: absolute; bottom: 0px; " + "right: 0px; visibility: visible;' " + "name='DhtmlHistoryFrame' id='DhtmlHistoryFrame' " + "src='blank.html?" + initialHash + "'>" + "</iframe>"); // wait 400 milliseconds between history // updates on IE, versus 200 on Firefox this.WAIT_TIME = 400; } // add an unload listener for the page; this is // needed for Firefox 1.5+ because this browser caches all // dynamic updates to the page, which can break some of our // logic related to testing whether this is the first instance // a page has loaded or whether it is being pulled from the cache var self = this; window.onunload = function() { self.firstLoad = null; }; // determine if this is our first page load; // for Internet Explorer, we do this in // this.iframeLoaded(), which is fired on // page load. We do it there because // we have no historyStorage at this point // in IE, which only exists after the page // is finished loading for that browser if (this.isInternetExplorer() == false) { if (historyStorage.hasKey("DhtmlHistory_pageLoaded") == false) { this.ignoreLocationChange = true; this.firstLoad = true; historyStorage.put("DhtmlHistory_pageLoaded", true); } else { // indicate that we want to pay attention // to this location change this.ignoreLocationChange = false; // For browser's other than IE, fire // a history change event; on IE, // the event will be thrown automatically // when it's hidden iframe reloads // on page load. // Unfortunately, we don't have any // listeners yet; indicate that we want // to fire an event when a listener // is added. this.fireOnNewListener = true; } } else { // Internet Explorer // the iframe will get loaded on page // load, and we want to ignore this fact this.ignoreLocationChange = true; } if (this.isInternetExplorer()) { this.iframe = document.getElementById("DhtmlHistoryFrame"); } // other browsers can use a location handler that checks // at regular intervals as their primary mechanism; // we use it for Internet Explorer as well to handle // an important edge case; see checkLocation() for // details var self = this; var locationHandler = function() { self.checkLocation(); }; setInterval(locationHandler, 100); }, /** Notify the listener of new history changes. */ /** private */ fireHistoryEvent: function(newHash) { // extract the value from our history storage for // this hash var historyData = historyStorage.get(newHash); // call our listener this.listener.call(null, newHash, historyData); }, /** Sees if the browsers has changed location. This is the primary history mechanism for Firefox. For Internet Explorer, we use this to handle an important edge case: if a user manually types in a new hash value into their Internet Explorer location bar and press enter, we want to intercept this and notify any history listener. */ /** private */ checkLocation: function() { // ignore any location changes that we made ourselves // for browsers other than Internet Explorer if (this.isInternetExplorer() == false && this.ignoreLocationChange == true) { this.ignoreLocationChange = false; return; } // if we are dealing with Internet Explorer // and we are in the middle of making a location // change from an iframe, ignore it if (this.isInternetExplorer() == false && this.ieAtomicLocationChange == true) { return; } // get hash location var hash = this.getCurrentLocation(); // see if there has been a change if (hash == this.currentLocation) return; // on Internet Explorer, we need to intercept users manually // entering locations into the browser; we do this by comparing // the browsers location against the iframes location; if they // differ, we are dealing with a manual event and need to // place it inside our history, otherwise we can return this.ieAtomicLocationChange = true; if (this.isInternetExplorer() && this.getIFrameHash() != hash) { this.iframe.src = "blank.html?" + hash; } else if (this.isInternetExplorer()) { // the iframe is unchanged return; } // save this new location this.currentLocation = hash; this.ieAtomicLocationChange = false; // notify listeners of the change this.fireHistoryEvent(hash); }, /** Gets the current location of the hidden IFrames that is stored as history. For Internet Explorer. */ /** private */ getIFrameHash: function() { // get the new location var historyFrame = document.getElementById("DhtmlHistoryFrame"); var doc = historyFrame.contentWindow.document; var hash = new String(doc.location.search); if (hash.length == 1 && hash.charAt(0) == "?") hash = ""; else if (hash.length >= 2 && hash.charAt(0) == "?") hash = hash.substring(1); return hash; }, /** Removes any leading hash that might be on a location. */ /** private */ removeHash: function(hashValue) { if (hashValue == null || hashValue == undefined) return null; else if (hashValue == "") return ""; else if (hashValue.length == 1 && hashValue.charAt(0) == "#") return ""; else if (hashValue.length > 1 && hashValue.charAt(0) == "#") return hashValue.substring(1); else return hashValue; }, /** For IE, says when the hidden iframe has finished loading. */ /** private */ iframeLoaded: function(newLocation) { // ignore any location changes that we made ourselves if (this.ignoreLocationChange == true) { this.ignoreLocationChange = false; return; } // get the new location var hash = new String(newLocation.search); if (hash.length == 1 && hash.charAt(0) == "?") hash = ""; else if (hash.length >= 2 && hash.charAt(0) == "?") hash = hash.substring(1); // move to this location in the browser location bar // if we are not dealing with a page load event if (this.pageLoadEvent != true) { window.location.hash = hash; } // notify listeners of the change this.fireHistoryEvent(hash); }, /** Determines if this is Internet Explorer. */ /** private */ isInternetExplorer: function() { var userAgent = navigator.userAgent.toLowerCase(); if (document.all && userAgent.indexOf('msie')!=-1) { return true; } else { return false; } } }; /** An object that uses a hidden form to store history state across page loads. The chief mechanism for doing so is using the fact that browser's save the text in form data for the life of the browser and cache, which means the text is still there when the user navigates back to the page. See http://codinginparadise.org/weblog/2005/08/ajax-tutorial-saving-session-across.html for full details. */ window.historyStorage = { /** If true, we are debugging and show the storage textfield. */ /** public */ debugging: false, /** Our hash of key name/values. */ /** private */ storageHash: new Object(), /** If true, we have loaded our hash table out of the storage form. */ /** private */ hashLoaded: false, /** public */ put: function(key, value) { this.assertValidKey(key); // if we already have a value for this, // remove the value before adding the // new one if (this.hasKey(key)) { this.remove(key); } // store this new key this.storageHash[key] = value; // save and serialize the hashtable into the form this.saveHashTable(); }, /** public */ get: function(key) { this.assertValidKey(key); // make sure the hash table has been loaded // from the form this.loadHashTable(); var value = this.storageHash[key]; if (value == undefined) return null; else return value; }, /** public */ remove: function(key) { this.assertValidKey(key); // make sure the hash table has been loaded // from the form this.loadHashTable(); // delete the value delete this.storageHash[key]; // serialize and save the hash table into the // form this.saveHashTable(); }, /** Clears out all saved data. */ /** public */ reset: function() { this.storageField.value = ""; this.storageHash = new Object(); }, /** public */ hasKey: function(key) { this.assertValidKey(key); // make sure the hash table has been loaded // from the form this.loadHashTable(); if (typeof this.storageHash[key] == "undefined") return false; else return true; }, /** Determines whether the key given is valid; keys can only have letters, numbers, the dash, underscore, spaces, or one of the following characters: !@#$%^&*()+=:;,./?|\~{}[] */ /** public */ isValidKey: function(key) { // allow all strings, since we don't use XML serialization // format anymore return (typeof key == "string"); /* if (typeof key != "string") key = key.toString(); var matcher = /^[a-zA-Z0-9_ \!\@\#\$\%\^\&\*\(\)\+\=\:\;\,\.\/\?\|\\\~\{\}\[\]]*$/; return matcher.test(key);*/ }, /** A reference to our textarea field. */ /** private */ storageField: null, /** private */ init: function() { // write a hidden form into the page var styleValue = "position: absolute; top: -1000px; left: -1000px;"; if (this.debugging == true) { styleValue = "width: 30em; height: 30em;"; } var newContent = "<form id='historyStorageForm' " + "method='GET' " + "style='" + styleValue + "'>" + "<textarea id='historyStorageField' " + "style='" + styleValue + "'" + "left: -1000px;' " + "name='historyStorageField'></textarea>" + "</form>"; document.write(newContent); this.storageField = document.getElementById("historyStorageField"); }, /** Asserts that a key is valid, throwing an exception if it is not. */ /** private */ assertValidKey: function(key) { if (this.isValidKey(key) == false) { throw "Please provide a valid key for " + "window.historyStorage, key= " + key; } }, /** Loads the hash table up from the form. */ /** private */ loadHashTable: function() { if (this.hashLoaded == false) { // get the hash table as a serialized // string var serializedHashTable = this.storageField.value; if (serializedHashTable != "" && serializedHashTable != null) { // destringify the content back into a // real JavaScript object this.storageHash = eval('(' + serializedHashTable + ')'); } this.hashLoaded = true; } }, /** Saves the hash table into the form. */ /** private */ saveHashTable: function() { this.loadHashTable(); // serialized the hash table var serializedHashTable = JSON.stringify(this.storageHash); // save this value this.storageField.value = serializedHashTable; } }; /** The JSON class is copyright 2005 JSON.org. */ Array.prototype.______array = '______array'; var JSON = { org: 'http://www.JSON.org', copyright: '(c)2005 JSON.org', license: 'http://www.crockford.com/JSON/license.html', stringify: function (arg) { var c, i, l, s = '', v; switch (typeof arg) { case 'object': if (arg) { if (arg.______array == '______array') { for (i = 0; i < arg.length; ++i) { v = this.stringify(arg[i]); if (s) { s += ','; } s += v; } return '[' + s + ']'; } else if (typeof arg.toString != 'undefined') { for (i in arg) { v = arg[i]; if (typeof v != 'undefined' && typeof v != 'function') { v = this.stringify(v); if (s) { s += ','; } s += this.stringify(i) + ':' + v; } } return '{' + s + '}'; } } return 'null'; case 'number': return isFinite(arg) ? String(arg) : 'null'; case 'string': l = arg.length; s = '"'; for (i = 0; i < l; i += 1) { c = arg.charAt(i); if (c >= ' ') { if (c == '\\' || c == '"') { s += '\\'; } s += c; } else { switch (c) { case '\b': s += '\\b'; break; case '\f': s += '\\f'; break; case '\n': s += '\\n'; break; case '\r': s += '\\r'; break; case '\t': s += '\\t'; break; default: c = c.charCodeAt(); s += '\\u00' + Math.floor(c / 16).toString(16) + (c % 16).toString(16); } } } return s + '"'; case 'boolean': return String(arg); default: return 'null'; } }, parse: function (text) { var at = 0; var ch = ' '; function error(m) { throw { name: 'JSONError', message: m, at: at - 1, text: text }; } function next() { ch = text.charAt(at); at += 1; return ch; } function white() { while (ch != '' && ch <= ' ') { next(); } } function str() { var i, s = '', t, u; if (ch == '"') { outer: while (next()) { if (ch == '"') { next(); return s; } else if (ch == '\\') { switch (next()) { case 'b': s += '\b'; break; case 'f': s += '\f'; break; case 'n': s += '\n'; break; case 'r': s += '\r'; break; case 't': s += '\t'; break; case 'u': u = 0; for (i = 0; i < 4; i += 1) { t = parseInt(next(), 16); if (!isFinite(t)) { break outer; } u = u * 16 + t; } s += String.fromCharCode(u); break; default: s += ch; } } else { s += ch; } } } error("Bad string"); } function arr() { var a = []; if (ch == '[') { next(); white(); if (ch == ']') { next(); return a; } while (ch) { a.push(val()); white(); if (ch == ']') { next(); return a; } else if (ch != ',') { break; } next(); white(); } } error("Bad array"); } function obj() { var k, o = {}; if (ch == '{') { next(); white(); if (ch == '}') { next(); return o; } while (ch) { k = str(); white(); if (ch != ':') { break; } next(); o[k] = val(); white(); if (ch == '}') { next(); return o; } else if (ch != ',') { break; } next(); white(); } } error("Bad object"); } function num() { var n = '', v; if (ch == '-') { n = '-'; next(); } while (ch >= '0' && ch <= '9') { n += ch; next(); } if (ch == '.') { n += '.'; while (next() && ch >= '0' && ch <= '9') { n += ch; } } if (ch == 'e' || ch == 'E') { n += 'e'; next(); if (ch == '-' || ch == '+') { n += ch; next(); } while (ch >= '0' && ch <= '9') { n += ch; next(); } } v = +n; if (!isFinite(v)) { error("Bad number"); } else { return v; } } function word() { switch (ch) { case 't': if (next() == 'r' && next() == 'u' && next() == 'e') { next(); return true; } break; case 'f': if (next() == 'a' && next() == 'l' && next() == 's' && next() == 'e') { next(); return false; } break; case 'n': if (next() == 'u' && next() == 'l' && next() == 'l') { next(); return null; } break; } error("Syntax error"); } function val() { white(); switch (ch) { case '{': return obj(); case '[': return arr(); case '"': return str(); case '-': return num(); default: return ch >= '0' && ch <= '9' ? num() : word(); } } return val(); } }; /** Initialize all of our objects now. */ window.historyStorage.init(); window.dhtmlHistory.create(); --- NEW FILE: AjaxRequest.js --- // =================================================================== // Author: Matt Kruse <ma...@aj...> // WWW: http://www.AjaxToolbox.com/ // // NOTICE: You may use this code for any purpose, commercial or // private, without any further permission from the author. You may // remove this notice from your final code if you wish, however it is // appreciated by the author if at least my web site address is kept. // // You may *NOT* re-distribute this code in any way except through its // use. That means, you can include it in your product, or your web // site, or any other form where the code is actually being used. You // may not put the plain javascript up on your site for download or // include it in your javascript libraries for download. // If you wish to share this code with others, please just point them // to the URL instead. // Please DO NOT link directly to my .js files from your site. Copy // the files to your server and use them there. Thank you. // =================================================================== /** * The AjaxRequest class is a wrapper for the XMLHttpRequest objects which * are available in most modern browsers. It simplifies the interfaces for * making Ajax requests, adds commonly-used convenience methods, and makes * the process of handling state changes more intuitive. * An object may be instantiated and used, or the Class methods may be used * which internally create an AjaxRequest object. */ /** * This script was originally used for utf-8 encoded data - only. * I have replaced all encodeURIComponent() with escape(), to make it * latin charset compliant - only ;) // Jon */ function AjaxRequest() { var req = new Object(); // ------------------- // Instance properties // ------------------- /** * Timeout period (in ms) until an async request will be aborted, and * the onTimeout function will be called */ req.timeout = null; /** * Since some browsers cache GET requests via XMLHttpRequest, an * additional parameter called AjaxRequestUniqueId will be added to * the request URI with a unique numeric value appended so that the requested * URL will not be cached. */ req.generateUniqueUrl = true; /** * The url that the request will be made to, which defaults to the current * url of the window */ req.url = window.location.href; /** * The method of the request, either GET (default), POST, or HEAD */ req.method = "GET"; /** * Whether or not the request will be asynchronous. In general, synchronous * requests should not be used so this should rarely be changed from true */ req.async = true; /** * The username used to access the URL */ req.username = null; /** * The password used to access the URL */ req.password = null; /** * The parameters is an object holding name/value pairs which will be * added to the url for a GET request or the request content for a POST request */ req.parameters = new Object(); /** * The sequential index number of this request, updated internally */ req.requestIndex = AjaxRequest.numAjaxRequests++; /** * Indicates whether a response has been received yet from the server */ req.responseReceived = false; /** * The name of the group that this request belongs to, for activity * monitoring purposes */ req.groupName = null; /** * The query string to be added to the end of a GET request, in proper * URIEncoded format */ req.queryString = ""; /** * After a response has been received, this will hold the text contents of * the response - even in case of error */ req.responseText = null; /** * After a response has been received, this will hold the XML content */ req.responseXML = null; /** * After a response has been received, this will hold the status code of * the response as returned by the server. */ req.status = null; /** * After a response has been received, this will hold the text description * of the response code */ req.statusText = null; /** * An internal flag to indicate whether the request has been aborted */ req.aborted = false; /** * The XMLHttpRequest object used internally */ req.xmlHttpRequest = null; // -------------- // Event handlers // -------------- /** * If a timeout period is set, and it is reached before a response is * received, a function reference assigned to onTimeout will be called */ req.onTimeout = null; /** * A function reference assigned will be called when readyState=1 */ req.onLoading = null; /** * A function reference assigned will be called when readyState=2 */ req.onLoaded = null; /** * A function reference assigned will be called when readyState=3 */ req.onInteractive = null; /** * A function reference assigned will be called when readyState=4 */ req.onComplete = null; /** * A function reference assigned will be called after onComplete, if * the statusCode=200 */ req.onSuccess = null; /** * A function reference assigned will be called after onComplete, if * the statusCode != 200 */ req.onError = null; /** * If this request has a group name, this function reference will be called * and passed the group name if this is the first request in the group to * become active */ req.onGroupBegin = null; /** * If this request has a group name, and this request is the last request * in the group to complete, this function reference will be called */ req.onGroupEnd = null; // Get the XMLHttpRequest object itself req.xmlHttpRequest = AjaxRequest.getXmlHttpRequest(); if (req.xmlHttpRequest==null) { return null; } // ------------------------------------------------------- // Attach the event handlers for the XMLHttpRequest object // ------------------------------------------------------- req.xmlHttpRequest.onreadystatechange = function() { if (req==null || req.xmlHttpRequest==null) { return; } if (req.xmlHttpRequest.readyState==1) { req.onLoadingInternal(req); } if (req.xmlHttpRequest.readyState==2) { req.onLoadedInternal(req); } if (req.xmlHttpRequest.readyState==3) { req.onInteractiveInternal(req); } if (req.xmlHttpRequest.readyState==4) { req.onCompleteInternal(req); } }; // --------------------------------------------------------------------------- // Internal event handlers that fire, and in turn fire the user event handlers // --------------------------------------------------------------------------- // Flags to keep track if each event has been handled, in case of // multiple calls (some browsers may call the onreadystatechange // multiple times for the same state) req.onLoadingInternalHandled = false; req.onLoadedInternalHandled = false; req.onInteractiveInternalHandled = false; req.onCompleteInternalHandled = false; req.onLoadingInternal = function() { if (req.onLoadingInternalHandled) { return; } AjaxRequest.numActiveAjaxRequests++; if (AjaxRequest.numActiveAjaxRequests==1 && typeof(window['AjaxRequestBegin'])=="function") { AjaxRequestBegin(); } if (req.groupName!=null) { if (typeof(AjaxRequest.numActiveAjaxGroupRequests[req.groupName])=="undefined") { AjaxRequest.numActiveAjaxGroupRequests[req.groupName] = 0; } AjaxRequest.numActiveAjaxGroupRequests[req.groupName]++; if (AjaxRequest.numActiveAjaxGroupRequests[req.groupName]==1 && typeof(req.onGroupBegin)=="function") { req.onGroupBegin(req.groupName); } } if (typeof(req.onLoading)=="function") { req.onLoading(req); } req.onLoadingInternalHandled = true; }; req.onLoadedInternal = function() { if (req.onLoadedInternalHandled) { return; } if (typeof(req.onLoaded)=="function") { req.onLoaded(req); } req.onLoadedInternalHandled = true; }; req.onInteractiveInternal = function() { if (req.onInteractiveInternalHandled) { return; } if (typeof(req.onInteractive)=="function") { req.onInteractive(req); } req.onInteractiveInternalHandled = true; }; req.onCompleteInternal = function() { if (req.onCompleteInternalHandled || req.aborted) { return; } req.onCompleteInternalHandled = true; AjaxRequest.numActiveAjaxRequests--; if (AjaxRequest.numActiveAjaxRequests==0 && typeof(window['AjaxRequestEnd'])=="function") { AjaxRequestEnd(req.groupName); } if (req.groupName!=null) { AjaxRequest.numActiveAjaxGroupRequests[req.groupName]--; if (AjaxRequest.numActiveAjaxGroupRequests[req.groupName]==0 && typeof(req.onGroupEnd)=="function") { req.onGroupEnd(req.groupName); } } req.responseReceived = true; req.status = req.xmlHttpRequest.status; req.statusText = req.xmlHttpRequest.statusText; req.responseText = req.xmlHttpRequest.responseText; req.responseXML = req.xmlHttpRequest.responseXML; if (typeof(req.onComplete)=="function") { req.onComplete(req); } if (req.xmlHttpRequest.status==200 && typeof(req.onSuccess)=="function") { req.onSuccess(req); } else if (typeof(req.onError)=="function") { req.onError(req); } // Clean up so IE doesn't leak memory delete req.xmlHttpRequest['onreadystatechange']; req.xmlHttpRequest = null; }; req.onTimeoutInternal = function() { if (req!=null && req.xmlHttpRequest!=null && !req.onCompleteInternalHandled) { req.aborted = true; req.xmlHttpRequest.abort(); AjaxRequest.numActiveAjaxRequests--; if (AjaxRequest.numActiveAjaxRequests==0 && typeof(window['AjaxRequestEnd'])=="function") { AjaxRequestEnd(req.groupName); } if (req.groupName!=null) { AjaxRequest.numActiveAjaxGroupRequests[req.groupName]--; if (AjaxRequest.numActiveAjaxGroupRequests[req.groupName]==0 && typeof(req.onGroupEnd)=="function") { req.onGroupEnd(req.groupName); } } if (typeof(req.onTimeout)=="function") { req.onTimeout(req); } // Opera won't fire onreadystatechange after abort, but other browsers do. // So we can't rely on the onreadystate function getting called. Clean up here! delete req.xmlHttpRequest['onreadystatechange']; req.xmlHttpRequest = null; } }; // ---------------- // Instance methods // ---------------- /** * The process method is called to actually make the request. It builds the * querystring for GET requests (the content for POST requests), sets the * appropriate headers if necessary, and calls the * XMLHttpRequest.send() method */ req.process = function() { if (req.xmlHttpRequest!=null) { // Some logic to get the real request URL if (req.generateUniqueUrl && req.method=="GET") { req.parameters["AjaxRequestUniqueId"] = new Date().getTime() + "" + req.requestIndex; } var content = null; // For POST requests, to hold query string for (var i in req.parameters) { if (req.queryString.length>0) { req.queryString += "&"; } req.queryString += escape(i) + "=" + escape(req.parameters[i]); } if (req.method=="GET") { if (req.queryString.length>0) { req.url += ((req.url.indexOf("?")>-1)?"&":"?") + req.queryString; } } req.xmlHttpRequest.open(req.method,req.url,req.async,req.username,req.password); if (req.method=="POST") { if (typeof(req.xmlHttpRequest.setRequestHeader)!="undefined") { //req.xmlHttpRequest.setRequestHeader("Content-type", "application/x-www-form-urlencoded; charset=iso-8859-1"); req.xmlHttpRequest.setRequestHeader('Content-type', 'application/x-www-form-urlencoded'); } content = req.queryString; } if (req.timeout>0) { setTimeout(req.onTimeoutInternal,req.timeout); } req.xmlHttpRequest.send(content); } }; /** * An internal function to handle an Object argument, which may contain * either AjaxRequest field values or parameter name/values */ req.handleArguments = function(args) { for (var i in args) { // If the AjaxRequest object doesn't have a property which was passed, treat it as a url parameter if (typeof(req[i])=="undefined") { req.parameters[i] = args[i]; } else { req[i] = args[i]; } } }; /** * Returns the results of XMLHttpRequest.getAllResponseHeaders(). * Only available after a response has been returned */ req.getAllResponseHeaders = function() { if (req.xmlHttpRequest!=null) { if (req.responseReceived) { return req.xmlHttpRequest.getAllResponseHeaders(); } alert("Cannot getAllResponseHeaders because a response has not yet been received"); } }; /** * Returns the the value of a response header as returned by ... [truncated message content] |
|
From: FlorinCB <ory...@us...> - 2008-09-18 00:43:48
|
Update of /cvsroot/mxbb/mx_music/phpbb2/mx_mod/mx_shared/SimpleTextEditor/images In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv19367/mx_mod/mx_shared/SimpleTextEditor/images Added Files: bold.gif center.gif help.gif image.gif indent.gif italic.gif left.gif link.gif ol.gif outdent.gif right.gif ul.gif underline.gif viewsource.gif Log Message: upgrade --- NEW FILE: indent.gif --- (This appears to be a binary file; contents omitted.) --- NEW FILE: left.gif --- (This appears to be a binary file; contents omitted.) --- NEW FILE: underline.gif --- (This appears to be a binary file; contents omitted.) --- NEW FILE: image.gif --- (This appears to be a binary file; contents omitted.) --- NEW FILE: outdent.gif --- (This appears to be a binary file; contents omitted.) --- NEW FILE: ul.gif --- (This appears to be a binary file; contents omitted.) --- NEW FILE: italic.gif --- (This appears to be a binary file; contents omitted.) --- NEW FILE: center.gif --- (This appears to be a binary file; contents omitted.) --- NEW FILE: link.gif --- (This appears to be a binary file; contents omitted.) --- NEW FILE: help.gif --- (This appears to be a binary file; contents omitted.) --- NEW FILE: viewsource.gif --- (This appears to be a binary file; contents omitted.) --- NEW FILE: ol.gif --- (This appears to be a binary file; contents omitted.) --- NEW FILE: bold.gif --- (This appears to be a binary file; contents omitted.) --- NEW FILE: right.gif --- (This appears to be a binary file; contents omitted.) |
|
From: FlorinCB <ory...@us...> - 2008-09-18 00:43:45
|
Update of /cvsroot/mxbb/mx_music/phpbb2/mx_mod/mx_shared/SimpleTextEditor In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv19367/mx_mod/mx_shared/SimpleTextEditor Added Files: SimpleTextEditor.css.php SimpleTextEditor.js demo.html help.html index.htm Log Message: upgrade --- NEW FILE: SimpleTextEditor.css.php --- <?php require '../../config.php'; header('Content-type: text/css'); ?> .ste .bar { background: #ECE9D8; padding: 3px; border: #ACA899 1px; border-style: solid solid none solid; } .ste .frame { border: 1px solid; border-color: #716F64 #ECE9D8 #ECE9D8 #716F64; } .ste .frame iframe { width: <?php echo $CONFIG['editor-width']; ?>px; height: <?php echo $CONFIG['editor-height']; ?>px; } .ste img { border: 0; } .ste .button { padding: 1px; border: #ECE9D8 1px solid; } .ste .button-hover { padding: 1px; border: 1px solid; border-color: #ffffff #ACA899 #ACA899 #ffffff; } .ste .button-click { padding: 1px; border: 1px solid; border-color: #ACA899 #ffffff #ffffff #ACA899; } .ste .separator { width: 0px; height: 18px; border-left: #aca899 1px solid; border-right: #ffffff 1px solid; margin: 0 5px; } .ste .source { padding-top: 5px; } --- NEW FILE: demo.html --- <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <title>SimpleTextEditor</title> <script type="text/javascript" src="SimpleTextEditor.js"></script> <link rel="stylesheet" type="text/css" href="SimpleTextEditor.css"> </head> <body> <form action="" method="post"> <textarea id="body" name="body" cols="60" rows="10"> <h1>Heading One</h1> <h2 style="margin-right: 0px;" dir="ltr">Heading Two</h2> <h3>Heading Three</h3> <pre>Preformatted <strong>bold</strong> <em>italic</em> <span style="text-decoration: underline;">underline</span> <a href="test2.php">test</a> test<br></pre> <p>Paragraph</p> <p style="margin-right: 0px; text-align: left;" dir="ltr">Normal </p> <ul> <li>List 1</li><li>List 2</li><li>List 3</li> </ul> <ol> <li>Ordered List</li><li>Ordered List</li><li>Ordered List</li><li>Ordered List</li> </ol> </textarea> <script type="text/javascript"> var ste = new SimpleTextEditor("body", "ste"); ste.init(); </script> <input type="submit" value="submit" onclick="ste.submit();"> </form> </body> </html> --- NEW FILE: SimpleTextEditor.js --- // +----------------------------------------------------------------+ // | SimpleTextEditor 1.0 | // | Author: Cezary Tomczak [www.gosu.pl] | // | Free for any use as long as all copyright messages are intact. | // +----------------------------------------------------------------+ function SimpleTextEditor(id, objectId) { if (!id || !objectId) { alert("SimpleTextEditor.constructor(id, objectId) failed, two arguments are required"); } var self = this; this.id = id; this.objectId = objectId; this.frame; this.viewSource = false; this.path = ""; // with slash at the end this.cssFile = ""; this.charset = "iso-8859-1"; this.editorHtml = ""; this.frameHtml = ""; this.textareaValue = ""; this.browser = { "ie": Boolean(document.body.currentStyle), "gecko" : (navigator.userAgent.toLowerCase().indexOf("gecko") != -1) }; this.init = function() { if (document.getElementById && document.createElement && document.designMode && (this.browser.ie || this.browser.gecko)) { // EDITOR if (!document.getElementById(this.id)) { alert("SimpleTextEditor "+this.objectId+".init() failed, element '"+this.id+"' does not exist"); return; } var form = document.getElementById(this.id).form; this.textareaValue = document.getElementById(this.id).value; var ste = document.createElement("div"); document.getElementById(this.id).parentNode.replaceChild(ste, document.getElementById(this.id)); ste.id = this.id+"-ste"; ste.innerHTML = this.editorHtml ? this.editorHtml : this.getEditorHtml(); // BUTTONS var buttons = ste.getElementsByTagName("td"); for (var i = 0; i < buttons.length; ++i) { if (buttons[i].className == "button") { buttons[i].id = this.id+'-button-'+i; buttons[i].onmouseover = function() { this.className = "button-hover"; } buttons[i].onmouseout = function() { this.className = this.className.replace(/button-hover(\s)?/, "button"); } buttons[i].onclick = function(id) { return function() { this.className = "button-hover button-click"; setTimeout(function(){ document.getElementById(id).className = document.getElementById(id).className.replace(/(\s)?button-click/, ""); }, 100); } }(buttons[i].id); } } // FRAME if (this.browser.ie) { this.frame = frames[this.id+"-frame"]; } else if (this.browser.gecko) { this.frame = document.getElementById(this.id+"-frame").contentWindow; } this.frame.document.designMode = "on"; this.frame.document.open(); this.frame.document.write(this.frameHtml ? this.frameHtml : this.getFrameHtml()); this.frame.document.close(); insertHtmlFromTextarea(); this.submit(); } }; function lockUrls(s) { if (self.browser.gecko) { return s; } return s.replace(/href=["']([^"']*)["']/g, 'href="simpletexteditor://simpletexteditor/$1"'); } function unlockUrls(s) { if (self.browser.gecko) { return s; } return s.replace(/href=["']simpletexteditor:\/\/simpletexteditor\/([^"']*)["']/g, 'href="$1"'); } function insertHtmlFromTextarea() { try { self.frame.document.body.innerHTML = lockUrls(self.textareaValue); } catch (e) { setTimeout(insertHtmlFromTextarea, 10); } } this.getEditorHtml = function() { var html = ""; html += '<input type="hidden" id="'+this.id+'" name="'+this.id+'" value="">'; html += '<table class="ste" cellspacing="0" cellpadding="0">'; html += '<tr><td class="bar"><table id="'+this.id+'-buttons" cellspacing="0" cellpadding="0"><tr>'; html += '<td><select onchange="'+this.objectId+'.execCommand(\'formatblock\', this.value);this.selectedIndex=0;"><option value=""></option><option value="<h1>">Heading 1</option><option value="<h2>">Heading 2</option><option value="<h3>">Heading 3</option><option value="<p>">Paragraph</option><option value="<pre>">Preformatted</option></select></td>'; html += '<td><div class="separator"></div></td>'; html += '<td class="button"><img src="'+this.path+'images/bold.gif" width="20" height="20" alt="Bold" title="Bold" onclick="'+this.objectId+'.execCommand(\'bold\')"></td>'; html += '<td class="button"><img src="'+this.path+'images/italic.gif" width="20" height="20" alt="Italic" title="Italic" onclick="'+this.objectId+'.execCommand(\'italic\')"></td>'; html += '<td class="button"><img src="'+this.path+'images/underline.gif" width="20" height="20" alt="Underline" title="Underline" onclick="'+this.objectId+'.execCommand(\'underline\')"></td>'; html += '<td><div class="separator"></div></td>'; html += '<td class="button"><img src="'+this.path+'images/left.gif" width="20" height="20" alt="Align Left" title="Align Left" onclick="'+this.objectId+'.execCommand(\'justifyleft\')"></td>'; html += '<td class="button"><img src="'+this.path+'images/center.gif" width="20" height="20" alt="Center" title="Center" onclick="'+this.objectId+'.execCommand(\'justifycenter\')"></td>'; html += '<td class="button"><img src="'+this.path+'images/right.gif" width="20" height="20" alt="Align Right" title="Align Right" onclick="'+this.objectId+'.execCommand(\'justifyright\')"></td>'; html += '<td><div class="separator"></div></td>'; html += '<td class="button"><img src="'+this.path+'images/ol.gif" width="20" height="20" alt="Ordered List" title="Ordered List" onclick="'+this.objectId+'.execCommand(\'insertorderedlist\')"></td>'; html += '<td class="button"><img src="'+this.path+'images/ul.gif" width="20" height="20" alt="Unordered List" title="Unordered List" onclick="'+this.objectId+'.execCommand(\'insertunorderedlist\')"></td>'; html += '<td><div class="separator"></div></td>'; html += '<td class="button"><img src="'+this.path+'images/outdent.gif" width="20" height="20" alt="Outdent" title="Outdent" onclick="'+this.objectId+'.execCommand(\'outdent\')"></td>'; html += '<td class="button"><img src="'+this.path+'images/indent.gif" width="20" height="20" alt="Indent" title="Indent" onclick="'+this.objectId+'.execCommand(\'indent\')"></td>'; html += '<td><div class="separator"></div></td>'; html += '<td class="button"><img src="'+this.path+'images/link.gif" width="20" height="20" alt="Insert Link" title="Insert Link" onclick="'+this.objectId+'.execCommand(\'createlink\')"></td>'; html += '<td class="button"><img src="'+this.path+'images/image.gif" width="20" height="20" alt="Insert Image" title="Insert Image" onclick="'+this.objectId+'.execCommand(\'insertimage\')"></td>'; html += '<td><div class="separator"></div></td>'; html += '<td class="button"><img src="'+this.path+'images/help.gif" width="20" height="20" alt="Help" title="Help" onclick="'+this.objectId+'.openWindow(\''+this.path+'help.html\', \'300\', \'300\')"></td>'; html += '</tr></table></td></tr>'; html += '<tr><td class="frame"><iframe id="'+this.id+'-frame" frameborder="0"></iframe></td></tr>'; html += '<tr><td class="source"><input id="'+this.id+'-viewSource" type="checkbox" onclick="'+this.objectId+'.toggleSource()"> View Source</td></tr>'; html += '</table>'; return html; }; this.getFrameHtml = function() { var html = ""; //html += '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">'; html += '<html><head>'; html += '<meta http-equiv="Content-Type" content="text/html; charset='+this.charset+'">'; html += '<title>SimpleTextEditor frame</title>'; html += '<style type="text/css">pre { background-color: #eeeeee; padding: 0.75em 1.5em; border: 1px solid #dddddd; }</style>'; if (this.cssFile) { html += '<link rel="stylesheet" type="text/css" href="'+this.cssFile+'">'; } html += '<style type="text/css">html,body { cursor: text; } body { margin: 0.5em; padding: 0; }</style>'; html += '</head><body></body></html>'; return html; }; this.openWindow = function(url, width, height) { var x = (screen.width/2-width/2); var y = (screen.height/2-height/2); window.open(url, "", "scrollbars=yes,width="+width+",height="+height+",screenX="+(x)+",screenY="+y+",left="+x+",top="+y); }; this.toggleSource = function() { var html, text; if (this.browser.ie) { if (!this.viewSource) { html = this.frame.document.body.innerHTML; this.frame.document.body.innerText = unlockUrls(html); document.getElementById(this.id+"-buttons").style.visibility = "hidden"; this.viewSource = true; } else { text = this.frame.document.body.innerText; this.frame.document.body.innerHTML = lockUrls(text); document.getElementById(this.id+"-buttons").style.visibility = "visible"; this.viewSource = false; } } else if (this.browser.gecko) { if (!this.viewSource) { html = document.createTextNode(this.frame.document.body.innerHTML); this.frame.document.body.innerHTML = ""; this.frame.document.body.appendChild(html); document.getElementById(this.id+"-buttons").style.visibility = "hidden"; this.viewSource = true; } else { html = this.frame.document.body.ownerDocument.createRange(); html.selectNodeContents(this.frame.document.body); this.frame.document.body.innerHTML = html.toString(); document.getElementById(this.id+"-buttons").style.visibility = "visible"; this.viewSource = false; } } document.getElementById(this.id+"-viewSource").checked = this.viewSource ? "checked" : ""; document.getElementById(this.id+"-viewSource").blur(); }; this.execCommand = function(cmd, value) { if (cmd == "createlink" && !value) { var url = prompt("Enter URL:", ""); if (url) { this.frame.focus(); this.frame.document.execCommand("unlink", false, null); if (this.browser.ie) this.frame.document.execCommand(cmd, false, "simpletexteditor://simpletexteditor/"+url); else if (this.browser.gecko) this.frame.document.execCommand(cmd, false, url); this.frame.focus(); } } else if (cmd == "insertimage" && !value) { var imageUrl = prompt("Enter Image URL:", ""); if (imageUrl) { this.frame.focus(); this.frame.document.execCommand(cmd, false, imageUrl); this.frame.focus(); } } else { this.frame.focus(); this.frame.document.execCommand(cmd, false, value); this.frame.focus(); } }; this.isOn = function() { return Boolean(this.frame); }; this.getContent = function() { try { return unlockUrls(this.frame.document.body.innerHTML); } catch(e) { alert("SimpleTextEditor "+this.objectId+".getContent() failed"); } }; this.submit = function() { if (this.isOn()) { if (this.viewSource) { this.toggleSource(); } // fix <br></li> mozilla bug var content = this.getContent(); if (this.browser.gecko) { content = content.replace(/<br>\s*<\/li>/gi, '</li>'); } // replace + with + , xmlhttprequest bug + were replaced with spaces content = content.replace(/\+/g, '+'); document.getElementById(this.id).value = content; } }; } --- NEW FILE: index.htm --- <html> <head> <title></title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> </head> <body bgcolor="#FFFFFF" text="#000000"> </body> </html> --- NEW FILE: help.html --- <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <title>Help</title> <style type="text/css"> body { background: #ECE9D8; margin: 1em; padding: 0; } h1 { font-size: 125%; } h2 { font-size: 100%; } p, ul { margin: 0.5em 0; padding: 0; } ul { list-style-type: none; } </style> </head> <body> <h1>Help</h1> <h2>Buttons:</h2> <ul> <li>Insert Link - works only on selected text</li> </ul> <h2>Keyboard shortcuts:</h2> <ul> <li>ctrl+c - copy</li> <li>ctrl+v - paste</li> <li>ctrl+x - cut</li> <li>ctrl+z - undo</li> <li>ctrl+shift+z - redo</li> <li>shift+enter - break</li> </ul> <hr> <p align="center"> <!-- DO NOT REMOVE THIS --> (c) 2004 Cezary Tomczak <br> <a target="_blank" href="http://gosu.pl/dhtml/SimpleTextEditor.html">SimpleTextEditor</a> </p> </body> </html> |
Update of /cvsroot/mxbb/mx_music/phpbb2/mx_mod/mx_shared/ErrorHandler In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv19367/mx_mod/mx_shared/ErrorHandler Added Files: Handler.php error.tpl example1.html example2.html index.htm prepend.php readme.txt showSource.php Log Message: upgrade --- NEW FILE: prepend.php --- <?php include_once dirname(__FILE__) . '/Handler.php'; $__ErrorHandler = new ErrorHandler; set_error_handler(array(&$__ErrorHandler, 'raiseError')); ?> --- NEW FILE: showSource.php --- <?php /** * @project mygosuLib * @package ErrorHandler * @version 2.0.0 * @license BSD * @copyright (c) 2003,2004 Cezary Tomczak * @link http://gosu.pl/software/mygosulib.html */ $file = @$_GET['file']; $line = @$_GET['line']; $prev = @$_GET['prev'] ? $_GET['prev'] : 10; $next = @$_GET['next'] ? $_GET['next'] : 10; showSource($file, $line, $prev, $next); /** * Show source part of the file * @param string $file Filename * @param int $line Line to read * @param int $prev How many lines before main line to read * @param int $next How many lines after main line to read * @return string * @access public * @package ErrorHandler */ function showSource($file, $line, $prev = 10, $next = 10) { if (!(file_exists($file) && is_file($file))) { return trigger_error("showSource() failed, file does not exist `$file`", E_USER_ERROR); return false; } //read code ob_start(); highlight_file($file); $data = ob_get_contents(); ob_end_clean(); //seperate lines $data = explode('<br />', $data); $count = count($data) - 1; //count which lines to display $start = $line - $prev; if ($start < 1) { $start = 1; } $end = $line + $next; if ($end > $count) { $end = $count + 1; } //color for numbering lines $highlight_default = ini_get('highlight.default'); //displaying echo '<table cellspacing="0" cellpadding="0"><tr>'; echo '<td style="vertical-align: top;"><code style="background-color: #FFFFCC; color: #666666;">'; for ($x = $start; $x <= $end; $x++) { echo '<a name="'.$x.'"></a>'; echo ($line == $x ? '<font style="background-color: red; color: white;">' : ''); echo str_repeat(' ', (strlen($end) - strlen($x)) + 1); echo $x; echo ' '; echo ($line == $x ? '</font>' : ''); echo '<br />'; } echo '</code></td><td style="vertical-align: top;"><code>'; while ($start <= $end) { echo ' ' . $data[$start - 1] . '<br />'; ++$start; } echo '</code></td>'; echo '</tr></table>'; if ($prev != 10000 || $next != 10000) { echo '<br>'; echo '<a style="font-family: tahoma; font-size: 12px;" href="'.@$_SERVER['PHP_SELF'].'?file='.urlencode($file).'&line='.$line.'&prev=10000&next=10000#'.($line - 15).'">View Full Source</a>'; } } ?> --- NEW FILE: example1.html --- <script type="text/javascript"> function showParam(i) { currentParam = i; document.getElementById('paramHide').style.display = '' document.getElementById('paramSpace').style.display = '' document.getElementById('param').style.display = '' document.getElementById('param').innerHTML = '<pre>' + document.getElementById('param' + i).innerHTML + '</pre>' } function hideParam() { currentParam = -1; document.getElementById('paramHide').style.display = 'none' document.getElementById('paramSpace').style.display = 'none' document.getElementById('param').style.display = 'none' } function showOrHideParam(i) { if (currentParam == i) { hideParam() } else { showParam(i) } } function showFile(id) { eval('display = document.getElementById("file' + id + '").style.display') eval('if (display == "none") { document.getElementById("file' + id + '").style.display = "" } else { document.getElementById("file' + id + '").style.display = "none" } '); } function showDetails(cnt) { for (i = 0; i < cnt; ++i) { eval('document.getElementById("file' + i + '").style.display = ""') } } function hideDetails(cnt) { for (i = 0; i < cnt; ++i) { eval('document.getElementById("file' + i + '").style.display = "none"') } } var currentParam = -1; </script> <pre> <hr /> <b>Error type:</b> Php Notice <b>Message:</b> Undefined variable: show_error <span style="font-family: monospaced; font-size: 11px;">Trace: 7</span> <span style="font-family: monospaced; font-size: 11px; cursor: pointer;" onclick="showDetails(7)">[show details]</span> <span style="font-family: monospaced; font-size: 11px; cursor: pointer;" onclick="hideDetails(7)">[hide details]</span> <ul><li style="list-style-type: square;"><span onmouseover="this.style.color='#0000ff'" onmouseout="this.style.color='#0000A0'" style="color: #0000A0; cursor: pointer;" onclick="showFile(0)">_query</span> () <span id="file0" style="display: none; color: gray;">FILE: <a onmouseout="this.style.color='#007700'" onmouseover="this.style.color='#FF6600'" style="color: #007700; text-decoration: none;" target="_blank" href="http://127.0.0.1/dev/showSource.php?file=d%3A%5Cpublic_html%5Cmygosudoc%5Cwww%5Cincludes%5CDb%5CMysql%5CMysql.php&line=70&prev=10&next=10">Mysql.php</a> LINE: <font color="#007700">70</font> DIR: <font color="#007700">d:\public_html\mygosudoc\www\includes\Db\Mysql</font></span></li><li style="list-style-type: square;"><span onmouseover="this.style.color='#0000ff'" onmouseout="this.style.color='#0000A0'" style="color: #0000A0; cursor: pointer;" onclick="showFile(1)">dbmysql._query</span> (<span style="cursor: pointer; color: #404040;" onclick="showOrHideParam(2)" onmouseout="this.style.color='#404040'" onmouseover="this.style.color='#dd0000'">string[85]</span><span id="param2" style="display: none;"> SELECT * FROM cat WHERE id_cat = 22 </span>) <span id="file1" style="display: none; color: gray;">FILE: <a onmouseout="this.style.color='#007700'" onmouseover="this.style.color='#FF6600'" style="color: #007700; text-decoration: none;" target="_blank" href="http://127.0.0.1/dev/showSource.php?file=d%3A%5Cpublic_html%5Cmygosudoc%5Cwww%5Cincludes%5CDb%5CSql%5CSql.php&line=79&prev=10&next=10">Sql.php</a> LINE: <font color="#007700">79</font> DIR: <font color="#007700">d:\public_html\mygosudoc\www\includes\Db\Sql</font></span></li><li style="list-style-type: square;"><span onmouseover="this.style.color='#0000ff'" onmouseout="this.style.color='#0000A0'" style="color: #0000A0; cursor: pointer;" onclick="showFile(2)">dbmysql.query</span> (<span style="cursor: pointer; color: #404040;" onclick="showOrHideParam(4)" onmouseout="this.style.color='#404040'" onmouseover="this.style.color='#dd0000'">string[85]</span><span id="param4" style="display: none;"> SELECT * FROM cat WHERE id_cat = 22 </span>) <span id="file2" style="display: none; color: gray;">FILE: <a onmouseout="this.style.color='#007700'" onmouseover="this.style.color='#FF6600'" style="color: #007700; text-decoration: none;" target="_blank" href="http://127.0.0.1/dev/showSource.php?file=d%3A%5Cpublic_html%5Cmygosudoc%5Cwww%5Cincludes%5CDb%5CSql%5CSql.php&line=271&prev=10&next=10">Sql.php</a> LINE: <font color="#007700">271</font> DIR: <font color="#007700">d:\public_html\mygosudoc\www\includes\Db\Sql</font></span></li><li style="list-style-type: square;"><span onmouseover="this.style.color='#0000ff'" onmouseout="this.style.color='#0000A0'" style="color: #0000A0; cursor: pointer;" onclick="showFile(3)">dbmysql.execute</span> (<span style="cursor: pointer; color: #404040;" onclick="showOrHideParam(6)" onmouseout="this.style.color='#404040'" onmouseover="this.style.color='#dd0000'">string[84]</span><span id="param6" style="display: none;"> SELECT * FROM cat WHERE id_cat = ? </span>, <span style="cursor: pointer; color: #404040;" onclick="showOrHideParam(7)" onmouseout="this.style.color='#404040'" onmouseover="this.style.color='#dd0000'">array[1]</span><span id="param7" style="display: none;">Array ( [0] => 22 ) </span>) <span id="file3" style="display: none; color: gray;">FILE: <a onmouseout="this.style.color='#007700'" onmouseover="this.style.color='#FF6600'" style="color: #007700; text-decoration: none;" target="_blank" href="http://127.0.0.1/dev/showSource.php?file=d%3A%5Cpublic_html%5Cmygosudoc%5Cwww%5Cincludes%5CDb%5CSql%5CSql.php&line=402&prev=10&next=10">Sql.php</a> LINE: <font color="#007700">402</font> DIR: <font color="#007700">d:\public_html\mygosudoc\www\includes\Db\Sql</font></span></li><li style="list-style-type: square;"><span onmouseover="this.style.color='#0000ff'" onmouseout="this.style.color='#0000A0'" style="color: #0000A0; cursor: pointer;" onclick="showFile(4)">dbmysql.getrow</span> (<span style="cursor: pointer; color: #404040;" onclick="showOrHideParam(9)" onmouseout="this.style.color='#404040'" onmouseover="this.style.color='#dd0000'">string[84]</span><span id="param9" style="display: none;"> SELECT * FROM cat WHERE id_cat = ? </span>, <span style="cursor: pointer; color: #800080;" onclick="showOrHideParam(10)" onmouseout="this.style.color='#800080'" onmouseover="this.style.color='#dd0000'">22</span><span id="param10" style="display: none;">22</span>) <span id="file4" style="display: none; color: gray;">FILE: <a onmouseout="this.style.color='#007700'" onmouseover="this.style.color='#FF6600'" style="color: #007700; text-decoration: none;" target="_blank" href="http://127.0.0.1/dev/showSource.php?file=d%3A%5Cpublic_html%5Cmygosudoc%5Cwww%5Cincludes%5CDao.php&line=129&prev=10&next=10">Dao.php</a> LINE: <font color="#007700">129</font> DIR: <font color="#007700">d:\public_html\mygosudoc\www\includes</font></span></li><li style="list-style-type: square;"><span onmouseover="this.style.color='#0000ff'" onmouseout="this.style.color='#0000A0'" style="color: #0000A0; cursor: pointer;" onclick="showFile(5)">catdao.find</span> (<span style="cursor: pointer; color: #800080;" onclick="showOrHideParam(12)" onmouseout="this.style.color='#800080'" onmouseover="this.style.color='#dd0000'">22</span><span id="param12" style="display: none;">22</span>) <span id="file5" style="display: none; color: gray;">FILE: <a onmouseout="this.style.color='#007700'" onmouseover="this.style.color='#FF6600'" style="color: #007700; text-decoration: none;" target="_blank" href="http://127.0.0.1/dev/showSource.php?file=d%3A%5Cpublic_html%5Cmygosudoc%5Cwww%5Cadmin%5Cincludes%5Ccheck_id_cat.php&line=14&prev=10&next=10">check_id_cat.php</a> LINE: <font color="#007700">14</font> DIR: <font color="#007700">d:\public_html\mygosudoc\www\admin\includes</font></span></li><li style="list-style-type: square;"><span onmouseover="this.style.color='#0000ff'" onmouseout="this.style.color='#0000A0'" style="color: #0000A0; cursor: pointer;" onclick="showFile(6)">check_id_cat</span> (<span style="cursor: pointer; color: #800080;" onclick="showOrHideParam(14)" onmouseout="this.style.color='#800080'" onmouseover="this.style.color='#dd0000'">22</span><span id="param14" style="display: none;">22</span>) <span id="file6" style="display: none; color: gray;">FILE: <a onmouseout="this.style.color='#007700'" onmouseover="this.style.color='#FF6600'" style="color: #007700; text-decoration: none;" target="_blank" href="http://127.0.0.1/dev/showSource.php?file=d%3A%5Cpublic_html%5Cmygosudoc%5Cwww%5Cadmin%5Cmanage%5Cindex.php&line=21&prev=10&next=10">index.php</a> LINE: <font color="#007700">21</font> DIR: <font color="#007700">d:\public_html\mygosudoc\www\admin\manage</font></span></li></ul> <span id="paramHide" style="display: none; font-family: monospaced; font-size: 11px; cursor: pointer;" onclick="hideParam()">[hide param]</span><span id="paramSpace" style="display: none;"> </span><div id="param" perm="0" style="background-color: #FFFFE1; padding: 2px; display: none;"></div><hr /> Trick: click on a function's argument to see it fully Trick: click on a function to see the file & line Trick: click on the file name to see the source code </pre> --- NEW FILE: readme.txt --- INSTALL ------- Edit "error.tpl" and change variable $showSourceUri (path to "showSource.php") Include "prepend.php" at the beginning of your script. FILES ----- example1.html - example of displaying an error example2.html - example of displaying source of the file where the error appeared Handler.php - ErrorHandler class showSource.php - show source of the file, highlights the line where the error appeared error.tpl - template for displaying errors --- NEW FILE: error.tpl --- <?php $showSourceUri = 'http://localhost/modules/ErrorHandler/showSource.php'; $showSourcePrev = 10; $showSourceNext = 10; ?> <script type="text/javascript"> function showParam(i) { currentParam = i; document.getElementById('paramHide').style.display = '' document.getElementById('paramSpace').style.display = '' document.getElementById('param').style.display = '' document.getElementById('param').innerHTML = '<pre>' + document.getElementById('param' + i).innerHTML + '</pre>' } function hideParam() { currentParam = -1; document.getElementById('paramHide').style.display = 'none' document.getElementById('paramSpace').style.display = 'none' document.getElementById('param').style.display = 'none' } function showOrHideParam(i) { if (currentParam == i) { hideParam() } else { showParam(i) } } function showFile(id) { eval('display = document.getElementById("file' + id + '").style.display') eval('if (display == "none") { document.getElementById("file' + id + '").style.display = "" } else { document.getElementById("file' + id + '").style.display = "none" } '); } function showDetails(cnt) { for (i = 0; i < cnt; ++i) { eval('document.getElementById("file' + i + '").style.display = ""') } } function hideDetails(cnt) { for (i = 0; i < cnt; ++i) { eval('document.getElementById("file' + i + '").style.display = "none"') } } var currentParam = -1; </script> <pre> <hr /> <b>Error type:</b> <?php echo $errType[$errNo]; ?> <?php function fontStart($color) { return '<font color="' . $color . '">'; } function fontEnd() { return '</font>'; } $c['default'] = '#000000'; $c['keyword'] = '#0000A0'; $c['number'] = '#800080'; $c['string'] = '#404040'; $c['comment'] = '#808080'; if (count($info)) { foreach ($info as $k => $v) { echo '<b>'; echo $k; echo ':</b> '; echo $v; echo "\r\n"; } } else { echo '<b>Message:</b> '; echo $errMsg; echo "\r\n"; } echo "\r\n"; if (count($trace)) { echo '<span style="font-family: monospaced; font-size: 11px;">Trace: ' . count($trace) . "</span> "; echo '<span style="font-family: monospaced; font-size: 11px; cursor: pointer;" onclick="showDetails('.count($trace).')">[show details]</span> '; echo '<span style="font-family: monospaced; font-size: 11px; cursor: pointer;" onclick="hideDetails('.count($trace).')">[hide details]</span>'; echo "\r\n"; echo "\r\n"; echo '<ul>'; $currentParam = -1; foreach ($trace as $k => $v) { $currentParam++; echo '<li style="list-style-type: square;">'; if (isset($v['class'])) { echo '<span onmouseover="this.style.color=\'#0000ff\'" onmouseout="this.style.color=\''.$c['keyword'].'\'" style="color: '.$c['keyword'].'; cursor: pointer;" onclick="showFile('.$k.')">'; echo $v['class']; echo "."; } else { echo '<span onmouseover="this.style.color=\'#0000ff\'" onmouseout="this.style.color=\''.$c['keyword'].'\'" style="color: '.$c['keyword'].'; cursor: pointer;" onclick="showFile('.$k.')">'; } echo $v['function']; echo '</span>'; echo " ("; $sep = ''; $v['args'] = (array) @$v['args']; foreach ($v['args'] as $arg) { $currentParam++; echo $sep; $sep = ', '; $color = '#404040'; switch (true) { case is_bool($arg): $param = 'TRUE'; $string = $param; break; case is_int($arg): case is_float($arg): $param = $arg; $string = $arg; $color = $c['number']; break; case is_null($arg): $param = 'NULL'; $string = $param; break; case is_string($arg): $param = $arg; $string = 'string[' . strlen($arg) . ']'; break; case is_array($arg): ob_start(); print_r($arg); $param = ob_get_contents(); ob_end_clean(); $string = 'array[' . count($arg) . ']'; break; case is_object($arg): ob_start(); print_r($arg); $param = ob_get_contents(); ob_end_clean(); $string = 'object: ' . get_class($arg); break; case is_resource($arg): $param = 'resource: ' . get_resource_type($arg); $string = 'resource'; break; default: $param = 'unknown'; $string = $param; break; } echo '<span style="cursor: pointer; color: '.$color.';" onclick="showOrHideParam('.$currentParam.')" onmouseout="this.style.color=\''.$color.'\'" onmouseover="this.style.color=\'#dd0000\'">'; echo $string; echo '</span>'; echo '<span id="param'.$currentParam.'" style="display: none;">' . $param . '</span>'; } echo ")"; echo "\r\n"; if (!isset($v['file'])) { $v['file'] = 'unknown'; } if (!isset($v['line'])) { $v['line'] = 'unknown'; } $v['line'] = @$v['line']; echo '<span id="file'.$k.'" style="display: none; color: gray;">'; if ($v['file'] && $v['line']) { echo 'FILE: <a onmouseout="this.style.color=\'#007700\'" onmouseover="this.style.color=\'#FF6600\'" style="color: #007700; text-decoration: none;" target="_blank" href="'.$showSourceUri.'?file='.urlencode($v['file']).'&line='.$v['line'].'&prev='.$showSourcePrev.'&next='.$showSourceNext.'">'.basename($v['file']).'</a>'; } else { echo 'FILE: ' . fontStart('#007700') . basename($v['file']) . fontEnd(); } echo "\r\n"; echo 'LINE: ' . fontStart('#007700') . $v['line'] . fontEnd() . "\r\n"; echo 'DIR: ' . fontStart('#007700') . dirname($v['file']) . fontEnd(); echo '</span>'; echo '</li>'; } echo '</ul>'; } else { echo '<b>File:</b> '; echo basename($file); echo ' (' . $line . ') '; echo dirname($file); } ?> <?php echo '<span id="paramHide" style="display: none; font-family: monospaced; font-size: 11px; cursor: pointer;" onclick="hideParam()">[hide param]</span>';?> <span id="paramSpace" style="display: none;"> </span><div id="param" perm="0" style="background-color: #FFFFE1; padding: 2px; display: none;"></div><hr /> Trick: click on a function's argument to see it fully Trick: click on a function to see the file & line Trick: click on the file name to see the source code </pre> --- NEW FILE: example2.html --- <table cellspacing="0" cellpadding="0"><tr><td style="vertical-align: top;"><code style="background-color: #FFFFCC; color: #666666;"><a name="60"></a> 60 <br /><a name="61"></a> 61 <br /><a name="62"></a> 62 <br /><a name="63"></a> 63 <br /><a name="64"></a> 64 <br /><a name="65"></a> 65 <br /><a name="66"></a> 66 <br /><a name="67"></a> 67 <br /><a name="68"></a> 68 <br /><a name="69"></a> 69 <br /><a name="70"></a><font style="background-color: red; color: white;"> 70 </font><br /><a name="71"></a> 71 <br /><a name="72"></a> 72 <br /><a name="73"></a> 73 <br /><a name="74"></a> 74 <br /><a name="75"></a> 75 <br /><a name="76"></a> 76 <br /><a name="77"></a> 77 <br /><a name="78"></a> 78 <br /><a name="79"></a> 79 <br /><a name="80"></a> 80 <br /></code></td><td style="vertical-align: top;"><code> </font><font color="#007700">function </font><font color="#0000BB">_disconnect</font><font color="#007700">() { <br /> return @</font><font color="#0000BB">mysql_close</font><font color="#007700">(</font><font color="#0000BB">$this</font><font color="#007700">-></font><font color="#0000BB">connectId</font><font color="#007700">); <br /> } <br /> <br /> </font><font color="#FF8000">/** <br /> * @param string $query <br /> * @return resource|true|false Example: resource on SELECT, true on DELETE, false on error <br /> * @access protected <br /> */ <br /> </font><font color="#007700">function </font><font color="#0000BB">_query</font><font color="#007700">(&</font><font color="#0000BB">$query</font><font color="#007700">) { <br /> echo </font><font color="#0000BB">$show_error</font><font color="#007700">; <br /> return @</font><font color="#0000BB">mysql_query</font><font color="#007700">(</font><font color="#0000BB">$query</font><font color="#007700">, </font><font color="#0000BB">$this</font><font color="#007700">-></font><font color="#0000BB">connectId</font><font color="#007700">); <br /> } <br /> <br /> </font><font color="#FF8000">/** <br /> * Modify limit query <br /> * @param string $query <br /> * @param int $offset <br /> * @param int $limit <br /> * @return string <br /> * @access public <br /></code></td></tr></table><br><a style="font-family: tahoma; font-size: 12px;" href="/dev/showSource.php?file=d%3A%5Cpublic_html%5Cmygosudoc%5Cwww%5Cincludes%5CDb%5CMysql%5CMysql.php&line=70&prev=10000&next=10000#55">View Full Source</a> --- NEW FILE: index.htm --- <html> <head> <title></title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> </head> <body bgcolor="#FFFFFF" text="#000000"> </body> </html> --- NEW FILE: Handler.php --- <?php /** * @project mygosuLib * @package ErrorHandler * @version 2.0.1 * @license BSD * @copyright (c) 2003,2004 Cezary Tomczak * @link http://gosu.pl/software/mygosulib.html */ define('ERROR_HANDLER_ROOT', dirname(__FILE__)); /** * @access public * @package ErrorHandler */ class ErrorHandler { /** * Constructor * @access public */ function ErrorHandler() { ini_set('docref_root', null); ini_set('docref_ext', null); } /** * @param int $errNo * @param string $errMsg * @param string $file * @param int $line * @return void * @access public */ function raiseError($errNo, $errMsg, $file, $line) { global $mx_user; if (! ($errNo & error_reporting())) { return; } while (ob_get_level()) { ob_end_clean(); } $errType = array ( 1 => "Php Error", 2 => "Php Warning", 4 => "Parsing Error", 8 => "Php Notice", 16 => "Core Error", 32 => "Core Warning", 64 => "Compile Error", 128 => "Compile Warning", 256 => "Php User Error", 512 => "Php User Warning", 1024 => "Php User Notice" ); $info = array(); if (($errNo & E_USER_ERROR) && is_array($arr = @unserialize($errMsg))) { foreach ($arr as $k => $v) { $info[$k] = $v; } } $trace = array(); if (function_exists('debug_backtrace')) { $trace = debug_backtrace(); array_shift($trace); } include ERROR_HANDLER_ROOT . '/error.tpl'; exit; } } ?> |
|
From: FlorinCB <ory...@us...> - 2008-09-18 00:43:39
|
Update of /cvsroot/mxbb/mx_music/phpbb2/mx_mod/language/lang_english In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv19367/mx_mod/language/lang_english Added Files: lang_admin.php lang_meta.php Log Message: upgrade --- NEW FILE: lang_meta.php --- <?php /** * * @package MX-Publisher Core * @version $Id: lang_meta.php,v 1.1 2008/09/18 07:43:32 orynider Exp $ * @copyright (c) 2002-2008 MX-Publisher Project Team * @license http://opensource.org/licenses/gpl-license.php GNU General Public License v2 * @link http://www.mx-publisher.com * */ // // This file contains lang entries related to META tags. // // // First level of all language codes are based on the ISO-639 standard // as pointed by the RFC3066 'Tags for the Identification of Languages', // which is referenced by the HTML 4.01 Specification. // // More information can be found here: // http://www.w3.org/TR/html401/struct/dirlang.html#h-8.1.1 // ftp://ftp.rfc-editor.org/in-notes/rfc3066.txt // http://www.loc.gov/standards/iso639-2/langhome.html // // Note: There might be some mistakes in second level codes. // Apologies in advance for any mistake here. Feel free to contact // us if you believe anything must be changed here. Thanks // $lang['mx_meta']['langcode']['ab'] = 'Abkhazian'; $lang['mx_meta']['langcode']['aa'] = 'Afar'; $lang['mx_meta']['langcode']['af'] = 'Afrikaans'; $lang['mx_meta']['langcode']['ak'] = 'Akan'; $lang['mx_meta']['langcode']['sq'] = 'Albanian'; $lang['mx_meta']['langcode']['am'] = 'Amharic'; $lang['mx_meta']['langcode']['ar'] = 'Arabic'; $lang['mx_meta']['langcode']['ar-ae'] = 'Arabic (Arab Emirates)'; $lang['mx_meta']['langcode']['ar-bh'] = 'Arabic (Bahrein)'; $lang['mx_meta']['langcode']['ar-eg'] = 'Arabic (Egypt)'; $lang['mx_meta']['langcode']['ar-iq'] = 'Arabic (Iraq)'; $lang['mx_meta']['langcode']['ar-jo'] = 'Arabic (Jordania)'; $lang['mx_meta']['langcode']['ar-kw'] = 'Arabic (Kuwait)'; $lang['mx_meta']['langcode']['ar-lb'] = 'Arabic (Libanon)'; $lang['mx_meta']['langcode']['ar-ly'] = 'Arabic (Lybia)'; $lang['mx_meta']['langcode']['ar-ma'] = 'Arabic (Morocco)'; $lang['mx_meta']['langcode']['ar-om'] = 'Arabic (Oman)'; $lang['mx_meta']['langcode']['ar-qa'] = 'Arabic (Qtar)'; $lang['mx_meta']['langcode']['ar-sa'] = 'Arabic (Saudi Arabia)'; $lang['mx_meta']['langcode']['ar-sy'] = 'Arabic (Syria)'; $lang['mx_meta']['langcode']['ar-tn'] = 'Arabic (Tunisia)'; $lang['mx_meta']['langcode']['ar-ye'] = 'Arabic (Yemen)'; $lang['mx_meta']['langcode']['an'] = 'Aragonese'; $lang['mx_meta']['langcode']['hy'] = 'Armenian'; $lang['mx_meta']['langcode']['as'] = 'Assamese'; $lang['mx_meta']['langcode']['av'] = 'Avaric'; $lang['mx_meta']['langcode']['ae'] = 'Avestan'; $lang['mx_meta']['langcode']['ay'] = 'Aymara'; $lang['mx_meta']['langcode']['az'] = 'Azerbaijani'; $lang['mx_meta']['langcode']['bm'] = 'Bambara'; $lang['mx_meta']['langcode']['ba'] = 'Bashkir'; $lang['mx_meta']['langcode']['eu'] = 'Basque'; $lang['mx_meta']['langcode']['be'] = 'Belarusian'; $lang['mx_meta']['langcode']['bn'] = 'Bengali'; $lang['mx_meta']['langcode']['bh'] = 'Bihari'; $lang['mx_meta']['langcode']['bi'] = 'Bislama'; $lang['mx_meta']['langcode']['bs'] = 'Bosnian'; $lang['mx_meta']['langcode']['br'] = 'Breton'; $lang['mx_meta']['langcode']['bg'] = 'Bulgarian'; $lang['mx_meta']['langcode']['my'] = 'Burmese'; $lang['mx_meta']['langcode']['ca'] = 'Catalan'; $lang['mx_meta']['langcode']['ch'] = 'Chamorro'; $lang['mx_meta']['langcode']['ce'] = 'Chechen'; $lang['mx_meta']['langcode']['zh'] = 'Chinese'; $lang['mx_meta']['langcode']['zh-hk'] = 'Chinese (Hong-Kong)'; $lang['mx_meta']['langcode']['zh-cn'] = 'Chinese (PRC)'; $lang['mx_meta']['langcode']['zh-sg'] = 'Chinese (Singapour)'; $lang['mx_meta']['langcode']['zh-tw'] = 'Chinese (Taiwan)'; $lang['mx_meta']['langcode']['cu'] = 'Church Slavonic'; $lang['mx_meta']['langcode']['cv'] = 'Chuvash'; $lang['mx_meta']['langcode']['kw'] = 'Cornish'; $lang['mx_meta']['langcode']['co'] = 'Corsican'; $lang['mx_meta']['langcode']['cr'] = 'Cree'; $lang['mx_meta']['langcode']['hr'] = 'Croatian'; $lang['mx_meta']['langcode']['cs'] = 'Czech'; $lang['mx_meta']['langcode']['da'] = 'Danish'; $lang['mx_meta']['langcode']['dv'] = 'Divehi'; $lang['mx_meta']['langcode']['nl'] = 'Dutch'; $lang['mx_meta']['langcode']['nl-be'] = 'Dutch (Belgian)'; $lang['mx_meta']['langcode']['dz'] = 'Dzongkha'; $lang['mx_meta']['langcode']['en'] = 'English'; $lang['mx_meta']['langcode']['en-au'] = 'English (Australia)'; $lang['mx_meta']['langcode']['en-bz'] = 'English (Belize)'; $lang['mx_meta']['langcode']['en-ca'] = 'English (Canada)'; $lang['mx_meta']['langcode']['en-ie'] = 'English (Ireland)'; $lang['mx_meta']['langcode']['en-jm'] = 'English (Jamaican)'; $lang['mx_meta']['langcode']['en-gb'] = 'English (Great Britain)'; $lang['mx_meta']['langcode']['en-nz'] = 'English (New Zeland)'; $lang['mx_meta']['langcode']['en-za'] = 'English (South Africa)'; $lang['mx_meta']['langcode']['eo'] = 'Esperanto'; $lang['mx_meta']['langcode']['et'] = 'Estonian'; $lang['mx_meta']['langcode']['ee'] = 'Ewe'; $lang['mx_meta']['langcode']['fo'] = 'Faroese'; $lang['mx_meta']['langcode']['fj'] = 'Fijian'; $lang['mx_meta']['langcode']['fi'] = 'Finnish'; $lang['mx_meta']['langcode']['fr'] = 'French'; $lang['mx_meta']['langcode']['fr-be'] = 'French (Belgian)'; $lang['mx_meta']['langcode']['fr-ca'] = 'French (Canada)'; $lang['mx_meta']['langcode']['fr-lu'] = 'French (Luxembourg)'; $lang['mx_meta']['langcode']['fr-ch'] = 'French (Switzerland)'; $lang['mx_meta']['langcode']['fy'] = 'Frisian'; $lang['mx_meta']['langcode']['ff'] = 'Fulah'; $lang['mx_meta']['langcode']['gl'] = 'Gallegan'; $lang['mx_meta']['langcode']['lg'] = 'Ganda'; $lang['mx_meta']['langcode']['ka'] = 'Georgian'; $lang['mx_meta']['langcode']['de'] = 'German'; $lang['mx_meta']['langcode']['de-li'] = 'German (Liechtenstein)'; $lang['mx_meta']['langcode']['de-lu'] = 'German (Luxembourg)'; $lang['mx_meta']['langcode']['de-ch'] = 'German (Switzerland)'; $lang['mx_meta']['langcode']['gn'] = 'Guarani'; $lang['mx_meta']['langcode']['gu'] = 'Gujarati'; $lang['mx_meta']['langcode']['ht'] = 'Haitian'; $lang['mx_meta']['langcode']['ha'] = 'Hausa'; $lang['mx_meta']['langcode']['he'] = 'Hebrew'; $lang['mx_meta']['langcode']['hz'] = 'Herero'; $lang['mx_meta']['langcode']['hi'] = 'Hindi'; $lang['mx_meta']['langcode']['ho'] = 'Hiri Motu'; $lang['mx_meta']['langcode']['hu'] = 'Hungarian'; $lang['mx_meta']['langcode']['is'] = 'Icelandic'; $lang['mx_meta']['langcode']['io'] = 'Ido'; $lang['mx_meta']['langcode']['ig'] = 'Igbo'; $lang['mx_meta']['langcode']['id'] = 'Indonesian'; $lang['mx_meta']['langcode']['ie'] = 'Interlingue'; $lang['mx_meta']['langcode']['iu'] = 'Inuktitut'; $lang['mx_meta']['langcode']['ik'] = 'Inupiaq'; $lang['mx_meta']['langcode']['ga'] = 'Irish'; $lang['mx_meta']['langcode']['it'] = 'Italian'; $lang['mx_meta']['langcode']['it-ch'] = 'Italian (Switzerland)'; $lang['mx_meta']['langcode']['ja'] = 'Japanese'; $lang['mx_meta']['langcode']['jv'] = 'Javanese'; $lang['mx_meta']['langcode']['kl'] = 'Kalaallisut'; $lang['mx_meta']['langcode']['kn'] = 'Kannada'; $lang['mx_meta']['langcode']['kr'] = 'Kanuri'; $lang['mx_meta']['langcode']['ks'] = 'Kashmiri'; $lang['mx_meta']['langcode']['kk'] = 'Kazakh'; $lang['mx_meta']['langcode']['km'] = 'Khmer'; $lang['mx_meta']['langcode']['ki'] = 'Kikuyu'; $lang['mx_meta']['langcode']['rw'] = 'Kinyarwanda'; $lang['mx_meta']['langcode']['ky'] = 'Kirghiz'; $lang['mx_meta']['langcode']['kv'] = 'Komi'; $lang['mx_meta']['langcode']['kg'] = 'Kongo'; $lang['mx_meta']['langcode']['ko'] = 'Korean'; $lang['mx_meta']['langcode']['ku'] = 'Kurdish'; $lang['mx_meta']['langcode']['kj'] = 'Kwanyama'; $lang['mx_meta']['langcode']['lo'] = 'Lao'; $lang['mx_meta']['langcode']['la'] = 'Latin'; $lang['mx_meta']['langcode']['lv'] = 'Latvian'; $lang['mx_meta']['langcode']['li'] = 'Limburgish'; $lang['mx_meta']['langcode']['ln'] = 'Lingala'; $lang['mx_meta']['langcode']['lt'] = 'Lithuanian'; $lang['mx_meta']['langcode']['lu'] = 'Luba-Katanga'; $lang['mx_meta']['langcode']['lb'] = 'Luxembourgish'; $lang['mx_meta']['langcode']['mk'] = 'Macedonian'; $lang['mx_meta']['langcode']['mg'] = 'Malagasy'; $lang['mx_meta']['langcode']['ms'] = 'Malay'; $lang['mx_meta']['langcode']['ml'] = 'Malayalam'; $lang['mx_meta']['langcode']['mt'] = 'Maltese'; $lang['mx_meta']['langcode']['gv'] = 'Manx'; $lang['mx_meta']['langcode']['mi'] = 'Maori'; $lang['mx_meta']['langcode']['mr'] = 'Marathi'; $lang['mx_meta']['langcode']['mh'] = 'Marshallese'; $lang['mx_meta']['langcode']['el'] = 'Modern Greek'; $lang['mx_meta']['langcode']['mo'] = 'Moldavian'; $lang['mx_meta']['langcode']['mn'] = 'Mongolian'; $lang['mx_meta']['langcode']['na'] = 'Nauru'; $lang['mx_meta']['langcode']['nv'] = 'Navajo'; $lang['mx_meta']['langcode']['nd'] = 'Ndebele, North'; $lang['mx_meta']['langcode']['ng'] = 'Ndonga'; $lang['mx_meta']['langcode']['ne'] = 'Nepali'; $lang['mx_meta']['langcode']['nb'] = 'Norwegian'; $lang['mx_meta']['langcode']['nn'] = 'Norwegian Nynorsk'; $lang['mx_meta']['langcode']['ny'] = 'Nyanja'; $lang['mx_meta']['langcode']['oc'] = 'Occitan'; $lang['mx_meta']['langcode']['oj'] = 'Ojibwa'; $lang['mx_meta']['langcode']['or'] = 'Oriya'; $lang['mx_meta']['langcode']['om'] = 'Oromo'; $lang['mx_meta']['langcode']['os'] = 'Ossetian'; $lang['mx_meta']['langcode']['pi'] = 'Pali'; $lang['mx_meta']['langcode']['pa'] = 'Panjabi'; $lang['mx_meta']['langcode']['fa'] = 'Persian'; $lang['mx_meta']['langcode']['pl'] = 'Polish'; $lang['mx_meta']['langcode']['pt'] = 'Portuguese'; $lang['mx_meta']['langcode']['pt-br'] = 'Portuguese (Brazil)'; $lang['mx_meta']['langcode']['ps'] = 'Pushto'; $lang['mx_meta']['langcode']['qu'] = 'Quechua'; $lang['mx_meta']['langcode']['rm'] = 'Raeto-Romance'; $lang['mx_meta']['langcode']['ro'] = 'Romanian'; $lang['mx_meta']['langcode']['ro-mo'] = 'Romanian (Moldavia)'; $lang['mx_meta']['langcode']['rn'] = 'Rundi'; $lang['mx_meta']['langcode']['ru'] = 'Russian'; $lang['mx_meta']['langcode']['ru-mo'] = 'Russian (Moldavia)'; $lang['mx_meta']['langcode']['sm'] = 'Samoan'; $lang['mx_meta']['langcode']['sg'] = 'Sango'; $lang['mx_meta']['langcode']['sa'] = 'Sanskrit'; $lang['mx_meta']['langcode']['sc'] = 'Sardinian'; $lang['mx_meta']['langcode']['gd'] = 'Scottish Gaelic'; $lang['mx_meta']['langcode']['sr'] = 'Serbian'; $lang['mx_meta']['langcode']['sn'] = 'Shona'; $lang['mx_meta']['langcode']['ii'] = 'Sichuan Yi'; $lang['mx_meta']['langcode']['sd'] = 'Sindhi'; $lang['mx_meta']['langcode']['si'] = 'Sinhalese'; $lang['mx_meta']['langcode']['sk'] = 'Slovak'; $lang['mx_meta']['langcode']['sl'] = 'Slovenian'; $lang['mx_meta']['langcode']['so'] = 'Somali'; $lang['mx_meta']['langcode']['st'] = 'Sotho'; $lang['mx_meta']['langcode']['nr'] = 'South Ndebele'; $lang['mx_meta']['langcode']['es'] = 'Spanish'; $lang['mx_meta']['langcode']['es-ar'] = 'Spanish (Argentina)'; $lang['mx_meta']['langcode']['es-bo'] = 'Spanish (Bolivia)'; $lang['mx_meta']['langcode']['es-cl'] = 'Spanish (Chile)'; $lang['mx_meta']['langcode']['es-co'] = 'Spanish (Colombia)'; $lang['mx_meta']['langcode']['es-cr'] = 'Spanish (Costa Rica)'; $lang['mx_meta']['langcode']['es-sv'] = 'Spanish (El Salvador)'; $lang['mx_meta']['langcode']['es-ec'] = 'Spanish (Ecuador)'; $lang['mx_meta']['langcode']['es-gt'] = 'Spanish (Guatemala)'; $lang['mx_meta']['langcode']['es-hn'] = 'Spanish (Honduras)'; $lang['mx_meta']['langcode']['es-mx'] = 'Spanish (Mexico)'; $lang['mx_meta']['langcode']['es-ni'] = 'Spanish (Nicaragua)'; $lang['mx_meta']['langcode']['es-pa'] = 'Spanish (Panama)'; $lang['mx_meta']['langcode']['es-py'] = 'Spanish (Paraguay)'; $lang['mx_meta']['langcode']['es-pr'] = 'Spanish (Puerto Rico)'; $lang['mx_meta']['langcode']['es-pe'] = 'Spanish (Peru)'; $lang['mx_meta']['langcode']['es-tt'] = 'Spanish (Trinidad)'; $lang['mx_meta']['langcode']['es-uy'] = 'Spanish (Uruguay)'; $lang['mx_meta']['langcode']['es-ve'] = 'Spanish (Venezuela)'; $lang['mx_meta']['langcode']['su'] = 'Sundanese'; $lang['mx_meta']['langcode']['sw'] = 'Swahili'; $lang['mx_meta']['langcode']['ss'] = 'Swati'; $lang['mx_meta']['langcode']['sv'] = 'Swedish'; $lang['mx_meta']['langcode']['sv-fi'] = 'Swedish (Finland)'; $lang['mx_meta']['langcode']['tl'] = 'Tagalog'; $lang['mx_meta']['langcode']['ty'] = 'Tahitian'; $lang['mx_meta']['langcode']['tg'] = 'Tajik'; $lang['mx_meta']['langcode']['ta'] = 'Tamil'; $lang['mx_meta']['langcode']['tt'] = 'Tatar'; $lang['mx_meta']['langcode']['te'] = 'Telugu'; $lang['mx_meta']['langcode']['th'] = 'Thai'; $lang['mx_meta']['langcode']['bo'] = 'Tibetan'; $lang['mx_meta']['langcode']['ti'] = 'Tigrinya'; $lang['mx_meta']['langcode']['to'] = 'Tonga'; $lang['mx_meta']['langcode']['ts'] = 'Tsonga'; $lang['mx_meta']['langcode']['tn'] = 'Tswana'; $lang['mx_meta']['langcode']['tr'] = 'Turkish'; $lang['mx_meta']['langcode']['tk'] = 'Turkmen'; $lang['mx_meta']['langcode']['tw'] = 'Twi'; $lang['mx_meta']['langcode']['uk'] = 'Ukrainian'; $lang['mx_meta']['langcode']['ur'] = 'Urdu'; $lang['mx_meta']['langcode']['ug'] = 'Uyghur'; $lang['mx_meta']['langcode']['uz'] = 'Uzbek'; $lang['mx_meta']['langcode']['ve'] = 'Venda'; $lang['mx_meta']['langcode']['vi'] = 'Vietnamese'; $lang['mx_meta']['langcode']['vo'] = 'Volapük'; $lang['mx_meta']['langcode']['wa'] = 'Walloon'; $lang['mx_meta']['langcode']['cy'] = 'Welsh'; $lang['mx_meta']['langcode']['wo'] = 'Wolof'; $lang['mx_meta']['langcode']['xh'] = 'Xhosa'; $lang['mx_meta']['langcode']['yi'] = 'Yiddish'; $lang['mx_meta']['langcode']['yo'] = 'Yoruba'; $lang['mx_meta']['langcode']['za'] = 'Zhuang'; $lang['mx_meta']['langcode']['zu'] = 'Zulu'; // // Other related META tag entries follow... // $lang['mx_meta']['rating']['general'] = 'General'; $lang['mx_meta']['rating']['14 years'] = '14 years'; $lang['mx_meta']['rating']['restricted']= 'Restricted'; $lang['mx_meta']['rating']['mature'] = 'Mature'; $lang['mx_meta']['index']['index'] = 'Index'; $lang['mx_meta']['index']['noindex'] = 'No index'; $lang['mx_meta']['follow']['follow'] = 'Follow'; $lang['mx_meta']['follow']['nofollow'] = 'No follow'; // // That's all Folks! // ------------------------------------------------- ?> --- NEW FILE: lang_admin.php --- <?php /** * * @package MX-Publisher MOD * @version $Id: lang_admin.php,v 1.1 2008/09/18 07:43:32 orynider Exp $ * @copyright (c) 2002-2008 MX-Publisher Project Team * @license http://opensource.org/licenses/gpl-license.php GNU General Public License v2 * @link http://www.mx-publisher.com * */ // // Editor Settings: Please set Tabsize to 4 ;-) // // // The format of this file is: // // ---> $lang['message'] = 'text'; // // Specify your language character encoding... [optional] // // setlocale(LC_ALL, 'en'); $lang['mxBB_adminCP'] = 'MX-Publisher Administration'; // // Left AdminCP Panel // $lang['1_General_admin'] = 'General'; $lang['1_1_Management'] = 'Configuration'; $lang['1_2_WordCensors'] = 'Word Censors'; $lang['2_CP'] = 'Management'; $lang['2_1_Modules'] = 'Modules Setup<br /><hr>'; $lang['2_2_ModuleCP'] = 'Module Control Panel'; $lang['2_3_BlockCP'] = 'Block Control Panel'; $lang['2_4_PageCP'] = 'Page Control Panel'; $lang['3_CP'] = 'Styles'; $lang['2_1_new'] = 'Add new'; $lang['2_2_manage'] = 'Manage'; $lang['2_3_smilies'] = 'Smilies'; $lang['4_Panel_system'] = 'System Tools'; $lang['4_1_Cache'] = 'Regenerate Cache'; $lang['4_1_Integrity'] = 'Integrity Checker'; $lang['4_1_Meta'] = 'META Tags'; $lang['4_1_PHPinfo'] = 'phpInfo()'; // // Index // $lang['Welcome_mxBB'] = 'Welcome to MX-Publisher'; $lang['Admin_intro_mxBB'] = 'Thank you for choosing MX-Publisher as your portal/cms solution and phpBB as your forum solution. This screen will give you a quick overview of all the various statistics of your site. You can get back to this page by clicking on the <span style="text-decoration: underline;">Admin Index</span> link in the left panel. To return to the index of your board, click the logo that is also in the left panel. The other links on the left hand side of this screen will allow you to control every aspect of your portal and forum experience. Each screen will have instructions on how to use the provided tools.'; // // General // $lang['Yes'] = 'Yes'; $lang['No'] = 'No'; $lang['No_modules'] = 'No modules are installed.'; $lang['No_functions'] = 'This module has no block functions.'; $lang['No_parameters'] = 'This function has no parameters.'; $lang['No_blocks'] = 'No blocks for this function exist.'; $lang['No_pages'] = 'No pages exist here.'; $lang['No_settings'] = 'There are no further settings for this block.'; $lang['Quick_nav'] = 'Quick Navigation'; $lang['Include_all_modules'] = 'List all modules'; $lang['Include_block_quickedit'] = 'Include Block QuickEdit panel'; $lang['Include_block_private'] = 'Include Block Private Auth Panel'; $lang['Include_all_pages'] = 'List all pages'; $lang['View'] = 'View'; $lang['Edit'] = 'Edit'; $lang['Delete'] = 'Delete'; $lang['Settings'] = 'Settings'; $lang['Move_up'] = 'Move up'; $lang['Move_down'] = 'Move down'; $lang['Resync'] = 'Resync'; $lang['Update'] = 'Update'; $lang['Permissions'] = 'Permissions'; $lang['Permissions_std'] = 'Standard Permissions'; $lang['Permissions_adv'] = 'Advanced Permissions'; $lang['return_to_page'] = 'Back to Portal Page'; $lang['Use_default'] = 'Use default setting'; $lang['AdminCP_status'] = '<b>Progress report</b>'; $lang['AdminCP_action'] = '<b>Database Action</b>'; $lang['Invalid_action'] = 'Error'; $lang['was_installed'] = 'was installed.'; $lang['was_uninstalled'] = 'was uninstalled.'; $lang['was_upgraded'] = 'was upgraded'; $lang['was_exported'] = 'was exported'; $lang['was_deleted'] = 'was deleted'; $lang['was_removed'] = 'was removed'; $lang['was_inserted'] = 'was inserted'; $lang['was_updated'] = 'was updated'; $lang['was_added'] = 'was added'; $lang['was_moved'] = 'was moved'; $lang['was_synced'] = 'was synchronized'; $lang['error_no_field'] = 'There is a missing field. Please fill out all the required fields.'; // // Configuration // $lang['Portal_admin'] = 'Portal Administration'; $lang['Portal_admin_explain'] = 'Use this form to customize your portal'; $lang['Portal_General_Config'] = 'Portal Configuration'; $lang['Portal_General_Config_explain'] = 'Use this form to manage the main settings of your MX-Publisher site.'; $lang['Portal_General_settings'] = 'General Settings'; $lang['Portal_Style_settings'] = 'Style Settings'; $lang['Portal_General_config_info'] = 'General Portal Config Info '; $lang['Portal_General_config_info_explain'] = 'Current setup info from config.php (no editing needed)'; $lang['Portal_Name'] = 'Portal Name:'; $lang['Portal_PHPBB_Url'] = 'URL to your phpBB installation:'; $lang['Portal_Url'] = 'URL to MX-Publisher:'; $lang['Portal_Config_updated'] = 'Portal Configuration Updated Successfully'; $lang['Click_return_portal_config'] = 'Click %sHere%s to return to Portal Configuration'; $lang['PHPBB_info'] = 'phpBB Info'; $lang['PHPBB_version'] = 'phpBB Version:'; $lang['PHPBB_script_path'] = 'phpBB Script Path:'; $lang['PHPBB_server_name'] = 'phpBB Domain (server_name):'; $lang['MX_Portal'] = 'MX-Publisher'; $lang['MX_Modules'] = 'MXP Modules'; $lang['Phpbb'] = 'phpBB'; $lang['Top_phpbb_links'] = 'phpBB Statistics in Header (default value)'; $lang['Top_phpbb_links_explain'] = '- Links to new, unread posts'; $lang['Portal_version'] = 'MX-Publisher Version:'; $lang['Mx_use_cache'] = 'Use MX-Publisher Block Cache'; $lang['Mx_use_cache_explain'] = 'Block data is cached to individual cache/block_*.xml files. Block cache files are created/updated when blocks are edited.'; $lang['Mx_mod_rewrite'] = 'Use mod_rewrite'; $lang['Mx_mod_rewrite_explain'] = 'If you\'re running on an Apache server and have mod_rewrite activated, you may rewrite URLS; for example, you can rewrite pages like \'page=x\' with more intuitive alternatives. Please read further documentation for the mx_mod_rewrite module.'; $lang['Portal_Overall_header'] = 'Overall Header File (default value)'; $lang['Portal_Overall_header_explain'] = '- This is the default template overall_header file, e.g. overall_header.tpl.'; $lang['Portal_Overall_footer'] = 'Overall Footer File (default value)'; $lang['Portal_Overall_footer_explain'] = '- This is the default template overall_footer file, e.g. overall_footer.tpl.'; $lang['Portal_Main_layout'] = 'Main Layout File (default value)'; $lang['Portal_Main_layout_explain'] = '- This is the default template main_layout file, e.g. mx_main_layout.tpl.'; $lang['Portal_Navigation_block'] = 'Overall Navigation Block (default value)'; $lang['Portal_Navigation_block_explain'] = '- This is the page header navigation block, provided you\'ve chosen a overall header file which supports page navigation.'; $lang['Default_style'] = 'Portal Pages Style (default)'; $lang['Default_admin_style'] = 'AdminCP Style'; $lang['Select_page_style'] = "Select (or use default)"; $lang['Override_style'] = 'Override user style'; $lang['Override_style_explain'] = 'Replaces users style with the default (for pages)'; $lang['Portal_status'] = 'Enable portal'; $lang['Portal_status_explain'] = 'Handy switch, when reconstructing the site. Only admin is able to view pages and browse around normally. While disabled, the message below is displayed.'; $lang['Disabled_message'] = 'Portal disabled message'; $lang['Portal_Backend'] = 'MX-Publisher User/Session backend'; $lang['Portal_Backend_explain'] = 'Select internal, phpBB2 or phpBB3 sessions and users'; $lang['Portal_Backend_path'] = 'Relative path to phpBB [non-internal]'; $lang['Portal_Backend_path_explain'] = 'If using non-internal sessions and users, enter the relative path to phpbb, eg \'phpBB2/\' or \'../phpBB2/\'. Note: slashes are important.'; $lang['Portal_Backend_submit'] = 'Change and validate Backend'; $lang['Portal_config_valid'] = 'Current Backend Status: '; $lang['Portal_config_valid_true'] = '<b><font color="green">Valid</font></b>'; $lang['Portal_config_valid_false'] = '<b><font color="red">Bad Setup. Either your phpBB relative path is wrong or phpBB is uninstalled (your phpBB database is unavailable). Thus, \'internal\' backend is used.</font></b>'; // // Module Management // $lang['Module_admin'] = 'Module Administration'; $lang['Module_admin_explain'] = 'Use this form to manage modules: installation, upgrading and module development.<br /><b>To use this panel, you need to have JavaScript and cookies enabled in your browser!</b>'; $lang['Modulecp_admin'] = 'Module Control Panel'; $lang['Modulecp_admin_explain'] = 'Use this form to manage modules: block functions (parameters) and portal blocks.<br /><b>To use this panel, you need to have JavaScript and cookies enabled in your browser!</b>'; $lang['Modules'] = 'Modules'; $lang['Module'] = 'Module'; $lang['Module_delete'] = 'Delete a Module'; $lang['Module_delete_explain'] = 'Use this form to delete a module (or block function)'; $lang['Edit_module'] = 'Edit a Module'; $lang['Create_module'] = 'Create a New Module'; $lang['Module_name'] = 'Module Name'; $lang['Module_desc'] = 'Description'; $lang['Module_path'] = 'Path, ex. \'modules/mx_textblocks/\''; $lang['Module_include_admin'] = 'Include this module in the AdminCP navigation'; // // Module Installation // $lang['Module_delete_db'] = 'Do you really want to uninstall the module? Warning: You will lose all module data. Consider upgrading instead.'; $lang['Click_module_delete_yes'] = 'Click %sHere%s to uninstall the module'; $lang['Click_module_upgrade_yes'] = 'Click %sHere%s to upgrade the module'; $lang['Click_module_export_yes'] = 'Click %sHere%s to export the module'; $lang['Error_no_db_install'] = 'Error: The file db_install.php does not exist. Please verify this and try again.'; $lang['Error_no_db_uninstall'] = 'Error: The file db_uninstall.php does not exist, or the uninstall feature is not supported for this module. Please verify this and try again.'; $lang['Error_no_db_upgrade'] = 'Error: The file db_upgrade.php does not exist, or the upgrade feature is not supported for this module. Please verify this and try again.'; $lang['Error_module_installed'] = 'Error: This module is already installed! Please either first delete the module, or upgrade the module instead.'; $lang['Uninstall_module'] = 'Uninstall Module'; $lang['import_module_pack'] = 'Install Module'; $lang['import_module_pack_explain'] = 'This will install a module to the portal. Be sure that the module\'s package is uploaded to the /modules/ folder. Remember to use the latest module version!'; $lang['upgrade_module_pack'] = 'Upgrade Module'; $lang['upgrade_module_pack_explain']= 'This will upgrade your module. Be sure to read the module\'s documentation before proceeding, or you risk module data loss.'; $lang['export_module_pack'] = 'Export Module'; $lang['Export_Module'] = 'Select a Module:'; $lang['export_module_pack_explain'] = 'This will export a module *.pak file. This is intended for module writers; regular users don\'t need to worry about this.'; $lang['Module_Config_updated'] = 'Module Configuration Updated Successfully'; $lang['Click_return_module_admin'] = 'Click %sHere%s to return to Module Administration'; $lang['Module_updated'] = 'Module Information Updated successfully'; $lang['list_of_queries'] = 'This is the result list of the SQL queries needed for the install/upgrade'; $lang['already_added'] = 'Error or Already added'; $lang['added_upgraded'] = 'Added/Updated'; $lang['upgrading_modules'] = 'If you get some Errors, Already Added or Updated messages, relax, this is normal when updating mods'; $lang['consider_upgrading'] = 'Module is already installed...consider upgrading ;)'; $lang['upgrading'] = 'Upgrading'; $lang['module_upgrade'] = 'This is a upgrade'; $lang['nothing_upgrade'] = 'Nothing to upgrade...'; $lang['upgraded_to_ver'] = '...Now upgraded to v. '; $lang['module_not_installed'] = 'Module not installed...and thus cannot be upgraded'; $lang['fresh_install'] = 'This is a fresh install'; $lang['module_install_info'] = 'Mod Installation/Upgrading/Uninstalling Information - mod specific db tables'; // // Functions & Parameters Administration // $lang['Function_admin'] = 'Block Function Administration'; $lang['Function_admin_explain'] = 'Modules have one or more block bunctions. Use this form to edit, add, or delete a block function'; $lang['Function'] = 'Block Function'; $lang['Function_name'] = 'Block Function Name'; $lang['Function_desc'] = 'Description'; $lang['Function_file'] = 'File '; $lang['Function_admin_file'] = 'File (Edit block script) <br /> Extra parameters for this edit block panel. Leave blank to use default edit panel.'; $lang['Create_function'] = 'Add New Block Function'; $lang['Delete_function'] = 'Delete Block Function'; $lang['Delete_function_explain'] = 'This will delete the function and all of its associated portal blocks. Beware: this operation cannot be undone!'; $lang['Click_function_delete_yes'] = 'Click %sHere%s to delete the Function'; $lang['Parameter_admin'] = 'Function Parameter Administration'; $lang['Parameter_admin_explain'] = 'List all parameters for this function'; $lang['Parameter'] = 'Parameter'; $lang['Parameter_name'] = '<b>Parameter Name</b><br />- to be used to access the parameter'; $lang['Parameter_type'] = '<b>Parameter Type</b>'; $lang['Parameter_default'] = '<b>Default Value</b>'; $lang['Parameter_function'] = '<b>Function/Options</b>'; $lang['Parameter_function_explain'] = '<b>Function</b> (when using the \'Function\' type)<br />- You may pass the parameter data to an external function <br /> to generate the parameter form field.<br />- For example: <br />get_list_formatted("block_list","{parameter_value}","{parameter_id}[]")'; $lang['Parameter_function_explain'] .= '<br /><br /><b>Option(s)</b> (when using \'Selection\' parameter types)<br />- For all selection parameters (radiobuttons, checkboxes and menus) all options are listed here, one option per line.'; $lang['Parameter_auth'] = '<b>Admin/Block Moderator only</b>'; $lang['Parameters'] = 'Parameters'; $lang['Parameter_id'] = 'ID'; $lang['Create_parameter'] = 'Add New Parameter'; $lang['Delete_parameter'] = 'Delete Function Parameter'; $lang['Delete_parameter_explain'] = 'This will delete the parameter and update all associated portal blocks. Beware: this operation cannot be undone!'; $lang['Click_parameter_delete_yes'] = 'Click %sHere%s to delete the Parameter'; // // Parameter Types // $lang['ParType_BBText'] = 'Simple BBCode Textblock'; $lang['ParType_BBText_info'] = 'This is a simple textblock that parses BBCode'; $lang['ParType_Html'] = 'Simple HTML Textblock'; $lang['ParType_Html_info'] = 'This is a simple textblock, parsing HTML'; $lang['ParType_Text'] = 'Plain Text (single-row)'; $lang['ParType_Text_info'] = 'This is a simple text field'; $lang['ParType_TextArea'] = 'Plain Text Area (multiple-row)'; $lang['ParType_TextArea_info'] = 'This is a simple textarea field'; $lang['ParType_Boolean'] = 'Boolean'; $lang['ParType_Boolean_info'] = 'This is a \'yes\' or \'no\' radio switch.'; $lang['ParType_Number'] = 'Plain Number'; $lang['ParType_Number_info'] = 'This is a simple number field'; $lang['ParType_Function'] = 'Parameter function'; $lang['ParType_Values'] = 'Values'; $lang['ParType_Radio_single_select'] = 'Single-Selection Radio Buttons'; $lang['ParType_Radio_single_select_info'] = ''; $lang['ParType_Menu_single_select'] = 'Single-Selection Menu'; $lang['ParType_Menu_single_select_info'] = ''; $lang['ParType_Menu_multiple_select'] = 'Multiple-Selection Menu'; $lang['ParType_Menu_multiple_select_info'] = ''; $lang['ParType_Checkbox_multiple_select'] = 'Multiple-Selection Checkbox'; $lang['ParType_Checkbox_multiple_select_info'] = ''; // // Blocks Administration // $lang['Block_admin'] = 'Block Control Panel'; $lang['Block_admin_explain'] = 'Use this form to manage portal blocks.<br /><b>To use this panel, you need to have JavaScript and cookies enabled in your browser!</b>'; $lang['Block'] = 'Block'; $lang['Show_title'] = 'Show Block Title?'; $lang['Show_title_explain'] = 'Whether or not to display the block title'; $lang['Show_block'] = 'Show Block?'; $lang['Show_block_explain'] = '- If \'no\', the Block is hidden to all users, except administrators'; $lang['Show_stats'] = 'Show Statistics?'; $lang['Show_stats_explain'] = '- If \'yes\', \'edited by...\' will be displayed below the block'; $lang['Show_blocks'] = 'View Function Blocks'; $lang['Block_delete'] = 'Delete a Block'; $lang['Block_delete_explain'] = 'Use this form to delete a Block (or column)'; $lang['Block_title'] = 'Title'; $lang['Block_desc'] = 'Description'; $lang['Add_Block'] = 'Add New Block'; $lang['Auth_Block'] = 'Permissions'; $lang['Auth_Block_explain'] = 'ALL: All users<br />REG: Registered Users<br />PRIVATE: Group members (see advanced permissions)<br />MOD: block moderators (see advanced permissions)<br />ADMIN: Admin<br />ANONYMOUS: Guest users ONLY'; $lang['Block_quick_stats'] = 'Quick Stats'; $lang['Block_quick_edit'] = 'Quick Edit'; $lang['Create_block'] = 'Create New Block'; $lang['Delete_block'] = 'Delete Portal Block'; $lang['Delete_block_explain'] = 'This will delete the block and update all associated Portal Pages. Beware: this operation cannot be undone!'; $lang['Click_block_delete_yes'] = 'Click %sHere%s to delete the Block'; // // BlockCP Administration // $lang['Block_cp'] = 'BlockCP'; $lang['Click_return_blockCP_admin'] = 'Click %sHere%s to return to the Block Control Panel'; $lang['Click_return_portalpage_admin'] = 'Click %sHere%s to return to the Portal Page'; $lang['BlockCP_Config_updated'] = 'This block has been updated.'; // // Pages Administration // $lang['Page_admin'] = 'Page Administration'; $lang['Page_admin_explain'] = 'Use this form to add, delete and change the settings for Portal Pages and Page Templates.<br /><b>To use this panel, you need to have JavaScript and cookies enabled in your browser!</b>'; $lang['Page_admin_edit'] = 'Page Edit'; $lang['Page_admin_private'] = 'Advanced Page (PRIVATE) Permissions'; $lang['Page_admin_settings'] = 'Page Settings'; $lang['Page_admin_new_page'] = 'New Page Administration'; $lang['Page'] = 'Page'; $lang['Page_Id'] = 'Page ID'; $lang['Page_icon'] = 'Page Icon <br /> - to be used in the adminCP only, eg. icon_home.gif (default)'; $lang['Page_alt_icon'] = 'Alternative Page Icon <br /> - Full url (http://...) to custom page icon.'; $lang['Default_page_style'] = 'Portal Style (default)<br />To use the default setting, leave this unset.'; $lang['Override_page_style'] = 'Override user style'; $lang['Override_page_style_explain'] = ' '; $lang['Page_header'] = 'Page header file <br /> - i.e. overall_header.tpl (default), overall_noheader.tpl (no header) or user custom header file.<br />To use the default setting, leave this blank.'; $lang['Page_footer'] = 'Page footer file <br /> - i.e. overall_footer.tpl (default) or user custom footer file.<br />To use the default setting, leave this blank.'; $lang['Page_main_layout'] = 'Page main layout file <br /> - i.e. mx_main_layout.tpl (default) or user custom header file.<br />To use the default setting, leave this blank.'; $lang['Page_Navigation_block'] = 'Page header navigation block'; $lang['Page_Navigation_block_explain'] = '- This is the page header navigation block, provided you\'ve chosen a overall header file which supports page navigation.<br />To use the default setting, leave this unset.'; $lang['Auth_Page'] = 'Permissions'; $lang['Select_sort_method'] = 'Select Sort Method'; $lang['Order'] = 'Order'; $lang['Sort'] = 'Sort'; $lang['Page_sort_title'] = 'Page title'; $lang['Page_sort_desc'] = 'Page description'; $lang['Page_sort_created'] = 'Page created'; $lang['Sort_Ascending'] = 'ASC'; $lang['Sort_Descending'] = 'DESC'; $lang['Return_to_page'] = 'Return to Portal Page'; $lang['Auth_Page_group'] = '-> PRIVATE Group'; $lang['Page_desc'] = 'Description'; $lang['Page_parent'] = 'Parent Page'; $lang['Add_Page'] = 'Add New Page'; $lang['Page_Config_updated'] = 'Page Configuration Updated Successfully'; $lang['Click_return_page_admin'] = 'Click %sHere%s to return to Page Administration'; $lang['Remove_block'] = 'Remove Portal Block'; $lang['Remove_block_explain'] = 'This will remove the block from this page. Beware: this operation cannot be undone!'; $lang['Click_block_remove_yes'] = 'Click %sHere%s to remove the Block'; $lang['Delete_page'] = 'Delete Page'; $lang['Delete_page_explain'] = 'This will delete the Page. Beware: this operation cannot be undone!'; $lang['Click_page_delete_yes'] = 'Click %sHere%s to delete the Page'; $lang['Mx_IP_filter'] = 'IP Filter'; $lang['Mx_IP_filter_explain'] = 'To restrict access to this page by IP, enter the valid IP adresses, with one IP address per line.<br>Example: 127.0.0.1 or 127.1.*.*'; $lang['Mx_phpBB_stats'] = 'phpBB Statistics in Header'; $lang['Mx_phpBB_stats_explain'] = '- Links to new, unread posts, etc.'; $lang['Column_admin'] = 'Page Column Administration'; $lang['Column_admin_explain'] = 'Administrate Page Columns'; $lang['Column'] = 'Page Column'; $lang['Columns'] = 'Page Columns'; $lang['Column_block'] = 'Page Column Block'; $lang['Column_blocks'] = 'Page Column Blocks'; $lang['Edit_Column'] = 'Edit a Column'; $lang['Edit_Column_explain'] = 'Use this form to modify a column'; $lang['Column_Size'] = 'Size of the column'; $lang['Column_name'] = 'Column Name'; $lang['Column_delete'] = 'Delete a Column'; $lang['Page_updated'] = 'Page and Column information updated successfully'; $lang['Create_column'] = 'Add New Column'; $lang['Delete_page_column'] = 'Delete Page Column'; $lang['Delete_page_column_explain'] = 'This will delete the Page Column. Beware: this operation cannot be undone!'; $lang['Click_page_column_delete_yes'] = 'Click %sHere%s to delete the Page Column'; $lang['Add_Split_Block'] = 'Add Split Column Block'; $lang['Add_Split_Block_explain'] = 'This block splits the column'; $lang['Add_Dynamic_Block'] = 'Add Dynamic (Sub) Block'; $lang['Add_Dynamic_Block_explain'] = 'This dynamic block defines subpages, set from the navigation menu'; $lang['Add_Virtual_Block'] = 'Add Virtual (Page Blog) Block'; $lang['Add_Virtual_Block_explain'] = 'This block turns the page into a virtual (blog) page'; // // Page templates // $lang['Page_templates_admin'] = 'Page Templates Administration'; $lang['Page_templates_admin_explain'] = 'Use this page to create, edit or delete Page Templates'; $lang['Page_template'] = 'Page Template'; $lang['Page_templates'] = 'Page Templates'; $lang['Page_template_column'] = 'Page Template Column'; $lang['Page_template_columns'] = 'Page Template Columns'; $lang['Choose_page_template'] = 'Choose Page Template'; $lang['Template_Config_updated'] = 'Template Configuration Updated'; $lang['Add_Template'] = 'Add New Template'; $lang['Template'] = 'Template'; $lang['Template_name'] = 'Template Name'; $lang['Page_template_delete'] = 'Delete Template'; $lang['Delete_page_template'] = 'Delete Page Template'; $lang['Delete_page_template_explain'] = 'This will delete the Page Template. Beware: this operation cannot be undone!'; $lang['Click_page_template_delete_yes'] = 'Click %sHere%s to delete the Page Template'; $lang['Delete_page_template_column'] = 'Delete Page Template'; $lang['Delete_page_template_column_explain'] = 'This will delete the Page Template. Beware: this operation cannot be undone!'; $lang['Click_page_template_column_delete_yes'] = 'Click %sHere%s to delete the Page Template'; // // Cache // $lang['Cache_dir_write_protect'] = 'Your cache directory is write-protected. MX-Publisher is unable to generate the cache file. Please make your cache directory writeable to continue.'; $lang['Cache_generate'] = 'Your cache files have been generated.'; $lang['Cache_submit'] = 'Generate the cache file?'; $lang['Cache_explain'] = 'With this option you can generate all cache files (XMLs files) at once for all portal blocks. These files allow the reduction of the number of database queries needed and improves overall portal performance. <br />Note: the MX-Publisher cache must be enabled (in the Portal General Admin CP) for these files to be used by the system.<br>Further note: the cache files are created on the fly when editing blocks as well.'; $lang['Generate_mx_cache'] = 'Generate Block Cache'; // // These are displayed in the drop down boxes for advanced // mode Module auth, try and keep them short! // $lang['Menu_Navigation'] = 'Navigation Menu'; $lang['Portal_index'] = 'Portal Index'; $lang['Save_Settings'] = 'Save Settings'; $lang['Translation_Tools'] = 'Translation Tools'; $lang['Preview_portal'] = 'Preview Portal'; // // META // $lang['Meta_admin'] = 'META Tags Administration'; $lang['Mega_admin_explain'] = 'Use this form to customize your META tags'; $lang['Meta_Title'] = 'Title'; $lang['Meta_Author'] = 'Author'; $lang['Meta_Copyright'] = 'Copyright'; $lang['Meta_Keywords'] = 'Keywords'; $lang['Meta_Keywords_explain'] = '(comma seperated list)'; $lang['Meta_Description'] = 'Description'; $lang['Meta_Language'] = 'Language Code'; $lang['Meta_Rating'] = 'Rating'; $lang['Meta_Robots'] = 'Robots'; $lang['Meta_Pragma'] = 'Pragma no-cache'; $lang['Meta_Bookmark_icon'] = 'Bookmark Icon'; $lang['Meta_Bookmark_explain'] = '(relative location)'; $lang['Meta_HTITLE'] = 'Extra Header Settings'; $lang['Meta_data_updated'] = 'Meta data file (mx_meta.inc) has been updated!<br />Click %sHere%s to return to Meta Tags Administration.'; $lang['Meta_data_ioerror'] = 'Unable to open mx_meta.inc. Make sure the file is writeable (chmod 777).'; // // Portal permissons // $lang['Mx_Block_Auth_Title'] = 'Private Block Permissions' ; $lang['Mx_Block_Auth_Explain'] = 'Here you can configure Private Block Permissions'; $lang['Mx_Page_Auth_Title'] = 'Private Page Permissions' ; $lang['Mx_Page_Auth_Explain'] = 'Here you configure Private Page Permissions'; $lang['Block_Auth_successfully'] = 'Block Permissions Updated Successfully'; $lang['Click_return_block_auth'] = 'Click %sHere%s to return to Private Block Permissions'; $lang['Page_Auth_successfully'] = 'Page Permissions Updated Successfully'; $lang['Click_return_page_auth'] = 'Click %sHere%s to return to Private Page Permissions'; $lang['AUTH_ALL'] = 'ALL'; $lang['AUTH_REG'] = 'REG'; $lang['AUTH_PRIVATE'] = 'PRIVATE'; $lang['AUTH_MOD'] = 'MOD'; $lang['AUTH_ADMIN'] = 'ADMIN'; $lang['AUTH_ANONYMOUS'] = 'ANONYMOUS'; // ----------------------------------- // BlockCP - Block Parameter Specific // ----------------------------------- // // General // $lang['target_block'] = 'Target Block'; $lang['target_block_explain'] = '- links, data etc are refering with this block'; // // Split column // $lang['block_ids'] = 'Source Blocks'; $lang['block_ids_explain'] = '- to be placed left to right'; $lang['block_sizes'] = 'Block Sizes (comma separated)'; $lang['block_sizes_explain'] = '- You may specify size using numbers (pixels), percentages (relative sizes, ie. \'40%\') or \'*\' for the remainder.'; $lang['space_between'] = 'Space between Blocks'; // // Sitelog // $lang['log_filter_date'] = 'Filter by time'; $lang['log_filter_date_explain'] = '- Show logs from last week, month, year...'; $lang['numOfEvents'] = 'Number'; $lang['numOfEvents_explain'] = '- Number of events to show'; // // IncludeX // $lang['x_listen'] = 'Listen (GET)'; $lang['x_iframe'] = 'IFrame'; $lang['x_textfile'] = 'Textfile'; $lang['x_multimedia'] = 'WMP Multimedia'; $lang['x_pic'] = 'Pic'; $lang['x_format'] = 'Formatted Textfile'; $lang['x_mode'] = 'IncludeX mode:'; $lang['x_mode_explain'] = '- The IncludeX block operates in one of the following modes. If mode \'Listen (GET)\' is selected, the mode may be set by a url \'x_mode=mode\' and associated parameters with \'x_1=, x_2=, etc\'.<br />Example: To pass a url to a iframe use \'domain/index.php?page=x&x_mode=iframe&x_1=http://domain\' '; $lang['x_1'] = 'Variable 1:'; $lang['x_1_explain'] = '- <i>IFrame:</i> url<br /><i>Textfile:</i> relative path from root (eg in \'/include_file/my_file.xxx\')<br /><i>Multimedia:</i> relative path from root (eg in \'/include_file/my_file.xxx\')<br /><i>Pic:</i> relative path from root (eg in \'/include_file/my_file.xxx\')<br /><i>Formatted textfile:</i> not available'; $lang['x_2'] = 'Variable 2:'; $lang['x_2_explain'] = '- <i>IFrame:</i> frame height (pixels)<br /><i>Multimedia:</i> width (pixles)'; $lang['x_3'] = 'Variable 3:'; $lang['x_3_explain'] = '- <i>Multimedia:</i> height (pixles)'; // // Dynamic Block // $lang['default_block_id'] = 'Default Block'; $lang['default_block_id_explain'] = '- This is the default or first block to display, unless a dynamic block is set'; // // Menu Navigation // //$lang['menu_display_style'] = 'Menu Style'; //$lang['menu_display_style_explain '] = 'Standard, Simple, Advanced or Advanced App'; $lang['menu_display_mode'] = 'Layout mode'; $lang['menu_display_mode_explain '] = 'Horizonal or Vertical layout mode'; //$lang['menu_page_sync'] = 'Highlight current?'; //$lang['menu_page_sync_explain'] = 'Highlight current Navigation Menu entry...'; $lang['menu_custom_tpl'] = "Custom template file"; $lang['menu_custom_tpl_explain '] = "Eg mx_menu_custom.tpl"; // // Version Checker // $lang['mxBB_Version_up_to_date'] = 'Your MX-Publisher installation is up to date. No updates are available for your version of MX-Publisher.'; $lang['mxBB_Version_outdated'] = 'Your MX-Publisher installation does <b>not</b> seem to be up to date. Updates are available for your version of MX-Publisher. Please visit <a href="http://www.mx-publisher.com/index.php?page=4&action=file&file_id=2" target="_new">the MX-Publisher Core package download</a> to obtain the latest version.'; $lang['mxBB_Latest_version_info'] = 'The latest available version is <b>MX-Publisher %s</b>. '; $lang['mxBB_Current_version_info'] = 'You are running <b>MX-Publisher %s</b>.'; $lang['mxBB_Mailing_list_subscribe_reminder'] = 'For the latest information on news and updates to MX-Publisher, why not <a href="http://lists.sourceforge.net/lists/listinfo/mxbb-news" target="_new">subscribe to our mailing list</a>?'; // // That's all Folks! // ------------------------------------------------- ?> |
|
From: FlorinCB <ory...@us...> - 2008-09-18 00:43:37
|
Update of /cvsroot/mxbb/mx_music/phpbb2/mx_mod/includes/shared/phpbb2/includes In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv19367/mx_mod/includes/shared/phpbb2/includes Added Files: bbcode.php functions.php functions_post.php Log Message: upgrade --- NEW FILE: functions.php --- <?php /*************************************************************************** * functions.php * ------------------- * begin : Saturday, Feb 13, 2001 * copyright : (C) 2001 The phpBB Group * email : su...@ph... * * $Id: functions.php,v 1.1 2008/09/18 07:43:32 orynider Exp $ * * ***************************************************************************/ /*************************************************************************** * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * ***************************************************************************/ // // Class phpBB2 - function container // class phpBB2 { function get_db_stat($mode) { global $db; switch( $mode ) { case 'usercount': $sql = "SELECT COUNT(user_id) AS total FROM " . USERS_TABLE . " WHERE user_id <> " . ANONYMOUS; break; case 'newestuser': $sql = "SELECT user_id, username FROM " . USERS_TABLE . " WHERE user_id <> " . ANONYMOUS . " ORDER BY user_id DESC LIMIT 1"; break; case 'postcount': case 'topiccount': $sql = "SELECT SUM(forum_topics) AS topic_total, SUM(forum_posts) AS post_total FROM " . FORUMS_TABLE; break; } if ( !($result = $db->sql_query($sql)) ) { return false; } $row = $db->sql_fetchrow($result); switch ( $mode ) { case 'usercount': return $row['total']; break; case 'newestuser': return $row; break; case 'postcount': return $row['post_total']; break; case 'topiccount': return $row['topic_total']; break; } return false; } // added at phpBB 2.0.11 to properly format the username function phpbb_clean_username($username) { $username = substr(htmlspecialchars(str_replace("\'", "'", trim($username))), 0, 25); $username = self::phpbb_rtrim($username, "\\"); $username = str_replace("'", "\'", $username); return $username; } /** * This function is a wrapper for ltrim, as charlist is only supported in php >= 4.1.0 * Added in phpBB 2.0.18 */ function phpbb_ltrim($str, $charlist = false) { if ($charlist === false) { return ltrim($str); } $php_version = explode('.', PHP_VERSION); // php version < 4.1.0 if ((int) $php_version[0] < 4 || ((int) $php_version[0] == 4 && (int) $php_version[1] < 1)) { while ($str{0} == $charlist) { $str = substr($str, 1); } } else { $str = ltrim($str, $charlist); } return $str; } // added at phpBB 2.0.12 to fix a bug in PHP 4.3.10 (only supporting charlist in php >= 4.1.0) function phpbb_rtrim($str, $charlist = false) { if ($charlist === false) { return rtrim($str); } $php_version = explode('.', PHP_VERSION); // php version < 4.1.0 if ((int) $php_version[0] < 4 || ((int) $php_version[0] == 4 && (int) $php_version[1] < 1)) { while ($str{strlen($str)-1} == $charlist) { $str = substr($str, 0, strlen($str)-1); } } else { $str = rtrim($str, $charlist); } return $str; } /** * Our own generator of random values * This uses a constantly changing value as the base for generating the values * The board wide setting is updated once per page if this code is called * With thanks to Anthrax101 for the inspiration on this one * Added in phpBB 2.0.20 */ function dss_rand() { global $db, $board_config, $dss_seeded; $val = $board_config['rand_seed'] . microtime(); $val = md5($val); $board_config['rand_seed'] = md5($board_config['rand_seed'] . $val . 'a'); if($dss_seeded !== true) { $sql = "UPDATE " . CONFIG_TABLE . " SET config_value = '" . $board_config['rand_seed'] . "' WHERE config_name = 'rand_seed'"; if( !$db->sql_query($sql) ) { mx_message_die(GENERAL_ERROR, "Unable to reseed PRNG", "", __LINE__, __FILE__, $sql); } $dss_seeded = true; } return substr($val, 4, 16); } // // Get Userdata, $user can be username or user_id. If force_str is true, the username will be forced. // function get_userdata($user, $force_str = false) { global $db; if (!is_numeric($user) || $force_str) { $user = self::phpbb_clean_username($user); } else { $user = intval($user); } $sql = "SELECT * FROM " . USERS_TABLE . " WHERE "; $sql .= ( ( is_integer($user) ) ? "user_id = $user" : "username = '" . str_replace("\'", "''", $user) . "'" ) . " AND user_id <> " . ANONYMOUS; if ( !($result = $db->sql_query($sql)) ) { message_die(GENERAL_ERROR, 'Tried obtaining data for a non-existent user', '', __LINE__, __FILE__, $sql); } return ( $row = $db->sql_fetchrow($result) ) ? $row : false; } function make_jumpbox($action, $match_forum_id = 0) { global $template, $userdata, $lang, $db, $nav_links, $phpEx, $SID; // $is_auth = auth(AUTH_VIEW, AUTH_LIST_ALL, $userdata); $sql = "SELECT c.cat_id, c.cat_title, c.cat_order FROM " . CATEGORIES_TABLE . " c, " . FORUMS_TABLE . " f WHERE f.cat_id = c.cat_id GROUP BY c.cat_id, c.cat_title, c.cat_order ORDER BY c.cat_order"; if ( !($result = $db->sql_query($sql)) ) { message_die(GENERAL_ERROR, "Couldn't obtain category list.", "", __LINE__, __FILE__, $sql); } $category_rows = array(); while ( $row = $db->sql_fetchrow($result) ) { $category_rows[] = $row; } if ( $total_categories = count($category_rows) ) { $sql = "SELECT * FROM " . FORUMS_TABLE . " ORDER BY cat_id, forum_order"; if ( !($result = $db->sql_query($sql)) ) { message_die(GENERAL_ERROR, 'Could not obtain forums information', '', __LINE__, __FILE__, $sql); } $boxstring = '<select name="' . POST_FORUM_URL . '" onchange="if(this.options[this.selectedIndex].value != -1){ forms[\'jumpbox\'].submit() }"><option value="-1">' . $lang['Select_forum'] . '</option>'; $forum_rows = array(); while ( $row = $db->sql_fetchrow($result) ) { $forum_rows[] = $row; } if ( $total_forums = count($forum_rows) ) { for($i = 0; $i < $total_categories; $i++) { $boxstring_forums = ''; for($j = 0; $j < $total_forums; $j++) { if ( $forum_rows[$j]['cat_id'] == $category_rows[$i]['cat_id'] && $forum_rows[$j]['auth_view'] <= AUTH_REG ) { // if ( $forum_rows[$j]['cat_id'] == $category_rows[$i]['cat_id'] && $is_auth[$forum_rows[$j]['forum_id']]['auth_view'] ) // { $selected = ( $forum_rows[$j]['forum_id'] == $match_forum_id ) ? 'selected="selected"' : ''; $boxstring_forums .= '<option value="' . $forum_rows[$j]['forum_id'] . '"' . $selected . '>' . $forum_rows[$j]['forum_name'] . '</option>'; // // Add an array to $nav_links for the Mozilla navigation bar. // 'chapter' and 'forum' can create multiple items, therefore we are using a nested array. // $nav_links['chapter forum'][$forum_rows[$j]['forum_id']] = array ( 'url' => mx_append_sid("viewforum.$phpEx?" . POST_FORUM_URL . "=" . $forum_rows[$j]['forum_id']), 'title' => $forum_rows[$j]['forum_name'] ); } } if ( $boxstring_forums != '' ) { $boxstring .= '<option value="-1"> </option>'; $boxstring .= '<option value="-1">' . $category_rows[$i]['cat_title'] . '</option>'; $boxstring .= '<option value="-1">----------------</option>'; $boxstring .= $boxstring_forums; } } } $boxstring .= '</select>'; } else { $boxstring .= '<select name="' . POST_FORUM_URL . '" onchange="if(this.options[this.selectedIndex].value != -1){ forms[\'jumpbox\'].submit() }"></select>'; } // Let the jumpbox work again in sites having additional session id checks. // if ( !empty($SID) ) // { $boxstring .= '<input type="hidden" name="sid" value="' . $userdata['session_id'] . '" />'; // } $template->set_filenames(array( 'jumpbox' => 'jumpbox.tpl') ); $template->assign_vars(array( 'L_GO' => $lang['Go'], 'L_JUMP_TO' => $lang['Jump_to'], 'L_SELECT_FORUM' => $lang['Select_forum'], 'S_JUMPBOX_SELECT' => $boxstring, 'S_JUMPBOX_ACTION' => mx_append_sid($action)) ); $template->assign_var_from_handle('JUMPBOX', 'jumpbox'); return; } // // Initialise user settings on page load /* function init_userprefs($userdata) { global $board_config, $theme, $images; global $template, $lang, $phpEx, $phpbb_root_path, $db; global $nav_links; if ( $userdata['user_id'] != ANONYMOUS ) { if ( !empty($userdata['user_lang'])) { $default_lang = self::phpbb_ltrim(basename(self::phpbb_rtrim($userdata['user_lang'])), "'"); } if ( !empty($userdata['user_dateformat']) ) { $board_config['default_dateformat'] = $userdata['user_dateformat']; } if ( isset($userdata['user_timezone']) ) { $board_config['board_timezone'] = $userdata['user_timezone']; } } else { $default_lang = self::phpbb_ltrim(basename(self::phpbb_rtrim($board_config['default_lang'])), "'"); } if ( !file_exists(@self::phpbb_realpath($phpbb_root_path . 'language/lang_' . $default_lang . '/lang_main.'.$phpEx)) ) { if ( $userdata['user_id'] != ANONYMOUS ) { // For logged in users, try the board default language next $default_lang = self::phpbb_ltrim(basename(self::phpbb_rtrim($board_config['default_lang'])), "'"); } else { // For guests it means the default language is not present, try english // This is a long shot since it means serious errors in the setup to reach here, // but english is part of a new install so it's worth us trying $default_lang = 'english'; } if ( !file_exists(@self::phpbb_realpath($phpbb_root_path . 'language/lang_' . $default_lang . '/lang_main.'.$phpEx)) ) { mx_message_die(CRITICAL_ERROR, 'Could not locate valid language pack'); } } // If we've had to change the value in any way then let's write it back to the database // before we go any further since it means there is something wrong with it if ( $userdata['user_id'] != ANONYMOUS && $userdata['user_lang'] !== $default_lang ) { $sql = 'UPDATE ' . USERS_TABLE . " SET user_lang = '" . $default_lang . "' WHERE user_lang = '" . $userdata['user_lang'] . "'"; if ( !($result = $db->sql_query($sql)) ) { mx_message_die(CRITICAL_ERROR, 'Could not update user language info'); } $userdata['user_lang'] = $default_lang; } elseif ( $userdata['user_id'] === ANONYMOUS && $board_config['default_lang'] !== $default_lang ) { $sql = 'UPDATE ' . CONFIG_TABLE . " SET config_value = '" . $default_lang . "' WHERE config_name = 'default_lang'"; if ( !($result = $db->sql_query($sql)) ) { mx_message_die(CRITICAL_ERROR, 'Could not update user language info'); } } $board_config['default_lang'] = $default_lang; include($phpbb_root_path . 'language/lang_' . $board_config['default_lang'] . '/lang_main.' . $phpEx); if ( defined('IN_ADMIN') ) { if( !file_exists(@self::phpbb_realpath($phpbb_root_path . 'language/lang_' . $board_config['default_lang'] . '/lang_admin.'.$phpEx)) ) { $board_config['default_lang'] = 'english'; } include($phpbb_root_path . 'language/lang_' . $board_config['default_lang'] . '/lang_admin.' . $phpEx); } // // Set up style // if ( !$board_config['override_user_style'] ) { if ( $userdata['user_id'] != ANONYMOUS && $userdata['user_style'] > 0 ) { if ( $theme = setup_style($userdata['user_style']) ) { return; } } } $theme = setup_style($board_config['default_style']); // // Mozilla navigation bar // Default items that should be valid on all pages. // Defined here to correctly assign the Language Variables // and be able to change the variables within code. // $nav_links['top'] = array ( 'url' => mx_append_sid($phpbb_root_path . 'index.' . $phpEx), 'title' => sprintf($lang['Forum_Index'], $board_config['sitename']) ); $nav_links['search'] = array ( 'url' => mx_append_sid($phpbb_root_path . 'search.' . $phpEx), 'title' => $lang['Search'] ); $nav_links['help'] = array ( 'url' => mx_append_sid($phpbb_root_path . 'faq.' . $phpEx), 'title' => $lang['FAQ'] ); $nav_links['author'] = array ( 'url' => mx_append_sid($phpbb_root_path . 'memberlist.' . $phpEx), 'title' => $lang['Memberlist'] ); return; } */ /* function setup_style($style) { global $db, $board_config, $template, $images, $phpbb_root_path; $sql = 'SELECT * FROM ' . THEMES_TABLE . ' WHERE themes_id = ' . (int) $style; if ( !($result = $db->sql_query($sql)) ) { mx_message_die(CRITICAL_ERROR, 'Could not query database for theme info'); } if ( !($row = $db->sql_fetchrow($result)) ) { // We are trying to setup a style which does not exist in the database // Try to fallback to the board default (if the user had a custom style) // and then any users using this style to the default if it succeeds if ( $style != $board_config['default_style']) { $sql = 'SELECT * FROM ' . THEMES_TABLE . ' WHERE themes_id = ' . (int) $board_config['default_style']; if ( !($result = $db->sql_query($sql)) ) { mx_message_die(CRITICAL_ERROR, 'Could not query database for theme info'); } if ( $row = $db->sql_fetchrow($result) ) { $db->sql_freeresult($result); $sql = 'UPDATE ' . USERS_TABLE . ' SET user_style = ' . (int) $board_config['default_style'] . " WHERE user_style = $style"; if ( !($result = $db->sql_query($sql)) ) { mx_message_die(CRITICAL_ERROR, 'Could not update user theme info'); } } else { mx_message_die(CRITICAL_ERROR, "Could not get theme data for themes_id [$style]"); } } else { mx_message_die(CRITICAL_ERROR, "Could not get theme data for themes_id [$style]"); } } $template_path = 'templates/' ; $template_name = $row['template_name'] ; $template = new Template($phpbb_root_path . $template_path . $template_name); if ( $template ) { $current_template_path = $template_path . $template_name; @include($phpbb_root_path . $template_path . $template_name . '/' . $template_name . '.cfg'); if ( !defined('TEMPLATE_CONFIG') ) { mx_message_die(CRITICAL_ERROR, "Could not open $template_name template config file", '', __LINE__, __FILE__); } $img_lang = ( file_exists(@self::phpbb_realpath($phpbb_root_path . $current_template_path . '/images/lang_' . $board_config['default_lang'])) ) ? $board_config['default_lang'] : 'english'; while( list($key, $value) = @each($images) ) { if ( !is_array($value) ) { $images[$key] = str_replace('{LANG}', 'lang_' . $img_lang, $value); } } } return $row; } */ function encode_ip($dotquad_ip) { $ip_sep = explode('.', $dotquad_ip); return sprintf('%02x%02x%02x%02x', $ip_sep[0], $ip_sep[1], $ip_sep[2], $ip_sep[3]); } function decode_ip($int_ip) { $hexipbang = explode('.', chunk_split($int_ip, 2, '.')); return hexdec($hexipbang[0]). '.' . hexdec($hexipbang[1]) . '.' . hexdec($hexipbang[2]) . '.' . hexdec($hexipbang[3]); } // // Create date/time from format and timezone // function create_date($format, $gmepoch, $tz) { global $board_config, $lang; static $translate; if ( empty($translate) && $board_config['default_lang'] != 'english' ) { @reset($lang['datetime']); while ( list($match, $replace) = @each($lang['datetime']) ) { $translate[$match] = $replace; } } return ( !empty($translate) ) ? strtr(@gmdate($format, $gmepoch + (3600 * $tz)), $translate) : @gmdate($format, $gmepoch + (3600 * $tz)); } // // Pagination routine, generates // page number sequence // function generate_pagination($base_url, $num_items, $per_page, $start_item, $add_prevnext_text = TRUE) { global $lang; $total_pages = ceil($num_items/$per_page); if ( $total_pages == 1 ) { return ''; } $on_page = floor($start_item / $per_page) + 1; $page_string = ''; if ( $total_pages > 10 ) { $init_page_max = ( $total_pages > 3 ) ? 3 : $total_pages; for($i = 1; $i < $init_page_max + 1; $i++) { $page_string .= ( $i == $on_page ) ? '<b>' . $i . '</b>' : '<a href="' . mx_append_sid($base_url . "&start=" . ( ( $i - 1 ) * $per_page ) ) . '">' . $i . '</a>'; if ( $i < $init_page_max ) { $page_string .= ", "; } } if ( $total_pages > 3 ) { if ( $on_page > 1 && $on_page < $total_pages ) { $page_string .= ( $on_page > 5 ) ? ' ... ' : ', '; $init_page_min = ( $on_page > 4 ) ? $on_page : 5; $init_page_max = ( $on_page < $total_pages - 4 ) ? $on_page : $total_pages - 4; for($i = $init_page_min - 1; $i < $init_page_max + 2; $i++) { $page_string .= ($i == $on_page) ? '<b>' . $i . '</b>' : '<a href="' . mx_append_sid($base_url . "&start=" . ( ( $i - 1 ) * $per_page ) ) . '">' . $i . '</a>'; if ( $i < $init_page_max + 1 ) { $page_string .= ', '; } } $page_string .= ( $on_page < $total_pages - 4 ) ? ' ... ' : ', '; } else { $page_string .= ' ... '; } for($i = $total_pages - 2; $i < $total_pages + 1; $i++) { $page_string .= ( $i == $on_page ) ? '<b>' . $i . '</b>' : '<a href="' . mx_append_sid($base_url . "&start=" . ( ( $i - 1 ) * $per_page ) ) . '">' . $i . '</a>'; if( $i < $total_pages ) { $page_string .= ", "; } } } } else { for($i = 1; $i < $total_pages + 1; $i++) { $page_string .= ( $i == $on_page ) ? '<b>' . $i . '</b>' : '<a href="' . mx_append_sid($base_url . "&start=" . ( ( $i - 1 ) * $per_page ) ) . '">' . $i . '</a>'; if ( $i < $total_pages ) { $page_string .= ', '; } } } if ( $add_prevnext_text ) { if ( $on_page > 1 ) { $page_string = ' <a href="' . mx_append_sid($base_url . "&start=" . ( ( $on_page - 2 ) * $per_page ) ) . '">' . $lang['Previous'] . '</a> ' . $page_string; } if ( $on_page < $total_pages ) { $page_string .= ' <a href="' . mx_append_sid($base_url . "&start=" . ( $on_page * $per_page ) ) . '">' . $lang['Next'] . '</a>'; } } $page_string = $lang['Goto_page'] . ' ' . $page_string; return $page_string; } // // This does exactly what preg_quote() does in PHP 4-ish // If you just need the 1-parameter preg_quote call, then don't bother using this. // function phpbb_preg_quote($str, $delimiter) { $text = preg_quote($str); $text = str_replace($delimiter, '\\' . $delimiter, $text); return $text; } // // Obtain list of naughty words and build preg style replacement arrays for use by the // calling script, note that the vars are passed as references this just makes it easier // to return both sets of arrays // function obtain_word_list(&$orig_word, &$replacement_word) { global $db; // // Define censored word matches // $sql = "SELECT word, replacement FROM " . WORDS_TABLE; if( !($result = $db->sql_query($sql)) ) { mx_message_die(GENERAL_ERROR, 'Could not get censored words from database', '', __LINE__, __FILE__, $sql); } if ( $row = $db->sql_fetchrow($result) ) { do { $orig_word[] = '#\b(' . str_replace('\*', '\w*?', preg_quote($row['word'], '#')) . ')\b#i'; $replacement_word[] = $row['replacement']; } while ( $row = $db->sql_fetchrow($result) ); } return true; } // // This is general replacement for die(), allows templated // output in users (or default) language, etc. // // $msg_code can be one of these constants: // // GENERAL_MESSAGE : Use for any simple text message, eg. results // of an operation, authorisation failures, etc. // // GENERAL ERROR : Use for any error which occurs _AFTER_ the // common.php include and session code, ie. most errors in // pages/functions // // CRITICAL_MESSAGE : Used when basic config data is available but // a session may not exist, eg. banned users // // CRITICAL_ERROR : Used when config data cannot be obtained, eg // no database connection. Should _not_ be used in 99.5% of cases // /* function message_die($msg_code, $msg_text = '', $msg_title = '', $err_line = '', $err_file = '', $sql = '') { global $db, $template, $board_config, $theme, $lang, $phpEx, $phpbb_root_path, $nav_links, $gen_simple_header, $images; global $userdata, $user_ip, $session_length; global $starttime; if(defined('HAS_DIED')) { die("mx_message_die() was called multiple times. This isn't supposed to happen. Was message_die() used in page_tail.php?"); } define('HAS_DIED', 1); $sql_store = $sql; // // Get SQL error if we are debugging. Do this as soon as possible to prevent // subsequent queries from overwriting the status of sql_error() // if ( DEBUG && ( $msg_code == GENERAL_ERROR || $msg_code == CRITICAL_ERROR ) ) { $sql_error = $db->sql_error(); $debug_text = ''; if ( $sql_error['message'] != '' ) { $debug_text .= '<br /><br />SQL Error : ' . $sql_error['code'] . ' ' . $sql_error['message']; } if ( $sql_store != '' ) { $debug_text .= "<br /><br />$sql_store"; } if ( $err_line != '' && $err_file != '' ) { $debug_text .= '<br /><br />Line : ' . $err_line . '<br />File : ' . basename($err_file); } } if( empty($userdata) && ( $msg_code == GENERAL_MESSAGE || $msg_code == GENERAL_ERROR ) ) { $userdata = session_pagestart($user_ip, PAGE_INDEX); init_userprefs($userdata); } // // If the header hasn't been output then do it // if ( !defined('HEADER_INC') && $msg_code != CRITICAL_ERROR ) { if ( empty($lang) ) { if ( !empty($board_config['default_lang']) ) { include($phpbb_root_path . 'language/lang_' . $board_config['default_lang'] . '/lang_main.'.$phpEx); } else { include($phpbb_root_path . 'language/lang_english/lang_main.'.$phpEx); } } if ( empty($template) || empty($theme) ) { $theme = setup_style($board_config['default_style']); } // // Load the Page Header // if ( !defined('IN_ADMIN') ) { include($phpbb_root_path . 'includes/page_header.'.$phpEx); } else { include($phpbb_root_path . 'admin/page_header_admin.'.$phpEx); } } switch($msg_code) { case GENERAL_MESSAGE: if ( $msg_title == '' ) { $msg_title = $lang['Information']; } break; case CRITICAL_MESSAGE: if ( $msg_title == '' ) { $msg_title = $lang['Critical_Information']; } break; case GENERAL_ERROR: if ( $msg_text == '' ) { $msg_text = $lang['An_error_occured']; } if ( $msg_title == '' ) { $msg_title = $lang['General_Error']; } break; case CRITICAL_ERROR: // // Critical errors mean we cannot rely on _ANY_ DB information being // available so we're going to dump out a simple echo'd statement // include($phpbb_root_path . 'language/lang_english/lang_main.'.$phpEx); if ( $msg_text == '' ) { $msg_text = $lang['A_critical_error']; } if ( $msg_title == '' ) { $msg_title = 'phpBB : <b>' . $lang['Critical_Error'] . '</b>'; } break; } // // Add on DEBUG info if we've enabled debug mode and this is an error. This // prevents debug info being output for general messages should DEBUG be // set TRUE by accident (preventing confusion for the end user!) // if ( DEBUG && ( $msg_code == GENERAL_ERROR || $msg_code == CRITICAL_ERROR ) ) { if ( $debug_text != '' ) { $msg_text = $msg_text . '<br /><br /><b><u>DEBUG MODE</u></b>' . $debug_text; } } if ( $msg_code != CRITICAL_ERROR ) { if ( !empty($lang[$msg_text]) ) { $msg_text = $lang[$msg_text]; } if ( !defined('IN_ADMIN') ) { $template->set_filenames(array( 'message_body' => 'message_body.tpl') ); } else { $template->set_filenames(array( 'message_body' => 'admin/admin_message_body.tpl') ); } $template->assign_vars(array( 'MESSAGE_TITLE' => $msg_title, 'MESSAGE_TEXT' => $msg_text) ); $template->pparse('message_body'); if ( !defined('IN_ADMIN') ) { include($phpbb_root_path . 'includes/page_tail.'.$phpEx); } else { include($phpbb_root_path . 'admin/page_footer_admin.'.$phpEx); } } else { echo "<html>\n<body>\n" . $msg_title . "\n<br /><br />\n" . $msg_text . "</body>\n</html>"; } exit; } */ // // This function is for compatibility with PHP 4.x's realpath() // function. In later versions of PHP, it needs to be called // to do checks with some functions. Older versions of PHP don't // seem to need this, so we'll just return the original value. // dougk_ff7 <October 5, 2002> function phpbb_realpath($path) { global $phpbb_root_path, $phpEx; return (!@function_exists('realpath') || !@realpath($phpbb_root_path . 'includes/functions.'.$phpEx)) ? $path : @realpath($path); } function redirect($url) { global $db, $board_config; if (!empty($db)) { $db->sql_close(); } if (strstr(urldecode($url), "\n") || strstr(urldecode($url), "\r") || strstr(urldecode($url), ';url')) { message_die(GENERAL_ERROR, 'Tried to redirect to potentially insecure url.'); } $server_protocol = ($board_config['cookie_secure']) ? 'https://' : 'http://'; $server_name = preg_replace('#^\/?(.*?)\/?$#', '\1', trim($board_config['server_name'])); $server_port = ($board_config['server_port'] <> 80) ? ':' . trim($board_config['server_port']) : ''; $script_name = preg_replace('#^\/?(.*?)\/?$#', '\1', trim($board_config['script_path'])); $script_name = ($script_name == '') ? $script_name : '/' . $script_name; $url = preg_replace('#^\/?(.*?)\/?$#', '/\1', trim($url)); // Redirect via an HTML form for PITA webservers if (@preg_match('/Microsoft|WebSTAR|Xitami/', getenv('SERVER_SOFTWARE'))) { header('Refresh: 0; URL=' . $server_protocol . $server_name . $server_port . $script_name . $url); echo '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><html><head><meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"><meta http-equiv="refresh" content="0; url=' . $server_protocol . $server_name . $server_port . $script_name . $url . '"><title>Redirect</title></head><body><div align="center">If your browser does not support meta redirection please click <a href="' . $server_protocol . $server_name . $server_port . $script_name . $url . '">HERE</a> to be redirected</div></body></html>'; exit; } // Behave as per HTTP/1.1 spec for others header('Location: ' . $server_protocol . $server_name . $server_port . $script_name . $url); exit; } } ?> --- NEW FILE: functions_post.php --- <?php /*************************************************************************** * functions_post.php * ------------------- * begin : Saturday, Feb 13, 2001 * copyright : (C) 2001 The phpBB Group * email : su...@ph... * * $Id: functions_post.php,v 1.1 2008/09/18 07:43:32 orynider Exp $ * * ***************************************************************************/ /*************************************************************************** * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * ***************************************************************************/ if (!defined('IN_PHPBB')) { die('Hacking attempt'); } $html_entities_match = array('#&(?!(\#[0-9]+;))#', '#<#', '#>#', '#"#'); $html_entities_replace = array('&', '<', '>', '"'); $unhtml_specialchars_match = array('#>#', '#<#', '#"#', '#&#'); $unhtml_specialchars_replace = array('>', '<', '"', '&'); // // This function will prepare a posted message for // entry into the database. // function prepare_message($message, $html_on, $bbcode_on, $smile_on, $bbcode_uid = 0) { global $board_config, $html_entities_match, $html_entities_replace; // // Clean up the message // $message = trim($message); if ($html_on) { // If HTML is on, we try to make it safe // This approach is quite agressive and anything that does not look like a valid tag // is going to get converted to HTML entities $message = stripslashes($message); $html_match = '#<[^\w<]*(\w+)((?:"[^"]*"|\'[^\']*\'|[^<>\'"])+)?>#'; $matches = array(); $message_split = preg_split($html_match, $message); preg_match_all($html_match, $message, $matches); $message = ''; foreach ($message_split as $part) { $tag = array(array_shift($matches[0]), array_shift($matches[1]), array_shift($matches[2])); $message .= preg_replace($html_entities_match, $html_entities_replace, $part) . clean_html($tag); } $message = addslashes($message); $message = str_replace('"', '\"', $message); } else { $message = preg_replace($html_entities_match, $html_entities_replace, $message); } if($bbcode_on && $bbcode_uid != '') { $message = bbencode_first_pass($message, $bbcode_uid); } return $message; } function unprepare_message($message) { global $unhtml_specialchars_match, $unhtml_specialchars_replace; return preg_replace($unhtml_specialchars_match, $unhtml_specialchars_replace, $message); } // // Prepare a message for posting // function prepare_post(&$mode, &$post_data, &$bbcode_on, &$html_on, &$smilies_on, &$error_msg, &$username, &$bbcode_uid, &$subject, &$message, &$poll_title, &$poll_options, &$poll_length) { global $board_config, $userdata, $lang, $phpEx, $phpbb_root_path; // Check username if (!empty($username)) { $username = phpbb_clean_username($username); if (!$userdata['session_logged_in'] || ($userdata['session_logged_in'] && $username != $userdata['username'])) { include($phpbb_root_path . 'includes/functions_validate.'.$phpEx); $result = validate_username($username); if ($result['error']) { $error_msg .= (!empty($error_msg)) ? '<br />' . $result['error_msg'] : $result['error_msg']; } } else { $username = ''; } } // Check subject if (!empty($subject)) { $subject = htmlspecialchars(trim($subject)); } else if ($mode == 'newtopic' || ($mode == 'editpost' && $post_data['first_post'])) { $error_msg .= (!empty($error_msg)) ? '<br />' . $lang['Empty_subject'] : $lang['Empty_subject']; } // Check message if (!empty($message)) { $bbcode_uid = ($bbcode_on) ? make_bbcode_uid() : ''; $message = prepare_message(trim($message), $html_on, $bbcode_on, $smilies_on, $bbcode_uid); } else if ($mode != 'delete' && $mode != 'poll_delete') { $error_msg .= (!empty($error_msg)) ? '<br />' . $lang['Empty_message'] : $lang['Empty_message']; } // // Handle poll stuff // if ($mode == 'newtopic' || ($mode == 'editpost' && $post_data['first_post'])) { $poll_length = (isset($poll_length)) ? max(0, intval($poll_length)) : 0; if (!empty($poll_title)) { $poll_title = htmlspecialchars(trim($poll_title)); } if(!empty($poll_options)) { $temp_option_text = array(); while(list($option_id, $option_text) = @each($poll_options)) { $option_text = trim($option_text); if (!empty($option_text)) { $temp_option_text[intval($option_id)] = htmlspecialchars($option_text); } } $option_text = $temp_option_text; if (count($poll_options) < 2) { $error_msg .= (!empty($error_msg)) ? '<br />' . $lang['To_few_poll_options'] : $lang['To_few_poll_options']; } else if (count($poll_options) > $board_config['max_poll_options']) { $error_msg .= (!empty($error_msg)) ? '<br />' . $lang['To_many_poll_options'] : $lang['To_many_poll_options']; } else if ($poll_title == '') { $error_msg .= (!empty($error_msg)) ? '<br />' . $lang['Empty_poll_title'] : $lang['Empty_poll_title']; } } } return; } // // Post a new topic/reply/poll or edit existing post/poll // function submit_post($mode, &$post_data, &$message, &$meta, &$forum_id, &$topic_id, &$post_id, &$poll_id, &$topic_type, &$bbcode_on, &$html_on, &$smilies_on, &$attach_sig, &$bbcode_uid, $post_username, $post_subject, $post_message, $poll_title, &$poll_options, &$poll_length) { global $board_config, $lang, $db, $phpbb_root_path, $phpEx; global $userdata, $user_ip; include($phpbb_root_path . 'includes/functions_search.'.$phpEx); $current_time = time(); if ($mode == 'newtopic' || $mode == 'reply' || $mode == 'editpost') { // // Flood control // $where_sql = ($userdata['user_id'] == ANONYMOUS) ? "poster_ip = '$user_ip'" : 'poster_id = ' . $userdata['user_id']; $sql = "SELECT MAX(post_time) AS last_post_time FROM " . POSTS_TABLE . " WHERE $where_sql"; if ($result = $db->sql_query($sql)) { if ($row = $db->sql_fetchrow($result)) { if (intval($row['last_post_time']) > 0 && ($current_time - intval($row['last_post_time'])) < intval($board_config['flood_interval'])) { mx_message_die(GENERAL_MESSAGE, $lang['Flood_Error']); } } } } if ($mode == 'editpost') { remove_search_post($post_id); } if ($mode == 'newtopic' || ($mode == 'editpost' && $post_data['first_post'])) { $topic_vote = (!empty($poll_title) && count($poll_options) >= 2) ? 1 : 0; $sql = ($mode != "editpost") ? "INSERT INTO " . TOPICS_TABLE . " (topic_title, topic_poster, topic_time, forum_id, topic_status, topic_type, topic_vote) VALUES ('$post_subject', " . $userdata['user_id'] . ", $current_time, $forum_id, " . TOPIC_UNLOCKED . ", $topic_type, $topic_vote)" : "UPDATE " . TOPICS_TABLE . " SET topic_title = '$post_subject', topic_type = $topic_type " . (($post_data['edit_vote'] || !empty($poll_title)) ? ", topic_vote = " . $topic_vote : "") . " WHERE topic_id = $topic_id"; if (!$db->sql_query($sql)) { mx_message_die(GENERAL_ERROR, 'Error in posting', '', __LINE__, __FILE__, $sql); } if ($mode == 'newtopic') { $topic_id = $db->sql_nextid(); } } $edited_sql = ($mode == 'editpost' && !$post_data['last_post'] && $post_data['poster_post']) ? ", post_edit_time = $current_time, post_edit_count = post_edit_count + 1 " : ""; $sql = ($mode != "editpost") ? "INSERT INTO " . POSTS_TABLE . " (topic_id, forum_id, poster_id, post_username, post_time, poster_ip, enable_bbcode, enable_html, enable_smilies, enable_sig) VALUES ($topic_id, $forum_id, " . $userdata['user_id'] . ", '$post_username', $current_time, '$user_ip', $bbcode_on, $html_on, $smilies_on, $attach_sig)" : "UPDATE " . POSTS_TABLE . " SET post_username = '$post_username', enable_bbcode = $bbcode_on, enable_html = $html_on, enable_smilies = $smilies_on, enable_sig = $attach_sig" . $edited_sql . " WHERE post_id = $post_id"; if (!$db->sql_query($sql)) { mx_message_die(GENERAL_ERROR, 'Error in posting', '', __LINE__, __FILE__, $sql); } if ($mode != 'editpost') { $post_id = $db->sql_nextid(); } $sql = ($mode != 'editpost') ? "INSERT INTO " . POSTS_TEXT_TABLE . " (post_id, post_subject, bbcode_uid, post_text) VALUES ($post_id, '$post_subject', '$bbcode_uid', '$post_message')" : "UPDATE " . POSTS_TEXT_TABLE . " SET post_text = '$post_message', bbcode_uid = '$bbcode_uid', post_subject = '$post_subject' WHERE post_id = $post_id"; if (!$db->sql_query($sql)) { mx_message_die(GENERAL_ERROR, 'Error in posting', '', __LINE__, __FILE__, $sql); } add_search_words('single', $post_id, stripslashes($post_message), stripslashes($post_subject)); // // Add poll // if (($mode == 'newtopic' || ($mode == 'editpost' && $post_data['edit_poll'])) && !empty($poll_title) && count($poll_options) >= 2) { $sql = (!$post_data['has_poll']) ? "INSERT INTO " . VOTE_DESC_TABLE . " (topic_id, vote_text, vote_start, vote_length) VALUES ($topic_id, '$poll_title', $current_time, " . ($poll_length * 86400) . ")" : "UPDATE " . VOTE_DESC_TABLE . " SET vote_text = '$poll_title', vote_length = " . ($poll_length * 86400) . " WHERE topic_id = $topic_id"; if (!$db->sql_query($sql)) { mx_message_die(GENERAL_ERROR, 'Error in posting', '', __LINE__, __FILE__, $sql); } $delete_option_sql = ''; $old_poll_result = array(); if ($mode == 'editpost' && $post_data['has_poll']) { $sql = "SELECT vote_option_id, vote_result FROM " . VOTE_RESULTS_TABLE . " WHERE vote_id = $poll_id ORDER BY vote_option_id ASC"; if (!($result = $db->sql_query($sql))) { mx_message_die(GENERAL_ERROR, 'Could not obtain vote data results for this topic', '', __LINE__, __FILE__, $sql); } while ($row = $db->sql_fetchrow($result)) { $old_poll_result[$row['vote_option_id']] = $row['vote_result']; if (!isset($poll_options[$row['vote_option_id']])) { $delete_option_sql .= ($delete_option_sql != '') ? ', ' . $row['vote_option_id'] : $row['vote_option_id']; } } } else { $poll_id = $db->sql_nextid(); } @reset($poll_options); $poll_option_id = 1; while (list($option_id, $option_text) = each($poll_options)) { if (!empty($option_text)) { $option_text = str_replace("\'", "''", htmlspecialchars($option_text)); $poll_result = ($mode == "editpost" && isset($old_poll_result[$option_id])) ? $old_poll_result[$option_id] : 0; $sql = ($mode != "editpost" || !isset($old_poll_result[$option_id])) ? "INSERT INTO " . VOTE_RESULTS_TABLE . " (vote_id, vote_option_id, vote_option_text, vote_result) VALUES ($poll_id, $poll_option_id, '$option_text', $poll_result)" : "UPDATE " . VOTE_RESULTS_TABLE . " SET vote_option_text = '$option_text', vote_result = $poll_result WHERE vote_option_id = $option_id AND vote_id = $poll_id"; if (!$db->sql_query($sql)) { mx_message_die(GENERAL_ERROR, 'Error in posting', '', __LINE__, __FILE__, $sql); } $poll_option_id++; } } if ($delete_option_sql != '') { $sql = "DELETE FROM " . VOTE_RESULTS_TABLE . " WHERE vote_option_id IN ($delete_option_sql) AND vote_id = $poll_id"; if (!$db->sql_query($sql)) { mx_message_die(GENERAL_ERROR, 'Error deleting pruned poll options', '', __LINE__, __FILE__, $sql); } } } $meta = '<meta http-equiv="refresh" content="3;url=' . append_sid("viewtopic.$phpEx?" . POST_POST_URL . "=" . $post_id) . '#' . $post_id . '">'; $message = $lang['Stored'] . '<br /><br />' . sprintf($lang['Click_view_message'], '<a href="' . append_sid("viewtopic.$phpEx?" . POST_POST_URL . "=" . $post_id) . '#' . $post_id . '">', '</a>') . '<br /><br />' . sprintf($lang['Click_return_forum'], '<a href="' . append_sid("viewforum.$phpEx?" . POST_FORUM_URL . "=$forum_id") . '">', '</a>'); return false; } // // Update post stats and details // function update_post_stats(&$mode, &$post_data, &$forum_id, &$topic_id, &$post_id, &$user_id) { global $db; $sign = ($mode == 'delete') ? '- 1' : '+ 1'; $forum_update_sql = "forum_posts = forum_posts $sign"; $topic_update_sql = ''; if ($mode == 'delete') { if ($post_data['last_post']) { if ($post_data['first_post']) { $forum_update_sql .= ', forum_topics = forum_topics - 1'; } else { $topic_update_sql .= 'topic_replies = topic_replies - 1'; $sql = "SELECT MAX(post_id) AS last_post_id FROM " . POSTS_TABLE . " WHERE topic_id = $topic_id"; if (!($result = $db->sql_query($sql))) { mx_message_die(GENERAL_ERROR, 'Error in deleting post', '', __LINE__, __FILE__, $sql); } if ($row = $db->sql_fetchrow($result)) { $topic_update_sql .= ', topic_last_post_id = ' . $row['last_post_id']; } } if ($post_data['last_topic']) { $sql = "SELECT MAX(post_id) AS last_post_id FROM " . POSTS_TABLE . " WHERE forum_id = $forum_id"; if (!($result = $db->sql_query($sql))) { mx_message_die(GENERAL_ERROR, 'Error in deleting post', '', __LINE__, __FILE__, $sql); } if ($row = $db->sql_fetchrow($result)) { $forum_update_sql .= ($row['last_post_id']) ? ', forum_last_post_id = ' . $row['last_post_id'] : ', forum_last_post_id = 0'; } } } else if ($post_data['first_post']) { $sql = "SELECT MIN(post_id) AS first_post_id FROM " . POSTS_TABLE . " WHERE topic_id = $topic_id"; if (!($result = $db->sql_query($sql))) { mx_message_die(GENERAL_ERROR, 'Error in deleting post', '', __LINE__, __FILE__, $sql); } if ($row = $db->sql_fetchrow($result)) { $topic_update_sql .= 'topic_replies = topic_replies - 1, topic_first_post_id = ' . $row['first_post_id']; } } else { $topic_update_sql .= 'topic_replies = topic_replies - 1'; } } else if ($mode != 'poll_delete') { $forum_update_sql .= ", forum_last_post_id = $post_id" . (($mode == 'newtopic') ? ", forum_topics = forum_topics $sign" : ""); $topic_update_sql = "topic_last_post_id = $post_id" . (($mode == 'reply') ? ", topic_replies = topic_replies $sign" : ", topic_first_post_id = $post_id"); } else { $topic_update_sql .= 'topic_vote = 0'; } if ($mode != 'poll_delete') { $sql = "UPDATE " . FORUMS_TABLE . " SET $forum_update_sql WHERE forum_id = $forum_id"; if (!$db->sql_query($sql)) { mx_message_die(GENERAL_ERROR, 'Error in posting', '', __LINE__, __FILE__, $sql); } } if ($topic_update_sql != '') { $sql = "UPDATE " . TOPICS_TABLE . " SET $topic_update_sql WHERE topic_id = $topic_id"; if (!$db->sql_query($sql)) { mx_message_die(GENERAL_ERROR, 'Error in posting', '', __LINE__, __FILE__, $sql); } } if ($mode != 'poll_delete') { $sql = "UPDATE " . USERS_TABLE . " SET user_posts = user_posts $sign WHERE user_id = $user_id"; if (!$db->sql_query($sql)) { mx_message_die(GENERAL_ERROR, 'Error in posting', '', __LINE__, __FILE__, $sql); } } return; } // // Delete a post/poll // function delete_post($mode, &$post_data, &$message, &$meta, &$forum_id, &$topic_id, &$post_id, &$poll_id) { global $board_config, $lang, $db, $phpbb_root_path, $phpEx; global $userdata, $user_ip; if ($mode != 'poll_delete') { include($phpbb_root_path . 'includes/functions_search.'.$phpEx); $sql = "DELETE FROM " . POSTS_TABLE . " WHERE post_id = $post_id"; if (!$db->sql_query($sql)) { mx_message_die(GENERAL_ERROR, 'Error in deleting post', '', __LINE__, __FILE__, $sql); } $sql = "DELETE FROM " . POSTS_TEXT_TABLE . " WHERE post_id = $post_id"; if (!$db->sql_query($sql)) { mx_message_die(GENERAL_ERROR, 'Error in deleting post', '', __LINE__, __FILE__, $sql); } if ($post_data['last_post']) { if ($post_data['first_post']) { $forum_update_sql .= ', forum_topics = forum_topics - 1'; $sql = "DELETE FROM " . TOPICS_TABLE . " WHERE topic_id = $topic_id OR topic_moved_id = $topic_id"; if (!$db->sql_query($sql)) { mx_message_die(GENERAL_ERROR, 'Error in deleting post', '', __LINE__, __FILE__, $sql); } $sql = "DELETE FROM " . TOPICS_WATCH_TABLE . " WHERE topic_id = $topic_id"; if (!$db->sql_query($sql)) { mx_message_die(GENERAL_ERROR, 'Error in deleting post', '', __LINE__, __FILE__, $sql); } } } remove_search_post($post_id); } if ($mode == 'poll_delete' || ($mode == 'delete' && $post_data['first_post'] && $post_data['last_post']) && $post_data['has_poll'] && $post_data['edit_poll']) { $sql = "DELETE FROM " . VOTE_DESC_TABLE . " WHERE topic_id = $topic_id"; if (!$db->sql_query($sql)) { mx_message_die(GENERAL_ERROR, 'Error in deleting poll', '', __LINE__, __FILE__, $sql); } $sql = "DELETE FROM " . VOTE_RESULTS_TABLE . " WHERE vote_id = $poll_id"; if (!$db->sql_query($sql)) { mx_message_die(GENERAL_ERROR, 'Error in deleting poll', '', __LINE__, __FILE__, $sql); } $sql = "DELETE FROM " . VOTE_USERS_TABLE . " WHERE vote_id = $poll_id"; if (!$db->sql_query($sql)) { mx_message_die(GENERAL_ERROR, 'Error in deleting poll', '', __LINE__, __FILE__, $sql); } } if ($mode == 'delete' && $post_data['first_post'] && $post_data['last_post']) { $meta = '<meta http-equiv="refresh" content="3;url=' . append_sid("viewforum.$phpEx?" . POST_FORUM_URL . '=' . $forum_id) . '">'; $message = $lang['Deleted']; } else { $meta = '<meta http-equiv="refresh" content="3;url=' . append_sid("viewtopic.$phpEx?" . POST_TOPIC_URL . '=' . $topic_id) . '">'; $message = (($mode == 'poll_delete') ? $lang['Poll_delete'] : $lang['Deleted']) . '<br /><br />' . sprintf($lang['Click_return_topic'], '<a href="' . append_sid("viewtopic.$phpEx?" . POST_TOPIC_URL . "=$topic_id") . '">', '</a>'); } $message .= '<br /><br />' . sprintf($lang['Click_return_forum'], '<a href="' . append_sid("viewforum.$phpEx?" . POST_FORUM_URL . "=$forum_id") . '">', '</a>'); return; } // // Handle user notification on new post // function user_notification($mode, &$post_data, &$topic_title, &$forum_id, &$topic_id, &$post_id, &$notify_user) { global $board_config, $lang, $db, $phpbb_root_path, $phpEx; global $userdata, $user_ip; $current_time = time(); if ($mode != 'delete') { if ($mode == 'reply') { $sql = "SELECT ban_userid FROM " . BANLIST_TABLE; if (!($result = $db->sql_query($sql))) { mx_message_die(GENERAL_ERROR, 'Could not obtain banlist', '', __LINE__, __FILE__, $sql); } $user_id_sql = ''; while ($row = $db->sql_fetchrow($result)) { if (isset($row['ban_userid']) && !empty($row['ban_userid'])) { $user_id_sql .= ', ' . $row['ban_userid']; } } $sql = "SELECT u.user_id, u.user_email, u.user_lang FROM " . TOPICS_WATCH_TABLE . " tw, " . USERS_TABLE . " u WHERE tw.topic_id = $topic_id AND tw.user_id NOT IN (" . $userdata['user_id'] . ", " . ANONYMOUS . $user_id_sql . ") AND tw.notify_status = " . TOPIC_WATCH_UN_NOTIFIED . " AND u.user_id = tw.user_id"; if (!($result = $db->sql_query($sql))) { mx_message_die(GENERAL_ERROR, 'Could not obtain list of topic watchers', '', __LINE__, __FILE__, $sql); } $update_watched_sql = ''; $bcc_list_ary = array(); if ($row = $db->sql_fetchrow($result)) { // Sixty second limit @set_time_limit(60); do { if ($row['user_email'] != '') { $bcc_list_ary[$row['user_lang']][] = $row['user_email']; } $update_watched_sql .= ($update_watched_sql != '') ? ', ' . $row['user_id'] : $row['user_id']; } while ($row = $db->sql_fetchrow($result)); // // Let's do some checking to make sure that mass mail functions // are working in win32 versions of php. // if (preg_match('/[c-z]:\\\.*/i', getenv('PATH')) && !$board_config['smtp_delivery']) { $ini_val = (@phpversion() >= '4.0.0') ? 'ini_get' : 'get_cfg_var'; // We are running on windows, force delivery to use our smtp functions // since php's are broken by default $board_config['smtp_delivery'] = 1; $board_config['smtp_host'] = @$ini_val('SMTP'); } if (sizeof($bcc_list_ary)) { include($phpbb_root_path . 'includes/emailer.'.$phpEx); $emailer = new emailer($board_config['smtp_delivery']); $script_name = preg_replace('/^\/?(.*?)\/?$/', '\1', trim($board_config['script_path'])); $script_name = ($script_name != '') ? $script_name . '/viewtopic.'.$phpEx : 'viewtopic.'.$phpEx; $server_name = trim($board_config['server_name']); $server_protocol = ($board_config['cookie_secure']) ? 'https://' : 'http://'; $server_port = ($board_config['server_port'] <> 80) ? ':' . trim($board_config['server_port']) . '/' : '/'; $orig_word = array(); $replacement_word = array(); phpBB2::obtain_word_list($orig_word, $replacement_word); $emailer->from($board_config['board_email']); $emailer->replyto($board_config['board_email']); $topic_title = (count($orig_word)) ? preg_replace($orig_word, $replacement_word, unprepare_message($topic_title)) : unprepare_message($topic_title); @reset($bcc_list_ary); while (list($user_lang, $bcc_list) = each($bcc_list_ary)) { $emailer->use_template('topic_notify', $user_lang); for ($i = 0; $i < count($bcc_list); $i++) { $emailer->bcc($bcc_list[$i]); } // The Topic_reply_notification lang string below will be used // if for some reason the mail template subject cannot be read // ... note it will not necessarily be in the posters own language! $emailer->set_subject($lang['Topic_reply_notification']); // This is a nasty kludge to remove the username var ... till (if?) // translators update their templates $emailer->msg = preg_replace('#[ ]?{USERNAME}#', '', $emailer->msg); $emailer->assign_vars(array( 'EMAIL_SIG' => (!empty($board_config['board_email_sig'])) ? str_replace('<br />', "\n", "-- \n" . $board_config['board_email_sig']) : '', 'SITENAME' => $board_config['sitename'], 'TOPIC_TITLE' => $topic_title, 'U_TOPIC' => $server_protocol . $server_name . $server_port . $script_name . '?' . POST_POST_URL . "=$post_id#$post_id", 'U_STOP_WATCHING_TOPIC' => $server_protocol . $server_name . $server_port . $script_name . '?' . POST_TOPIC_URL . "=$topic_id&unwatch=topic") ); $emailer->send(); $emailer->reset(); } } } $db->sql_freeresult($result); if ($update_watched_sql != '') { $sql = "UPDATE " . TOPICS_WATCH_TABLE . " SET notify_status = " . TOPIC_WATCH_NOTIFIED . " WHERE topic_id = $topic_id AND user_id IN ($update_watched_sql)"; $db->sql_query($sql); } } $sql = "SELECT topic_id FROM " . TOPICS_WATCH_TABLE . " WHERE topic_id = $topic_id AND user_id = " . $userdata['user_id']; if (!($result = $db->sql_query($sql))) { mx_message_die(GENERAL_ERROR, 'Could not obtain topic watch information', '', __LINE__, __FILE__, $sql); } $row = $db->sql_fetchrow($result); if (!$notify_user && !empty($row['topic_id'])) { $sql = "DELETE FROM " . TOPICS_WATCH_TABLE . " WHERE topic_id = $topic_id AND user_id = " . $userdata['user_id']; if (!$db->sql_query($sql)) { mx_message_die(GENERAL_ERROR, 'Could not delete topic watch information', '', __LINE__, __FILE__, $sql); } } else if ($notify_user && empty($row['topic_id'])) { $sql = "INSERT INTO " . TOPICS_WATCH_TABLE . " (user_id, topic_id, notify_status) VALUES (" . $userdata['user_id'] . ", $topic_id, 0)"; if (!$db->sql_query($sql)) { mx_message_die(GENERAL_ERROR, 'Could not insert topic watch information', '', __LINE__, __FILE__, $sql); } } } } // // Fill smiley templates (or just the variables) with smileys // Either in a window or inline // function generate_smilies($mode, $page_id) { global $db, $board_config, $template, $lang, $images, $theme, $phpEx, $phpbb_root_path; global $user_ip, $session_length, $starttime; global $userdata; $inline_columns = 4; $inline_rows = 5; $window_columns = 8; if ($mode == 'window') { $userdata = session_pagestart($user_ip, $page_id); init_userprefs($userdata); $gen_simple_header = TRUE; $page_title = $lang['Emoticons']; include($phpbb_root_path . 'includes/page_header.'.$phpEx); $template->set_filenames(array( 'smiliesbody' => 'posting_smilies.tpl') ); } $sql = "SELECT emoticon, code, smile_url FROM " . SMILIES_TABLE . " ORDER BY smilies_id"; if ($result = $db->sql_query($sql)) { $num_smilies = 0; $rowset = array(); while ($row = $db->sql_fetchrow($result)) { if (empty($rowset[$row['smile_url']])) { $rowset[$row['smile_url']]['code'] = str_replace("'", "\\'", str_replace('\\', '\\\\', $row['code'])); $rowset[$row['smile_url']]['emoticon'] = $row['emoticon']; $num_smilies++; } } if ($num_smilies) { $smilies_count = ($mode == 'inline') ? min(19, $num_smilies) : $num_smilies; $smilies_split_row = ($mode == 'inline') ? $inline_columns - 1 : $window_columns - 1; $s_colspan = 0; $row = 0; $col = 0; while (list($smile_url, $data) = @each($rowset)) { if (!$col) { $template->assign_block_vars('smilies_row', array()); } $template->assign_block_vars('smilies_row.smilies_col', array( 'SMILEY_CODE' => $data['code'], 'SMILEY_IMG' => $board_config['smilies_path'] . '/' . $smile_url, 'SMILEY_DESC' => $data['emoticon']) ); $s_colspan = max($s_colspan, $col + 1); if ($col == $smilies_split_row) { if ($mode == 'inline' && $row == $inline_rows - 1) { break; } $col = 0; $row++; } else { $col++; } } if ($mode == 'inline' && $num_smilies > $inline_rows * $inline_columns) { $template->assign_block_vars('switch_smilies_extra', array()); $template->assign_vars(array( 'L_MORE_SMILIES' => $lang['More_emoticons'], 'U_MORE_SMILIES' => append_sid("posting.$phpEx?mode=smilies")) ); } $template->assign_vars(array( 'L_EMOTICONS' => $lang['Emoticons'], 'L_CLOSE_WINDOW' => $lang['Close_window'], 'S_SMILIES_COLSPAN' => $s_colspan) ); } } if ($mode == 'window') { $template->pparse('smiliesbody'); include($phpbb_root_path . 'includes/page_tail.'.$phpEx); } } /** * Called from within prepare_message to clean included HTML tags if HTML is * turned on for that post * @param array $tag Matching text from the message to parse */ function clean_html($tag) { global $board_config; if (empty($tag[0])) { return ''; } $allowed_html_tags = preg_split('/, */', strtolower($board_config['allow_html_tags'])); $disallowed_attributes = '/^(?:style|on)/i'; // Check if this is an end tag preg_match('/<[^\w\/]*\/[\W]*(\w+)/', $tag[0], $matches); if (sizeof($matches)) { if (in_array(strtolower($matches[1]), $allowed_html_tags)) { return '</' . $matches[1] . '>'; } else { return htmlspecialchars('</' . $matches[1] . '>'); } } // Check if this is an allowed tag if (in_array(strtolower($tag[1]), $allowed_html_tags)) { $attributes = ''; if (!empty($tag[2])) { preg_match_all('/[\W]*?(\w+)[\W]*?=[\W]*?(["\'])((?:(?!\2).)*)\2/', $tag[2], $test); for ($i = 0; $i < sizeof($test[0]); $i++) { if (preg_match($disallowed_attributes, $test[1][$i])) { continue; } $attributes .= ' ' . $test[1][$i] . '=' . $test[2][$i] . str_replace(array('[', ']'), array('[', ']'), htmlspecialchars($test[3][$i])) . $test[2][$i]; } } if (in_array(strtolower($tag[1]), $allowed_html_tags)) { return '<' . $tag[1] . $attributes . '>'; } else { return htmlspecialchars('<' . $tag[1] . $attributes . '>'); } } // Finally, this is not an allowed tag so strip all the attibutes and escape it else { return htmlspecialchars('<' . $tag[1] . '>'); } } ?> --- NEW FILE: bbcode.php --- <?php /*************************************************************************** * bbcode.php * ------------------- * begin : Saturday, Feb 13, 2001 * copyright : (C) 2001 The phpBB Group * email : su...@ph... * * $Id: bbcode.php,v 1.1 2008/09/18 07:43:31 orynider Exp $ * ***************************************************************************/ /*************************************************************************** * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * ***************************************************************************/ /* * MXBB MODIFICATIONS: * mx_dss_rand() * */ if ( !defined('IN_PHPBB') ) { die("Hacking attempt"); } define("BBCODE_UID_LEN", 10); // global that holds loaded-and-prepared bbcode templates, so we only have to do // that stuff once. $bbcode_tpl = null; /** * Loads bbcode templates from the bbcode.tpl file of the current template set. * Creates an array, keys are bbcode names like "b_open" or "url", values * are the associated template. * Probably pukes all over the place if there's something really screwed * with the bbcode.tpl file. * * Nathan Codding, Sept 26 2001. */ function load_bbcode_template() { global $template; $tpl_filename = $template->make_filename('bbcode.tpl'); $tpl = fread(fopen($tpl_filename, 'r'), filesize($tpl_filename)); // replace \ with \\ and then ' with \'. $tpl = str_replace('\\', '\\\\', $tpl); $tpl = str_replace('\'', '\\\'', $tpl); // strip newlines. $tpl = str_replace("\n", '', $tpl); // Turn template blocks into PHP assignment statements for the values of $bbcode_tpls.. $tpl = preg_replace('#<!-- BEGIN (.*?) -->(.*?)<!-- END (.*?) -->#', "\n" . '$bbcode_tpls[\'\\1\'] = \'\\2\';', $tpl); $bbcode_tpls = array(); eval($tpl); return $bbcode_tpls; } /** * Prepares the loaded bbcode templates for insertion into preg_replace() * or str_replace() calls in the bbencode_second_pass functions. This * means replacing template placeholders with the appropriate preg backrefs * or with language vars. NOTE: If you change how the regexps work in * bbencode_second_pass(), you MUST change this function. * * Nathan Codding, Sept 26 2001 * */ function prepare_bbcode_template($bbcode_tpl) { global $lang; $bbcode_tpl['olist_open'] = str_replace('{LIST_TYPE}', '\\1', $bbcode_tpl['olist_open']); $bbcode_tpl['color_open'] = str_replace('{COLOR}', '\\1', $bbcode_tpl['color_open']); $bbcode_tpl['size_open'] = str_replace('{SIZE}', '\\1', $bbcode_tpl['size_open']); $bbcode_tpl['quote_open'] = str_replace('{L_QUOTE}', $lang['Quote'], $bbcode_tpl['quote_open']); $bbcode_tpl['quote_username_open'] = str_replace('{L_QUOTE}', $lang['Quote'], $bbcode_tpl['quote_username_open']); $bbcode_tpl['quote_username_open'] = str_replace('{L_WROTE}', $lang['wrote'], $bbcode_tpl['quote_username_open']); $bbcode_tpl['quote_username_open'] = str_replace('{USERNAME}', '\\1', $bbcode_tpl['quote_username_open']); $bbcode_tpl['code_open'] = str_replace('{L_CODE}', $lang['Code'], $bbcode_tpl['code_open']); $bbcode_tpl['img'] = str_replace('{URL}', '\\1', $bbcode_tpl['img']); // We do URLs in several different ways.. $bbcode_tpl['url1'] = str_replace('{URL}', '\\1', $bbcode_tpl['url']); $bbcode_tpl['url1'] = str_replace('{DESCRIPTION}', '\\1', $bbcode_tpl['url1']); $bbcode_tpl['url2'] = str_replace('{URL}', 'http://\\1', $bbcode_tpl['url']); $bbcode_tpl['url2'] = str_replace('{DESCRIPTION}', '\\1', $bbcode_tpl['url2']); $bbcode_tpl['url3'] = str_replace('{URL}', '\\1', $bbcode_tpl['url']); $bbcode_tpl['url3'] = str_replace('{DESCRIPTION}', '\\2', $bbcode_tpl['url3']); $bbcode_tpl['url4'] = str_replace('{URL}', 'http://\\1', $bbcode_tpl['url']); $bbcode_tpl['url4'] = str_replace('{DESCRIPTION}', '\\3', $bbcode_tpl['url4']); $bbcode_tpl['email'] = str_replace('{EMAIL}', '\\1', $bbcode_tpl['email']); define("BBCODE_TPL_READY", true); return $bbcode_tpl; } /** * Does second-pass bbencoding. This should be used before displaying the message in * a thread. Assumes the message is already first-pass encoded, and we are given the * correct UID as used in first-pass encoding. */ function bbencode_second_pass($text, $uid) { global $lang, $bbcode_tpl; $text = preg_replace('#(script|about|applet|activex|chrome):#is', "\\1:", $text); // pad it with a space so we can distinguish between FALSE and matching the 1st char (index 0). // This is important; bbencode_quote(), bbencode_list(), and bbencode_code() all depend on it. $text = " " . $text; // First: If there isn't a "[" and a "]" in the message, don't bother. if (! (strpos($text, "[") && strpos($text, "]")) ) { // Remove padding, return. $text = substr($text, 1); return $text; } // Only load the templates ONCE.. if (!defined("BBCODE_TPL_READY")) { // load templates from file into array. $bbcode_tpl = load_bbcode_template(); // prepare array for use in regexps. $bbcode_tpl = prepare_bbcode_template($bbcode_tpl); } // [CODE] and [/CODE] for posting code (HTML, PHP, C etc etc) in your posts. $text = bbencode_second_pass_code($text, $uid, $bbcode_tpl); // [QUOTE] and [/QUOTE] for posting replies with quote, or just for quoting stuff. $text = str_replace("[quote:$uid]", $bbcode_tpl['quote_open'], $text); $text = str_replace("[/quote:$uid]", $bbcode_tpl['quote_close'], $text); // New one liner to deal with opening quotes with usernames... // replaces the two line version that I had here before.. $text = preg_replace("/\[quote:$uid=\"(.*?)\"\]/si", $bbcode_tpl['quote_username_open'], $text); // [list] and [list=x] for (un)ordered lists. // unordered lists $text = ... [truncated message content] |
|
From: FlorinCB <ory...@us...> - 2008-09-18 00:43:37
|
Update of /cvsroot/mxbb/mx_music/phpbb2/mx_mod/includes/shared/phpbb2/language/lang_english In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv19367/mx_mod/includes/shared/phpbb2/language/lang_english Added Files: lang_admin.php lang_main.php Log Message: upgrade --- NEW FILE: lang_main.php --- <?php /*************************************************************************** * lang_main.php [English] * ------------------- * begin : Sat Dec 16 2000 * copyright : (C) 2001 The phpBB Group * email : su...@ph... * * $Id: lang_main.php,v 1.1 2008/09/18 07:43:32 orynider Exp $ * ****************************************************************************/ /*************************************************************************** * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * ***************************************************************************/ // // CONTRIBUTORS: // Add your details here if wanted, e.g. Name, username, email address, website // 2002-08-27 Philip M. White - fixed many grammar problems // // // The format of this file is ---> $lang['message'] = 'text'; // // You should also try to set a locale and a character encoding (plus direction). The encoding and direction // will be sent to the template. The locale may or may not work, it's dependent on OS support and the syntax // varies ... give it your best guess! // $lang['ENCODING'] = 'iso-8859-1'; $lang['DIRECTION'] = 'ltr'; $lang['LEFT'] = 'left'; $lang['RIGHT'] = 'right'; $lang['DATE_FORMAT'] = 'd M Y'; // This should be changed to the default date format for your language, php date() format // This is optional, if you would like a _SHORT_ message output // along with our copyright message indicating you are the translator // please add it here. // $lang['TRANSLATION'] = ''; // // Common, these terms are used // extensively on several pages // $lang['Forum'] = 'Forum'; $lang['Category'] = 'Category'; $lang['Topic'] = 'Topic'; $lang['Topics'] = 'Topics'; $lang['Replies'] = 'Replies'; $lang['Views'] = 'Views'; $lang['Post'] = 'Post'; $lang['Posts'] = 'Posts'; $lang['Posted'] = 'Posted'; $lang['Username'] = 'Username'; $lang['Password'] = 'Password'; $lang['Email'] = 'Email'; $lang['Poster'] = 'Poster'; $lang['Author'] = 'Author'; $lang['Time'] = 'Time'; $lang['Hours'] = 'Hours'; $lang['Message'] = 'Message'; $lang['1_Day'] = '1 Day'; $lang['7_Days'] = '7 Days'; $lang['2_Weeks'] = '2 Weeks'; $lang['1_Month'] = '1 Month'; $lang['3_Months'] = '3 Months'; $lang['6_Months'] = '6 Months'; $lang['1_Year'] = '1 Year'; $lang['Go'] = 'Go'; $lang['Jump_to'] = 'Jump to'; $lang['Submit'] = 'Submit'; $lang['Reset'] = 'Reset'; $lang['Cancel'] = 'Cancel'; $lang['Preview'] = 'Preview'; $lang['Confirm'] = 'Confirm'; $lang['Spellcheck'] = 'Spellcheck'; $lang['Yes'] = 'Yes'; $lang['No'] = 'No'; $lang['Enabled'] = 'Enabled'; $lang['Disabled'] = 'Disabled'; $lang['Error'] = 'Error'; $lang['Next'] = 'Next'; $lang['Previous'] = 'Previous'; $lang['Goto_page'] = 'Goto page'; $lang['Joined'] = 'Joined'; $lang['IP_Address'] = 'IP Address'; $lang['Select_forum'] = 'Select a forum'; $lang['View_latest_post'] = 'View latest post'; $lang['View_newest_post'] = 'View newest post'; $lang['Page_of'] = 'Page <b>%d</b> of <b>%d</b>'; // Replaces with: Page 1 of 2 for example $lang['ICQ'] = 'ICQ Number'; $lang['AIM'] = 'AIM Address'; $lang['MSNM'] = 'MSN Messenger'; $lang['YIM'] = 'Yahoo Messenger'; $lang['Forum_Index'] = '%s Forum Index'; // eg. sitename Forum Index, %s can be removed if you prefer $lang['Post_new_topic'] = 'Post new topic'; $lang['Reply_to_topic'] = 'Reply to topic'; $lang['Reply_with_quote'] = 'Reply with quote'; $lang['Click_return_topic'] = 'Click %sHere%s to return to the topic'; // %s's here are for uris, do not remove! $lang['Click_return_login'] = 'Click %sHere%s to try again'; $lang['Click_return_forum'] = 'Click %sHere%s to return to the forum'; $lang['Click_view_message'] = 'Click %sHere%s to view your message'; $lang['Click_return_modcp'] = 'Click %sHere%s to return to the Moderator Control Panel'; $lang['Click_return_group'] = 'Click %sHere%s to return to group information'; $lang['Admin_panel'] = 'Go to Administration Panel'; $lang['Board_disable'] = 'Sorry, but this board is currently unavailable. Please try again later.'; // // Global Header strings // $lang['Registered_users'] = 'Registered Users:'; $lang['Browsing_forum'] = 'Users browsing this forum:'; $lang['Online_users_zero_total'] = 'In total there are <b>0</b> users online :: '; $lang['Online_users_total'] = 'In total there are <b>%d</b> users online :: '; $lang['Online_user_total'] = 'In total there is <b>%d</b> user online :: '; $lang['Reg_users_zero_total'] = '0 Registered, '; $lang['Reg_users_total'] = '%d Registered, '; $lang['Reg_user_total'] = '%d Registered, '; $lang['Hidden_users_zero_total'] = '0 Hidden and '; $lang['Hidden_user_total'] = '%d Hidden and '; $lang['Hidden_users_total'] = '%d Hidden and '; $lang['Guest_users_zero_total'] = '0 Guests'; $lang['Guest_users_total'] = '%d Guests'; $lang['Guest_user_total'] = '%d Guest'; $lang['Record_online_users'] = 'Most users ever online was <b>%s</b> on %s'; // first %s = number of users, second %s is the date. $lang['Admin_online_color'] = '%sAdministrator%s'; $lang['Mod_online_color'] = '%sModerator%s'; $lang['You_last_visit'] = 'You last visited on %s'; // %s replaced by date/time $lang['Current_time'] = 'The time now is %s'; // %s replaced by time $lang['Search_new'] = 'View posts since last visit'; $lang['Search_your_posts'] = 'View your posts'; $lang['Search_unanswered'] = 'View unanswered posts'; $lang['Register'] = 'Register'; $lang['Profile'] = 'Profile'; $lang['Edit_profile'] = 'Edit your profile'; $lang['Search'] = 'Search'; $lang['Memberlist'] = 'Memberlist'; $lang['FAQ'] = 'FAQ'; $lang['BBCode_guide'] = 'BBCode Guide'; $lang['Usergroups'] = 'Usergroups'; $lang['Last_Post'] = 'Last Post'; $lang['Moderator'] = 'Moderator'; $lang['Moderators'] = 'Moderators'; // // Stats block text // $lang['Posted_articles_zero_total'] = 'Our users have posted a total of <b>0</b> articles'; // Number of posts $lang['Posted_articles_total'] = 'Our users have posted a total of <b>%d</b> articles'; // Number of posts $lang['Posted_article_total'] = 'Our users have posted a total of <b>%d</b> article'; // Number of posts $lang['Registered_users_zero_total'] = 'We have <b>0</b> registered users'; // # registered users $lang['Registered_users_total'] = 'We have <b>%d</b> registered users'; // # registered users $lang['Registered_user_total'] = 'We have <b>%d</b> registered user'; // # registered users $lang['Newest_user'] = 'The newest registered user is <b>%s%s%s</b>'; // a href, username, /a $lang['No_new_posts_last_visit'] = 'No new posts since your last visit'; $lang['No_new_posts'] = 'No new posts'; $lang['New_posts'] = 'New posts'; $lang['New_post'] = 'New post'; $lang['No_new_posts_hot'] = 'No new posts [ Popular ]'; $lang['New_posts_hot'] = 'New posts [ Popular ]'; $lang['No_new_posts_locked'] = 'No new posts [ Locked ]'; $lang['New_posts_locked'] = 'New posts [ Locked ]'; $lang['Forum_is_locked'] = 'Forum is locked'; // // Login // $lang['Enter_password'] = 'Please enter your username and password to log in.'; $lang['Login'] = 'Log in'; $lang['Logout'] = 'Log out'; $lang['Forgotten_password'] = 'I forgot my password'; $lang['Log_me_in'] = 'Log me on automatically each visit'; $lang['Error_login'] = 'You have specified an incorrect or inactive username, or an invalid password.'; // // Index page // $lang['Index'] = 'Index'; $lang['No_Posts'] = 'No Posts'; $lang['No_forums'] = 'This board has no forums'; $lang['Private_Message'] = 'Private Message'; $lang['Private_Messages'] = 'Private Messages'; $lang['Who_is_Online'] = 'Who is Online'; $lang['Mark_all_forums'] = 'Mark all forums read'; $lang['Forums_marked_read'] = 'All forums have been marked read'; // // Viewforum // $lang['View_forum'] = 'View Forum'; $lang['Forum_not_exist'] = 'The forum you selected does not exist.'; $lang['Reached_on_error'] = 'You have reached this page in error.'; $lang['Display_topics'] = 'Display topics from previous'; $lang['All_Topics'] = 'All Topics'; $lang['Topic_Announcement'] = '<b>Announcement:</b>'; $lang['Topic_Sticky'] = '<b>Sticky:</b>'; $lang['Topic_Moved'] = '<b>Moved:</b>'; $lang['Topic_Poll'] = '<b>[ Poll ]</b>'; $lang['Mark_all_topics'] = 'Mark all topics read'; $lang['Topics_marked_read'] = 'The topics for this forum have now been marked read'; $lang['Rules_post_can'] = 'You <b>can</b> post new topics in this forum'; $lang['Rules_post_cannot'] = 'You <b>cannot</b> post new topics in this forum'; $lang['Rules_reply_can'] = 'You <b>can</b> reply to topics in this forum'; $lang['Rules_reply_cannot'] = 'You <b>cannot</b> reply to topics in this forum'; $lang['Rules_edit_can'] = 'You <b>can</b> edit your posts in this forum'; $lang['Rules_edit_cannot'] = 'You <b>cannot</b> edit your posts in this forum'; $lang['Rules_delete_can'] = 'You <b>can</b> delete your posts in this forum'; $lang['Rules_delete_cannot'] = 'You <b>cannot</b> delete your posts in this forum'; $lang['Rules_vote_can'] = 'You <b>can</b> vote in polls in this forum'; $lang['Rules_vote_cannot'] = 'You <b>cannot</b> vote in polls in this forum'; $lang['Rules_moderate'] = 'You <b>can</b> %smoderate this forum%s'; // %s replaced by a href links, do not remove! $lang['No_topics_post_one'] = 'There are no posts in this forum.<br />Click on the <b>Post New Topic</b> link on this page to post one.'; // // Viewtopic // $lang['View_topic'] = 'View topic'; $lang['Guest'] = 'Guest'; $lang['Post_subject'] = 'Post subject'; $lang['View_next_topic'] = 'View next topic'; $lang['View_previous_topic'] = 'View previous topic'; $lang['Submit_vote'] = 'Submit Vote'; $lang['View_results'] = 'View Results'; $lang['No_newer_topics'] = 'There are no newer topics in this forum'; $lang['No_older_topics'] = 'There are no older topics in this forum'; $lang['Topic_post_not_exist'] = 'The topic or post you requested does not exist'; $lang['No_posts_topic'] = 'No posts exist for this topic'; $lang['Display_posts'] = 'Display posts from previous'; $lang['All_Posts'] = 'All Posts'; $lang['Newest_First'] = 'Newest First'; $lang['Oldest_First'] = 'Oldest First'; $lang['Back_to_top'] = 'Back to top'; $lang['Read_profile'] = 'View user\'s profile'; $lang['Visit_website'] = 'Visit poster\'s website'; $lang['ICQ_status'] = 'ICQ Status'; $lang['Edit_delete_post'] = 'Edit/Delete this post'; $lang['View_IP'] = 'View IP address of poster'; $lang['Delete_post'] = 'Delete this post'; $lang['wrote'] = 'wrote'; // proceeds the username and is followed by the quoted text $lang['Quote'] = 'Quote'; // comes before bbcode quote output. $lang['Code'] = 'Code'; // comes before bbcode code output. $lang['Edited_time_total'] = 'Last edited by %s on %s; edited %d time in total'; // Last edited by me on 12 Oct 2001; edited 1 time in total $lang['Edited_times_total'] = 'Last edited by %s on %s; edited %d times in total'; // Last edited by me on 12 Oct 2001; edited 2 times in total $lang['Lock_topic'] = 'Lock this topic'; $lang['Unlock_topic'] = 'Unlock this topic'; $lang['Move_topic'] = 'Move this topic'; $lang['Delete_topic'] = 'Delete this topic'; $lang['Split_topic'] = 'Split this topic'; $lang['Stop_watching_topic'] = 'Stop watching this topic'; $lang['Start_watching_topic'] = 'Watch this topic for replies'; $lang['No_longer_watching'] = 'You are no longer watching this topic'; $lang['You_are_watching'] = 'You are now watching this topic'; $lang['Total_votes'] = 'Total Votes'; // // Posting/Replying (Not private messaging!) // $lang['Message_body'] = 'Message body'; $lang['Topic_review'] = 'Topic review'; $lang['No_post_mode'] = 'No post mode specified'; // If posting.php is called without a mode (newtopic/reply/delete/etc, shouldn't be shown normaly) $lang['Post_a_new_topic'] = 'Post a new topic'; $lang['Post_a_reply'] = 'Post a reply'; $lang['Post_topic_as'] = 'Post topic as'; $lang['Edit_Post'] = 'Edit post'; $lang['Options'] = 'Options'; $lang['Post_Announcement'] = 'Announcement'; $lang['Post_Sticky'] = 'Sticky'; $lang['Post_Normal'] = 'Normal'; $lang['Confirm_delete'] = 'Are you sure you want to delete this post?'; $lang['Confirm_delete_poll'] = 'Are you sure you want to delete this poll?'; $lang['Flood_Error'] = 'You cannot make another post so soon after your last; please try again in a short while.'; $lang['Empty_subject'] = 'You must specify a subject when posting a new topic.'; $lang['Empty_message'] = 'You must enter a message when posting.'; $lang['Forum_locked'] = 'This forum is locked: you cannot post, reply to, or edit topics.'; $lang['Topic_locked'] = 'This topic is locked: you cannot edit posts or make replies.'; $lang['No_post_id'] = 'You must select a post to edit'; $lang['No_topic_id'] = 'You must select a topic to reply to'; $lang['No_valid_mode'] = 'You can only post, reply, edit, or quote messages. Please return and try again.'; $lang['No_such_post'] = 'There is no such post. Please return and try again.'; $lang['Edit_own_posts'] = 'Sorry, but you can only edit your own posts.'; $lang['Delete_own_posts'] = 'Sorry, but you can only delete your own posts.'; $lang['Cannot_delete_replied'] = 'Sorry, but you may not delete posts that have been replied to.'; $lang['Cannot_delete_poll'] = 'Sorry, but you cannot delete an active poll.'; $lang['Empty_poll_title'] = 'You must enter a title for your poll.'; $lang['To_few_poll_options'] = 'You must enter at least two poll options.'; $lang['To_many_poll_options'] = 'You have tried to enter too many poll options.'; $lang['Post_has_no_poll'] = 'This post has no poll.'; $lang['Already_voted'] = 'You have already voted in this poll.'; $lang['No_vote_option'] = 'You must specify an option when voting.'; $lang['Add_poll'] = 'Add a Poll'; $lang['Add_poll_explain'] = 'If you do not want to add a poll to your topic, leave the fields blank.'; $lang['Poll_question'] = 'Poll question'; $lang['Poll_option'] = 'Poll option'; $lang['Add_option'] = 'Add option'; $lang['Update'] = 'Update'; $lang['Delete'] = 'Delete'; $lang['Poll_for'] = 'Run poll for'; $lang['Days'] = 'Days'; // This is used for the Run poll for ... Days + in admin_forums for pruning $lang['Poll_for_explain'] = '[ Enter 0 or leave blank for a never-ending poll ]'; $lang['Delete_poll'] = 'Delete Poll'; $lang['Disable_HTML_post'] = 'Disable HTML in this post'; $lang['Disable_BBCode_post'] = 'Disable BBCode in this post'; $lang['Disable_Smilies_post'] = 'Disable Smilies in this post'; $lang['HTML_is_ON'] = 'HTML is <u>ON</u>'; $lang['HTML_is_OFF'] = 'HTML is <u>OFF</u>'; $lang['BBCode_is_ON'] = '%sBBCode%s is <u>ON</u>'; // %s are replaced with URI pointing to FAQ $lang['BBCode_is_OFF'] = '%sBBCode%s is <u>OFF</u>'; $lang['Smilies_are_ON'] = 'Smilies are <u>ON</u>'; $lang['Smilies_are_OFF'] = 'Smilies are <u>OFF</u>'; $lang['Attach_signature'] = 'Attach signature (signatures can be changed in profile)'; $lang['Notify'] = 'Notify me when a reply is posted'; $lang['Stored'] = 'Your message has been entered successfully.'; $lang['Deleted'] = 'Your message has been deleted successfully.'; $lang['Poll_delete'] = 'Your poll has been deleted successfully.'; $lang['Vote_cast'] = 'Your vote has been cast.'; $lang['Topic_reply_notification'] = 'Topic Reply Notification'; $lang['bbcode_b_help'] = 'Bold text: [b]text[/b] (alt+b)'; $lang['bbcode_i_help'] = 'Italic text: [i]text[/i] (alt+i)'; $lang['bbcode_u_help'] = 'Underline text: [u]text[/u] (alt+u)'; $lang['bbcode_q_help'] = 'Quote text: [quote]text[/quote] (alt+q)'; $lang['bbcode_c_help'] = 'Code display: [code]code[/code] (alt+c)'; $lang['bbcode_l_help'] = 'List: [list]text[/list] (alt+l)'; $lang['bbcode_o_help'] = 'Ordered list: [list=]text[/list] (alt+o)'; $lang['bbcode_p_help'] = 'Insert image: [img]http://image_url[/img] (alt+p)'; $lang['bbcode_w_help'] = 'Insert URL: [url]http://url[/url] or [url=http://url]URL text[/url] (alt+w)'; $lang['bbcode_a_help'] = 'Close all open bbCode tags'; $lang['bbcode_s_help'] = 'Font color: [color=red]text[/color] Tip: you can also use color=#FF0000'; $lang['bbcode_f_help'] = 'Font size: [size=x-small]small text[/size]'; $lang['Emoticons'] = 'Emoticons'; $lang['More_emoticons'] = 'View more Emoticons'; $lang['Font_color'] = 'Font colour'; $lang['color_default'] = 'Default'; $lang['color_dark_red'] = 'Dark Red'; $lang['color_red'] = 'Red'; $lang['color_orange'] = 'Orange'; $lang['color_brown'] = 'Brown'; $lang['color_yellow'] = 'Yellow'; $lang['color_green'] = 'Green'; $lang['color_olive'] = 'Olive'; $lang['color_cyan'] = 'Cyan'; $lang['color_blue'] = 'Blue'; $lang['color_dark_blue'] = 'Dark Blue'; $lang['color_indigo'] = 'Indigo'; $lang['color_violet'] = 'Violet'; $lang['color_white'] = 'White'; $lang['color_black'] = 'Black'; $lang['Font_size'] = 'Font size'; $lang['font_tiny'] = 'Tiny'; $lang['font_small'] = 'Small'; $lang['font_normal'] = 'Normal'; $lang['font_large'] = 'Large'; $lang['font_huge'] = 'Huge'; $lang['Close_Tags'] = 'Close Tags'; $lang['Styles_tip'] = 'Tip: Styles can be applied quickly to selected text.'; // // Private Messaging // $lang['Private_Messaging'] = 'Private Messaging'; $lang['Login_check_pm'] = 'Log in to check your private messages'; $lang['New_pms'] = 'You have %d new messages'; // You have 2 new messages $lang['New_pm'] = 'You have %d new message'; // You have 1 new message $lang['No_new_pm'] = 'You have no new messages'; $lang['Unread_pms'] = 'You have %d unread messages'; $lang['Unread_pm'] = 'You have %d unread message'; $lang['No_unread_pm'] = 'You have no unread messages'; $lang['You_new_pm'] = 'A new private message is waiting for you in your Inbox'; $lang['You_new_pms'] = 'New private messages are waiting for you in your Inbox'; $lang['You_no_new_pm'] = 'No new private messages are waiting for you'; $lang['Unread_message'] = 'Unread message'; $lang['Read_message'] = 'Read message'; $lang['Read_pm'] = 'Read message'; $lang['Post_new_pm'] = 'Post message'; $lang['Post_reply_pm'] = 'Reply to message'; $lang['Post_quote_pm'] = 'Quote message'; $lang['Edit_pm'] = 'Edit message'; $lang['Inbox'] = 'Inbox'; $lang['Outbox'] = 'Outbox'; $lang['Savebox'] = 'Savebox'; $lang['Sentbox'] = 'Sentbox'; $lang['Flag'] = 'Flag'; $lang['Subject'] = 'Subject'; $lang['From'] = 'From'; $lang['To'] = 'To'; $lang['Date'] = 'Date'; $lang['Mark'] = 'Mark'; $lang['Sent'] = 'Sent'; $lang['Saved'] = 'Saved'; $lang['Delete_marked'] = 'Delete Marked'; $lang['Delete_all'] = 'Delete All'; $lang['Save_marked'] = 'Save Marked'; $lang['Save_message'] = 'Save Message'; $lang['Delete_message'] = 'Delete Message'; $lang['Display_messages'] = 'Display messages from previous'; // Followed by number of days/weeks/months $lang['All_Messages'] = 'All Messages'; $lang['No_messages_folder'] = 'You have no messages in this folder'; $lang['PM_disabled'] = 'Private messaging has been disabled on this board.'; $lang['Cannot_send_privmsg'] = 'Sorry, but the administrator has prevented you from sending private messages.'; $lang['No_to_user'] = 'You must specify a username to whom to send this message.'; $lang['No_such_user'] = 'Sorry, but no such user exists.'; $lang['Disable_HTML_pm'] = 'Disable HTML in this message'; $lang['Disable_BBCode_pm'] = 'Disable BBCode in this message'; $lang['Disable_Smilies_pm'] = 'Disable Smilies in this message'; $lang['Message_sent'] = 'Your message has been sent.'; $lang['Click_return_inbox'] = 'Click %sHere%s to return to your Inbox'; $lang['Click_return_index'] = 'Click %sHere%s to return to the Index'; $lang['Send_a_new_message'] = 'Send a new private message'; $lang['Send_a_reply'] = 'Reply to a private message'; $lang['Edit_message'] = 'Edit private message'; $lang['Notification_subject'] = 'New Private Message has arrived!'; $lang['Find_username'] = 'Find a username'; $lang['Find'] = 'Find'; $lang['No_match'] = 'No matches found.'; $lang['No_post_id'] = 'No post ID was specified'; $lang['No_such_folder'] = 'No such folder exists'; $lang['No_folder'] = 'No folder specified'; $lang['Mark_all'] = 'Mark all'; $lang['Unmark_all'] = 'Unmark all'; $lang['Confirm_delete_pm'] = 'Are you sure you want to delete this message?'; $lang['Confirm_delete_pms'] = 'Are you sure you want to delete these messages?'; $lang['Inbox_size'] = 'Your Inbox is %d%% full'; // eg. Your Inbox is 50% full $lang['Sentbox_size'] = 'Your Sentbox is %d%% full'; $lang['Savebox_size'] = 'Your Savebox is %d%% full'; $lang['Click_view_privmsg'] = 'Click %sHere%s to visit your Inbox'; // // Profiles/Registration // $lang['Viewing_user_profile'] = 'Viewing profile :: %s'; // %s is username $lang['About_user'] = 'All about %s'; // %s is username $lang['Preferences'] = 'Preferences'; $lang['Items_required'] = 'Items marked with a * are required unless stated otherwise.'; $lang['Registration_info'] = 'Registration Information'; $lang['Profile_info'] = 'Profile Information'; $lang['Profile_info_warn'] = 'This information will be publicly viewable'; $lang['Avatar_panel'] = 'Avatar control panel'; $lang['Avatar_gallery'] = 'Avatar gallery'; $lang['Website'] = 'Website'; $lang['Location'] = 'Location'; $lang['Contact'] = 'Contact'; $lang['Email_address'] = 'E-mail address'; $lang['Send_private_message'] = 'Send private message'; $lang['Hidden_email'] = '[ Hidden ]'; $lang['Interests'] = 'Interests'; $lang['Occupation'] = 'Occupation'; $lang['Poster_rank'] = 'Poster rank'; $lang['Total_posts'] = 'Total posts'; $lang['User_post_pct_stats'] = '%.2f%% of total'; // 1.25% of total $lang['User_post_day_stats'] = '%.2f posts per day'; // 1.5 posts per day $lang['Search_user_posts'] = 'Find all posts by %s'; // Find all posts by username $lang['No_user_id_specified'] = 'Sorry, but that user does not exist.'; $lang['Wrong_Profile'] = 'You cannot modify a profile that is not your own.'; $lang['Only_one_avatar'] = 'Only one type of avatar can be specified'; $lang['File_no_data'] = 'The file at the URL you gave contains no data'; $lang['No_connection_URL'] = 'A connection could not be made to the URL you gave'; $lang['Incomplete_URL'] = 'The URL you entered is incomplete'; $lang['Wrong_remote_avatar_format'] = 'The URL of the remote avatar is not valid'; $lang['No_send_account_inactive'] = 'Sorry, but your password cannot be retrieved because your account is currently inactive. Please contact the forum administrator for more information.'; $lang['Always_smile'] = 'Always enable Smilies'; $lang['Always_html'] = 'Always allow HTML'; $lang['Always_bbcode'] = 'Always allow BBCode'; $lang['Always_add_sig'] = 'Always attach my signature'; $lang['Always_notify'] = 'Always notify me of replies'; $lang['Always_notify_explain'] = 'Sends an e-mail when someone replies to a topic you have posted in. This can be changed whenever you post.'; $lang['Board_style'] = 'Board Style'; $lang['Board_lang'] = 'Board Language'; $lang['No_themes'] = 'No Themes In database'; $lang['Timezone'] = 'Timezone'; $lang['Date_format'] = 'Date format'; $lang['Date_format_explain'] = 'The syntax used is identical to the PHP <a href=\'http://www.php.net/date\' target=\'_other\'>date()</a> function.'; $lang['Signature'] = 'Signature'; $lang['Signature_explain'] = 'This is a block of text that can be added to posts you make. There is a %d character limit'; $lang['Public_view_email'] = 'Always show my e-mail address'; $lang['Current_password'] = 'Current password'; $lang['New_password'] = 'New password'; $lang['Confirm_password'] = 'Confirm password'; $lang['Confirm_password_explain'] = 'You must confirm your current password if you wish to change it or alter your e-mail address'; $lang['password_if_changed'] = 'You only need to supply a password if you want to change it'; $lang['password_confirm_if_changed'] = 'You only need to confirm your password if you changed it above'; $lang['Avatar'] = 'Avatar'; $lang['Avatar_explain'] = 'Displays a small graphic image below your details in posts. Only one image can be displayed at a time, its width can be no greater than %d pixels, the height no greater than %d pixels, and the file size no more than %d KB.'; $lang['Upload_Avatar_file'] = 'Upload Avatar from your machine'; $lang['Upload_Avatar_URL'] = 'Upload Avatar from a URL'; $lang['Upload_Avatar_URL_explain'] = 'Enter the URL of the location containing the Avatar image, it will be copied to this site.'; $lang['Pick_local_Avatar'] = 'Select Avatar from the gallery'; $lang['Link_remote_Avatar'] = 'Link to off-site Avatar'; $lang['Link_remote_Avatar_explain'] = 'Enter the URL of the location containing the Avatar image you wish to link to.'; $lang['Avatar_URL'] = 'URL of Avatar Image'; $lang['Select_from_gallery'] = 'Select Avatar from gallery'; $lang['View_avatar_gallery'] = 'Show gallery'; $lang['Select_avatar'] = 'Select avatar'; $lang['Return_profile'] = 'Cancel avatar'; $lang['Select_category'] = 'Select category'; $lang['Delete_Image'] = 'Delete Image'; $lang['Current_Image'] = 'Current Image'; $lang['Notify_on_privmsg'] = 'Notify on new Private Message'; $lang['Popup_on_privmsg'] = 'Pop up window on new Private Message'; $lang['Popup_on_privmsg_explain'] = 'Some templates may open a new window to inform you when new private messages arrive.'; $lang['Hide_user'] = 'Hide your online status'; $lang['Profile_updated'] = 'Your profile has been updated'; $lang['Profile_updated_inactive'] = 'Your profile has been updated. However, you have changed vital details, thus your account is now inactive. Check your e-mail to find out how to reactivate your account, or if admin activation is required, wait for the administrator to reactivate it.'; $lang['Password_mismatch'] = 'The passwords you entered did not match.'; $lang['Current_password_mismatch'] = 'The current password you supplied does not match that stored in the database.'; $lang['Password_long'] = 'Your password must be no more than 32 characters.'; $lang['Username_taken'] = 'Sorry, but this username has already been taken.'; $lang['Username_invalid'] = 'Sorry, but this username contains an invalid character such as \'.'; $lang['Username_disallowed'] = 'Sorry, but this username has been disallowed.'; $lang['Email_taken'] = 'Sorry, but that e-mail address is already registered to a user.'; $lang['Email_banned'] = 'Sorry, but this e-mail address has been banned.'; $lang['Email_invalid'] = 'Sorry, but this e-mail address is invalid.'; $lang['Signature_too_long'] = 'Your signature is too long.'; $lang['Fields_empty'] = 'You must fill in the required fields.'; $lang['Avatar_filetype'] = 'The avatar filetype must be .jpg, .gif or .png'; $lang['Avatar_filesize'] = 'The avatar image file size must be less than %d KB'; // The avatar image file size must be less than 6 KB $lang['Avatar_imagesize'] = 'The avatar must be less than %d pixels wide and %d pixels high'; $lang['Welcome_subject'] = 'Welcome to %s Forums'; // Welcome to my.com forums $lang['New_account_subject'] = 'New user account'; $lang['Account_activated_subject'] = 'Account Activated'; $lang['Account_added'] = 'Thank you for registering. Your account has been created. You may now log in with your username and password'; $lang['Account_inactive'] = 'Your account has been created. However, this forum requires account activation. An activation key has been sent to the e-mail address you provided. Please check your e-mail for further information'; $lang['Account_inactive_admin'] = 'Your account has been created. However, this forum requires account activation by the administrator. An e-mail has been sent to them and you will be informed when your account has been activated'; $lang['Account_active'] = 'Your account has now been activated. Thank you for registering'; $lang['Account_active_admin'] = 'The account has now been activated'; $lang['Reactivate'] = 'Reactivate your account!'; $lang['Already_activated'] = 'You have already activated your account'; $lang['COPPA'] = 'Your account has been created but has to be approved. Please check your e-mail for details.'; $lang['Registration'] = 'Registration Agreement Terms'; $lang['Reg_agreement'] = 'While the administrators and moderators of this forum will attempt to remove or edit any generally objectionable material as quickly as possible, it is impossible to review every message. Therefore you acknowledge that all posts made to these forums express the views and opinions of the author and not the administrators, moderators or webmaster (except for posts by these people) and hence will not be held liable.<br /><br />You agree not to post any abusive, obscene, vulgar, slanderous, hateful, threatening, sexually-oriented or any other material that may violate any applicable laws. Doing so may lead to you being immediately and permanently banned (and your service provider being informed). The IP address of all posts is recorded to aid in enforcing these conditions. You agree that the webmaster, administrator and moderators of this forum have the right to remove, edit, move or close any topic at any time should they see fit. As a user you agree to any information you have entered above being stored in a database. While this information will not be disclosed to any third party without your consent the webmaster, administrator and moderators cannot be held responsible for any hacking attempt that may lead to the data being compromised.<br /><br />This forum system uses cookies to store information on your local computer. These cookies do not contain any of the information you have entered above; they serve only to improve your viewing pleasure. The e-mail address is used only for confirming your registration details and password (and for sending new passwords should you forget your current one).<br /><br />By clicking Register below you agree to be bound by these conditions.'; $lang['Agree_under_13'] = 'I Agree to these terms and am <b>under</b> 13 years of age'; $lang['Agree_over_13'] = 'I Agree to these terms and am <b>over</b> or <b>exactly</b> 13 years of age'; $lang['Agree_not'] = 'I do not agree to these terms'; $lang['Wrong_activation'] = 'The activation key you supplied does not match any in the database.'; $lang['Send_password'] = 'Send me a new password'; $lang['Password_updated'] = 'A new password has been created; please check your e-mail for details on how to activate it.'; $lang['No_email_match'] = 'The e-mail address you supplied does not match the one listed for that username.'; $lang['New_password_activation'] = 'New password activation'; $lang['Password_activated'] = 'Your account has been re-activated. To log in, please use the password supplied in the e-mail you received.'; $lang['Send_email_msg'] = 'Send an e-mail message'; $lang['No_user_specified'] = 'No user was specified'; $lang['User_prevent_email'] = 'This user does not wish to receive e-mail. Try sending them a private message.'; $lang['User_not_exist'] = 'That user does not exist'; $lang['CC_email'] = 'Send a copy of this e-mail to yourself'; $lang['Email_message_desc'] = 'This message will be sent as plain text, so do not include any HTML or BBCode. The return address for this message will be set to your e-mail address.'; $lang['Flood_email_limit'] = 'You cannot send another e-mail at this time. Try again later.'; $lang['Recipient'] = 'Recipient'; $lang['Email_sent'] = 'The e-mail has been sent.'; $lang['Send_email'] = 'Send e-mail'; $lang['Empty_subject_email'] = 'You must specify a subject for the e-mail.'; $lang['Empty_message_email'] = 'You must enter a message to be e-mailed.'; // // Visual confirmation system strings // $lang['Confirm_code_wrong'] = 'The confirmation code you entered was incorrect'; $lang['Too_many_registers'] = 'You have exceeded the number of registration attempts for this session. Please try again later.'; $lang['Confirm_code_impaired'] = 'If you are visually impaired or cannot otherwise read this code please contact the %sAdministrator%s for help.'; $lang['Confirm_code'] = 'Confirmation code'; $lang['Confirm_code_explain'] = 'Enter the code exactly as you see it. The code is case sensitive and zero has a diagonal line through it.'; // // Memberslist // $lang['Select_sort_method'] = 'Select sort method'; $lang['Sort'] = 'Sort'; $lang['Sort_Top_Ten'] = 'Top Ten Posters'; $lang['Sort_Joined'] = 'Joined Date'; $lang['Sort_Username'] = 'Username'; $lang['Sort_Location'] = 'Location'; $lang['Sort_Posts'] = 'Total posts'; $lang['Sort_Email'] = 'Email'; $lang['Sort_Website'] = 'Website'; $lang['Sort_Ascending'] = 'Ascending'; $lang['Sort_Descending'] = 'Descending'; $lang['Order'] = 'Order'; // // Search // $lang['Search_query'] = 'Search Query'; $lang['Search_options'] = 'Search Options'; $lang['Search_keywords'] = 'Search for Keywords'; $lang['Search_keywords_explain'] = 'You can use <u>AND</u> to define words which must be in the results, <u>OR</u> to define words which may be in the result and <u>NOT</u> to define words which should not be in the result. Use * as a wildcard for partial matches'; $lang['Search_author'] = 'Search for Author'; $lang['Search_author_explain'] = 'Use * as a wildcard for partial matches'; $lang['Search_for_any'] = 'Search for any terms or use query as entered'; $lang['Search_for_all'] = 'Search for all terms'; $lang['Search_title_msg'] = 'Search topic title and message text'; $lang['Search_msg_only'] = 'Search message text only'; $lang['Return_first'] = 'Return first'; // followed by xxx characters in a select box $lang['characters_posts'] = 'characters of posts'; $lang['Search_previous'] = 'Search previous'; // followed by days, weeks, months, year, all in a select box $lang['Sort_by'] = 'Sort by'; $lang['Sort_Time'] = 'Post Time'; $lang['Sort_Post_Subject'] = 'Post Subject'; $lang['Sort_Topic_Title'] = 'Topic Title'; $lang['Sort_Author'] = 'Author'; $lang['Sort_Forum'] = 'Forum'; $lang['Display_results'] = 'Display results as'; $lang['All_available'] = 'All available'; $lang['No_searchable_forums'] = 'You do not have permissions to search any forum on this site.'; $lang['No_search_match'] = 'No topics or posts met your search criteria'; $lang['Found_search_match'] = 'Search found %d match'; // eg. Search found 1 match $lang['Found_search_matches'] = 'Search found %d matches'; // eg. Search found 24 matches $lang['Search_Flood_Error'] = 'You cannot make another search so soon after your last; please try again in a short while.'; $lang['Close_window'] = 'Close Window'; // // Auth related entries // // Note the %s will be replaced with one of the following 'user' arrays $lang['Sorry_auth_announce'] = 'Sorry, but only %s can post announcements in this forum.'; $lang['Sorry_auth_sticky'] = 'Sorry, but only %s can post sticky messages in this forum.'; $lang['Sorry_auth_read'] = 'Sorry, but only %s can read topics in this forum.'; $lang['Sorry_auth_post'] = 'Sorry, but only %s can post topics in this forum.'; $lang['Sorry_auth_reply'] = 'Sorry, but only %s can reply to posts in this forum.'; $lang['Sorry_auth_edit'] = 'Sorry, but only %s can edit posts in this forum.'; $lang['Sorry_auth_delete'] = 'Sorry, but only %s can delete posts in this forum.'; $lang['Sorry_auth_vote'] = 'Sorry, but only %s can vote in polls in this forum.'; // These replace the %s in the above strings $lang['Auth_Anonymous_Users'] = '<b>anonymous users</b>'; $lang['Auth_Registered_Users'] = '<b>registered users</b>'; $lang['Auth_Users_granted_access'] = '<b>users granted special access</b>'; $lang['Auth_Moderators'] = '<b>moderators</b>'; $lang['Auth_Administrators'] = '<b>administrators</b>'; $lang['Not_Moderator'] = 'You are not a moderator of this forum.'; $lang['Not_Authorised'] = 'Not Authorised'; $lang['You_been_banned'] = 'You have been banned from this forum.<br />Please contact the webmaster or board administrator for more information.'; // // Viewonline // $lang['Reg_users_zero_online'] = 'There are 0 Registered users and '; // There are 5 Registered and $lang['Reg_users_online'] = 'There are %d Registered users and '; // There are 5 Registered and $lang['Reg_user_online'] = 'There is %d Registered user and '; // There is 1 Registered and $lang['Hidden_users_zero_online'] = '0 Hidden users online'; // 6 Hidden users online $lang['Hidden_users_online'] = '%d Hidden users online'; // 6 Hidden users online $lang['Hidden_user_online'] = '%d Hidden user online'; // 6 Hidden users online $lang['Guest_users_online'] = 'There are %d Guest users online'; // There are 10 Guest users online $lang['Guest_users_zero_online'] = 'There are 0 Guest users online'; // There are 10 Guest users online $lang['Guest_user_online'] = 'There is %d Guest user online'; // There is 1 Guest user online $lang['No_users_browsing'] = 'There are no users currently browsing this forum'; $lang['Online_explain'] = 'This data is based on users active over the past five minutes'; $lang['Forum_Location'] = 'Forum Location'; $lang['Last_updated'] = 'Last Updated'; $lang['Forum_index'] = 'Forum index'; $lang['Logging_on'] = 'Logging on'; $lang['Posting_message'] = 'Posting a message'; $lang['Searching_forums'] = 'Searching forums'; $lang['Viewing_profile'] = 'Viewing profile'; $lang['Viewing_online'] = 'Viewing who is online'; $lang['Viewing_member_list'] = 'Viewing member list'; $lang['Viewing_priv_msgs'] = 'Viewing Private Messages'; $lang['Viewing_FAQ'] = 'Viewing FAQ'; // // Moderator Control Panel // $lang['Mod_CP'] = 'Moderator Control Panel'; $lang['Mod_CP_explain'] = 'Using the form below you can perform mass moderation operations on this forum. You can lock, unlock, move or delete any number of topics.'; $lang['Select'] = 'Select'; $lang['Delete'] = 'Delete'; $lang['Move'] = 'Move'; $lang['Lock'] = 'Lock'; $lang['Unlock'] = 'Unlock'; $lang['Topics_Removed'] = 'The selected topics have been successfully removed from the database.'; $lang['Topics_Locked'] = 'The selected topics have been locked.'; $lang['Topics_Moved'] = 'The selected topics have been moved.'; $lang['Topics_Unlocked'] = 'The selected topics have been unlocked.'; $lang['No_Topics_Moved'] = 'No topics were moved.'; $lang['Confirm_delete_topic'] = 'Are you sure you want to remove the selected topic/s?'; $lang['Confirm_lock_topic'] = 'Are you sure you want to lock the selected topic/s?'; $lang['Confirm_unlock_topic'] = 'Are you sure you want to unlock the selected topic/s?'; $lang['Confirm_move_topic'] = 'Are you sure you want to move the selected topic/s?'; $lang['Move_to_forum'] = 'Move to forum'; $lang['Leave_shadow_topic'] = 'Leave shadow topic in old forum.'; $lang['Split_Topic'] = 'Split Topic Control Panel'; $lang['Split_Topic_explain'] = 'Using the form below you can split a topic in two, either by selecting the posts individually or by splitting at a selected post'; $lang['Split_title'] = 'New topic title'; $lang['Split_forum'] = 'Forum for new topic'; $lang['Split_posts'] = 'Split selected posts'; $lang['Split_after'] = 'Split from selected post'; $lang['Topic_split'] = 'The selected topic has been split successfully'; $lang['Too_many_error'] = 'You have selected too many posts. You can only select one post to split a topic after!'; $lang['None_selected'] = 'You have not selected any topics to perform this operation on. Please go back and select at least one.'; $lang['New_forum'] = 'New forum'; $lang['This_posts_IP'] = 'IP address for this post'; $lang['Other_IP_this_user'] = 'Other IP addresses this user has posted from'; $lang['Users_this_IP'] = 'Users posting from this IP address'; $lang['IP_info'] = 'IP Information'; $lang['Lookup_IP'] = 'Look up IP address'; // // Timezones ... for display on each page // $lang['All_times'] = 'All times are %s'; // eg. All times are GMT - 12 Hours (times from next block) $lang['-12'] = 'GMT - 12 Hours'; $lang['-11'] = 'GMT - 11 Hours'; $lang['-10'] = 'GMT - 10 Hours'; $lang['-9'] = 'GMT - 9 Hours'; $lang['-8'] = 'GMT - 8 Hours'; $lang['-7'] = 'GMT - 7 Hours'; $lang['-6'] = 'GMT - 6 Hours'; $lang['-5'] = 'GMT - 5 Hours'; $lang['-4'] = 'GMT - 4 Hours'; $lang['-3.5'] = 'GMT - 3.5 Hours'; $lang['-3'] = 'GMT - 3 Hours'; $lang['-2'] = 'GMT - 2 Hours'; $lang['-1'] = 'GMT - 1 Hours'; $lang['0'] = 'GMT'; $lang['1'] = 'GMT + 1 Hour'; $lang['2'] = 'GMT + 2 Hours'; $lang['3'] = 'GMT + 3 Hours'; $lang['3.5'] = 'GMT + 3.5 Hours'; $lang['4'] = 'GMT + 4 Hours'; $lang['4.5'] = 'GMT + 4.5 Hours'; $lang['5'] = 'GMT + 5 Hours'; $lang['5.5'] = 'GMT + 5.5 Hours'; $lang['6'] = 'GMT + 6 Hours'; $lang['6.5'] = 'GMT + 6.5 Hours'; $lang['7'] = 'GMT + 7 Hours'; $lang['8'] = 'GMT + 8 Hours'; $lang['9'] = 'GMT + 9 Hours'; $lang['9.5'] = 'GMT + 9.5 Hours'; $lang['10'] = 'GMT + 10 Hours'; $lang['11'] = 'GMT + 11 Hours'; $lang['12'] = 'GMT + 12 Hours'; $lang['13'] = 'GMT + 13 Hours'; // These are displayed in the timezone select box $lang['tz']['-12'] = 'GMT - 12 Hours'; $lang['tz']['-11'] = 'GMT - 11 Hours'; $lang['tz']['-10'] = 'GMT - 10 Hours'; $lang['tz']['-9'] = 'GMT - 9 Hours'; $lang['tz']['-8'] = 'GMT - 8 Hours'; $lang['tz']['-7'] = 'GMT - 7 Hours'; $lang['tz']['-6'] = 'GMT - 6 Hours'; $lang['tz']['-5'] = 'GMT - 5 Hours'; $lang['tz']['-4'] = 'GMT - 4 Hours'; $lang['tz']['-3.5'] = 'GMT - 3.5 Hours'; $lang['tz']['-3'] = 'GMT - 3 Hours'; $lang['tz']['-2'] = 'GMT - 2 Hours'; $lang['tz']['-1'] = 'GMT - 1 Hours'; $lang['tz']['0'] = 'GMT'; $lang['tz']['1'] = 'GMT + 1 Hour'; $lang['tz']['2'] = 'GMT + 2 Hours'; $lang['tz']['3'] = 'GMT + 3 Hours'; $lang['tz']['3.5'] = 'GMT + 3.5 Hours'; $lang['tz']['4'] = 'GMT + 4 Hours'; $lang['tz']['4.5'] = 'GMT + 4.5 Hours'; $lang['tz']['5'] = 'GMT + 5 Hours'; $lang['tz']['5.5'] = 'GMT + 5.5 Hours'; $lang['tz']['6'] = 'GMT + 6 Hours'; $lang['tz']['6.5'] = 'GMT + 6.5 Hours'; $lang['tz']['7'] = 'GMT + 7 Hours'; $lang['tz']['8'] = 'GMT + 8 Hours'; $lang['tz']['9'] = 'GMT + 9 Hours'; $lang['tz']['9.5'] = 'GMT + 9.5 Hours'; $lang['tz']['10'] = 'GMT + 10 Hours'; $lang['tz']['11'] = 'GMT + 11 Hours'; $lang['tz']['12'] = 'GMT + 12 Hours'; $lang['tz']['13'] = 'GMT + 13 Hours'; $lang['datetime']['Sunday'] = 'Sunday'; $lang['datetime']['Monday'] = 'Monday'; $lang['datetime']['Tuesday'] = 'Tuesday'; $lang['datetime']['Wednesday'] = 'Wednesday'; $lang['datetime']['Thursday'] = 'Thursday'; $lang['datetime']['Friday'] = 'Friday'; $lang['datetime']['Saturday'] = 'Saturday'; $lang['datetime']['Sun'] = 'Sun'; $lang['datetime']['Mon'] = 'Mon'; $lang['datetime']['Tue'] = 'Tue'; $lang['datetime']['Wed'] = 'Wed'; $lang['datetime']['Thu'] = 'Thu'; $lang['datetime']['Fri'] = 'Fri'; $lang['datetime']['Sat'] = 'Sat'; $lang['datetime']['January'] = 'January'; $lang['datetime']['February'] = 'February'; $lang['datetime']['March'] = 'March'; $lang['datetime']['April'] = 'April'; $lang['datetime']['May'] = 'May'; $lang['datetime']['June'] = 'June'; $lang['datetime']['July'] = 'July'; $lang['datetime']['August'] = 'August'; $lang['datetime']['September'] = 'September'; $lang['datetime']['October'] = 'October'; $lang['datetime']['November'] = 'November'; $lang['datetime']['December'] = 'December'; $lang['datetime']['Jan'] = 'Jan'; $lang['datetime']['Feb'] = 'Feb'; $lang['datetime']['Mar'] = 'Mar'; $lang['datetime']['Apr'] = 'Apr'; $lang['datetime']['May'] = 'May'; $lang['datetime']['Jun'] = 'Jun'; $lang['datetime']['Jul'] = 'Jul'; $lang['datetime']['Aug'] = 'Aug'; $lang['datetime']['Sep'] = 'Sep'; $lang['datetime']['Oct'] = 'Oct'; $lang['datetime']['Nov'] = 'Nov'; $lang['datetime']['Dec'] = 'Dec'; // // Errors (not related to a // specific failure on a page) // $lang['Information'] = 'Information'; $lang['Critical_Information'] = 'Critical Information'; $lang['General_Error'] = 'General Error'; $lang['Critical_Error'] = 'Critical Error'; $lang['An_error_occured'] = 'An Error Occurred'; $lang['A_critical_error'] = 'A Critical Error Occurred'; $lang['Admin_reauthenticate'] = 'To administer the board you must re-authenticate yourself.'; $lang['Login_attempts_exceeded'] = 'The maximum number of %s login attempts has been exceeded. You are not allowed to login for the next %s minutes.'; $lang['Please_remove_install_contrib'] = 'Please ensure both the install/ and contrib/ directories are deleted'; // // That's all, Folks! // ------------------------------------------------- // Begin Simple Subforums MOD $lang['Subforums'] = 'Subforums'; // End Simple Subforums MOD ?> --- NEW FILE: lang_admin.php --- <?php /*************************************************************************** * lang_admin.php [English] * ------------------- * begin : Sat Dec 16 2000 * copyright : (C) 2001 The phpBB Group * email : su...@ph... * * $Id: lang_admin.php,v 1.1 2008/09/18 07:43:32 orynider Exp $ * ****************************************************************************/ /*************************************************************************** * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * ***************************************************************************/ /* CONTRIBUTORS 2002-12-15 Philip M. White (pw...@ma...) Fixed many minor grammatical mistakes */ // // Format is same as lang_main // // // Modules, this replaces the keys used // in the modules[][] arrays in each module file // $lang['General'] = 'General Admin'; $lang['Users'] = 'User Admin'; $lang['Groups'] = 'Group Admin'; $lang['Forums'] = 'Forum Admin'; $lang['Styles'] = 'Styles Admin'; $lang['Configuration'] = 'Configuration'; $lang['Permissions'] = 'Permissions'; $lang['Manage'] = 'Management'; $lang['Disallow'] = 'Disallow names'; $lang['Prune'] = 'Pruning'; $lang['Mass_Email'] = 'Mass Email'; $lang['Ranks'] = 'Ranks'; $lang['Smilies'] = 'Smilies'; $lang['Ban_Management'] = 'Ban Control'; $lang['Word_Censor'] = 'Word Censors'; $lang['Export'] = 'Export'; $lang['Create_new'] = 'Create'; $lang['Add_new'] = 'Add'; $lang['Backup_DB'] = 'Backup Database'; $lang['Restore_DB'] = 'Restore Database'; // // Index // $lang['Admin'] = 'Administration'; $lang['Not_admin'] = 'You are not authorised to administer this board'; $lang['Welcome_phpBB'] = 'Welcome to phpBB'; $lang['Admin_intro'] = 'Thank you for choosing phpBB as your forum solution. This screen will give you a quick overview of all the various statistics of your board. You can get back to this page by clicking on the <u>Admin Index</u> link in the left pane. To return to the index of your board, click the phpBB logo also in the left pane. The other links on the left hand side of this screen will allow you to control every aspect of your forum experience. Each screen will have instructions on how to use the tools.'; $lang['Main_index'] = 'Forum Index'; $lang['Forum_stats'] = 'Forum Statistics'; $lang['Admin_Index'] = 'Admin Index'; $lang['Preview_forum'] = 'Preview Forum'; $lang['Click_return_admin_index'] = 'Click %sHere%s to return to the Admin Index'; $lang['Statistic'] = 'Statistic'; $lang['Value'] = 'Value'; $lang['Number_posts'] = 'Number of posts'; $lang['Posts_per_day'] = 'Posts per day'; $lang['Number_topics'] = 'Number of topics'; $lang['Topics_per_day'] = 'Topics per day'; $lang['Number_users'] = 'Number of users'; $lang['Users_per_day'] = 'Users per day'; $lang['Board_started'] = 'Board started'; $lang['Avatar_dir_size'] = 'Avatar directory size'; $lang['Database_size'] = 'Database size'; $lang['Gzip_compression'] ='Gzip compression'; $lang['Not_available'] = 'Not available'; $lang['ON'] = 'ON'; // This is for GZip compression $lang['OFF'] = 'OFF'; // // DB Utils // $lang['Database_Utilities'] = 'Database Utilities'; $lang['Restore'] = 'Restore'; $lang['Backup'] = 'Backup'; $lang['Restore_explain'] = 'This will perform a full restore of all phpBB tables from a saved file. If your server supports it, you may upload a gzip-compressed text file and it will automatically be decompressed. <b>WARNING</b>: This will overwrite any existing data. The restore may take a long time to process, so please do not move from this page until it is complete.'; $lang['Backup_explain'] = 'Here you can back up all your phpBB-related data. If you have any additional custom tables in the same database with phpBB that you would like to back up as well, please enter their names, separated by commas, in the Additional Tables textbox below. If your server supports it you may also gzip-compress the file to reduce its size before download.'; $lang['Backup_options'] = 'Backup options'; $lang['Start_backup'] = 'Start Backup'; $lang['Full_backup'] = 'Full backup'; $lang['Structure_backup'] = 'Structure-Only backup'; $lang['Data_backup'] = 'Data only backup'; $lang['Additional_tables'] = 'Additional tables'; $lang['Gzip_compress'] = 'Gzip compress file'; $lang['Select_file'] = 'Select a file'; $lang['Start_Restore'] = 'Start Restore'; $lang['Restore_success'] = 'The Database has been successfully restored.<br /><br />Your board should be back to the state it was when the backup was made.'; $lang['Backup_download'] = 'Your download will start shortly; please wait until it begins.'; $lang['Backups_not_supported'] = 'Sorry, but database backups are not currently supported for your database system.'; $lang['Restore_Error_uploading'] = 'Error in uploading the backup file'; $lang['Restore_Error_filename'] = 'Filename problem; please try an alternative file'; $lang['Restore_Error_decompress'] = 'Cannot decompress a gzip file; please upload a plain text version'; $lang['Restore_Error_no_file'] = 'No file was uploaded'; // // Auth pages // $lang['Select_a_User'] = 'Select a User'; $lang['Select_a_Group'] = 'Select a Group'; $lang['Select_a_Forum'] = 'Select a Forum'; $lang['Auth_Control_User'] = 'User Permissions Control'; $lang['Auth_Control_Group'] = 'Group Permissions Control'; $lang['Auth_Control_Forum'] = 'Forum Permissions Control'; $lang['Look_up_User'] = 'Look up User'; $lang['Look_up_Group'] = 'Look up Group'; $lang['Look_up_Forum'] = 'Look up Forum'; $lang['Group_auth_explain'] = 'Here you can alter the permissions and moderator status assigned to each user group. Do not forget when changing group permissions that individual user permissions may still allow the user entry to forums, etc. You will be warned if this is the case.'; $lang['User_auth_explain'] = 'Here you can alter the permissions and moderator status assigned to each individual user. Do not forget when changing user permissions that group permissions may still allow the user entry to forums, etc. You will be warned if this is the case.'; $lang['Forum_auth_explain'] = 'Here you can alter the authorisation levels of each forum. You will have both a simple and advanced method for doing this, where advanced offers greater control of each forum operation. Remember that changing the permission level of forums will affect which users can carry out the various operations within them.'; $lang['Simple_mode'] = 'Simple Mode'; $lang['Advanced_mode'] = 'Advanced Mode'; $lang['Moderator_status'] = 'Moderator status'; $lang['Allowed_Access'] = 'Allowed Access'; $lang['Disallowed_Access'] = 'Disallowed Access'; $lang['Is_Moderator'] = 'Is Moderator'; $lang['Not_Moderator'] = 'Not Moderator'; $lang['Conflict_warning'] = 'Authorisation Conflict Warning'; $lang['Conflict_access_userauth'] = 'This user still has access rights to this forum via group membership. You may want to alter the group permissions or remove this user the group to fully prevent them having access rights. The groups granting rights (and the forums involved) are noted below.'; $lang['Conflict_mod_userauth'] = 'This user still has moderator rights to this forum via group membership. You may want to alter the group permissions or remove this user the group to fully prevent them having moderator rights. The groups granting rights (and the forums involved) are noted below.'; $lang['Conflict_access_groupauth'] = 'The following user (or users) still have access rights to this forum via their user permission settings. You may want to alter the user permissions to fully prevent them having access rights. The users granted rights (and the forums involved) are noted below.'; $lang['Conflict_mod_groupauth'] = 'The following user (or users) still have moderator rights to this forum via their user permissions settings. You may want to alter the user permissions to fully prevent them having moderator rights. The users granted rights (and the forums involved) are noted below.'; $lang['Public'] = 'Public'; $lang['Private'] = 'Private'; $lang['Registered'] = 'Registered'; $lang['Administrators'] = 'Administrators'; $lang['Hidden'] = 'Hidden'; // These are displayed in the drop down boxes for advanced // mode forum auth, try and keep them short! $lang['Forum_ALL'] = 'ALL'; $lang['Forum_REG'] = 'REG'; $lang['Forum_PRIVATE'] = 'PRIVATE'; $lang['Forum_MOD'] = 'MOD'; $lang['Forum_ADMIN'] = 'ADMIN'; $lang['View'] = 'View'; $lang['Read'] = 'Read'; $lang['Post'] = 'Post'; $lang['Reply'] = 'Reply'; $lang['Edit'] = 'Edit'; $lang['Delete'] = 'Delete'; $lang['Sticky'] = 'Sticky'; $lang['Announce'] = 'Announce'; $lang['Vote'] = 'Vote'; $lang['Pollcreate'] = 'Poll create'; $lang['Permissions'] = 'Permissions'; $lang['Simple_Permission'] = 'Simple Permissions'; $lang['User_Level'] = 'User Level'; $lang['Auth_User'] = 'User'; $lang['Auth_Admin'] = 'Administrator'; $lang['Group_memberships'] = 'Usergroup memberships'; $lang['Usergroup_members'] = 'This group has the following members'; $lang['Forum_auth_updated'] = 'Forum permissions updated'; $lang['User_auth_updated'] = 'User permissions updated'; $lang['Group_auth_updated'] = 'Group permissions updated'; $lang['Auth_updated'] = 'Permissions have been updated'; $lang['Click_return_userauth'] = 'Click %sHere%s to return to User Permissions'; $lang['Click_return_groupauth'] = 'Click %sHere%s to return to Group Permissions'; $lang['Click_return_forumauth'] = 'Click %sHere%s to return to Forum Permissions'; // // Banning // $lang['Ban_control'] = 'Ban Control'; $lang['Ban_explain'] = 'Here you can control the banning of users. You can achieve this by banning either or both of a specific user or an individual or range of IP addresses or hostnames. These methods prevent a user from even reaching the index page of your board. To prevent a user from registering under a different username you can also specify a banned email address. Please note that banning an email address alone will not prevent that user from being able to log on or post to your board. You should use one of the first two methods to achieve this.'; $lang['Ban_explain_warn'] = 'Please note that entering a range of IP addresses results in all the addresses between the start and end being added to the banlist. Attempts will be made to minimise the number of addresses added to the database by introducing wildcards automatically where appropriate. If you really must enter a range, try to keep it small or better yet state specific addresses.'; $lang['Select_username'] = 'Select a Username'; $lang['Select_ip'] = 'Select an IP address'; $lang['Select_email'] = 'Select an Email address'; $lang['Ban_username'] = 'Ban one or more specific users'; $lang['Ban_username_explain'] = 'You can ban multiple users in one go using the appropriate combination of mouse and keyboard for your computer and browser'; $lang['Ban_IP'] = 'Ban one or more IP addresses or hostnames'; $lang['IP_hostname'] = 'IP addresses or hostnames'; $lang['Ban_IP_explain'] = 'To specify several different IP addresses or hostnames separate them with commas. To specify a range of IP addresses, separate the start and end with a hyphen (-); to specify a wildcard, use an asterisk (*).'; $lang['Ban_email'] = 'Ban one or more email addresses'; $lang['Ban_email_explain'] = 'To specify more than one email address, separate them with commas. To specify a wildcard username, use * like *@hotmail.com'; $lang['Unban_username'] = 'Un-ban one more specific users'; $lang['Unban_username_explain'] = 'You can unban multiple users in one go using the appropriate combination of mouse and keyboard for your computer and browser'; $lang['Unban_IP'] = 'Un-ban one or more IP addresses'; $lang['Unban_IP_explain'] = 'You can unban multiple IP addresses in one go using the appropriate combination of mouse and keyboard for your computer and browser'; $lang['Unban_email'] = 'Un-ban one or more email addresses'; $lang['Unban_email_explain'] = 'You can unban multiple email addresses in one go using the appropriate combination of mouse and keyboard for your computer and browser'; $lang['No_banned_users'] = 'No banned usernames'; $lang['No_banned_ip'] = 'No banned IP addresses'; $lang['No_banned_email'] = 'No banned email addresses'; $lang['Ban_update_sucessful'] = 'The banlist has been updated successfully'; $lang['Click_return_banadmin'] = 'Click %sHere%s to return to Ban Control'; // // Configuration // $lang['General_Config'] = 'General Configuration'; $lang['Config_explain'] = 'The form below will allow you to customize all the general board options. For User and Forum configurations use the related links on the left hand side.'; $lang['Click_return_config'] = 'Click %sHere%s to return to General Configuration'; $lang['General_settings'] = 'General Board Settings'; $lang['Server_name'] = 'Domain Name'; $lang['Server_name_explain'] = 'The domain name from which this board runs'; $lang['Script_path'] = 'Script path'; $lang['Script_path_explain'] = 'The path where phpBB2 is located relative to the domain name'; $lang['Server_port'] = 'Server Port'; $lang['Server_port_explain'] = 'The port your server is running on, usually 80. Only change if different'; $lang['Site_name'] = 'Site name'; $lang['Site_desc'] = 'Site description'; $lang['Board_disable'] = 'Disable board'; $lang['Board_disable_explain'] = 'This will make the board unavailable to users. Administrators are able to access the Administration Panel while the board is disabled.'; $lang['Acct_activation'] = 'Enable account activation'; $lang['Acc_None'] = 'None'; // These three entries are the type of activation $lang['Acc_User'] = 'User'; $lang['Acc_Admin'] = 'Admin'; $lang['Abilities_settings'] = 'User and Forum Basic Settings'; $lang['Max_poll_options'] = 'Max number of poll options'; $lang['Flood_Interval'] = 'Flood Interval'; $lang['Flood_Interval_explain'] = 'Number of seconds a user must wait between posts'; $lang['Board_email_form'] = 'User email via board'; $lang['Board_email_form_explain'] = 'Users send email to each other via this board'; $lang['Topics_per_page'] = 'Topics Per Page'; $lang['Posts_per_page'] = 'Posts Per Page'; $lang['Hot_threshold'] = 'Posts for Popular Threshold'; $lang['Default_style'] = 'Default Style'; $lang['Override_style'] = 'Override user style'; $lang['Override_style_explain'] = 'Replaces users style with the default'; $lang['Default_language'] = 'Default Language'; $lang['Date_format'] = 'Date Format'; $lang['System_timezone'] = 'System Timezone'; $lang['Enable_gzip'] = 'Enable GZip Compression'; $lang['Enable_prune'] = 'Enable Forum Pruning'; $lang['Allow_HTML'] = 'Allow HTML'; $lang['Allow_BBCode'] = 'Allow BBCode'; $lang['Allowed_tags'] = 'Allowed HTML tags'; $lang['Allowed_tags_explain'] = 'Separate tags with commas'; $lang['Allow_smilies'] = 'Allow Smilies'; $lang['Smilies_path'] = 'Smilies Storage Path'; $lang['Smilies_path_explain'] = 'Path under your phpBB root dir, e.g. images/smiles'; $lang['Allow_sig'] = 'Allow Signatures'; $lang['Max_sig_length'] = 'Maximum signature length'; $lang['Max_sig_length_explain'] = 'Maximum number of characters in user signatures'; $lang['Allow_name_change'] = 'Allow Username changes'; $lang['Avatar_settings'] = 'Avatar Settings'; $lang['Allow_local'] = 'Enable gallery avatars'; $lang['Allow_remote'] = 'Enable remote avatars'; $lang['Allow_remote_explain'] = 'Avatars linked to from another website'; $lang['Allow_upload'] = 'Enable avatar uploading'; $lang['Max_filesize'] = 'Maximum Avatar File Size'; $lang['Max_filesize_explain'] = 'For uploaded avatar files'; $lang['Max_avatar_size'] = 'Maximum Avatar Dimensions... [truncated message content] |
Update of /cvsroot/mxbb/mx_music/phpbb2/mx_mod/includes In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv19367/mx_mod/includes Added Files: functions_admincp.php functions_core.php functions_required.php functions_styles.php functions_tools.php mx_constants.php Log Message: upgrade --- NEW FILE: functions_admincp.php --- <?php /** * * @package mx_mod * @version $Id: functions_admincp.php,v 1.1 2008/09/18 07:43:28 orynider Exp $ * @copyright (c) 2002-2006 mxBB Project Team * @license http://opensource.org/licenses/gpl-license.php GNU General Public License v2 * @link http://www.mxbb.net * */ if ( !defined('IN_PHPBB') ) { die("Hacking attempt"); } function mx_do_install_upgrade( $sql = '', $main_install = false ) { global $table_prefix, $mx_table_prefix, $userdata, $phpEx, $template, $lang, $db, $board_config, $HTTP_POST_VARS; $inst_error = false; $n = 0; $message = "<b>This is the result list of the SQL queries needed for the install/upgrade</b><br /><br />"; while ( $sql[$n] ) { if ( !$result = @$db->sql_query( $sql[$n] ) ) { $message .= '<b><font color=#FF0000>[Error or Already added]</font></b> line: ' . ( $n + 1 ) . ' , ' . $sql[$n] . '<br />'; $inst_error = true; } else { $message .= '<b><font color=#0000fF>[Added/Updated]</font></b> line: ' . ( $n + 1 ) . ' , ' . $sql[$n] . '<br />'; } $n++; } $message .= '<br /> If you get some Errors, Already Added or Updated messages, relax, this is normal when updating mods'; return $message; } // THE END ?> --- NEW FILE: functions_styles.php --- <?php /** * * @package mx_mod * @version $Id: functions_styles.php,v 1.1 2008/09/18 07:43:29 orynider Exp $ * @copyright (c) 2002-2006 mxBB Project Team * @license http://opensource.org/licenses/gpl-license.php GNU General Public License v2 * @link http://www.mxbb.net * */ if ( !defined('IN_PHPBB') ) { die("Hacking attempt"); } /** * Class: mx_Template from mx_functions_style.php * [...1580 lines suppressed...] function set_module_cfg_name($module_cfg_name = '') { //global $mx_block; global $module_root_path; //$this->loaded_default_styles[$mx_block->module_root_path] = $default_module_style; $this->module_cfg_name[$module_root_path] = $module_cfg_name; } function set_module_lang_path($module_lang_path = '') { //global $mx_block; global $module_root_path; //$this->loaded_default_styles[$mx_block->module_root_path] = $default_module_style; $this->module_lang_path[$module_root_path] = $module_lang_path; } } // class mx_user // THE END ?> --- NEW FILE: functions_required.php --- <?php /** * * @package mx_mod * @version $Id: functions_required.php,v 1.1 2008/09/18 07:43:29 orynider Exp $ * @copyright (c) 2002-2006 mxBB Project Team * @license http://opensource.org/licenses/gpl-license.php GNU General Public License v2 * @link http://www.mxbb.net * */ if ( !defined('IN_PHPBB') ) { die("Hacking attempt"); } if(!function_exists('mx_message_die')) { [...1552 lines suppressed...] { $mxurl = ( $file == '' ? "./" : $file . '/' ) . ( $args == '' ? '' : '?' . $args ); } else { $mxurl = $mx_root_path . 'index.' . $phpEx; if( is_numeric($page_id) ) { $mxurl .= '?page=' . $page_id . ( $args == '' ? '' : '&' . $args ); } else { $mxurl = "./" . ( $args == '' ? '' : '?' . $args ); } } return $mxurl; } } // THE END ?> --- NEW FILE: mx_constants.php --- <?php /** * * @package Constants * @version $Id: mx_constants.php,v 1.1 2008/09/18 07:43:30 orynider Exp $ * @copyright (c) 2002-2008 MX-Publisher Project Team * @license http://opensource.org/licenses/gpl-license.php GNU General Public License v2 * @link http://www.mx-publisher.com * */ if ( !defined('IN_PORTAL') ) { die("Hacking attempt"); } // User Levels <- this values are for compatiblility with mxBB 2.8.x and phpBB2 // Revove them when mxBB is fixed !defined('DELETED') ? define('DELETED', -1) : false; !defined('USER') ? define('USER', 0) : false; !defined('ADMIN') ? define('ADMIN', 1) : false; !defined('MOD') ? define('MOD', 2) : false; // User Levels <- this values are for compatiblility with mxBB 2.8.x and phpBB2 // URL PARAMETERS !defined('POST_TOPIC_URL') ? define('POST_TOPIC_URL', 't') : false; !defined('POST_CAT_URL') ? define('POST_CAT_URL', 'c') : false; !defined('POST_FORUM_URL') ? define('POST_FORUM_URL', 'f') : false; !defined('POST_USERS_URL') ? define('POST_USERS_URL', 'u') : false; !defined('POST_POST_URL') ? define('POST_POST_URL', 'p') : false; !defined('POST_GROUPS_URL') ? define('POST_GROUPS_URL', 'g') : false; // Page numbers for session handling !defined('PAGE_INDEX') ? define('PAGE_INDEX', 0) : false; !defined('PAGE_LOGIN') ? define('PAGE_LOGIN', -1) : false; !defined('PAGE_SEARCH') ? define('PAGE_SEARCH', -2) : false; !defined('PAGE_REGISTER') ? define('PAGE_REGISTER', -3) : false; !defined('PAGE_PROFILE') ? define('PAGE_PROFILE', -4) : false; !defined('PAGE_VIEWONLINE') ? define('PAGE_VIEWONLINE', -6) : false; !defined('PAGE_VIEWMEMBERS') ? define('PAGE_VIEWMEMBERS', -7) : false; !defined('PAGE_FAQ') ? define('PAGE_FAQ', -8) : false; !defined('PAGE_POSTING') ? define('PAGE_POSTING', -9) : false; !defined('PAGE_PRIVMSGS') ? define('PAGE_PRIVMSGS', -10) : false; !defined('PAGE_GROUPCP') ? define('PAGE_GROUPCP', -11) : false; !defined('PAGE_TOPIC_OFFSET') ? define('PAGE_TOPIC_OFFSET', 5000) : false; // Auth settings (blockCP) !defined('AUTH_LIST_ALL') ? define('AUTH_LIST_ALL', 0) : false; !defined('AUTH_ALL') ? define('AUTH_ALL', 0) : false; !defined('AUTH_REG') ? define('AUTH_REG', 1) : false; !defined('AUTH_ACL') ? define('AUTH_ACL', 2) : false; !defined('AUTH_MOD') ? define('AUTH_MOD', 3) : false; !defined('AUTH_ADMIN') ? define('AUTH_ADMIN', 5) : false; !defined('AUTH_ANONYMOUS') ? define('AUTH_ANONYMOUS', 9) : false; !defined('AUTH_VIEW') ? define('AUTH_VIEW', 1) : false; !defined('AUTH_READ') ? define('AUTH_READ', 2) : false; !defined('AUTH_POST') ? define('AUTH_POST', 3) : false; !defined('AUTH_REPLY') ? define('AUTH_REPLY', 4) : false; !defined('AUTH_EDIT') ? define('AUTH_EDIT', 5) : false; !defined('AUTH_DELETE') ? define('AUTH_DELETE', 6) : false; !defined('AUTH_ANNOUNCE') ? define('AUTH_ANNOUNCE', 7) : false; !defined('AUTH_STICKY') ? define('AUTH_STICKY', 8) : false; !defined('AUTH_POLLCREATE') ? define('AUTH_POLLCREATE', 9) : false; !defined('AUTH_VOTE') ? define('AUTH_VOTE', 10) : false; !defined('AUTH_ATTACH') ? define('AUTH_ATTACH', 11) : false; /** * ViewOnline extension for MX-Publisher Pages * @access private */ define('MX_PORTAL_PAGES_OFFSET', 1000); $mx_table_prefix = $table_prefix; @define('MX_CONFIG_TABLE', $table_prefix . 'mx_config'); /**#@+ * MX-Publisher Core table names * @access public */ @define('PORTAL_TABLE', $table_prefix . 'mx_config'); //Modifyed for mx_mod /* define('MENU_NAV_TABLE', $mx_table_prefix . 'menu_nav'); define('MENU_CAT_TABLE', $mx_table_prefix . 'menu_categories'); define('MODULE_TABLE', $mx_table_prefix . 'module'); define('FUNCTION_TABLE', $mx_table_prefix . 'function'); define('PARAMETER_TABLE', $mx_table_prefix . 'parameter'); define('PARAMETER_OPTION_TABLE', $mx_table_prefix . 'parameter_option'); define('PAGE_TABLE' , $mx_table_prefix . 'page'); define('COLUMN_TABLE' , $mx_table_prefix . 'column'); define('COLUMN_BLOCK_TABLE', $mx_table_prefix . 'column_block'); define('BLOCK_TABLE', $mx_table_prefix . 'block'); define('BLOCK_SYSTEM_PARAMETER_TABLE', $mx_table_prefix . 'block_system_parameter'); define('BLOCK_USER_PARAMETER_TABLE', $mx_table_prefix . 'block_user_parameter'); define('COLUMN_TEMPLATES' , $mx_table_prefix . 'column_templates'); define('PAGE_TEMPLATES' , $mx_table_prefix . 'page_templates'); define('MX_THEMES_TABLE', $mx_table_prefix.'themes'); define('MX_MATCH_TABLE' , $mx_table_prefix . 'wordmatch'); define('MX_WORD_TABLE' , $mx_table_prefix . 'wordlist'); define('MX_SEARCH_TABLE' , $mx_table_prefix . 'search_results'); */ /**#@-*/ /** * Sick and tired of these variables getting lost... */ $html_entities_match = array('#&(?!(\#[0-9]+;))#', '#<#', '#>#', '#"#'); $html_entities_replace = array('&', '<', '>', '"'); $unhtml_specialchars_match = array('#>#', '#<#', '#"#', '#&#'); $unhtml_specialchars_replace = array('>', '<', '"', '&'); ?> --- NEW FILE: functions_tools.php --- <?php /** * * @package mx_mod * @version $Id: functions_tools.php,v 1.15.2.6 2008/02/18 20:20:08 jonohlsson Exp * @copyright (c) 2002-2006 mxBB Project Team * @license http://opensource.org/licenses/gpl-license.php GNU General Public License v2 * @link http://www.mxbb.net * */ if ( !defined( 'IN_PORTAL' ) ) { die( "Hacking attempt" ); } // // This 'include' is needed for the mx_text class // [...4373 lines suppressed...] echo '<b>Value</b>: '; if (is_string($var)) { echo htmlspecialchars($var); } else { $print_r = print_r($var, true); // str_contains < or > if ((strstr($print_r, '<') !== false) || (strstr($print_r, '>') !== false)) { $print_r = htmlspecialchars($print_r); } echo $print_r; } echo '</pre>'; exit; } } ?> --- NEW FILE: functions_core.php --- <?php /** * * @package mx_mod * @version $Id: functions_core.php,v 1.1 2008/09/18 07:43:28 orynider Exp $ * @copyright (c) 2002-2006 mxBB Project Team * @license http://opensource.org/licenses/gpl-license.php GNU General Public License v2 * @link http://www.mxbb.net * */ if ( !defined('IN_PORTAL') ) { die("Hacking attempt"); } //@define('MX_CONFIG_TABLE', $table_prefix . 'mx_config'); /**#@+ [...3308 lines suppressed...] global $HTTP_GET_VARS; return empty($HTTP_GET_VARS[$var]) ? 1 : 0 ; } /** * Is REQUEST empty (GET and POST) var? * * Boolean method to check if REQUEST (both) variable is empty. * * @access public * @param string $var * @return boolean */ function is_empty_request($var) { return ($this->is_empty_get($var) && $this->is_empty_post($var)) ? 1 : 0; } } // class mx_request_vars ?> |
|
From: FlorinCB <ory...@us...> - 2008-09-18 00:43:33
|
Update of /cvsroot/mxbb/mx_music/phpbb2/admin In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv19367/admin Added Files: admin_mx_config.php Log Message: upgrade --- NEW FILE: admin_mx_config.php --- <?php /** * * @package MX Mod * @version $Id: admin_mx_config.php,v 1.1 2008/09/18 07:43:26 orynider Exp $ * @copyright (c) 2002-2006 mxBB Project Team * @license http://opensource.org/licenses/gpl-license.php GNU General Public License v2 * @link http://www.mx-publisher.com * */ $phpEx = substr(strrchr(__FILE__, '.'), 1); if ( @file_exists( './../viewtopic.' . $phpEx ) ) // -------------------------------------------- phpBB MOD MODE { define('MXBB_MODULE', false); define('IN_PHPBB', true); $phpbb_root_path = $module_root_path = './../'; $mx_mod_path = $phpbb_root_path . 'mx_mod/'; require_once($mx_mod_path . "includes/functions_required.$phpEx"); @define('IN_PORTAL', true); $mx_root_path = './../'; //include_once($mx_mod_path . "includes/shared/phpbb2/includes/functions.$phpEx"); require_once($mx_mod_path . "includes/functions_core.$phpEx"); //Check for cash mod if (file_exists($phpbb_root_path . 'includes/functions_cash.'.$phpEx)) { define('IN_CASHMOD', true); } //@ini_set( 'display_errors', '1' ); error_reporting (E_ERROR | E_WARNING | E_PARSE); // This will NOT report uninitialized variables //error_reporting(E_ALL & ~E_NOTICE); define( 'PAGE_KB', -502 ); // If this id generates a conflict with other mods, change it ;) // // Instatiate the mx_cache class // $mx_cache = new mx_cache(); // // instatiate the mx_request_vars class // $mx_request_vars = new mx_request_vars(); // // instatiate the mx_user class // //$mx_user = new mx_user(); // // Left Pane Paths // $setmodules_admin_path = ''; $setmodules_module_path = "./../"; if (file_exists($phpbb_root_path."modcp.$phpEx")) // phpBB2 { define('PORTAL_BACKEND', 'phpbb2'); $tplEx = 'tpl'; } else if (@file_exists($phpbb_root_path."mcp.$phpEx")) // phpBB3 { define('PORTAL_BACKEND', 'phpbb3'); $tplEx = 'html'; } } else { define( 'IN_PORTAL', 1 ); define( 'MXBB_MODULE', true ); // // Main paths // $mx_root_path = './../../../'; $module_root_path = './../../../modules/mx_linkdb/'; // // Left Pane Paths // $setmodules_root_path = './../'; $setmodules_module_path = 'modules/mx_linkdb/'; $setmodules_admin_path = $setmodules_module_path . 'admin/'; define( 'MXBB_27x', file_exists( $setmodules_root_path . 'mx_login.php' ) ); } if( !empty($setmodules) ) { $file = basename(__FILE__); $module['Mx_Mod']['Configuration'] = $file; return; } // // Let's set the root dir for phpBB // require($phpbb_root_path."admin/pagestart.$phpEx"); require($mx_mod_path . "includes/mx_constants.$phpEx"); @define('PORTAL_TABLE', $table_prefix . 'mx_config'); //Modifyed for mx_mod require_once($mx_mod_path . "includes/functions_styles.$phpEx"); $mx_user = new mx_user(); // instatiate the mx_user class // // Define basic constants // $mx_user->page_id = 51; $mx_user->user_ip = $user_ip; $mx_user->_init_userprefs(); //$mx_user->extend(); // // Get mxBB config settings // $portal_config = $mx_cache->obtain_mxbb_config(); // ********************************************************************** // Read language definition // ********************************************************************** if ( !MXBB_MODULE ) { if (!file_exists($mx_mod_path . "language/lang_" . $board_config['default_lang'] . "/lang_admin.$phpEx")) { include($mx_mod_path . "language/lang_english/lang_admin.$phpEx"); } else { include($mx_mod_path . "language/lang_" . $board_config['default_lang'] . "/lang_admin.$phpEx"); } } // // Begin program proper // $mode = ''; if( isset($HTTP_POST_VARS['submit']) ) { $mode = 'submit'; } // // Pull all config data // $sql = "SELECT * FROM " . PORTAL_TABLE; if(!$result = $db->sql_query($sql)) { message_die(CRITICAL_ERROR, "Could not query music config information", "", __LINE__, __FILE__, $sql); } else { while( $row = $db->sql_fetchrow($result) ) { $config_name = $row['config_name']; $config_value = $row['config_value']; $default_config[$config_name] = $config_value; //$new[$config_name] = ( isset($HTTP_POST_VARS[$config_name]) ) ? $HTTP_POST_VARS[$config_name] : $default_config[$config_name]; if( !empty($mode) ) { $new['portal_name'] = $mx_request_vars->post('portal_name', MX_TYPE_NO_TAGS, 'mxBB Portal and CMS'); $new['portal_url'] = $mx_request_vars->post('portal_url', MX_TYPE_NO_TAGS, ''); $new['portal_phpbb_url'] = $mx_request_vars->post('portal_phpbb_url', MX_TYPE_NO_TAGS, ''); $new['default_admin_style'] = $mx_request_vars->post('mx_default_admin_style', MX_TYPE_NO_TAGS, '-1'); $new['default_style'] = $mx_request_vars->post('mx_default_style', MX_TYPE_NO_TAGS, '-1'); $new['override_user_style'] = $mx_request_vars->post('mx_override_user_style', MX_TYPE_NO_TAGS, '1'); $new['overall_header'] = $mx_request_vars->post('overall_header', MX_TYPE_NO_TAGS, 'overall_header.tpl'); $new['overall_footer'] = $mx_request_vars->post('overall_footer', MX_TYPE_NO_TAGS, 'overall_footer.tpl'); $new['main_layout'] = $mx_request_vars->post('main_layout', MX_TYPE_NO_TAGS, 'mx_main_layout.tpl'); $new['navigation_block'] = $mx_request_vars->post('navigation_block', MX_TYPE_INT, '0'); $new['top_phpbb_links'] = $mx_request_vars->post('top_phpbb_links', MX_TYPE_INT, '0'); $new['mx_use_cache'] = $mx_request_vars->post('mx_use_cache', MX_TYPE_INT, '1'); $new['mod_rewrite'] = $mx_request_vars->post('mod_rewrite', MX_TYPE_INT, '0'); $new['portal_status'] = $mx_request_vars->post('portal_status', MX_TYPE_INT, '0'); $new['disabled_message'] = $mx_request_vars->post('disabled_message', MX_TYPE_NO_TAGS, 'Site disabled.'); if( isset($HTTP_POST_VARS['submit']) ) { $sql = "UPDATE " . PORTAL_TABLE . " SET config_value = '" . str_replace("\'", "''", $new[$config_name]) . "' WHERE config_name = '$config_name'"; if( !$db->sql_query($sql) ) { mx_message_die(GENERAL_ERROR, "Failed to update music configuration for $config_name", "", __LINE__, __FILE__, $sql); } } /* $sql = "UPDATE " . PORTAL_TABLE . " SET portal_name = '" . str_replace("\'", "''", $new['portal_name']) . "', portal_url = '" . str_replace("\'", "''", $new['portal_url']) . "', portal_phpbb_url = '" . str_replace("\'", "''", $new['portal_phpbb_url']) . "', default_admin_style = '" . str_replace("\'", "''", $new['default_admin_style']) . "', default_style = '" . str_replace("\'", "''", $new['default_style']) . "', override_user_style = '" . str_replace("\'", "''", $new['override_user_style']) . "', overall_header = '" . str_replace("\'", "''", $new['overall_header']) . "', overall_footer = '" . str_replace("\'", "''", $new['overall_footer']) . "', main_layout = '" . str_replace("\'", "''", $new['main_layout']) . "', navigation_block = '" . str_replace("\'", "''", $new['navigation_block']) . "', top_phpbb_links = '" . str_replace("\'", "''", $new['top_phpbb_links']) . "', mx_use_cache = '" . str_replace("\'", "''", $new['mx_use_cache']) . "', mod_rewrite = '" . str_replace("\'", "''", $new['mod_rewrite']) . "', portal_status = '" . str_replace("\'", "''", $new['portal_status']) . "', disabled_message = '" . str_replace("\'", "''", $new['disabled_message']) . "'"; if( !($db->sql_query($sql)) ) { mx_message_die(GENERAL_ERROR, "Failed to update portal configuration ", "", __LINE__, __FILE__, $sql); } */ //$mx_cache->put( 'mxbb_config', $new ); $message = $lang['Portal_Config_updated'] . "<br /><br />" . sprintf($lang['Click_return_portal_config'], "<a href=\"" . append_sid("admin_mx_config.$phpEx") . "\">", "</a>") . "<br /><br />" . sprintf($lang['Click_return_admin_index'], "<a href=\"" . append_sid("index.$phpEx?pane=right") . "\">", "</a>"); mx_message_die(GENERAL_MESSAGE, $message); } } } $template->set_filenames(array( 'admin_portal' => 'admin/admin_mx_config.tpl') ); $top_phpbb_links_yes = ( $portal_config['top_phpbb_links'] == 1 ) ? 'checked="checked"' : ''; $top_phpbb_links_no = ( $portal_config['top_phpbb_links'] == 0 ) ? 'checked="checked"' : ''; $mx_use_cache_yes = ( $portal_config['mx_use_cache'] == 1 ) ? 'checked="checked"' : ''; $mx_use_cache_no = ( $portal_config['mx_use_cache'] == 0 ) ? 'checked="checked"' : ''; $mx_mod_rewrite_yes = ( $portal_config['mod_rewrite'] == 1 ) ? 'checked="checked"' : ''; $mx_mod_rewrite_no = ( $portal_config['mod_rewrite'] == 0 ) ? 'checked="checked"' : ''; $mx_portal_status_yes = ( $portal_config['portal_status'] == 1 ) ? 'checked="checked"' : ''; $mx_portal_status_no = ( $portal_config['portal_status'] == 0 ) ? 'checked="checked"' : ''; $disabled_message = $portal_config['disabled_message']; $phpbb_rel_path = substr( "$phpbb_root_path", 3 ); $navigation_block_list = ''; //get_list_formatted('block_list', $portal_config['navigation_block'], 'navigation_block', 'mx_menu_nav.php', false, 'mx_site_nav.php'); $portal_version = $portal_config['portal_version']; $phpbb_version = '2' . $board_config['version']; $phpbb_script_path = $board_config['script_path']; $phpbb_server_name = $board_config['server_name']; // Default to phpBB default $portal_config['default_admin_style'] = $portal_config['default_admin_style'] == -1 ? $board_config['default_style'] : $portal_config['default_admin_style']; $portal_config['default_style'] = $portal_config['default_style'] == -1 ? $board_config['default_style'] : $portal_config['default_style']; $portal_config['override_user_style'] = $portal_config['override_user_style'] == -1 ? $board_config['override_user_style'] : $portal_config['override_user_style']; $style_select = $portal_config['default_style']; //mx_style_select($portal_config['default_style'], 'mx_default_style'); $style_admin_select = $portal_config['default_admin_style']; //mx_style_select($portal_config['default_admin_style'], 'mx_default_admin_style'); $override_user_style_yes = ( $portal_config['override_user_style'] ) ? "checked=\"checked\"" : ""; $override_user_style_no = ( !$portal_config['override_user_style'] ) ? "checked=\"checked\"" : ""; $template->assign_vars(array( "S_CONFIG_ACTION" => append_sid("admin_mx_config.$phpEx"), "L_YES" => $lang['Yes'], "L_NO" => $lang['No'], "L_CONFIGURATION_TITLE" => $lang['Portal_General_Config'], "L_CONFIGURATION_EXPLAIN" => $lang['Portal_General_Config_explain'], "L_GENERAL_SETTINGS" => $lang['Portal_General_settings'], "L_GENERAL_CONFIG_INFO" => $lang['Portal_General_config_info'] . "<br />" . $lang['Portal_General_config_info_explain'], "L_STYLE_SETTINGS" => $lang['Portal_Style_settings'], "L_PORTAL_NAME" => $lang['Portal_Name'], "L_PORTAL_URL" => $lang['Portal_Url'] . "<br />" . $lang['Portal_url_explain'], "L_PORTAL_PHPBB_URL" => $lang['Portal_PHPBB_Url'] . "<br />" . $lang['Phpbb_url_explain'], "L_OVERALL_HEADER" => $lang['Portal_Overall_header'] . "<br />" . $lang['Portal_Overall_header_explain'], "L_OVERALL_FOOTER" => $lang['Portal_Overall_footer'] . "<br />" . $lang['Portal_Overall_footer_explain'], "L_MAIN_LAYOUT" => $lang['Portal_Main_layout'] . "<br />" . $lang['Portal_Main_layout_explain'], "L_NAVIGATION_BLOCK" => $lang['Portal_Navigation_block'] . "<br />" . $lang['Portal_Navigation_block_explain'], "L_SUBMIT" => $lang['Submit'], "L_RESET" => $lang['Reset'], "PORTAL_NAME" => $portal_config['portal_name'], "PORTAL_URL" => $portal_config['portal_url'], "PORTAL_PHPBB_URL" => $portal_config['portal_phpbb_url'], "OVERALL_HEADER" => $portal_config['overall_header'], "OVERALL_FOOTER" => $portal_config['overall_footer'], "MAIN_LAYOUT" => $portal_config['main_layout'], "NAVIGATION_BLOCK" => $navigation_block_list, "L_PHPBB_RELATIVE_PATH" => $lang['Phpbb_path'], "L_PHPBB_RELATIVE_PATH_EXPLAIN" => $lang['Phpbb_path_explain'], "PHPBB_RELATIVE_PATH" => $phpbb_rel_path, "L_PORTAL_VERSION" => $lang['Portal_version'], "PORTAL_VERSION" => $portal_version, "L_PHPBB_INFO" => $lang['PHPBB_info'], "L_PHPBB_SERVER_NAME" => $lang['PHPBB_server_name'], "PHPBB_SERVER_NAME" => $phpbb_server_name, "L_PHPBB_SCRIPT_PATH" => $lang['PHPBB_script_path'], "PHPBB_SCRIPT_PATH" => $phpbb_script_path, "L_PHPBB_VERSION" => $lang['PHPBB_version'], "PHPBB_VERSION" => $phpbb_version, "L_TOP_PHPBB_LINKS" => $lang['Top_phpbb_links'] . "<br />" . $lang['Top_phpbb_links_explain'], "S_TOP_PHPBB_LINKS_YES" => $top_phpbb_links_yes, "S_TOP_PHPBB_LINKS_NO" => $top_phpbb_links_no, "TOP_PHPBB_LINKS" => $portal_config['top_phpbb_links'], "L_MX_USE_CACHE" => $lang['Mx_use_cache'], "L_MX_USE_CACHE_EXPLAIN" => $lang['Mx_use_cache_explain'], "S_MX_USE_CACHE_YES" => $mx_use_cache_yes, "S_MX_USE_CACHE_NO" => $mx_use_cache_no, "MX_USE_CACHE" => $portal_config['mx_use_cache'], "L_DEFAULT_STYLE" => $lang['Default_style'], "L_DEFAULT_ADMIN_STYLE" => $lang['Default_admin_style'], "L_OVERRIDE_STYLE" => $lang['Override_style'], "L_OVERRIDE_STYLE_EXPLAIN" => $lang['Override_style_explain'], "STYLE_SELECT" => $style_select, "ADMIN_STYLE_SELECT" => $style_admin_select, "OVERRIDE_STYLE_YES" => $override_user_style_yes, "OVERRIDE_STYLE_NO" => $override_user_style_no, "L_MX_MOD_REWRITE" => $lang['Mx_mod_rewrite'], "L_MX_MOD_REWRITE_EXPLAIN" => $lang['Mx_mod_rewrite_explain'], "S_MX_MOD_REWRITE_YES" => $mx_mod_rewrite_yes, "S_MX_MOD_REWRITE_NO" => $mx_mod_rewrite_no, "MX_MOD_REWRITE" => $portal_config['mod_rewrite'], "L_PORTAL_STATUS" => $lang['Portal_status'], "L_PORTAL_STATUS_EXPLAIN" => $lang['Portal_status_explain'], "S_PORTAL_STATUS_YES" => $mx_portal_status_yes, "S_PORTAL_STATUS_NO" => $mx_portal_status_no, "L_DISABLED_MESSAGE" => $lang['Disabled_message'], "DISABLED_MESSAGE" => $disabled_message, )); $template->pparse('admin_portal'); include_once('page_footer_admin.' . $phpEx); ?> |
Update of /cvsroot/mxbb/mx_music/phpbb2 In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv19367 Added Files: modx.subsilver.en.xsl music_install.txt music_install.xml mx_mod_install.php mx_mod_readme.txt mx_mod_uninstall.php Log Message: upgrade --- NEW FILE: mx_mod_uninstall.php --- <?php /** * * @package phpBB2 Mod - mx mod * @version $Id: mx_mod_uninstall.php,v 1.1 2008/09/18 07:43:28 orynider Exp $ * @copyright (c) 2002-2006 [Jon Ohlsson, Mohd Basri, wGEric, PHP Arena, pafileDB, CRLin] mxBB Project Team * @license http://opensource.org/licenses/gpl-license.php GNU General Public License v2 * */ $phpEx = substr(strrchr(__FILE__, '.'), 1); if ( !defined('PORTAL_BACKEND') && @file_exists( './viewtopic.' . $phpEx ) ) // -------------------------------------------- phpBB MOD MODE { define( 'MXBB_MODULE', false ); define( 'IN_PHPBB', true ); $phpbb_root_path = $module_root_path = './'; $mx_mod_path = $phpbb_root_path . 'mx_mod/'; include($phpbb_root_path . 'common.' . $phpEx); include($mx_mod_path . "includes/functions_required.$phpEx"); //Check if forum_hack is installed if (!isset($mx_root_path)) { $mx_root_path = './'; @define('IN_PORTAL', true); include_once($mx_mod_path . "includes/mx_constants.$phpEx"); include_once($mx_mod_path . "includes/shared/phpbb2/includes/functions.$phpEx"); } else { @define('IN_PORTAL', true); include_once($mx_root_path . "includes/mx_constants.$phpEx"); include_once($mx_root_path . "includes/shared/phpbb2/includes/functions.$phpEx"); } require($mx_mod_path . "includes/functions_core.$phpEx"); require($mx_mod_path . "includes/functions_styles.$phpEx"); //Check for cash mod if (file_exists($phpbb_root_path . 'includes/functions_cash.'.$phpEx)) { define('IN_CASHMOD', true); } //@ini_set( 'display_errors', '1' ); error_reporting (E_ERROR | E_WARNING | E_PARSE); // This will NOT report uninitialized variables //error_reporting(E_ALL & ~E_NOTICE); define( 'PAGE_KB', -502 ); // If this id generates a conflict with other mods, change it ;) // // Instatiate the mx_cache class // $mx_cache = new mx_cache(); // // Get mxBB config settings // //$portal_config = $mx_cache->obtain_mxbb_config(); // // instatiate the mx_request_vars class // $mx_request_vars = new mx_request_vars(); // // Page selector // $page_id = $mx_request_vars->request('page', MX_TYPE_INT, 1); $is_block = false; // // instatiate the mx_user class // $mx_user = new mx_user(); if (file_exists("./modcp.$phpEx")) // phpBB2 { define('PORTAL_BACKEND', 'phpbb2'); $tplEx = 'tpl'; // // Start user session // - populate $userdata and $lang // $mx_user->init($user_ip, $page_id, false); init_userprefs($userdata); $mx_user->set_module_default_style('prosilver'); // For compatibility with core 2.8.x if (!$userdata['user_level'] == ADMIN) { die('Only admins may run this script!!!'); } } else if (@file_exists("./mcp.$phpEx")) // phpBB3 { define('PORTAL_BACKEND', 'phpbb3'); $tplEx = 'html'; // // Start user session // - populate $userdata and $lang // $mx_user->init($user_ip, $page_id, false); $user->setup(); // // End session management // $mx_user->set_module_default_style('prosilver'); // For compatibility with core 2.8.x if ($userdata['user_type'] != USER_FOUNDER) { die('Only admins may run this script!!!'); } } else { die('Copy this file in phpbb_root_path were is your viewtopic.php file!!!'); } } else // --------------------------------------------------------------------------------- mxBB Module MODE { define( 'MXBB_MODULE', true ); if ( !function_exists( 'read_block_config' ) ) { define( 'IN_PORTAL', true ); $mx_root_path = './../../'; $module_root_path = './'; $phpEx = substr(strrchr(__FILE__, '.'), 1); include_once( $mx_root_path . 'common.' . $phpEx ); // Start session management $mx_user->init($user_ip, PAGE_INDEX); // End session management define( 'MXBB_27x', file_exists( $mx_root_path . 'mx_login.' . $phpEx ) ); } else { if( !defined('IN_PORTAL') || !is_object($mx_block)) { die("Hacking attempt"); } // // Read Block Settings (default mode) // $title = !empty( $mx_block->block_info['block_title'] ) ? $mx_block->block_info['block_title'] : $lang['KB_title']; $desc = $mx_block->block_info['block_desc']; $block_size = ( isset( $block_size ) && !empty( $block_size ) ? $block_size : '100%' ); //Check for cash mod if (file_exists($phpbb_root_path . 'includes/functions_cash.'.$phpEx)) { define('IN_CASHMOD', true); } $is_block = true; global $images; } define( 'MXBB_27x', @file_exists( $mx_root_path . 'mx_login.'.$phpEx ) ); } // // Check if mx_common Mod is prezent // if (!file_exists($mx_mod_path . "includes/functions_admincp.$phpEx")) { die('mx mod is not uploaded!!!'); } else { require($mx_mod_path . "includes/functions_admincp.$phpEx"); } $page_title = 'Mx Mod'; switch (PORTAL_BACKEND) { case 'internal': case 'phpbb2': include($phpbb_root_path . 'includes/page_header.'.$phpEx); $modtemplate = new mx_Template($mx_mod_path . 'styles'); $modtemplate->set_filenames( array( // # 'body' => 'install_body.html', )); $modtemplate->assign_vars( array( //# 'CSS_COLOR_H1' => 'color: #767676;', 'CSS_CONTENT_H1' => 'color: #115098;', )); break; case 'phpbb3': $template->set_custom_template($mx_mod_path . 'styles/prosilver', 'mx_mod'); $template->set_filenames( array( 'header' => 'install_header.html', 'body' => 'install_body.html', 'footer' => 'install_footer.html' )); $template->assign_var('CSS_STYLESHEET', $phpbb_root_path . 'adm/style/admin.css'); break; } $template->assign_vars( array( 'L_MX_MOD_INSTALL_TITLE' => $page_title, 'L_MX_MOD_TITLE' => 'Installing/Upgrading', 'MX_MOD_PATH' => $mx_mod_path, )); $message = "<b>This will uninstall the mod!</b><br/><br/>"; $sql = array( "DROP TABLE " . $table_prefix . "mx_config " ); $message .= mx_do_install_upgrade($sql); /* echo "<br /><br />"; echo "<table width=\"90%\" align=\"center\" cellpadding=\"4\" cellspacing=\"1\" border=\"0\" class=\"forumline\">"; echo "<tr><th class=\"thHead\" align=\"center\">Mod Installation/Upgrading/Uninstalling Information - mod specific db tables</th></tr>"; echo "<tr><td class=\"row1\" align=\"left\"><span class=\"gen\">" . mx_do_install_upgrade( $sql ) . "</span></td></tr>"; echo "</table><br />"; */ switch (PORTAL_BACKEND) { case 'internal': case 'phpbb2': $modtemplate->assign_var('INSTALL_MESSAGE', $message); $modtemplate->pparse('body'); include($phpbb_root_path . 'includes/page_tail.'.$phpEx); break; case 'phpbb3': $template->assign_var('INSTALL_MESSAGE', $message); $template->display('header'); $template->display('body'); $template->display('footer'); //page_footer(); break; } ?> --- NEW FILE: music_install.xml --- <?xml version="1.0" encoding="utf-8" standalone="yes"?> <?xml-stylesheet type="text/xsl" href="modx.subsilver.en.xsl"?> <!--For security purposes, please check: http://www.phpbb.com/mods/ for the latest version of this MOD. Although MODs are checked before being allowed in the MODs Database there is no guarantee that there are no security problems within the MOD. No support will be given for MODs not found within the MODs Database which can be found at http://www.phpbb.com/mods/--> <mod xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.phpbb.com/mods/xml/modx-1.0.xsd"> <header> <license>http://opensource.org/licenses/gpl-license.php GNU General Public License v2</license> <title lang="en-gb">Media Center (MXP Addon Integration)</title> <description lang="en-gb"><![CDATA[This Mod allows you create the Music Center Page where users can upload, listen, rate and comment on media files. Beside that, users can link URL of the song from the another server without uploading. Youtube videos are supported. You will have Admin Panel to take control Music Center Page. Compatibility: 2.0.21 --> 2.0.23 (I tested on phpBB 2.0.22) Features: - Fully integrated with phpBB2 backend (DB, session, template, multi languages..) - Powerful and handy AdminCP - Multi-categories - Powerfull and phpBB-like permissions system - ModeratorCP - Upload Quota - Lyrics - Top listen songs (can set number of songs viewed) - Rate system - Comment system - Hotlink prevention (can set allowed domains) - Listen counter - Admin/Moderator song approval - Probably uploadable in PHP Safe Mode - Hide the URL of your songs - Link URL of the song from the other server Bonus funtions: - Allowed files: MP3, WMA, WMV, WAV, MIDI, MPEG, AVI, AU, SWF, QT, RAM, RM, FLV - Download song (Music Download Song Add-on) - Song Image (Music Song Image Add-on) - Search Song (Music Search Song Add-on) - Sub-Categories (Music Online Sub-Categories) - YouTube and Google Video (Media Center FLV Support) - And more... Requirements: A running phpBB 2.0.x (recommend the lastest version) The mxBB Mod "include/" folder that can be found in this mod "contrib/" folder The eXtreme Styles MOD is required for this mod to have all features enabled HTTP File Upload Enabled (this MOD can work with PHP Safe-Mode in some cases) MySQL 4.3.3+ ]]></description> <author-notes lang="en-gb">Please remember that this MOD requires the mxBB Mod "include" folder that can be found in the "contrib" folder, and the eXtreme Styles MOD. If you want to update from previous versions please deleate all releated files, upload the new files and do upgrade the database using music_install.php /*. Plz follow the Installation Instructions as strict as you can. This Mod was tested with the following databases: MySQL At last, DO NOT REMOVE MY COPYRIGHT NOTICE!</author-notes> <author-group> <author> <realname>Florin Bodin Ciprian</realname> <email>ory...@rd...</email> <username>orynider</username> <homepage>http://www.publisher.com/</homepage> <contributions /> </author> <author> <realname>Son Thai</realname> <email>cf_...@ya...</email> <username>Cf Manager</username> <homepage>http://cfmanager.net.tf/</homepage> <contributions /> </author> </author-group> <mod-version> <major>2</major> <minor>1</minor> <revision>0</revision> </mod-version> <installation> <level>easy</level> <time>598</time> <target-version> <target-primary>2.9.4</target-primary> <target-major allow="exact">2</target-major> <target-minor allow="exact">9</target-minor> </target-version> </installation> <meta name="generator" content="Phpbb.ModTeam.Tools (c#)" /> </header> <action-group> <sql> CREATE TABLE IF NOT EXISTS `phpbb_music` ( `song_id` int(11) unsigned NOT NULL auto_increment, `song_filename` varchar(255) NOT NULL default '', `song_filetype` varchar(255) NOT NULL default '', `song_imagename` varchar(255) NOT NULL default '', `song_title` varchar(255) NOT NULL default '', `song_url` varchar(255) NOT NULL default '', `song_desc` text, `song_singer` varchar(255) NOT NULL default '', `song_user_id` mediumint(8) NOT NULL default '0', `song_username` varchar(32) default NULL, `song_user_ip` varchar(8) NOT NULL default '0', `song_time` int(11) unsigned NOT NULL default '0', `song_cat_id` mediumint(8) unsigned NOT NULL default '1', `song_view_count` int(11) unsigned NOT NULL default '0', `song_lock` tinyint(3) NOT NULL default '0', `song_approval` tinyint(3) NOT NULL default '1', `song_download_count` varchar(255) NOT NULL default '', PRIMARY KEY (`song_id`), KEY `song_cat_id` (`song_cat_id`), KEY `song_user_id` (`song_user_id`), KEY `song_time` (`song_time`) ); CREATE TABLE IF NOT EXISTS `phpbb_music_cat` ( `cat_id` mediumint(8) unsigned NOT NULL auto_increment, `cat_parent` mediumint(8) unsigned NOT NULL default '0', `cat_type` tinyint(4) NOT NULL default '0', `cat_title` varchar(255) NOT NULL default '', `cat_desc` text, `cat_order` mediumint(8) NOT NULL default '0', `cat_views` mediumint(8) NOT NULL default '0', `cat_view_level` tinyint(3) NOT NULL default '-1', `cat_upload_level` tinyint(3) NOT NULL default '0', `cat_rate_level` tinyint(3) NOT NULL default '0', `cat_comment_level` tinyint(3) NOT NULL default '0', `cat_edit_level` tinyint(3) NOT NULL default '0', `cat_delete_level` tinyint(3) NOT NULL default '2', `cat_view_groups` varchar(255) default NULL, `cat_upload_groups` varchar(255) default NULL, `cat_rate_groups` varchar(255) default NULL, `cat_comment_groups` varchar(255) default NULL, `cat_edit_groups` varchar(255) default NULL, `cat_delete_groups` varchar(255) default NULL, `cat_moderator_groups` varchar(255) default NULL, `cat_approval` tinyint(3) NOT NULL default '0', PRIMARY KEY (`cat_id`), KEY `cat_order` (`cat_order`) ); CREATE TABLE IF NOT EXISTS `phpbb_music_comment` ( `comment_id` int(11) unsigned NOT NULL auto_increment, `comment_song_id` int(11) unsigned NOT NULL default '0', `comment_user_id` mediumint(8) NOT NULL default '0', `comment_username` varchar(32) default NULL, `comment_user_ip` varchar(8) NOT NULL default '', `comment_time` int(11) unsigned NOT NULL default '0', `comment_text` text, `comment_edit_time` int(11) unsigned default NULL, `comment_edit_count` smallint(5) unsigned NOT NULL default '0', `comment_edit_user_id` mediumint(8) default NULL, PRIMARY KEY (`comment_id`), KEY `comment_song_id` (`comment_song_id`), KEY `comment_user_id` (`comment_user_id`), KEY `comment_user_ip` (`comment_user_ip`), KEY `comment_time` (`comment_time`) ); CREATE TABLE IF NOT EXISTS `phpbb_music_config` ( `config_name` varchar(255) NOT NULL default '', `config_value` varchar(255) NOT NULL default '', PRIMARY KEY (`config_name`) ); INSERT INTO `phpbb_music_config` (`config_name`, `config_value`) VALUES ('max_songs', '1024'); INSERT INTO `phpbb_music_config` (`config_name`, `config_value`) VALUES ('user_songs_limit', '50'); INSERT INTO `phpbb_music_config` (`config_name`, `config_value`) VALUES ('mod_songs_limit', '250'); INSERT INTO `phpbb_music_config` (`config_name`, `config_value`) VALUES ('max_file_size', '3145728'); INSERT INTO `phpbb_music_config` (`config_name`, `config_value`) VALUES ('rows_per_page', '20'); INSERT INTO `phpbb_music_config` (`config_name`, `config_value`) VALUES ('cols_per_page', '1'); INSERT INTO `phpbb_music_config` (`config_name`, `config_value`) VALUES ('top', '5'); INSERT INTO `phpbb_music_config` (`config_name`, `config_value`) VALUES ('sort_method', 'song_time'); INSERT INTO `phpbb_music_config` (`config_name`, `config_value`) VALUES ('sort_order', 'DESC'); INSERT INTO `phpbb_music_config` (`config_name`, `config_value`) VALUES ('mp3_allowed', '1'); INSERT INTO `phpbb_music_config` (`config_name`, `config_value`) VALUES ('wav_allowed', '1'); INSERT INTO `phpbb_music_config` (`config_name`, `config_value`) VALUES ('wma_allowed', '1'); INSERT INTO `phpbb_music_config` (`config_name`, `config_value`) VALUES ('wmv_allowed', '1'); INSERT INTO `phpbb_music_config` (`config_name`, `config_value`) VALUES ('mid_allowed', '1'); INSERT INTO `phpbb_music_config` (`config_name`, `config_value`) VALUES ('ram_allowed', '1'); INSERT INTO `phpbb_music_config` (`config_name`, `config_value`) VALUES ('au_allowed', '1'); INSERT INTO `phpbb_music_config` (`config_name`, `config_value`) VALUES ('mpeg_allowed', '1'); INSERT INTO `phpbb_music_config` (`config_name`, `config_value`) VALUES ('avi_allowed', '1'); INSERT INTO `phpbb_music_config` (`config_name`, `config_value`) VALUES ('swf_allowed', '1'); INSERT INTO `phpbb_music_config` (`config_name`, `config_value`) VALUES ('qt_allowed', '1'); INSERT INTO `phpbb_music_config` (`config_name`, `config_value`) VALUES ('rm_allowed', '1'); INSERT INTO `phpbb_music_config` (`config_name`, `config_value`) VALUES ('desc_length', '512000'); INSERT INTO `phpbb_music_config` (`config_name`, `config_value`) VALUES ('hotlink_prevent', '0'); INSERT INTO `phpbb_music_config` (`config_name`, `config_value`) VALUES ('hotlink_allowed', 'cfmanager.gate2vn.net'); INSERT INTO `phpbb_music_config` (`config_name`, `config_value`) VALUES ('rate', '1'); INSERT INTO `phpbb_music_config` (`config_name`, `config_value`) VALUES ('rate_scale', '10'); INSERT INTO `phpbb_music_config` (`config_name`, `config_value`) VALUES ('comment', '1'); INSERT INTO `phpbb_music_config` (`config_name`, `config_value`) VALUES ('music_version', '.1.0'); INSERT INTO `phpbb_music_config` (`config_name`, `config_value`) VALUES ('max_image_size', '1024000'); INSERT INTO `phpbb_music_config` (`config_name`, `config_value`) VALUES ('max_image_width', '800'); INSERT INTO `phpbb_music_config` (`config_name`, `config_value`) VALUES ('max_image_height', '600'); INSERT INTO `phpbb_music_config` (`config_name`, `config_value`) VALUES ('download', '1'); INSERT INTO `phpbb_music_config` (`config_name`, `config_value`) VALUES ('enable_integration', '1'); INSERT INTO `phpbb_music_config` (`config_name`, `config_value`) VALUES ('override_default_pages', '0'); INSERT INTO `phpbb_music_config` (`config_name`, `config_value`) VALUES ('index', '5'); INSERT INTO `phpbb_music_config` (`config_name`, `config_value`) VALUES ('xs_enabled', '1'); INSERT INTO `phpbb_music_config` (`config_name`, `config_value`) VALUES ('img_allowed', '1'); INSERT INTO `phpbb_music_config` (`config_name`, `config_value`) VALUES ('flv_allowed', '1'); INSERT INTO `phpbb_music_config` (`config_name`, `config_value`) VALUES ('show_index_subcats', '1'); INSERT INTO `phpbb_music_config` (`config_name`, `config_value`) VALUES ('rows_per_page_pic', '5'); INSERT INTO `phpbb_music_config` (`config_name`, `config_value`) VALUES ('cols_per_page_pic', '5'); INSERT INTO `phpbb_music_config` (`config_name`, `config_value`) VALUES ('rows_per_page_media', '10'); INSERT INTO `phpbb_music_config` (`config_name`, `config_value`) VALUES ('cols_per_page_media', '1'); -- -------------------------------------------------------- CREATE TABLE IF NOT EXISTS `phpbb_music_rate` ( `rate_song_id` int(11) unsigned NOT NULL default '0', `rate_user_id` mediumint(8) NOT NULL default '0', `rate_user_ip` char(8) NOT NULL default '', `rate_point` tinyint(3) unsigned NOT NULL default '0', KEY `rate_song_id` (`rate_song_id`), KEY `rate_user_id` (`rate_user_id`), KEY `rate_user_ip` (`rate_user_ip`), KEY `rate_point` (`rate_point`) ); </sql> <copy> <file from="root/*.php" to="*.php" /> <file from="root/admin/*.php" to="admin/*.php" /> <file from="root/music_box/music_common.php" to="music_box/music_common.php" /> <file from="root/music_box/includes/*.php" to="music_box/includes/*.php" /> <file from="root/music_box/language/lang_english/*.php" to="music_box/language/lang_english/*.php" /> <file from="root/music_box/modules/*.php" to="music_box/modules/*.php" /> <file from="root/templates/subSilver/*.tpl" to="templates/subSilver/*.tpl" /> <file from="root/templates/subSilver/admin/*.tpl" to="templates/subSilver/admin/*.tpl" /> <file from="root/templates/subSilver/music.cfg" to="templates/subSilver/music.cfg" /> <file from="root/templates/subSilver/images/*.gif" to="templates/subSilver/images/*.gif" /> <file from="root/templates/subSilver/images/lang_english/upload_song.gif" to="templates/subSilver/images/lang_english/upload_song.gif" /> </copy> <open src="templates/subSilver/overall_header.tpl"> <edit> <find><![CDATA[<td align="center" valign="top" nowrap="nowrap"><span class="mainmenu"> <a href="{U_FAQ}" class="mainmenu"><img src="templates/subSilver/images/icon_mini_faq.gif" width="12" height="13" border="0" alt="{L_FAQ}" hspace="3" />{L_FAQ}</a></span><span class="mainmenu"> <a href="{U_SEARCH}" class="mainmenu"><img src="templates/subSilver/images/icon_mini_search.gif" width="12" height="13" border="0" alt="{L_SEARCH}" hspace="3" />{L_SEARCH}</a> <a href="{U_MEMBERLIST}" class="mainmenu"><img src="templates/subSilver/images/icon_mini_members.gif" width="12" height="13" border="0" alt="{L_MEMBERLIST}" hspace="3" />{L_MEMBERLIST}</a> <a href="{U_GROUP_CP}" class="mainmenu"><img src="templates/subSilver/images/icon_mini_groups.gif" width="12" height="13" border="0" alt="{L_USERGROUPS}" hspace="3" />{L_USERGROUPS}</a> ]]></find> <inline-edit> <inline-find><![CDATA[<a href="{U_FAQ}" class="mainmenu"><img src="templates/subSilver/images/icon_mini_faq.gif" width="12" height="13" border="0" alt="{L_FAQ}" hspace="3" />{L_FAQ}</a></span><span class="mainmenu"> ]]></inline-find> <inline-action type="after-add"><![CDATA[ <a href="{U_MUSIC}" class="mainmenu"><img src="templates/subSilver/images/icon_mini_music.gif" width="12" height="13" border="0" alt="{L_MUSIC}" hspace="3" />{L_MUSIC}</a> ]]></inline-action> </inline-edit> </edit> </open> <open src="viewonline.php"> <edit> <find> case PAGE_FAQ: $location = $lang['Viewing_FAQ']; $location_url = "faq.$phpEx"; break; </find> <action type="after-add"> case PAGE_MUSIC: $location = $lang['Music']; $location_url = "music.$phpEx"; break;</action> </edit> </open> <open src="admin/index.php"> <edit> <find> case PAGE_FAQ: $location = $lang['Viewing_FAQ']; $location_url = "index.$phpEx?pane=right"; break; </find> <action type="after-add"> case PAGE_MUSIC: $location = $lang['Music']; $location_url = "index.$phpEx?pane=right"; break; </action> </edit> </open> <open src="includes/page_header.php"> <edit> <find><![CDATA[ 'U_GROUP_CP' => append_sid('groupcp.'.$phpEx), ]]></find> <action type="after-add"><![CDATA[ // Music Online 'L_MUSIC' => $lang['Music'], 'U_MUSIC' => append_sid('music.'.$phpEx), ]]></action> </edit> </open> <open src="language/lang_english/lang_main.php"> <edit> <find>$lang['Moderators'] = 'Moderators'; </find> <action type="after-add">// // Music Online // $lang['Music'] = 'Media Center'; // or Music Online </action> </edit> </open> <diy-instructions lang="en-gb">. CHMOD 777 music_box/upload . </diy-instructions> </action-group> </mod> --- NEW FILE: music_install.txt --- ################################################################ ## MOD Title: Media Center (MXP Addon Integration) ## ## MOD Author: orynider < ory...@rd... > (Florin Bodin Ciprian) http://www.publisher.com/ ## MOD Author: Cf Manager < cf_...@ya... > (Son Thai) http://cfmanager.net.tf/ ## ## MOD Description: This Mod allows you create the Music Center Page ## where users can upload, listen, rate and comment on media files. ## Beside that, users can link URL of the song from ## the another server without uploading. Youtube videos are supported. ## You will have Admin Panel to take control Music Center Page. ## ## Compatibility: 2.0.21 --> 2.0.23 (I tested on phpBB 2.0.23) ## ## Features: ## - Fully integrated with phpBB2 backend (DB, session, template, multi languages..) ## - Powerful and handy AdminCP ## - Multi-categories ## - Powerfull and phpBB-like permissions system ## - ModeratorCP ## - Upload Quota ## - Lyrics ## - Top listen songs (can set number of songs viewed) ## - Rate system ## - Comment system ## - Hotlink prevention (can set allowed domains) ## - Listen counter ## - Admin/Moderator song approval ## - Probably uploadable in PHP Safe Mode ## - Hide the URL of your songs ## - Link URL of the song from the other server ## ## Bonus funtions: ## - Allowed files: MP3, WMA, WMV, WAV, MIDI, MPEG, AVI, AU, SWF, QT, RAM, RM, FLV ## - Download song (Music Download Song Add-on) ## - Song Image (Music Song Image Add-on) ## - Search Song (Music Search Song Add-on) ## - Sub-Categories (Music Online Sub-Categories) ## - YouTube and Google Video (Media Center FLV Support) ## - And more... ## ## Requirements: ## A running phpBB 2.0.x (recommend the lastest version) ## The mxBB Mod "include/" folder that can be found in this mod "contrib/" folder ## The eXtreme Styles MOD is required for this mod to have all features enabled ## HTTP File Upload Enabled (this MOD can work with PHP Safe-Mode in some cases) ## MySQL 4.3.3+ ## ## MOD Version: 2.9.4 ## ## Installation Level: (Easy) ## Installation Time: 9 Minutes ## Files To Edit: (4) ## viewonline.php, ## includes/page_header.php, ## language/lang_english/lang_main.php, ## templates/subSilver/overall_header.tpl ## ## Included Files: 50 ## root/music.php ## root/music_db_install.php ## root/music_db_uninstall.php ## root/admin/admin_music_cfg.php ## root/admin/admin_music_auth.php ## root/admin/admin_music_cat.php ## root/music_box/music_common.php ## root/music_box/includes/music_constants.php ## root/music_box/includes/music_functions.php ## root/music_box/includes/music_integration.php ## root/music_box/includes/music_player.swf ## root/music_box/language/lang_english/lang_admin.php ## root/music_box/language/lang_english/lang_admin_music.php ## root/music_box/language/lang_english/lang_main_music.php ## root/music_box/modules/music_cat.php ## root/music_box/modules/music_comment.php ## root/music_box/modules/music_comment_edit.php ## root/music_box/modules/music_comment_delete.php ## root/music_box/modules/music_delete.php ## root/music_box/modules/music_edit.php ## root/music_box/modules/music_modcp.php ## root/music_box/modules/music_page.php ## root/music_box/modules/music_rate.php ## root/music_box/modules/music_rss.php ## root/music_box/modules/music_song.php ## root/music_box/modules/music_stream.php ## root/music_box/modules/music_upload.php ## root/templates/subSilver/music_cat_body.tpl ## root/templates/subSilver/music_cat_xs.tpl ## root/templates/subSilver/music_comment_body.tpl ## root/templates/subSilver/music_edit_body.tpl ## root/templates/subSilver/music_index_body.tpl ## root/templates/subSilver/music_media_cat_body.tpl ## root/templates/subSilver/music_modcp_body.tpl ## root/templates/subSilver/music_move_body.tpl ## root/templates/subSilver/music_page_body.tpl ## root/templates/subSilver/music_pic_cat_body.tpl ## root/templates/subSilver/music_rate_body.tpl ## root/templates/subSilver/music_upload_body.tpl ## root/templates/subSilver/admin/music_admin_body_ext.tpl ## root/templates/subSilver/admin/music_auth_body.tpl ## root/templates/subSilver/admin/music_cat_body.tpl ## root/templates/subSilver/admin/music_cat_delete_body.tpl ## root/templates/subSilver/admin/music_cat_new_body.tpl ## root/templates/subSilver/admin/music_cat_select_body.tpl ## root/templates/subSilver/admin/music_config_body.tpl ## root/templates/subSilver/music.cfg ## root/templates/subSilver/images/icon_mini_music.gif ## root/templates/subSilver/images/no_image.gif ## root/templates/subSilver/images/lang_english/upload_song.gif ## License: http://opensource.org/licenses/gpl-license.php GNU General Public License v2 ############################################################## ## For security purposes, please check: http://www.phpbb.com/mods/ ## for the latest version of this MOD. Although MODs are checked ## before being allowed in the MODs Database there is no guarantee ## that there are no security problems within the MOD. No support ## will be given for MODs not found within the MODs Database which ## can be found at http://www.phpbb.com/mods/ ############################################################## ## Author Notes: ## Please remember that this MOD requires the mxBB Mod "include" folder ## that can be found in the "contrib" folder, and the eXtreme Styles MOD. ## If you want to update from previous versions please deleate ## all releated files, upload the new files and do upgrade the database ## using music_install.php /*. ## Plz follow the Installation Instructions as strict as you can. ## ## This Mod was tested with the following databases: MySQL ## At last, DO NOT REMOVE MY COPYRIGHT NOTICE! ################################################################ ## This MOD is released under the GPL License. ################################################################ ## Before Adding This MOD To Your Forum, You Should Back Up All Files Related To This MOD ################################################################ # #-----[ COPY ]-------------------------------------------------- # Copy the following file and folder to root folder on your host copy root/*.php to *.php copy root/admin/*.php to admin/*.php copy root/music_box/music_common.php to music_box/music_common.php copy root/music_box/includes/*.php to music_box/includes/*.php copy root/music_box/language/lang_english/*.php to music_box/language/lang_english/*.php copy root/music_box/modules/*.php to music_box/modules/*.php copy root/templates/subSilver/*.tpl to templates/subSilver/*.tpl copy root/templates/subSilver/admin/*.tpl to templates/subSilver/admin/*.tpl copy root/templates/subSilver/music.cfg to templates/subSilver/music.cfg copy root/templates/subSilver/images/*.gif to templates/subSilver/images/*.gif copy root/templates/subSilver/images/lang_english/upload_song.gif to templates/subSilver/images/lang_english/upload_song.gif # #-----[ DIY INSTRUCTIONS ]------------------------------------ # # Require for Unix-like host (you can use your FTP client to do this) # . CHMOD 777 music_box/upload . # #-----[ SQL ]------------------------------------------------- # # Copy "music_db_install.php" to your phpBB root and execute it from your browser when you're logged in with admin rights # At last, you can run music_db_uninstall.php if you don't want to use this mod anymore # # Notes: After completed, remember to delete music_db_install.php and # music_db_uninstall.php if you don't want to get the problems! # CREATE TABLE IF NOT EXISTS `phpbb_music` ( `song_id` int(11) unsigned NOT NULL auto_increment, `song_filename` varchar(255) NOT NULL default '', `song_filetype` varchar(255) NOT NULL default '', `song_imagename` varchar(255) NOT NULL default '', `song_title` varchar(255) NOT NULL default '', `song_url` varchar(255) NOT NULL default '', `song_desc` text, `song_singer` varchar(255) NOT NULL default '', `song_user_id` mediumint(8) NOT NULL default '0', `song_username` varchar(32) default NULL, `song_user_ip` varchar(8) NOT NULL default '0', `song_time` int(11) unsigned NOT NULL default '0', `song_cat_id` mediumint(8) unsigned NOT NULL default '1', `song_view_count` int(11) unsigned NOT NULL default '0', `song_lock` tinyint(3) NOT NULL default '0', `song_approval` tinyint(3) NOT NULL default '1', `song_download_count` varchar(255) NOT NULL default '', PRIMARY KEY (`song_id`), KEY `song_cat_id` (`song_cat_id`), KEY `song_user_id` (`song_user_id`), KEY `song_time` (`song_time`) ); CREATE TABLE IF NOT EXISTS `phpbb_music_cat` ( `cat_id` mediumint(8) unsigned NOT NULL auto_increment, `cat_parent` mediumint(8) unsigned NOT NULL default '0', `cat_type` tinyint(4) NOT NULL default '0', `cat_title` varchar(255) NOT NULL default '', `cat_desc` text, `cat_order` mediumint(8) NOT NULL default '0', `cat_views` mediumint(8) NOT NULL default '0', `cat_view_level` tinyint(3) NOT NULL default '-1', `cat_upload_level` tinyint(3) NOT NULL default '0', `cat_rate_level` tinyint(3) NOT NULL default '0', `cat_comment_level` tinyint(3) NOT NULL default '0', `cat_edit_level` tinyint(3) NOT NULL default '0', `cat_delete_level` tinyint(3) NOT NULL default '2', `cat_view_groups` varchar(255) default NULL, `cat_upload_groups` varchar(255) default NULL, `cat_rate_groups` varchar(255) default NULL, `cat_comment_groups` varchar(255) default NULL, `cat_edit_groups` varchar(255) default NULL, `cat_delete_groups` varchar(255) default NULL, `cat_moderator_groups` varchar(255) default NULL, `cat_approval` tinyint(3) NOT NULL default '0', PRIMARY KEY (`cat_id`), KEY `cat_order` (`cat_order`) ); CREATE TABLE IF NOT EXISTS `phpbb_music_comment` ( `comment_id` int(11) unsigned NOT NULL auto_increment, `comment_song_id` int(11) unsigned NOT NULL default '0', `comment_user_id` mediumint(8) NOT NULL default '0', `comment_username` varchar(32) default NULL, `comment_user_ip` varchar(8) NOT NULL default '', `comment_time` int(11) unsigned NOT NULL default '0', `comment_text` text, `comment_edit_time` int(11) unsigned default NULL, `comment_edit_count` smallint(5) unsigned NOT NULL default '0', `comment_edit_user_id` mediumint(8) default NULL, PRIMARY KEY (`comment_id`), KEY `comment_song_id` (`comment_song_id`), KEY `comment_user_id` (`comment_user_id`), KEY `comment_user_ip` (`comment_user_ip`), KEY `comment_time` (`comment_time`) ); CREATE TABLE IF NOT EXISTS `phpbb_music_config` ( `config_name` varchar(255) NOT NULL default '', `config_value` varchar(255) NOT NULL default '', PRIMARY KEY (`config_name`) ); INSERT INTO `phpbb_music_config` (`config_name`, `config_value`) VALUES ('max_songs', '1024'); INSERT INTO `phpbb_music_config` (`config_name`, `config_value`) VALUES ('user_songs_limit', '50'); INSERT INTO `phpbb_music_config` (`config_name`, `config_value`) VALUES ('mod_songs_limit', '250'); INSERT INTO `phpbb_music_config` (`config_name`, `config_value`) VALUES ('max_file_size', '3145728'); INSERT INTO `phpbb_music_config` (`config_name`, `config_value`) VALUES ('rows_per_page', '20'); INSERT INTO `phpbb_music_config` (`config_name`, `config_value`) VALUES ('cols_per_page', '1'); INSERT INTO `phpbb_music_config` (`config_name`, `config_value`) VALUES ('top', '5'); INSERT INTO `phpbb_music_config` (`config_name`, `config_value`) VALUES ('sort_method', 'song_time'); INSERT INTO `phpbb_music_config` (`config_name`, `config_value`) VALUES ('sort_order', 'DESC'); INSERT INTO `phpbb_music_config` (`config_name`, `config_value`) VALUES ('mp3_allowed', '1'); INSERT INTO `phpbb_music_config` (`config_name`, `config_value`) VALUES ('wav_allowed', '1'); INSERT INTO `phpbb_music_config` (`config_name`, `config_value`) VALUES ('wma_allowed', '1'); INSERT INTO `phpbb_music_config` (`config_name`, `config_value`) VALUES ('wmv_allowed', '1'); INSERT INTO `phpbb_music_config` (`config_name`, `config_value`) VALUES ('mid_allowed', '1'); INSERT INTO `phpbb_music_config` (`config_name`, `config_value`) VALUES ('ram_allowed', '1'); INSERT INTO `phpbb_music_config` (`config_name`, `config_value`) VALUES ('au_allowed', '1'); INSERT INTO `phpbb_music_config` (`config_name`, `config_value`) VALUES ('mpeg_allowed', '1'); INSERT INTO `phpbb_music_config` (`config_name`, `config_value`) VALUES ('avi_allowed', '1'); INSERT INTO `phpbb_music_config` (`config_name`, `config_value`) VALUES ('swf_allowed', '1'); INSERT INTO `phpbb_music_config` (`config_name`, `config_value`) VALUES ('qt_allowed', '1'); INSERT INTO `phpbb_music_config` (`config_name`, `config_value`) VALUES ('rm_allowed', '1'); INSERT INTO `phpbb_music_config` (`config_name`, `config_value`) VALUES ('desc_length', '512000'); INSERT INTO `phpbb_music_config` (`config_name`, `config_value`) VALUES ('hotlink_prevent', '0'); INSERT INTO `phpbb_music_config` (`config_name`, `config_value`) VALUES ('hotlink_allowed', 'cfmanager.gate2vn.net'); INSERT INTO `phpbb_music_config` (`config_name`, `config_value`) VALUES ('rate', '1'); INSERT INTO `phpbb_music_config` (`config_name`, `config_value`) VALUES ('rate_scale', '10'); INSERT INTO `phpbb_music_config` (`config_name`, `config_value`) VALUES ('comment', '1'); INSERT INTO `phpbb_music_config` (`config_name`, `config_value`) VALUES ('music_version', '.1.0'); INSERT INTO `phpbb_music_config` (`config_name`, `config_value`) VALUES ('max_image_size', '1024000'); INSERT INTO `phpbb_music_config` (`config_name`, `config_value`) VALUES ('max_image_width', '800'); INSERT INTO `phpbb_music_config` (`config_name`, `config_value`) VALUES ('max_image_height', '600'); INSERT INTO `phpbb_music_config` (`config_name`, `config_value`) VALUES ('download', '1'); INSERT INTO `phpbb_music_config` (`config_name`, `config_value`) VALUES ('enable_integration', '1'); INSERT INTO `phpbb_music_config` (`config_name`, `config_value`) VALUES ('override_default_pages', '0'); INSERT INTO `phpbb_music_config` (`config_name`, `config_value`) VALUES ('index', '5'); INSERT INTO `phpbb_music_config` (`config_name`, `config_value`) VALUES ('xs_enabled', '1'); INSERT INTO `phpbb_music_config` (`config_name`, `config_value`) VALUES ('img_allowed', '1'); INSERT INTO `phpbb_music_config` (`config_name`, `config_value`) VALUES ('flv_allowed', '1'); INSERT INTO `phpbb_music_config` (`config_name`, `config_value`) VALUES ('show_index_subcats', '1'); INSERT INTO `phpbb_music_config` (`config_name`, `config_value`) VALUES ('rows_per_page_pic', '5'); INSERT INTO `phpbb_music_config` (`config_name`, `config_value`) VALUES ('cols_per_page_pic', '5'); INSERT INTO `phpbb_music_config` (`config_name`, `config_value`) VALUES ('rows_per_page_media', '10'); INSERT INTO `phpbb_music_config` (`config_name`, `config_value`) VALUES ('cols_per_page_media', '1'); -- -------------------------------------------------------- CREATE TABLE IF NOT EXISTS `phpbb_music_rate` ( `rate_song_id` int(11) unsigned NOT NULL default '0', `rate_user_id` mediumint(8) NOT NULL default '0', `rate_user_ip` char(8) NOT NULL default '', `rate_point` tinyint(3) unsigned NOT NULL default '0', KEY `rate_song_id` (`rate_song_id`), KEY `rate_user_id` (`rate_user_id`), KEY `rate_user_ip` (`rate_user_ip`), KEY `rate_point` (`rate_point`) ); # #-----[ OPEN ]------------------------------------------ # templates/subSilver/overall_header.tpl # #-----[ FIND ]------------------------------------------ # <td align="center" valign="top" nowrap="nowrap"><span class="mainmenu"> <a href="{U_FAQ}" class="mainmenu"><img src="templates/subSilver/images/icon_mini_faq.gif" width="12" height="13" border="0" alt="{L_FAQ}" hspace="3" />{L_FAQ}</a></span><span class="mainmenu"> <a href="{U_SEARCH}" class="mainmenu"><img src="templates/subSilver/images/icon_mini_search.gif" width="12" height="13" border="0" alt="{L_SEARCH}" hspace="3" />{L_SEARCH}</a> <a href="{U_MEMBERLIST}" class="mainmenu"><img src="templates/subSilver/images/icon_mini_members.gif" width="12" height="13" border="0" alt="{L_MEMBERLIST}" hspace="3" />{L_MEMBERLIST}</a> <a href="{U_GROUP_CP}" class="mainmenu"><img src="templates/subSilver/images/icon_mini_groups.gif" width="12" height="13" border="0" alt="{L_USERGROUPS}" hspace="3" />{L_USERGROUPS}</a> # #-----[ IN-LINE FIND ]------------------------------------------ # <a href="{U_FAQ}" class="mainmenu"><img src="templates/subSilver/images/icon_mini_faq.gif" width="12" height="13" border="0" alt="{L_FAQ}" hspace="3" />{L_FAQ}</a></span><span class="mainmenu"> # #-----[ IN-LINE AFTER, ADD ]------------------------------------------ # <a href="{U_MUSIC}" class="mainmenu"><img src="templates/subSilver/images/icon_mini_music.gif" width="12" height="13" border="0" alt="{L_MUSIC}" hspace="3" />{L_MUSIC}</a> # #-----[ OPEN ]-------------------------------------------------- # viewonline.php # #-----[ FIND ]-------------------------------------------------- # case PAGE_FAQ: $location = $lang['Viewing_FAQ']; $location_url = "faq.$phpEx"; break; # #-----[ AFTER, ADD ]-------------------------------------------- # case PAGE_MUSIC: $location = $lang['Music']; $location_url = "music.$phpEx"; break; # #-----[ OPEN ]-------------------------------------------------- # admin/index.php # #-----[ FIND ]-------------------------------------------------- # case PAGE_FAQ: $location = $lang['Viewing_FAQ']; $location_url = "index.$phpEx?pane=right"; break; # #-----[ AFTER, ADD ]-------------------------------------------- # case PAGE_MUSIC: $location = $lang['Music']; $location_url = "index.$phpEx?pane=right"; break; # #-----[ OPEN ]-------------------------------------------------- # includes/page_header.php # #-----[ FIND ]-------------------------------------------------- # 'U_GROUP_CP' => append_sid('groupcp.'.$phpEx), # #-----[ AFTER, ADD ]-------------------------------------------- # // Music Online 'L_MUSIC' => $lang['Music'], 'U_MUSIC' => append_sid('music.'.$phpEx), # #-----[ OPEN ]-------------------------------------------------- # also for all other language packs language/lang_english/lang_main.php # #-----[ FIND ]-------------------------------------------------- # $lang['Moderators'] = 'Moderators'; # #-----[ AFTER, ADD ]------------------------------------------- # // // Music Online // $lang['Music'] = 'Media Center'; // or Music Online # #-----[ SAVE/CLOSE ALL FILES ]------------------------------------------ # # EoM --- NEW FILE: modx.subsilver.en.xsl --- <?xml version="1.0" encoding="UTF-8" ?> <!-- MODX by the phpBB MOD Team XSL file v1.0 copyright 2005-2006 the phpBB MOD Team. $Id: modx.subsilver.en.xsl,v 1.1 2008/09/18 07:43:27 orynider Exp $ --> <!DOCTYPE xsl:stylesheet[ <!ENTITY nbsp " "> ]> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0" xmlns:mod="http://www.phpbb.com/mods/xml/modx-1.0.xsd"> <xsl:output method="html" omit-xml-declaration="no" indent="yes" /> <xsl:variable name="title" select="mod:mod/mod:header/mod:title" /> <xsl:variable name="version"> <xsl:for-each select="mod:mod/mod:header/mod:mod-version"> <xsl:call-template name="give-version"> </xsl:call-template> </xsl:for-each> </xsl:variable> <xsl:template match="mod:mod"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Language" content="en-GB" /> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <style> /* Style for a "Recommendation" */ /* Copyright 1997-2003 W3C (MIT, ERCIM, Keio). All Rights Reserved. The following software licensing rules apply: http://www.w3.org/Consortium/Legal/copyright-software */ /* $Id: modx.subsilver.en.xsl,v 1.1 2008/09/18 07:43:27 orynider Exp $ */ /* Updated by Jon Stanley for use in phpBB XML MOD */ /* Updated by David Smith to look subSilvery for phpBB */ html, body { font-family: Verdana, Arial, Helvetica, sans-serif; color: black; background: #E5E5E5; background-position: top left; background-attachment: fixed; background-repeat: no-repeat; } :link { color : #006699; background: transparent } :visited { color : #006699; background: transparent } a:active { color : #006699; background: transparent } a:hover { text-decoration: underline; color : #DD6900; } a:link img, a:visited img { border-style: none } /* no border on img links */ a img { color: white; } /* trick to hide the border in Netscape 4 */ @media all { /* hide the next rule from Netscape 4 */ a img { color: inherit; } /* undo the color change above */ } th, td { /* ns 4 */ font-family: sans-serif; } h1, h2, h3, h4, h5, h6 { text-align: left } /* background should be transparent, but WebTV has a bug */ h1, h2, h3 { color: #006699 } h1 { font: 170% sans-serif } h2 { font: 140% sans-serif } h3 { font: 120% sans-serif } h4 { font: bold 100% sans-serif } h5 { font: italic 100% sans-serif } h6 { font: small-caps 100% sans-serif } .hide { display: none } div.head { margin-bottom: 1em } div.head h1 { margin-top: 2em; clear: both } div.head table { margin-left: 2em; margin-top: 2em } p.copyright { font-size: small } p.copyright small { font-size: small } @media screen { /* hide from IE3 */ a[href]:hover { background: #ffa } } pre { margin-left: 2em } /* p { margin-top: 0.6em; margin-bottom: 0.6em; } */ dt, dd { margin-top: 0; margin-bottom: 0 } /* opera 3.50 */ dt { font-weight: bold } pre, code { font-family: monospace } /* navigator 4 requires this */ ul.toc { list-style: disc; /* Mac NS has problem with 'none' */ list-style: none; } @media aural { h1, h2, h3 { stress: 20; richness: 90 } .hide { speak: none } p.copyright { volume: x-soft; speech-rate: x-fast } dt { pause-before: 20% } pre { speak-punctuation: code } } /* Additional styles */ div.editFile {border: 2px solid #333333; margin: 0em 0em 2em; padding: 1em 1em; background: #D1D7DC;} div.editFile h2 { font-size: 170%; margin: 0.4em 0em; } div.action { border: 2px solid #DD6900; padding: 1em; background: #DEE3E7; margin: 1em 0em; } div.action p { font-weight: normal; margin-top: 0px; margin-bottom: 0px; font-size: 0.8em; } div.action h3 { margin-top: 0px; margin-bottom: 0px; } div.action pre { padding: 0.2em; background: #EFEFEF; border: 2px solid #006699; overflow: scroll; width: 95%; } div.editFile pre { padding: 0.2em; background: #EFEFEF; border: 2px solid #006699; overflow: scroll; width: 95%; } #pageBody { background-color: #FFFFFF; border: 1px #98AAB1 solid; padding: 1em 1em;} hr { height: 0px; border: solid #D1D7DC 0px; border-top-width: 1px;} strong.red { color: red; } </style> <script type="text/javascript"><![CDATA[<!--]]> var i = 0; var box = new Array(); <xsl:for-each select="mod:action-group/mod:open/mod:edit"> <xsl:for-each select="mod:find|mod:action"> box[i] = '<xsl:value-of select="generate-id()"/>'; i += 1; </xsl:for-each> <xsl:for-each select="mod:inline-edit"> <xsl:for-each select="mod:inline-find|mod:inline-action"> box[i] = '<xsl:value-of select="generate-id()"/>'; i += 1; </xsl:for-each> </xsl:for-each> </xsl:for-each> <![CDATA[ var selectedElement = -1; var boxes = box.length; var pre_count = 0; // The following line from http://www.ryancooper.com/resources/keycode.asp document.onkeydown = mod_doKeyPress; function SXBB_IsIEMac() { // Any better way to detect IEMac? var ua = String(navigator.userAgent).toLowerCase(); if( document.all && ua.indexOf("mac") >= 0 ) { return true; } return false; } function select_text(id) { var o = document.getElementById(id); if( !o ) { return; } var r, s; if( document.selection && !SXBB_IsIEMac() ) { // Works on: IE5+ // To be confirmed: IE4? / IEMac fails? r = document.body.createTextRange(); r.moveToElementText(o); r.select(); } else if( document.createRange && (document.getSelection || window.getSelection) ) { // Works on: Netscape/Mozilla/Konqueror/Safari // To be confirmed: Konqueror/Safari use window.getSelection ? r = document.createRange(); r.selectNodeContents(o); s = window.getSelection ? window.getSelection() : document.getSelection(); s.removeAllRanges(); s.addRange(r); } find_selected(id); return o; } function find_selected(id) { for( x = 0; x < box.length; x++ ) { if ( box[x] == id ) { selectedElement = x; } } } // function findPosY taken from http://www.quirksmode.org/js/findpos.html function findPosY(obj) { var curtop = 0; if (obj.offsetParent) { while (obj.offsetParent) { curtop += obj.offsetTop obj = obj.offsetParent; } } else if (obj.y) { curtop += obj.y; } return curtop; } function selectNextBox() { selectedElement += 1; if (selectedElement >= boxes) selectedElement = 0; obj = select_text(box[selectedElement]); window.scrollTo(0, findPosY(obj) - 100); } function selectPrevBox() { selectedElement -= 1; if (selectedElement < 0) selectedElement = boxes - 1; obj = select_text(box[selectedElement]); window.scrollTo(0, findPosY(obj) - 100); } function selectFirstBox() { selectedElement = 0; obj = select_text(box[selectedElement]); window.scrollTo(0, findPosY(obj) - 100); } function mod_doKeyPress(e) { /* section from w3 schools starts here http://www.w3schools.com/jsref/jsref_onkeypress.asp */ var keynum; /* section from w3 schools ends here */ // The following line from http://www.ryancooper.com/resources/keycode.asp if (window.event) keynum = window.event.keyCode; else if (e) keynum = e.which; if (keynum == 84) selectNextBox(); //if (keynum == 9) selectNextBox(); //tab //if (keynum == 13) selectNextBox(); //enter/return //if (keynum == 32) selectNextBox(); //space if (keynum == 40) selectNextBox(); //down key if (keynum == 38) selectPrevBox(); //up key if (keynum == 83 || keynum == 37) { selectFirstBox(); } return false; } //-->]]></script> <title>phpBB MOD » <xsl:value-of select="$title" /></title> </head> <body> <div id="pageBody"> <div id="modInfo"> <xsl:for-each select="mod:header"> <xsl:call-template name="give-header"></xsl:call-template> </xsl:for-each> <div id="modInstructions"> <xsl:for-each select="mod:action-group"> <xsl:call-template name="give-actions"></xsl:call-template> </xsl:for-each> </div> <hr /> <div class="endMOD"> <h1>Save all files. End of MOD.</h1> <p>You have finished the installation for this MOD. Upload all changed files to your website. If the installation went bad, simply restore your backed up files.</p> </div> </div> </div> <p class="copyright" style="text-align: center; font-size: 10px;">MOD UA XSLT File Copyright © 2006 The phpBB Group, this MOD is copyright to the author<xsl:if test="count(author) > 1">s</xsl:if> listed above.</p> </body> </html> </xsl:template> <xsl:template name="give-header"> <h1>Installation instructions for '<xsl:value-of select="$title" />' Version <xsl:value-of select="$version" /></h1> <h2>About this MOD</h2> <dl> <dt>Title:</dt> <dd> <xsl:if test="count(mod:title) > 1"> <dl id="title"> <xsl:for-each select="mod:title"> <dl id="{generate-id()}"> <dt> <xsl:value-of select="@lang" /> </dt> <dd style='white-space:pre;'> <xsl:value-of select="current()" /> </dd> </dl> </xsl:for-each> </dl> </xsl:if> <xsl:if test="count(mod:title) = 1"> <xsl:value-of select="mod:title" /> </xsl:if> </dd> <dt>Description:</dt> <dd> <xsl:if test="count(mod:description) > 1"> <dl id="description"> <xsl:for-each select="mod:description"> <dl id="{generate-id()}"> <dt> <xsl:value-of select="@lang" /> </dt> <dd> <xsl:call-template name="add-line-breaks"> <xsl:with-param name="string"> <xsl:value-of select="current()" /> </xsl:with-param> </xsl:call-template> </dd> </dl> </xsl:for-each> </dl> </xsl:if> <xsl:if test="count(mod:description) = 1"> <xsl:call-template name="add-line-breaks"> <xsl:with-param name="string"> <xsl:value-of select="mod:description" /> </xsl:with-param> </xsl:call-template> </xsl:if> </dd> <dt>Version:</dt> <dd> <xsl:for-each select="mod:mod-version"> <xsl:call-template name="give-version"></xsl:call-template> </xsl:for-each> </dd> <xsl:for-each select="mod:installation"> <xsl:call-template name="give-installation"></xsl:call-template> </xsl:for-each> </dl> <xsl:for-each select="mod:author-group"> <h2>Author<xsl:if test="count(mod:author) > 1">s</xsl:if></h2> <xsl:call-template name="give-authors"></xsl:call-template> </xsl:for-each> <h2>Files To Edit</h2> <xsl:for-each select="../mod:action-group"> <xsl:call-template name="give-files-to-edit"></xsl:call-template> </xsl:for-each> <h2>Included Files</h2> <xsl:if test="count(../mod:action-group/mod:copy/mod:file) = 0"> <p>No files have been included with this MOD.</p> </xsl:if> <xsl:for-each select="../mod:action-group"> <xsl:call-template name="give-files-included"></xsl:call-template> </xsl:for-each> <hr /> <div id="modDisclaimer"> <h1>Disclaimer</h1> <p>For Security Purposes, Please Check: <a href="http://www.phpbb.com/mods/">http://www.phpbb.com/mods/</a> for the latest version of this MOD. Downloading this MOD from other sites could cause malicious code to enter into your phpBB Forum. As such, phpBB will not offer support for MOD's not offered in our MOD-Database, located at: <a href="http://www.phpbb.com/mods/">http://www.phpbb.com/mods/</a></p> <h2>Author Notes</h2> <xsl:if test="count(mod:author-notes) > 1"> <dl id="author-notes"> <xsl:for-each select="mod:author-notes"> <dl id="{generate-id()}"> <dt> <xsl:value-of select="@lang" /> </dt> <dd> <xsl:call-template name="add-line-breaks"> <xsl:with-param name="string"> <xsl:value-of select="current()" /> </xsl:with-param> </xsl:call-template> </dd> </dl> </xsl:for-each> </dl> </xsl:if> <xsl:if test="count(mod:author-notes) = 1"> <xsl:call-template name="add-line-breaks"> <xsl:with-param name="string"> <xsl:value-of select="mod:author-notes" /> </xsl:with-param> </xsl:call-template> </xsl:if> <xsl:for-each select="mod:history"> <xsl:call-template name="give-mod-history"></xsl:call-template> </xsl:for-each> <h3>License</h3> <p>This MOD has been licensed under the following license:</p> <p style='white-space:pre;'> <xsl:value-of select="mod:license" /> </p> <h3>Other Notes</h3> <p>Before Adding This MOD To Your Forum, You Should Back Up All Files Related To This MOD</p> <p>This MOD was designed for phpBB<xsl:value-of select="mod:installation/mod:target-version/mod:target-primary" /> and may not function as stated on other phpBB versions. MODs for phpBB3.0 will <strong>not</strong> work on phpBB2.0 and vice versa.</p> <xsl:if test="./mod:mod-version/mod:minor mod 2 != 0 or ./mod:mod-version/mod:major = 0"> <p> <strong class="red">This MOD is development quality. It is not recommended that you install it on a live forum.</strong> </p> </xsl:if> </div> <hr /> </xsl:template> <xsl:template name="give-authors"> <xsl:for-each select="mod:author"> <xsl:call-template name="give-author"></xsl:call-template> </xsl:for-each> </xsl:template> <xsl:template name="give-author"> <dl> <dt>Username:</dt> <dd> <a href="http://www.phpbb.com/phpBB/profile.php?mode=viewprofile&un={mod:username}"> <xsl:value-of select="mod:username" /> </a> </dd> <xsl:if test="mod:email != 'N/A' and mod:email != 'n/a' and mod:email != ''"> <dt>Email:</dt> <dd> <a href="mailto:{mod:email}"> <xsl:value-of select="mod:email" /> </a> </dd> </xsl:if> <dt>Realname:</dt> <dd> <xsl:value-of select="mod:realname" /> </dd> <xsl:if test="mod:homepage != 'N/A' and mod:homepage != 'n/a' and mod:homepage!=''"> <dt>WWW:</dt> <dd> <a href="{mod:homepage}"> <xsl:value-of select="mod:homepage" /> </a> </dd> </xsl:if> </dl> <br /> </xsl:template> <xsl:template name="give-version"><xsl:value-of select="concat(mod:major, '.', mod:minor, '.', mod:revision, mod:release)" /></xsl:template> <xsl:template name="give-installation"> <dt>Installation Level:</dt> <dd> <xsl:if test="mod:level='easy'">Easy</xsl:if> <xsl:if test="mod:level='intermediate'">Intermediate</xsl:if> <xsl:if test="mod:level='hard'">Hard</xsl:if> </dd> <dt>Installation Time:</dt> <dd>~<xsl:value-of select="floor(mod:time div 60)" /> minutes</dd> </xsl:template> <xsl:template name="give-mod-history"> <xsl:if test="count(mod:entry)>1"> <h2>MOD History</h2> <dl> <xsl:for-each select="mod:entry"> <xsl:call-template name="give-history-entry"></xsl:call-template> </xsl:for-each> </dl> </xsl:if> </xsl:template> <xsl:template name="give-history-entry"> <dt><xsl:value-of select="substring(mod:date,1,10)" /> - Version <xsl:for-each select="mod:rev-version"> <xsl:call-template name="give-version"></xsl:call-template> </xsl:for-each></dt> <dd> <xsl:if test="count(mod:changelog) > 1"> <xsl:for-each select="mod:changelog"> <xsl:call-template name="give-history-entry-changelog"></xsl:call-template> </xsl:for-each> </xsl:if> <xsl:if test="count(mod:changelog) = 1"> <xsl:for-each select="mod:changelog"> <xsl:call-template name="give-history-entry-changelog-single"></xsl:call-template> </xsl:for-each> </xsl:if> </dd> </xsl:template> <xsl:template name="give-history-entry-changelog"> <dl> <dt> <xsl:value-of select="@lang" /> </dt> <dd> <ul> <xsl:for-each select="mod:change"> <li> <xsl:value-of select="current()" /> </li> </xsl:for-each> </ul> </dd> </dl> </xsl:template> <xsl:template name="give-history-entry-changelog-single"> <ul> <xsl:for-each select="mod:change"> <li> <xsl:value-of select="current()" /> </li> </xsl:for-each> </ul> </xsl:template> <xsl:template name="give-files-to-edit"> <ul> <xsl:for-each select="mod:open"> <xsl:call-template name="give-file"></xsl:call-template> </xsl:for-each> </ul> </xsl:template> <xsl:template name="give-files-included"> <ul> <xsl:for-each select="mod:copy"> <xsl:call-template name="give-file-copy"></xsl:call-template> </xsl:for-each> </ul> </xsl:template> <xsl:template name="give-file"> <li> <xsl:value-of select="@src" /> <xsl:if test="position()!=last()">,</xsl:if> </li> </xsl:template> <xsl:template name="give-file-copy"> <xsl:for-each select="mod:file"> <li> <xsl:value-of select="@from" /> <xsl:if test="position()!=last()">,</xsl:if> </li> </xsl:for-each> </xsl:template> <xsl:template name="give-actions"> <xsl:if test="count(mod:sql) > 0"> <h1 onclick="select_text('sql');">SQL</h1> </xsl:if> <div id="sql"> <xsl:for-each select="mod:sql"> <xsl:call-template name="give-sql"></xsl:call-template> </xsl:for-each> </div> <xsl:if test="count(mod:copy) > 0"> <h1>File Copy</h1> </xsl:if> <xsl:for-each select="mod:copy"> <xsl:call-template name="give-filez"></xsl:call-template> </xsl:for-each> <h1>Edits</h1> <p>Click on the action name or in the code box to select the code. You may also hit '<em>s</em>' on your keyboard to go to the first code box and the <em>up</em> and <em>down</em> arrows to scroll through the code boxes.</p> <xsl:for-each select="mod:open"> <xsl:call-template name="give-fileo"></xsl:call-template> </xsl:for-each> <xsl:call-template name="give-manual"></xsl:call-template> </xsl:template> <xsl:template name="give-sql"> <div class="action"> <pre> <xsl:value-of select="current()" /> </pre> </div> </xsl:template> <xsl:template name="give-manual"> <xsl:for-each select="mod:diy-instructions"> <div class="editFile"> <h2 onClick="select_text('{generate-id()}')">DIY Instructions<xsl:if test="count(../mod:diy-instructions) > 1"> (<xsl:value-of select="@lang" />)</xsl:if></h2> <p>These are manual instructions that cannot be performed automatically. You should follow these instructions carefully.</p> <pre id="{generate-id()}"> <xsl:value-of select="current()" /> </pre> </div> </xsl:for-each> </xsl:template> <xsl:template name="give-fileo"> <div class="editFile"> <h2>Open: <xsl:value-of select="@src" /></h2> <xsl:for-each select="mod:edit"> <div class="action"> <xsl:for-each select="mod:find|mod:action|mod:inline-edit|mod:comment"> <xsl:if test="name() = 'find'"> <h3 onClick="select_text('{generate-id()}')">Find</h3> <p><strong>Tip:</strong> This may be a partial find and not the whole line. <xsl:if test="@type = 'regex'"> <br /> <em>This find contains an advanced feature known as regular expressions, click here to learn more.</em> </xsl:if> </p> <pre id="{generate-id()}"> <xsl:value-of select="current()" /> </pre> </xsl:if> <xsl:if test="name() = 'action'"> <xsl:if test="@type = 'after-add'"> <h3 onClick="select_text('{generate-id()}')">Add after</h3> <p><strong>Tip:</strong> Add these lines on a new blank line after the preceding line(s) to find.</p> </xsl:if> <xsl:if test="@type = 'before-add'"> <h3 onClick="select_text('{generate-id()}')">Add before</h3> <p><strong>Tip:</strong> Add these lines on a new blank line before the preceding line(s) to find.</p> </xsl:if> <xs... [truncated message content] |
|
From: FlorinCB <ory...@us...> - 2008-09-18 00:42:11
|
Update of /cvsroot/mxbb/mx_music/phpbb2/templates/subSilver/admin In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv19070/admin Log Message: Directory /cvsroot/mxbb/mx_music/phpbb2/templates/subSilver/admin added to the repository |
|
From: FlorinCB <ory...@us...> - 2008-09-18 00:41:47
|
Update of /cvsroot/mxbb/mx_music/phpbb2/mx_mod/styles/prosilver In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv18786/prosilver Log Message: Directory /cvsroot/mxbb/mx_music/phpbb2/mx_mod/styles/prosilver added to the repository |
|
From: FlorinCB <ory...@us...> - 2008-09-18 00:41:23
|
Update of /cvsroot/mxbb/mx_music/phpbb2/mx_mod/mx_shared/SimpleTextEditor/images In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv18581/images Log Message: Directory /cvsroot/mxbb/mx_music/phpbb2/mx_mod/mx_shared/SimpleTextEditor/images added to the repository |