phpslash-commit Mailing List for phpSlash (Page 34)
Brought to you by:
joestewart,
nhruby
You can subscribe to this list here.
2001 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(11) |
Nov
(59) |
Dec
(60) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2002 |
Jan
(52) |
Feb
(77) |
Mar
(118) |
Apr
(76) |
May
(106) |
Jun
(145) |
Jul
(9) |
Aug
(15) |
Sep
(78) |
Oct
(83) |
Nov
(105) |
Dec
(51) |
2003 |
Jan
(105) |
Feb
(100) |
Mar
(111) |
Apr
(149) |
May
(95) |
Jun
(56) |
Jul
(8) |
Aug
(2) |
Sep
|
Oct
(22) |
Nov
(117) |
Dec
(6) |
2004 |
Jan
(1) |
Feb
|
Mar
(3) |
Apr
(25) |
May
|
Jun
(11) |
Jul
(26) |
Aug
(85) |
Sep
(119) |
Oct
(312) |
Nov
(271) |
Dec
(5) |
2005 |
Jan
(6) |
Feb
|
Mar
|
Apr
(12) |
May
(7) |
Jun
(8) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2009 |
Jan
(5) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: Joe S. <joe...@us...> - 2004-08-23 16:29:19
|
Update of /cvsroot/phpslash/phpslash-dev/include/templates/en/basiccurves In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14036/phpslash-dev/include/templates/en/basiccurves Modified Files: slashHead-htmlarea3.tpl Log Message: Upgraded htmlarea3 Index: slashHead-htmlarea3.tpl =================================================================== RCS file: /cvsroot/phpslash/phpslash-dev/include/templates/en/basiccurves/slashHead-htmlarea3.tpl,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** slashHead-htmlarea3.tpl 13 Nov 2003 02:34:21 -0000 1.1 --- slashHead-htmlarea3.tpl 23 Aug 2004 16:29:04 -0000 1.2 *************** *** 15,54 **** <!-- END each_metatag --> <link rel="alternate" type="application/rss+xml" title="RSS" href="{ROOTDIR}/backend.php" /> - <!-- BEGIN HTMLAREA3 Javascript --> - <script TYPE="text/javascript" LANGUAGE="JavaScript"> - <!-- Script Begin - <!-- Root path for the html WYSIWYG editor --> - var _editor_url="{ROOTDIR}/scripts/htmlarea3/"; - // --> - </script> <link rel="stylesheet" type="text/css" href="{ROOTDIR}/styles/basic.css" /> ! <script TYPE="text/javascript" LANGUAGE="JavaScript" src="{ROOTDIR}/scripts/htmlarea3/htmlarea.js"></script> ! <script TYPE="text/javascript" LANGUAGE="JavaScript" src="{ROOTDIR}/scripts/htmlarea3/lang/en.js"></script> ! <script TYPE="text/javascript" LANGUAGE="JavaScript" src="{ROOTDIR}/scripts/htmlarea3/dialog.js"></script> ! <!-- <script TYPE="text/javascript" LANGUAGE="JavaScript" src="{ROOTDIR}/scripts/htmlarea3/popupdiv.js"></script> --> ! <script TYPE="text/javascript" LANGUAGE="JavaScript" src="{ROOTDIR}/scripts/htmlarea3/popupwin.js"></script> - <!-- load the TableOperations plugin files --> - <script TYPE="text/javascript" LANGUAGE="JavaScript" src="{ROOTDIR}/scripts/htmlarea3/plugins/TableOperations/table-operations.js"></script> - <script TYPE="text/javascript" LANGUAGE="JavaScript" src="{ROOTDIR}/scripts/htmlarea3/plugins/TableOperations/lang/en.js"></script> ! <style type="text/css"> ! @import url({ROOTDIR}/scripts/htmlarea3/htmlarea.css); ! textarea { background-color: #fff; border: 1px solid 00f; } ! </style> ! <script TYPE="text/javascript" LANGUAGE="JavaScript"> ! var editor = null; ! function initEditor() { ! // create an editor for the "ta" textbox ! editor = new HTMLArea("ta"); ! // register the TableOperations plugin with our editor ! editor.registerPlugin("TableOperations"); - editor.generate(); - return false; - } function insertHTML() { --- 15,179 ---- <!-- END each_metatag --> <link rel="alternate" type="application/rss+xml" title="RSS" href="{ROOTDIR}/backend.php" /> <link rel="stylesheet" type="text/css" href="{ROOTDIR}/styles/basic.css" /> ! <!-- BEGIN HTMLAREA3 Javascript --> ! <script type="text/javascript"> ! // the _editor_url is REQUIRED! don't forget to set it. ! _editor_url="{ROOTDIR}/scripts/htmlarea3/"; ! // implicit language will be "en", but let's set it for brevity ! _editor_lang = "en"; ! </script> ! <script type="text/javascript" src="{ROOTDIR}/scripts/htmlarea3/htmlarea.js"></script> ! <!-- load the plugins --> ! <script type="text/javascript"> ! // WARNING: using this interface to load plugin ! // will _NOT_ work if plugins do not have the language ! // loaded by HTMLArea. ! // In other words, this function generates SCRIPT tags ! // that load the plugin and the language file, based on the ! // global variable HTMLArea.I18N.lang (defined in the lang file, ! // in our case "lang/en.js" loaded above). ! // If this lang file is not found the plugin will fail to ! // load correctly and nothing will work. ! ! HTMLArea.loadPlugin("TableOperations"); ! // HTMLArea.loadPlugin("SpellChecker"); ! // HTMLArea.loadPlugin("FullPage"); ! // HTMLArea.loadPlugin("CSS"); ! HTMLArea.loadPlugin("ContextMenu"); ! // HTMLArea.loadPlugin("HtmlTidy"); ! // HTMLArea.loadPlugin("ListType"); ! HTMLArea.loadPlugin("ImageManager"); ! ! </script> ! ! <script type="text/javascript"> ! // this function will get called at body.onload ! function initEditor() { ! // cache these values as we need to pass it for both editors ! var css_plugin_args = { ! combos : [ ! { label: "Syntax", ! // menu text // CSS class ! options: { "None" : "", ! "Code" : "code", ! "String" : "string", ! "Comment" : "comment", ! "Variable name" : "variable-name", ! "Type" : "type", ! "Reference" : "reference", ! "Preprocessor" : "preprocessor", ! "Keyword" : "keyword", ! "Function name" : "function-name", ! "Html tag" : "html-tag", ! "Html italic" : "html-helper-italic", ! "Warning" : "warning", ! "Html bold" : "html-helper-bold" ! }, ! context: "pre" ! }, ! { label: "Info", ! options: { "None" : "", ! "Quote" : "quote", ! "Highlight" : "highlight", ! "Deprecated" : "deprecated" ! } ! } ! ] ! }; ! ! ! ! ! ! ! ! //--------------------------------------------------------------------- ! // GENERAL PATTERN ! // ! // 1. Instantitate an editor object. ! // 2. Register plugins (note, it's required to have them loaded). ! // 3. Configure any other items in editor.config. ! // 4. generate() the editor ! // ! // The above are steps that you use to create one editor. Nothing new ! // so far. In order to create more than one editor, you just have to ! // repeat those steps for each of one. Of course, you can register any ! // plugins you want (no need to register the same plugins for all ! // editors, and to demonstrate that we'll skip the TableOperations ! // plugin for the second editor). Just be careful to pass different ! // ID-s in the constructor (you don't want to _even try_ to create more ! // editors for the same TEXTAREA element ;-)). ! // ! // So much for the noise, see the action below. ! ! //--------------------------------------------------------------------- ! ! ! ! //--------------------------------------------------------------------- ! // CREATE FIRST EDITOR ! // ! var editor1 = new HTMLArea("intro_text"); ! ! // plugins must be registered _per editor_. Therefore, we register ! // plugins for the first editor here, and we will also do this for the ! // second editor. ! editor1.registerPlugin(TableOperations); ! // editor1.registerPlugin(SpellChecker); ! // editor1.registerPlugin(CSS, css_plugin_args); ! // editor1.registerPlugin(HtmlTidy); ! // editor1.registerPlugin(ListType); ! editor1.registerPlugin(ContextMenu); ! editor1.registerPlugin(ImageManager); ! ! // custom config must be done per editor. Here we're importing the ! // stylesheet used by the CSS plugin. ! // editor1.config.pageStyle = "@import url(custom.css);"; ! ! // generate first editor ! editor1.config.hideSomeButtons(" fontname fontsize formatblock "); ! editor1.generate(); ! ! //--------------------------------------------------------------------- ! ! ! ! //--------------------------------------------------------------------- ! // CREATE SECOND EDITOR ! // ! var editor2 = new HTMLArea("body_text"); ! ! // we are using the same plugins ! editor2.registerPlugin(TableOperations); ! // editor2.registerPlugin(SpellChecker); ! // editor2.registerPlugin(CSS, css_plugin_args); ! // editor2.registerPlugin(HtmlTidy); ! // editor2.registerPlugin(ListType); ! editor2.registerPlugin(ContextMenu); ! editor2.registerPlugin(ImageManager); ! ! // import the CSS plugin styles ! // editor2.config.pageStyle = "@import url(custom.css);"; ! ! // generate the second editor ! // IMPORTANT: if we don't give it a timeout, the first editor will ! // not function in Mozilla. Soon I'll think about starting to ! // implement some kind of event that will fire when the editor ! // finished creating, then we'll be able to chain the generate() ! // calls in an elegant way. But right now there's no other solution ! // than the following. ! setTimeout(function() { ! editor2.config.hideSomeButtons(" fontname fontsize formatblock "); ! editor2.generate(); ! }, 500); ! ! //--------------------------------------------------------------------- ! }; function insertHTML() { *************** *** 59,66 **** } function highlight() { ! editor.surroundHTML('<span style="background-color: white">', '</span>'); } ! function PSL_chooseEditor(editor) { // if IE 5.5 or W3C/Moz 1.3+ - Can't combine the two due to problems with reload() & IE --- 184,194 ---- } function highlight() { ! editor.surroundHTML('<span style="background-color: yellow">', '</span>'); } + </script> ! <script type="text/javascript"> ! ! function PSL_chooseEditor(onLoad) { // if IE 5.5 or W3C/Moz 1.3+ - Can't combine the two due to problems with reload() & IE *************** *** 70,76 **** if(document.all && document.designMode) { // HTML or htmlArea ! if (editor == 'htmlarea') { // HTMLArea.replace('en'); ! HTMLArea.replaceAll(); } else { // how to remove in IE? --- 198,205 ---- if(document.all && document.designMode) { // HTML or htmlArea ! if (document.editNew.content_type[0].checked) { // HTMLArea.replace('en'); ! // HTMLArea.replaceAll(); ! initEditor(); } else { // how to remove in IE? *************** *** 80,88 **** } else if(document.designMode) { // HTML or htmlArea ! if (editor == 'htmlarea') { // HTMLArea.replace('en'); ! HTMLArea.replaceAll(); } else { ! window.location.reload(); } } --- 209,221 ---- } else if(document.designMode) { // HTML or htmlArea ! if (document.editNew.content_type[0].checked) { // HTMLArea.replace('en'); ! // HTMLArea.replaceAll(); ! initEditor(); } else { ! if(onLoad == 1) { ! onLoad = 2; ! window.location.reload(); ! } } } *************** *** 94,99 **** </head> ! <body> <!-- onLoad="HTMLArea.replace('en'); HTMLArea.replace('fr');" --> ! <a name="top"></a> <div id="header"> --- 227,231 ---- </head> ! <body onLoad="PSL_chooseEditor()"> <a name="top"></a> <div id="header"> |
From: Joe S. <joe...@us...> - 2004-08-23 16:29:18
|
Update of /cvsroot/phpslash/phpslash-dev/public_html In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14036/phpslash-dev/public_html Modified Files: config-dist.php Log Message: Upgraded htmlarea3 Index: config-dist.php =================================================================== RCS file: /cvsroot/phpslash/phpslash-dev/public_html/config-dist.php,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -d -r1.18 -r1.19 *** config-dist.php 19 Apr 2004 21:08:37 -0000 1.18 --- config-dist.php 23 Aug 2004 16:29:03 -0000 1.19 *************** *** 968,972 **** $default_story_options = ''; ! $default_story_options[] = array( 'name' => "htmleditor", --- 968,972 ---- $default_story_options = ''; ! /* $default_story_options[] = array( 'name' => "htmleditor", *************** *** 977,981 **** 'choices' => array('no" onClick="PSL_chooseEditor();' => 'No', 'yes" onClick="PSL_chooseEditor(\'htmlarea\');' => 'Yes')); ! $default_story_options[] = array( --- 977,981 ---- 'choices' => array('no" onClick="PSL_chooseEditor();' => 'No', 'yes" onClick="PSL_chooseEditor(\'htmlarea\');' => 'Yes')); ! */ $default_story_options[] = array( |
From: Joe S. <joe...@us...> - 2004-08-23 16:29:18
|
Update of /cvsroot/phpslash/phpslash-dev In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14036/phpslash-dev Modified Files: CHANGES Log Message: Upgraded htmlarea3 Index: CHANGES =================================================================== RCS file: /cvsroot/phpslash/phpslash-dev/CHANGES,v retrieving revision 1.79 retrieving revision 1.80 diff -C2 -d -r1.79 -r1.80 *** CHANGES 29 Jul 2004 16:02:17 -0000 1.79 --- CHANGES 23 Aug 2004 16:29:03 -0000 1.80 *************** *** 13,16 **** --- 13,21 ---- 9 - Removal of something (kill -9 :) + 2004-August 23 Joe Stewart <joe...@us...> + [FT] - htmlarea3, slashHead-htmlarea3.tpl, storyNew.tpl, config.php - Upgraded + htmlarea3. Added Image Manager module to htmlarea3 that allows uploads. + Default is now for editor to be on. + 2004-July 29 Peter Cruickshank <kr...@us...> [BF] slashTemplate.class::set_file |
From: Joe S. <joe...@us...> - 2004-08-23 16:29:18
|
Update of /cvsroot/phpslash/phpslash-dev/include/templates/en/basic In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14036/phpslash-dev/include/templates/en/basic Modified Files: slashHead-htmlarea3.tpl storyNew.tpl Log Message: Upgraded htmlarea3 Index: slashHead-htmlarea3.tpl =================================================================== RCS file: /cvsroot/phpslash/phpslash-dev/include/templates/en/basic/slashHead-htmlarea3.tpl,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** slashHead-htmlarea3.tpl 13 Nov 2003 02:34:21 -0000 1.2 --- slashHead-htmlarea3.tpl 23 Aug 2004 16:29:03 -0000 1.3 *************** *** 15,54 **** <!-- END each_metatag --> <link rel="alternate" type="application/rss+xml" title="RSS" href="{ROOTDIR}/backend.php" /> - <!-- BEGIN HTMLAREA3 Javascript --> - <script TYPE="text/javascript" LANGUAGE="JavaScript"> - <!-- Script Begin - <!-- Root path for the html WYSIWYG editor --> - var _editor_url="{ROOTDIR}/scripts/htmlarea3/"; - // --> - </script> <link rel="stylesheet" type="text/css" href="{ROOTDIR}/styles/{SKIN}.css" /> ! <script TYPE="text/javascript" LANGUAGE="JavaScript" src="{ROOTDIR}/scripts/htmlarea3/htmlarea.js"></script> ! <script TYPE="text/javascript" LANGUAGE="JavaScript" src="{ROOTDIR}/scripts/htmlarea3/lang/en.js"></script> ! <script TYPE="text/javascript" LANGUAGE="JavaScript" src="{ROOTDIR}/scripts/htmlarea3/dialog.js"></script> ! <!-- <script TYPE="text/javascript" LANGUAGE="JavaScript" src="{ROOTDIR}/scripts/htmlarea3/popupdiv.js"></script> --> ! <script TYPE="text/javascript" LANGUAGE="JavaScript" src="{ROOTDIR}/scripts/htmlarea3/popupwin.js"></script> - <!-- load the TableOperations plugin files --> - <script TYPE="text/javascript" LANGUAGE="JavaScript" src="{ROOTDIR}/scripts/htmlarea3/plugins/TableOperations/table-operations.js"></script> - <script TYPE="text/javascript" LANGUAGE="JavaScript" src="{ROOTDIR}/scripts/htmlarea3/plugins/TableOperations/lang/en.js"></script> ! <style type="text/css"> ! @import url({ROOTDIR}/scripts/htmlarea3/htmlarea.css); - textarea { background-color: #fff; border: 1px solid 00f; } - </style> - <script TYPE="text/javascript" LANGUAGE="JavaScript"> - var editor = null; - function initEditor() { - // create an editor for the "ta" textbox - editor = new HTMLArea("ta"); - // register the TableOperations plugin with our editor - editor.registerPlugin("TableOperations"); ! editor.generate(); ! return false; ! } function insertHTML() { --- 15,179 ---- <!-- END each_metatag --> <link rel="alternate" type="application/rss+xml" title="RSS" href="{ROOTDIR}/backend.php" /> <link rel="stylesheet" type="text/css" href="{ROOTDIR}/styles/{SKIN}.css" /> ! <!-- BEGIN HTMLAREA3 Javascript --> ! <script type="text/javascript"> ! // the _editor_url is REQUIRED! don't forget to set it. ! _editor_url="{ROOTDIR}/scripts/htmlarea3/"; ! // implicit language will be "en", but let's set it for brevity ! _editor_lang = "en"; ! </script> ! <script type="text/javascript" src="{ROOTDIR}/scripts/htmlarea3/htmlarea.js"></script> ! ! <!-- load the plugins --> ! <script type="text/javascript"> ! // WARNING: using this interface to load plugin ! // will _NOT_ work if plugins do not have the language ! // loaded by HTMLArea. ! ! // In other words, this function generates SCRIPT tags ! // that load the plugin and the language file, based on the ! // global variable HTMLArea.I18N.lang (defined in the lang file, ! // in our case "lang/en.js" loaded above). ! ! // If this lang file is not found the plugin will fail to ! // load correctly and nothing will work. ! ! HTMLArea.loadPlugin("TableOperations"); ! // HTMLArea.loadPlugin("SpellChecker"); ! // HTMLArea.loadPlugin("FullPage"); ! // HTMLArea.loadPlugin("CSS"); ! HTMLArea.loadPlugin("ContextMenu"); ! // HTMLArea.loadPlugin("HtmlTidy"); ! // HTMLArea.loadPlugin("ListType"); ! HTMLArea.loadPlugin("ImageManager"); ! ! </script> ! ! <script type="text/javascript"> ! // this function will get called at body.onload ! function initEditor() { ! // cache these values as we need to pass it for both editors ! var css_plugin_args = { ! combos : [ ! { label: "Syntax", ! // menu text // CSS class ! options: { "None" : "", ! "Code" : "code", ! "String" : "string", ! "Comment" : "comment", ! "Variable name" : "variable-name", ! "Type" : "type", ! "Reference" : "reference", ! "Preprocessor" : "preprocessor", ! "Keyword" : "keyword", ! "Function name" : "function-name", ! "Html tag" : "html-tag", ! "Html italic" : "html-helper-italic", ! "Warning" : "warning", ! "Html bold" : "html-helper-bold" ! }, ! context: "pre" ! }, ! { label: "Info", ! options: { "None" : "", ! "Quote" : "quote", ! "Highlight" : "highlight", ! "Deprecated" : "deprecated" ! } ! } ! ] ! }; ! ! ! ! //--------------------------------------------------------------------- ! // GENERAL PATTERN ! // ! // 1. Instantitate an editor object. ! // 2. Register plugins (note, it's required to have them loaded). ! // 3. Configure any other items in editor.config. ! // 4. generate() the editor ! // ! // The above are steps that you use to create one editor. Nothing new ! // so far. In order to create more than one editor, you just have to ! // repeat those steps for each of one. Of course, you can register any ! // plugins you want (no need to register the same plugins for all ! // editors, and to demonstrate that we'll skip the TableOperations ! // plugin for the second editor). Just be careful to pass different ! // ID-s in the constructor (you don't want to _even try_ to create more ! // editors for the same TEXTAREA element ;-)). ! // ! // So much for the noise, see the action below. ! ! //--------------------------------------------------------------------- ! ! ! ! //--------------------------------------------------------------------- ! // CREATE FIRST EDITOR ! // ! var editor1 = new HTMLArea("intro_text"); ! ! // plugins must be registered _per editor_. Therefore, we register ! // plugins for the first editor here, and we will also do this for the ! // second editor. ! editor1.registerPlugin(TableOperations); ! // editor1.registerPlugin(SpellChecker); ! // editor1.registerPlugin(CSS, css_plugin_args); ! // editor1.registerPlugin(HtmlTidy); ! // editor1.registerPlugin(ListType); ! editor1.registerPlugin(ContextMenu); ! editor1.registerPlugin(ImageManager); ! ! // custom config must be done per editor. Here we're importing the ! // stylesheet used by the CSS plugin. ! // editor1.config.pageStyle = "@import url(custom.css);"; ! ! // generate first editor ! editor1.config.hideSomeButtons(" fontname fontsize formatblock "); ! editor1.generate(); ! ! //--------------------------------------------------------------------- ! ! ! ! //--------------------------------------------------------------------- ! // CREATE SECOND EDITOR ! // ! var editor2 = new HTMLArea("body_text"); ! ! // we are using the same plugins ! editor2.registerPlugin(TableOperations); ! // editor2.registerPlugin(SpellChecker); ! // editor2.registerPlugin(CSS, css_plugin_args); ! // editor2.registerPlugin(HtmlTidy); ! // editor2.registerPlugin(ListType); ! editor2.registerPlugin(ContextMenu); ! editor2.registerPlugin(ImageManager); ! ! // import the CSS plugin styles ! // editor2.config.pageStyle = "@import url(custom.css);"; ! ! // generate the second editor ! // IMPORTANT: if we don't give it a timeout, the first editor will ! // not function in Mozilla. Soon I'll think about starting to ! // implement some kind of event that will fire when the editor ! // finished creating, then we'll be able to chain the generate() ! // calls in an elegant way. But right now there's no other solution ! // than the following. ! setTimeout(function() { ! editor2.config.hideSomeButtons(" fontname fontsize formatblock "); ! editor2.generate(); ! }, 500); ! ! //--------------------------------------------------------------------- ! }; ! function insertHTML() { *************** *** 59,66 **** } function highlight() { ! editor.surroundHTML('<span style="background-color: white">', '</span>'); } ! function PSL_chooseEditor(editor) { // if IE 5.5 or W3C/Moz 1.3+ - Can't combine the two due to problems with reload() & IE --- 184,194 ---- } function highlight() { ! editor.surroundHTML('<span style="background-color: yellow">', '</span>'); } + </script> ! <script type="text/javascript"> ! ! function PSL_chooseEditor(onLoad) { // if IE 5.5 or W3C/Moz 1.3+ - Can't combine the two due to problems with reload() & IE *************** *** 70,76 **** if(document.all && document.designMode) { // HTML or htmlArea ! if (editor == 'htmlarea') { // HTMLArea.replace('en'); ! HTMLArea.replaceAll(); } else { // how to remove in IE? --- 198,205 ---- if(document.all && document.designMode) { // HTML or htmlArea ! if (document.editNew.content_type[0].checked) { // HTMLArea.replace('en'); ! // HTMLArea.replaceAll(); ! initEditor(); } else { // how to remove in IE? *************** *** 80,88 **** } else if(document.designMode) { // HTML or htmlArea ! if (editor == 'htmlarea') { // HTMLArea.replace('en'); ! HTMLArea.replaceAll(); } else { ! window.location.reload(); } } --- 209,221 ---- } else if(document.designMode) { // HTML or htmlArea ! if (document.editNew.content_type[0].checked) { // HTMLArea.replace('en'); ! // HTMLArea.replaceAll(); ! initEditor(); } else { ! if(onLoad == 1) { ! onLoad = 2; ! window.location.reload(); ! } } } *************** *** 94,98 **** </head> ! <body> <!-- onLoad="HTMLArea.replace('en'); HTMLArea.replace('fr');" --> <a name="top"></a> --- 227,231 ---- </head> ! <body onLoad="PSL_chooseEditor()"> <a name="top"></a> Index: storyNew.tpl =================================================================== RCS file: /cvsroot/phpslash/phpslash-dev/include/templates/en/basic/storyNew.tpl,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** storyNew.tpl 12 Nov 2003 21:29:48 -0000 1.6 --- storyNew.tpl 23 Aug 2004 16:29:03 -0000 1.7 *************** *** 98,107 **** <tr> <td class="descr">Intro Text</td> ! <td colspan="3"><textarea name="intro_text" wrap="physical" cols="80" rows="20">{INTROTEXT}</textarea></td> </tr> <tr> <td class="descr">Body Text</td> <td colspan="3"><!-- body text --> ! <textarea name="body_text" wrap="physical" cols="80" rows="20">{BODYTEXT} </textarea> <br /> --- 98,107 ---- <tr> <td class="descr">Intro Text</td> ! <td colspan="3"><textarea id="intro_text" name="intro_text" wrap="physical" cols="80" rows="20">{INTROTEXT}</textarea></td> </tr> <tr> <td class="descr">Body Text</td> <td colspan="3"><!-- body text --> ! <textarea id="body_text" name="body_text" wrap="physical" cols="80" rows="20">{BODYTEXT} </textarea> <br /> *************** *** 110,113 **** --- 110,124 ---- </td> </tr> + <tr> + <td class="descr"><b>WYSIWYG Editor</b><br /> + <small></small></td> + + <td> + <input type="radio" checked name="content_type" value="yes" onClick="PSL_chooseEditor(1);" /> Yes + <br /> + <input type="radio" name="content_type" value="no" onClick="PSL_chooseEditor(1);" /> No + </td> + </tr> + {OPTIONS} <tr> |
From: Peter C. <kr...@us...> - 2004-07-29 16:02:26
|
Update of /cvsroot/phpslash/phpslash-dev In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1165 Modified Files: CHANGES Log Message: Better explain slashTemplate::set_file changes Index: CHANGES =================================================================== RCS file: /cvsroot/phpslash/phpslash-dev/CHANGES,v retrieving revision 1.78 retrieving revision 1.79 diff -C2 -d -r1.78 -r1.79 *** CHANGES 29 Jul 2004 15:50:08 -0000 1.78 --- CHANGES 29 Jul 2004 16:02:17 -0000 1.79 *************** *** 14,18 **** 2004-July 29 Peter Cruickshank <kr...@us...> ! [B] slashTemplate.class::set_file Fix of potential infinite loop [W] functions.inc::getHeader Treats missing page titles more kindly [T] basic/loginformCR.tpl Move to XHTML complience. No other change --- 14,20 ---- 2004-July 29 Peter Cruickshank <kr...@us...> ! [BF] slashTemplate.class::set_file ! Fix of potential infinite loop and allow modules to have language-specific ! templates [W] functions.inc::getHeader Treats missing page titles more kindly [T] basic/loginformCR.tpl Move to XHTML complience. No other change |
From: Peter C. <kr...@us...> - 2004-07-29 15:57:23
|
Update of /cvsroot/phpslash/phpslash-dev/include/class In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv32578 Modified Files: slashTemplate.class Log Message: Fix comments and a minor logic error Index: slashTemplate.class =================================================================== RCS file: /cvsroot/phpslash/phpslash-dev/include/class/slashTemplate.class,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** slashTemplate.class 29 Jul 2004 15:35:42 -0000 1.8 --- slashTemplate.class 29 Jul 2004 15:57:14 -0000 1.9 *************** *** 5,16 **** * Provides specific template handling functions for PHPSlash * ! * Main extension is implicit search bath: ! * - given skin, given language ** (to be added) * - current skin, current language * - parent skin, skin.parent.language (or current language) * - parent skin, default language ! * - "module directory"/templates/ ?? Why no language path?? * - "module directory" ! * - default skin, default language* ?? Why not check current language first * * @class slashTemplate --- 5,17 ---- * Provides specific template handling functions for PHPSlash * ! * Main extension is implicit search path for set_file(): ! * - given skin, given language * - current skin, current language * - parent skin, skin.parent.language (or current language) * - parent skin, default language ! * - "module directory"/{lang}/templates/ ! * - "module directory"/templates/ * - "module directory" ! * - default skin, default language * * @class slashTemplate *************** *** 62,68 **** * if the given filename is not found in the current skin directory * a search is made for it in the skin.parent specified in an optional ! * skin.ini file. * ! * We have to to check for existence of template file before caling template::set_file * because it would HALT the code! * --- 63,69 ---- * if the given filename is not found in the current skin directory * a search is made for it in the skin.parent specified in an optional ! * skin.ini file. See comments at head of class for full search logic * ! * NB We have to to check for existence of template file before calling template::set_file * because it would HALT the code! * *************** *** 163,167 **** // Fifth: Try default skin and default language, if we're not already there (this is getting desperate) ! if ($this->psl['defaultskin'] |= $skin && $this->psl['language.default'] != $language) { debug('[5] default skin and language',$filename); if ($this->set_file($varname, $filename , $this->psl['defaultskin'], $this->psl['language.default'])) { --- 164,168 ---- // Fifth: Try default skin and default language, if we're not already there (this is getting desperate) ! if ($this->psl['defaultskin'] != $skin && $this->psl['language.default'] != $language) { debug('[5] default skin and language',$filename); if ($this->set_file($varname, $filename , $this->psl['defaultskin'], $this->psl['language.default'])) { |
From: Peter C. <kr...@us...> - 2004-07-29 15:50:17
|
Update of /cvsroot/phpslash/phpslash-dev In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31252 Modified Files: CHANGES Log Message: [B] slashTemplate.class::set_file Fix of potential infinite loop [W] functions.inc::getHeader Treats missing page titles more kindly [T] basic/loginformCR.tpl Move to XHTML compliance. No other change [E] config_setup.ini.php jpcache.enable set to off by default to save confusion while testing new install [W] config_setup.php Use the <title> tag Index: CHANGES =================================================================== RCS file: /cvsroot/phpslash/phpslash-dev/CHANGES,v retrieving revision 1.77 retrieving revision 1.78 diff -C2 -d -r1.77 -r1.78 *** CHANGES 7 Jul 2004 18:26:23 -0000 1.77 --- CHANGES 29 Jul 2004 15:50:08 -0000 1.78 *************** *** 13,16 **** --- 13,25 ---- 9 - Removal of something (kill -9 :) + 2004-July 29 Peter Cruickshank <kr...@us...> + [B] slashTemplate.class::set_file Fix of potential infinite loop + [W] functions.inc::getHeader Treats missing page titles more kindly + [T] basic/loginformCR.tpl Move to XHTML complience. No other change + [E] config_setup.ini.php + jpcache.enable set to off by default to save confusion while testing new install + [W] config_setup.php Use the <title> tag + + 2004-July 7 Peter Cruickshank <kr...@us...> [E] debug() now uses backtrace if available to show details of file/class and |
From: Peter C. <kr...@us...> - 2004-07-29 15:44:30
|
Update of /cvsroot/phpslash/phpslash-dev/public_html In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30406 Modified Files: config_setup.ini.php config_setup.php Log Message: Setup changes - Have jpcache turned OFF by default (very confusing otherwise while setting up a site) - Config code now uses <title> tag Index: config_setup.ini.php =================================================================== RCS file: /cvsroot/phpslash/phpslash-dev/public_html/config_setup.ini.php,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** config_setup.ini.php 19 Apr 2004 21:08:37 -0000 1.5 --- config_setup.ini.php 29 Jul 2004 15:44:21 -0000 1.6 *************** *** 187,191 **** ;; other way. ;; ! jpcache.enable = internal ;;; --- 187,191 ---- ;; other way. ;; ! jpcache.enable = off ;;; Index: config_setup.php =================================================================== RCS file: /cvsroot/phpslash/phpslash-dev/public_html/config_setup.php,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** config_setup.php 13 Nov 2003 21:46:28 -0000 1.5 --- config_setup.php 29 Jul 2004 15:44:22 -0000 1.6 *************** *** 949,952 **** --- 949,953 ---- <html> <head> + <title>PHP Slash Configurator</title> <style><!-- .verificationTableHeader { |
From: Peter C. <kr...@us...> - 2004-07-29 15:42:09
|
Update of /cvsroot/phpslash/phpslash-dev/include/templates/en/basic In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30021 Modified Files: loginformCR.tpl Log Message: Move to XHTML compliance Index: loginformCR.tpl =================================================================== RCS file: /cvsroot/phpslash/phpslash-dev/include/templates/en/basic/loginformCR.tpl,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** loginformCR.tpl 22 Apr 2004 20:11:21 -0000 1.2 --- loginformCR.tpl 29 Jul 2004 15:42:01 -0000 1.3 *************** *** 1,78 **** ! <!-- Start loginformCR.tpl --> ! <div id="loginForm"> ! <script language="javascript" src="{ROOTURL}/md5.js"></script> ! <script language="javascript"> ! <!-- ! function doChallengeResponse() { ! str = MD5(document.login.username.value + ":" + ! document.login.password.value) + ":" + ! document.login.challenge.value; ! document.login.response.value = MD5(str); ! document.login.password.value = ""; ! document.logintrue.username.value = document.login.username.value; ! document.logintrue.response.value = MD5(str); ! document.logintrue.setcookie.value = document.login.setcookie.value; ! document.logintrue.submit(); ! return false; ! } ! // --> ! </script> ! <h3>Welcome!</h3> ! <p>Please identify yourself with a username and a password:</p> ! <p class="error">{ERROR}</p> ! ! <form name="login" action="{ACTION_URL}" method="post" onSubmit="doChallengeResponse()"> ! ! <table border="0" cellspacing="0" cellpadding="4" align="center"> ! <tr> ! <td class="descr">Username:</td> ! <td><input type="text" name="username" value="{USERNAME}" size="32" maxlength="32" /></td> ! </tr> ! <tr> ! <td class="descr">Password:</td> ! <td><input type="password" name="password" value="" size="32" maxlength="32" /></td> ! </tr> ! <tr> ! <td> </td> ! <td> ! <input type="submit" name="submit" value="Login now" /> ! <input type="submit" name="cancel" value="Cancel Login" /> ! </td> ! </tr> ! <tr> ! <td class="descr"><input type=checkbox name=setcookie></td> ! <td class="descr">Remember me? ( Stay logged in from this computer)</td> ! </tr> ! <tr> ! <td class="descr"><input type=checkbox name=lostpw></td> ! <td class="descr">Oops, I lost my password.<br /> Send an email with a link that allows me to change my password</td> ! </tr> ! </table> ! <input type="hidden" name="challenge" value="{CHALLENGE}" /> ! <input type="hidden" name="response" value="" /> ! </form> ! ! <form name="logintrue" action="{PHP_SELF}" method=post> ! <input type="hidden" name="username" value=""> ! <input type="hidden" name="challenge" value="{CHALLENGE}"> ! <input type="hidden" name="response" value=""> ! <input type="hidden" name="setcookie" value=""> ! </form> ! <script language="JavaScript"> ! <!-- ! // Activate the appropriate input form field. ! if (document.login.username.value == '') { ! document.login.username.focus(); ! } else { ! document.login.password.focus(); ! } ! // --> ! </script> ! </div> ! <!-- BEGIN reg_block --> ! <div align="center">Don't have an account yet? Use our <a href="{PHP_SELF}?login=yes&mode=reg">Registration form</a> ! </div> ! <!-- END reg_block --> ! <!-- id="loginForm" --> ! <!-- end loginformCR.tpl --> ! --- 1,79 ---- ! <!-- Start loginformCR.tpl --> ! <div id="loginForm"> ! <script type="text/javascript" language="javascript" src="{ROOTURL}/md5.js"></script> ! <script language="javascript" type="text/javascript"> ! <!-- ! function doChallengeResponse() { ! str = MD5(document.login.username.value + ":" + ! document.login.password.value) + ":" + ! document.login.challenge.value; ! document.login.response.value = MD5(str); ! document.login.password.value = ""; ! document.logintrue.username.value = document.login.username.value; ! document.logintrue.response.value = MD5(str); ! document.logintrue.setcookie.value = document.login.setcookie.value; ! document.logintrue.submit(); ! return false; ! } ! // --> ! </script> ! <h3>Welcome!</h3> ! <p>Please identify yourself with a username and a password:</p> ! <p class="error">{ERROR}</p> ! ! <form name="login" action="{ACTION_URL}" method="post" onsubmit="doChallengeResponse()"> ! ! <table border="0" cellspacing="0" cellpadding="4" align="center"> ! <tr> ! <td class="descr">Username:</td> ! <td><input type="text" name="username" value="{USERNAME}" size="32" maxlength="32" /></td> ! </tr> ! <tr> ! <td class="descr">Password:</td> ! <td><input type="password" name="password" value="" size="32" maxlength="32" /></td> ! </tr> ! <tr> ! <td> </td> ! <td> ! <input type="submit" name="submit" value="Login now" /> ! <input type="submit" name="cancel" value="Cancel Login" /> ! </td> ! </tr> ! <tr> ! <td class="descr"><input type="checkbox" name="setcookie" /></td> ! <td class="descr">Remember me? ( Stay logged in from this computer)</td> ! </tr> ! <tr> ! <td class="descr"><input type="checkbox" name="lostpw" /></td> ! <td class="descr">Oops, I lost my password.<br /> Send an email with a link that allows me to change my password</td> ! </tr> ! </table> ! <input type="hidden" name="challenge" value="{CHALLENGE}" /> ! <input type="hidden" name="response" value="" /> ! </form> ! ! <form name="logintrue" action="{PHP_SELF}" method="post"> ! <input type="hidden" name="username" value="" /> ! <input type="hidden" name="challenge" value="{CHALLENGE}" /> ! <input type="hidden" name="response" value="" /> ! <input type="hidden" name="setcookie" value="" /> ! </form> ! <script language="JavaScript" type="text/javascript"> ! <!-- ! // Activate the appropriate input form field. ! if (document.login.username.value == '') { ! document.login.username.focus(); ! } else { ! document.login.password.focus(); ! } ! // --> ! </script> ! </div> ! <!-- BEGIN reg_block --> ! <div align="center"> ! Don't have an account yet? Use our <a href="{PHP_SELF}?login=yes&mode=reg">Registration form</a> ! </div> ! <!-- END reg_block --> ! <!-- id="loginForm" --> ! <!-- end loginformCR.tpl --> ! |
From: Peter C. <kr...@us...> - 2004-07-29 15:39:00
|
Update of /cvsroot/phpslash/phpslash-dev/include/class In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29502 Modified Files: functions.inc Log Message: getHeader now treats missing titles more kindly Index: functions.inc =================================================================== RCS file: /cvsroot/phpslash/phpslash-dev/include/class/functions.inc,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** functions.inc 7 Jul 2004 18:10:10 -0000 1.16 --- functions.inc 29 Jul 2004 15:38:52 -0000 1.17 *************** *** 188,192 **** if (!$title) { // PAC: This is a bit brutal - why not just echo an error message? ! return pslgetText("NO TITLE"); }; --- 188,193 ---- if (!$title) { // PAC: This is a bit brutal - why not just echo an error message? ! $title = pslgetText("NO TITLE"); ! #return pslgetText("NO TITLE"); }; *************** *** 1759,1764 **** $ans .= "(line {$back[0]['line']}) </small>"; } else { ! $ans = null; ! } } $ans .= debug_iterator($name,$msg,$type,$max_level,$escapeHtmlFlag); --- 1760,1765 ---- $ans .= "(line {$back[0]['line']}) </small>"; } else { ! $ans = null; ! } } $ans .= debug_iterator($name,$msg,$type,$max_level,$escapeHtmlFlag); |
From: Peter C. <kr...@us...> - 2004-07-29 15:35:50
|
Update of /cvsroot/phpslash/phpslash-dev/include/class In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28976 Modified Files: slashTemplate.class Log Message: Fix set_file bug which caused infinite loop Index: slashTemplate.class =================================================================== RCS file: /cvsroot/phpslash/phpslash-dev/include/class/slashTemplate.class,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** slashTemplate.class 7 Jul 2004 17:22:32 -0000 1.7 --- slashTemplate.class 29 Jul 2004 15:35:42 -0000 1.8 *************** *** 1,12 **** <?php /** ! * slashTemplate.class -> Primary methods for providing Templates ! * @version $Id$ ! * ! * Provides Session functions of PHPSlash ! * ! * Extends the phplib Template class. ! * ! */ class slashTemplate extends Template { --- 1,20 ---- <?php /** ! * slashTemplate.class -> Primary methods for providing Templates ! * ! * Provides specific template handling functions for PHPSlash ! * ! * Main extension is implicit search bath: ! * - given skin, given language ** (to be added) ! * - current skin, current language ! * - parent skin, skin.parent.language (or current language) ! * - parent skin, default language ! * - "module directory"/templates/ ?? Why no language path?? ! * - "module directory" ! * - default skin, default language* ?? Why not check current language first ! * ! * @class slashTemplate ! * @version $Id$ ! */ class slashTemplate extends Template { *************** *** 17,21 **** var $psl; - /** * The slashTemplate Constructor --- 25,28 ---- *************** *** 29,33 **** function slashTemplate($root = ".", $unknowns = "remove") { global $_PSL, $ary; ! $this->psl = &$_PSL; $this->ary = &$ary; --- 36,40 ---- function slashTemplate($root = ".", $unknowns = "remove") { global $_PSL, $ary; ! $this->psl = &$_PSL; $this->ary = &$ary; *************** *** 47,51 **** **/ function set_root($root="") { - } --- 54,57 ---- *************** *** 58,147 **** * skin.ini file. * * @access public ! * @param string varname ! * @param string filename ! **/ function set_file($varname, $filename = "", $skin="", $language="") { ! if (!is_array($varname)) { ! // default to the current skin ! if($skin == "") { ! $skin = $this->psl['skin.current']; } ! // default to the current language ! if($language == "") { ! $language = $this->psl['language.current']; } ! // assemble the templatedir ! // $templatedir = $this->psl['templatedir.main'] ."/". basename($language) ."/". basename($skin); ! $templatedir = $this->psl['templatedir.main'] ."/". $language ."/". $skin; ! // assemble the filepath ! $filepath = $templatedir ."/". $filename; ! // debug("slashTemplate::set_file::filepath", $filepath); ! ! $status = false; ! ! if( file_exists($filepath)) { ! // module templates in skin directory ! $status = Template::set_file($varname, $filepath); ! } elseif(file_exists($templatedir ."/skin.ini")) { ! // parent skin defined ! $skin_cfg = ''; ! $skin_cfg = parse_ini_file($templatedir ."/skin.ini"); ! if(!empty($skin_cfg['skin.parent.language'])) { ! $language = $skin_cfg['skin.parent.language']; ! } ! if($this->set_file($varname, $filename, $skin_cfg['skin.parent'], $language)) { ! // template in current language / parent skin ! $status = true; ! } elseif($this->set_file($varname, $filename, $skin_cfg['skin.parent'], $this->psl['language.default'])) { ! // template in default language / parent skin ! $status = true; ! } ! // $status = false; ! // $this->message = "set_file: set_file: For varname $varname filename $filepath is invalid."; ! // $this->halt($this->message); ! } else { ! // no parent skin ! ! // try to find template in module/template, skin/module, or in ! // defaultskin directory. ! if(file_exists($this->psl['moduledir'] ."/". $this->psl['module'][$this->psl['module']['module.current']] ."/templates/" . basename($filename))) { ! // module templates in module subdirectory ! $filepath = $this->psl['moduledir'] ."/". $this->psl['module'][$this->psl['module']['module.current']] ."/templates/" . basename($filename); ! $status = Template::set_file($varname, $filepath); ! } elseif( file_exists($templatedir ."/". $this->psl['module'][$this->psl['module']['module.current']] ."/". basename($filename))) { ! // module templates in subdirectory of skin ! $filepath = $templatedir ."/". $this->psl['module'][$this->psl['module']['module.current']] ."/". basename($filename); ! $status = Template::set_file($varname, $filepath); ! #Commented out: This leads an infinite loop since the skin directory is not used. ! # } elseif($this->set_file($varname, $filename, $this->psl['defaultskin'], $this->psl['language.default'])) { ! # // template in default language / default skin ! # $status = true; ! } else { ! // template isn't in the defaults either - bail out ! $this->message = "set_file: set_file: For varname $varname filename $filepath is invalid."; ! // $this->halt($this->message); ! $status = false; ! } } ! ! } else { ! reset($varname); ! $status = true; ! while(list($v, $f) = each($varname)) { ! if(!$this->set_file($v, $f)) { ! $status = false; ! break; ! } } } ! return $status; ! } // end of function set_root --- 64,178 ---- * skin.ini file. * + * We have to to check for existence of template file before caling template::set_file + * because it would HALT the code! + * * @access public ! * @param mixed $varname string or array (varname => filename). If array, remaining parameters are ignored ! * @param string $filename ! * @param string $skin ! * @param string $language ! * @return boolean ! */ function set_file($varname, $filename = "", $skin="", $language="") { ! #debug('filename',$filename); ! // If we're given an array of varname=>filename, recurse & attampt to set each ! // - bailing out at first failure ! if (is_array($varname)) { ! foreach ($varname as $v => $f) { ! #debug('setting f',$f); ! if (!$this->set_file($v, $f)) { ! return false; ! } } + return true; + } ! ! // The rest of this function looks for the template in the various places it could be ! ! // Intitialisation: ! // - default to the current skin ! if ($skin == "") { ! $skin = $this->psl['skin.current']; ! } else { ! // belt and braces - make sure noone's messing ! $skin = basename($skin); ! } ! ! // - default to the current language ! if ($language == "") { ! $language = $this->psl['language.current']; ! } else { ! // belt and braces - make sure noone's messing ! $language = basename($language); ! } ! ! // - assemble the templatedir ! $filename = basename($filename); ! $templatedir = $this->psl['templatedir.main'] ."/$language/$skin"; ! // - assemble the filepath ! $filepath = $templatedir .'/'. $filename; ! ! // First: Try given absolute path ! if (file_exists($filepath)) { ! #debug("[1] filepath exists", $filepath); ! // module templates in skin directory ! return Template::set_file($varname, $filepath); ! } ! ! // Second: Recurse up any parent skins ! if (file_exists("$templatedir/skin.ini")) { ! // parent skin defined ! $skin_cfg = parse_ini_file("$templatedir/skin.ini"); ! if (!empty($skin_cfg['skin.parent.language'])) { ! $language = $skin_cfg['skin.parent.language']; ! } ! if ($this->set_file($varname, $filename, $skin_cfg['skin.parent'], $language)) { ! #debug("[2a] Using skin".$skin_cfg['skin.parent'], $filename); ! // template in current language / parent skin ! return true; } ! if ($this->set_file($varname, $filename, $skin_cfg['skin.parent'] , $this->psl['language.default'])) { // template in default language / parent skin ! #debug("[2b] Using skin (with default language)".$skin_cfg['skin.parent'], $filename); ! return true; } ! } ! // Third: Try module directory for skins (module/templates) ! $modulePath = $this->psl['moduledir'] ."/". $this->psl['module'][$this->psl['module']['module.current']] ."/templates/"; ! if (file_exists($modulePath."/$language/$filename")) { ! #debug('[3a] using',$modulePath."/$language/$filename"); ! return Template::set_file($varname, $modulePath."/$language/$filename"); ! } elseif (file_exists($modulePath.'/'.$this->psl['language.default'].'/'.$filename)) { ! #debug('[3b] using',$modulePath.'/'.$this->psl['language.default'].'/'.$filename); ! return Template::set_file($varname, $modulePath.'/'.$this->psl['language.default'].'/'.$filename); ! } elseif (file_exists($modulePath.'/'.$filename)) { ! #debug('[3c] using',$modulePath.'/'.$filename); ! return Template::set_file($varname, $modulePath.'/'.$filename); ! } ! ! // Fourth: Check skin directory for module subdirectory (templatedir/module) ! $modulePath = $templatedir ."/". $this->psl['module'][$this->psl['module']['module.current']] ."/$filename"; ! if (file_exists($modulePath)) { ! #debug('[4] modulepath',$modulePath); ! // module templates in subdirectory of skin ! return Template::set_file($varname, $modulePath); ! } ! ! // Fifth: Try default skin and default language, if we're not already there (this is getting desperate) ! if ($this->psl['defaultskin'] |= $skin && $this->psl['language.default'] != $language) { ! debug('[5] default skin and language',$filename); ! if ($this->set_file($varname, $filename , $this->psl['defaultskin'], $this->psl['language.default'])) { ! return true; } } ! // Finally: Template isn't in the defaults either - bail out ! $this->message = "set_file: set_file: For varname $varname filename $filepath is invalid."; ! return false; ! } // end of function set_file |
From: Peter C. <kr...@us...> - 2004-07-07 18:26:31
|
Update of /cvsroot/phpslash/phpslash-dev In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27932 Modified Files: CHANGES Log Message: debug enhancement and more minor fixes Index: CHANGES =================================================================== RCS file: /cvsroot/phpslash/phpslash-dev/CHANGES,v retrieving revision 1.76 retrieving revision 1.77 diff -C2 -d -r1.76 -r1.77 *** CHANGES 7 Jul 2004 17:56:10 -0000 1.76 --- CHANGES 7 Jul 2004 18:26:23 -0000 1.77 *************** *** 14,17 **** --- 14,24 ---- 2004-July 7 Peter Cruickshank <kr...@us...> + [E] debug() now uses backtrace if available to show details of file/class and + line + [W] story/admin.php Move to use _POST and _GET vars + [W] Story_base.class + Improvements to logic + presentation of validation process + + 2004-July 7 Peter Cruickshank <kr...@us...> [B] slashTemplate.class: Comment out portion of code that was causing infinite recursion when attempting |
From: Peter C. <kr...@us...> - 2004-07-07 18:24:44
|
Update of /cvsroot/phpslash/phpslash-dev/include/modules/story In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27236 Modified Files: Story_base.class Log Message: Improvements to logic + presentation of validation process Index: Story_base.class =================================================================== RCS file: /cvsroot/phpslash/phpslash-dev/include/modules/story/Story_base.class,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** Story_base.class 26 Nov 2003 19:33:21 -0000 1.9 --- Story_base.class 7 Jul 2004 18:24:36 -0000 1.10 *************** *** 464,475 **** if((!$this->perm->have_perm('storyeditothers')) AND ( $ary['author_id'] != $this->auth->auth['uid'])) { ! $this->message = pslgetText("Sorry. You do not have the necessary privilege to view this page."); return false; } $topic_id_ary = $ary['topic_id_ary']; // move the section id's from the array value to the array key ! if(is_array($ary['section_id_ary'])) { foreach($ary['section_id_ary'] as $value) { $section_id_ary[$value] = true; --- 464,477 ---- if((!$this->perm->have_perm('storyeditothers')) AND ( $ary['author_id'] != $this->auth->auth['uid'])) { ! $this->message .= pslgetText("Sorry. You do not have the necessary privilege to view this page."); return false; } + $isOK = true; + $topic_id_ary = $ary['topic_id_ary']; // move the section id's from the array value to the array key ! if (is_array(@$ary['section_id_ary'])) { foreach($ary['section_id_ary'] as $value) { $section_id_ary[$value] = true; *************** *** 486,515 **** */ if ($topic_id_ary[0] == "") { ! $this->message = "You need to select at least one topic in Story.class::saveStory"; ! return false; } if (count($section_id_ary) < 1) { ! $this->message = "You need to select at least one section in Story.class::saveStory"; ! return false; } if ($ary['title'] == "") { ! $this->message = "There is no title in Story.class::saveStory"; ! return false; } if ($ary['intro_text'] == "") { ! $this->message = "There is no intro_text in Story.class::saveStory"; ! return false; } if ($ary['author_id'] == "") { ! $this->message = "There is no author_id in Story.class::saveStory"; return false; } ! if ($ary['datetime'] == "") { if( $ary['story_date'] ) { $ary['datetime'] = implode( '-', $ary['story_date']) ." ". implode( ':',$ary['story_time']); ! } else { $ary['datetime'] = date("Y-m-d H:i:s"); ! } } $ary['timestamp'] = strtotime($ary['datetime']); --- 488,521 ---- */ if ($topic_id_ary[0] == "") { ! $this->message .= getError("You need to select at least one topic in Story.class::saveStory"); ! $isOK = false; } if (count($section_id_ary) < 1) { ! $this->message .= getError("You need to select at least one section in Story.class::saveStory"); ! $isOK = false; } if ($ary['title'] == "") { ! $this->message .= getError("There is no title in Story.class::saveStory"); ! $isOK = false; } if ($ary['intro_text'] == "") { ! $this->message .= getError("There is no intro_text in Story.class::saveStory"); ! $isOK = false; } if ($ary['author_id'] == "") { ! $this->message .= getError("There is no author_id in Story.class::saveStory"); ! $isOK = false; ! } ! ! if (!$isOK) { return false; } ! if (empty($ary['datetime'])) { if( $ary['story_date'] ) { $ary['datetime'] = implode( '-', $ary['story_date']) ." ". implode( ':',$ary['story_time']); ! } else { $ary['datetime'] = date("Y-m-d H:i:s"); ! } } $ary['timestamp'] = strtotime($ary['datetime']); *************** *** 518,523 **** $ary['dept'] = eregi_replace(' ','-',addslashes($ary['dept'])); $ary['order_no'] = eregi_replace(' ','-',addslashes($ary['order_no'])); ! $ary['intro_text'] = addslashes($ary['intro_text']); ! $ary['body_text'] = addslashes($ary['body_text']); // body_text_file comes from a file uploaded to us. --- 524,529 ---- $ary['dept'] = eregi_replace(' ','-',addslashes($ary['dept'])); $ary['order_no'] = eregi_replace(' ','-',addslashes($ary['order_no'])); ! $ary['intro_text'] = addslashes(trim($ary['intro_text'])); ! $ary['body_text'] = addslashes(trim($ary['body_text'])); // body_text_file comes from a file uploaded to us. *************** *** 526,530 **** // ; File Uploads ; // ;;;;;;;;;;;;;;;; ! // file_uploads = On ; Whether to allow HTTP file uploads // upload_tmp_dir = /tmp ; temporary directory for HTTP uploaded files (will use system default if not specified) // upload_max_filesize = 2M ; Maximum allowed size for uploaded files --- 532,536 ---- // ; File Uploads ; // ;;;;;;;;;;;;;;;; ! // file_uploads = On ; Whether to allow HTTP file uploads // upload_tmp_dir = /tmp ; temporary directory for HTTP uploaded files (will use system default if not specified) // upload_max_filesize = 2M ; Maximum allowed size for uploaded files *************** *** 535,542 **** // since php 4.1.x // if we were sent a file, then use this to create preview ! // let's allow users to type text in the body_text field // (text area) and also submit a file... in other words // append file to text typed. ! if ( is_uploaded_file($_FILES['body_text_file']['tmp_name']) --- 541,548 ---- // since php 4.1.x // if we were sent a file, then use this to create preview ! // let's allow users to type text in the body_text field // (text area) and also submit a file... in other words // append file to text typed. ! if ( is_uploaded_file($_FILES['body_text_file']['tmp_name']) *************** *** 545,549 **** $binary_junk = parse_upload($_FILES['body_text_file']['tmp_name']); // append this file to the text typed in TEXT box: ! $ary['body_text'] .= addslashes($binary_junk); } // end if isset ary[body_text_file] --- 551,555 ---- $binary_junk = parse_upload($_FILES['body_text_file']['tmp_name']); // append this file to the text typed in TEXT box: ! $ary['body_text'] .= addslashes(trim($binary_junk)); } // end if isset ary[body_text_file] *************** *** 555,559 **** // $ary['body_text'] = put_latin($ary['body_text']); // $ary['intro_text'] = put_latin($ary['intro_text']); ! // $ary['title'] = put_latin($ary['title']); // echo "<BR><BR>STORYID: $ary['story_id']<BR><BR>SID: $story_id<BR><BR>\n"; --- 561,565 ---- // $ary['body_text'] = put_latin($ary['body_text']); // $ary['intro_text'] = put_latin($ary['intro_text']); ! // $ary['title'] = put_latin($ary['title']); // echo "<BR><BR>STORYID: $ary['story_id']<BR><BR>SID: $story_id<BR><BR>\n"; *************** *** 809,814 **** */ ! if ( ($ary[$field_name]['expire'] > 0) AND ! ($now - $ary[$field]['update']) > $ary[$field]['expire'] ) { $expired = true; } --- 815,820 ---- */ ! if ( (@$ary[$field_name]['expire'] > 0) && ! ($now - $ary[$field]['update']) > @$ary[$field]['expire'] ) { $expired = true; } |
From: Peter C. <kr...@us...> - 2004-07-07 18:20:39
|
Update of /cvsroot/phpslash/phpslash-dev/include/modules/story In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26131 Modified Files: admin.php Log Message: Move to use _POST and _GET vars Index: admin.php =================================================================== RCS file: /cvsroot/phpslash/phpslash-dev/include/modules/story/admin.php,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** admin.php 11 Nov 2003 22:11:11 -0000 1.5 --- admin.php 7 Jul 2004 18:20:30 -0000 1.6 *************** *** 3,7 **** /* $Id$ */ ! global $_PSL, $HTTP_POST_VARS, $HTTP_GET_VARS, $auth, $perm; $ary = $GLOBALS['ary']; --- 3,7 ---- /* $Id$ */ ! global $_PSL, $auth, $perm; $ary = $GLOBALS['ary']; *************** *** 21,33 **** $xsiteobject = pslgetText("Administration"); // Defines The META TAG Page Type ! if(!empty($HTTP_POST_VARS['submit'])) { ! $submit = clean($HTTP_POST_VARS['submit']); ! $ary = clean($HTTP_POST_VARS,true); ! } elseif (!empty($HTTP_GET_VARS['submit'])) { ! $submit = clean($HTTP_GET_VARS['submit']); ! $story_id = clean($HTTP_GET_VARS['story_id']); ! $next = clean($HTTP_GET_VARS['next']); ! $ary = clean($HTTP_GET_VARS); } else { $submit = ''; } --- 21,35 ---- $xsiteobject = pslgetText("Administration"); // Defines The META TAG Page Type ! if(!empty($_POST['submit'])) { ! $submit = clean($_POST['submit']); ! $next = NULL; ! $ary = clean($_POST,true); ! } elseif (!empty($_GET['submit'])) { ! $submit = clean($_GET['submit']); ! $story_id= clean(@$_GET['story_id']); ! $next = clean(@$_GET['next']); ! $ary = clean($_GET); } else { + $next = NULL; $submit = ''; } *************** *** 41,44 **** --- 43,47 ---- if ($perm->have_perm("storyList")) { + switch ($submit) { *************** *** 56,70 **** case "save": if ($perm->have_perm("storySave")) { ! $success = $story->saveStory($HTTP_POST_VARS); if( $success == false) { $content .= getError($story->message); ! $content .= $story->newStory($HTTP_POST_VARS, "array"); } // expire cache for this story_id if(function_exists('jpcache_gc')) { ! jpcache_gc('string', "-story_id-" . $HTTP_POST_VARS['story_id'], "100"); // expire cache for these section_id's ! $section_id_ary = $HTTP_POST_VARS['section_id_ary']; foreach($section_id_ary as $key => $value) { jpcache_gc('string', "-section_id-" . $value, "100"); --- 59,73 ---- case "save": if ($perm->have_perm("storySave")) { ! $success = $story->saveStory($_POST); if( $success == false) { $content .= getError($story->message); ! $content .= $story->newStory($_POST, "array"); } // expire cache for this story_id if(function_exists('jpcache_gc')) { ! jpcache_gc('string', "-story_id-" . $_POST['story_id'], "100"); // expire cache for these section_id's ! $section_id_ary = $_POST['section_id_ary']; foreach($section_id_ary as $key => $value) { jpcache_gc('string', "-section_id-" . $value, "100"); *************** *** 84,94 **** case "preview": ! $HTTP_POST_VARS['name'] = $HTTP_POST_VARS['author_id']; ! $content .= $story->showStory($HTTP_POST_VARS); $content .= getTitlebar("100%", "Edit Story"); ! $HTTP_POST_VARS['title'] = stripslashes($HTTP_POST_VARS['title']); ! $HTTP_POST_VARS['intro_text'] = stripslashes($HTTP_POST_VARS['intro_text']); ! $HTTP_POST_VARS['body_text'] = stripslashes($HTTP_POST_VARS['body_text']); // since php 4.1.x --- 87,97 ---- case "preview": ! $_POST['name'] = $_POST['author_id']; ! $content .= $story->showStory($_POST); $content .= getTitlebar("100%", "Edit Story"); ! $_POST['title'] = stripslashes($_POST['title']); ! $_POST['intro_text'] = stripslashes($_POST['intro_text']); ! $_POST['body_text'] = stripslashes($_POST['body_text']); // since php 4.1.x *************** *** 104,120 **** $binary_junk = parse_upload($_FILES['body_text_file']['tmp_name']); // append this file to the text typed in TEXT box: ! $HTTP_POST_VARS['body_text'] .= addslashes($binary_junk); } // end if isset ary[body_text_file] ! //debug("admin.php::preview",$HTTP_POST_VARS); ! $content .= $story->newStory($HTTP_POST_VARS, "array"); break; case "edit": if ($perm->have_perm("storyEdit")) { ! $HTTP_POST_VARS['story_id'] = $story_id; ! $returned = $story->newStory($HTTP_POST_VARS, "database"); if(isset($returned)) { $content .= $returned; --- 107,123 ---- $binary_junk = parse_upload($_FILES['body_text_file']['tmp_name']); // append this file to the text typed in TEXT box: ! $_POST['body_text'] .= addslashes($binary_junk); } // end if isset ary[body_text_file] ! //debug("admin.php::preview",$_POST); ! $content .= $story->newStory($_POST, "array"); break; case "edit": if ($perm->have_perm("storyEdit")) { ! $_POST['story_id'] = $story_id; ! $returned = $story->newStory($_POST, "database"); if(isset($returned)) { $content .= $returned; *************** *** 127,131 **** case "new": if ($perm->have_perm("storyNew")) { ! $content .= $story->newStory($HTTP_POST_VARS, "array"); } break; --- 130,134 ---- case "new": if ($perm->have_perm("storyNew")) { ! $content .= $story->newStory($_POST, "array"); } break; |
From: Peter C. <kr...@us...> - 2004-07-07 18:18:41
|
Update of /cvsroot/phpslash/phpslash-dev/include/modules/section In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25677 Modified Files: admin.php Log Message: Notice squashing Index: admin.php =================================================================== RCS file: /cvsroot/phpslash/phpslash-dev/include/modules/section/admin.php,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** admin.php 15 May 2003 18:19:54 -0000 1.2 --- admin.php 7 Jul 2004 18:18:32 -0000 1.3 *************** *** 14,20 **** $xsiteobject = pslgetText("Administration"); ! if (!is_object($sess)) { ! page_open($_PSL['page_features']); ! } /***************************** --- 14,20 ---- $xsiteobject = pslgetText("Administration"); ! #if (!is_object($sess)) { ! # page_open($_PSL['page_features']); ! #} /***************************** |
From: Peter C. <kr...@us...> - 2004-07-07 18:10:19
|
Update of /cvsroot/phpslash/phpslash-dev/include/class In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23930 Modified Files: functions.inc Log Message: debug() now uses backtrace if available to show details of file/class and line Index: functions.inc =================================================================== RCS file: /cvsroot/phpslash/phpslash-dev/include/class/functions.inc,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** functions.inc 2 Jul 2004 15:02:30 -0000 1.15 --- functions.inc 7 Jul 2004 18:10:10 -0000 1.16 *************** *** 1752,1757 **** --- 1752,1765 ---- $escapeHtmlFlag = $_PSL['debug.escape_html']; if(!isset($ans)) { + if (function_exists('debug_backtrace')) { + $back = debug_backtrace(); + #print_r($back); + $ans = '<small>' . (empty($back[1]['class']) ? basename($back[0]['file']) : $back[1]['class']); + $ans .= empty($back[1]['function']) ? '' : '::'.$back[1]['function']; + $ans .= "(line {$back[0]['line']}) </small>"; + } else { $ans = null; } + } $ans .= debug_iterator($name,$msg,$type,$max_level,$escapeHtmlFlag); switch($type) { |
From: Peter C. <kr...@us...> - 2004-07-07 17:56:20
|
Update of /cvsroot/phpslash/phpslash-dev In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv21263 Modified Files: CHANGES Log Message: More minor changes and fixes by PeterC Index: CHANGES =================================================================== RCS file: /cvsroot/phpslash/phpslash-dev/CHANGES,v retrieving revision 1.75 retrieving revision 1.76 diff -C2 -d -r1.75 -r1.76 *** CHANGES 2 Jul 2004 15:55:11 -0000 1.75 --- CHANGES 7 Jul 2004 17:56:10 -0000 1.76 *************** *** 13,16 **** --- 13,34 ---- 9 - Removal of something (kill -9 :) + 2004-July 7 Peter Cruickshank <kr...@us...> + [B] slashTemplate.class: + Comment out portion of code that was causing infinite recursion when attempting + to find default skins template + [B] author/index.php: + Check for existance of jpcache_gc function before attempting to call it + [F] Block_render_header.class + Make section name available to slashHead template. (There may be a more elegant + way of doing this) + [BW] Block_render_query.class + Fix generation of topic_id and section_id plus some minor tidyup of logic + [W] Block_render_topic.class + Tidy up logic - incl move parse_str to top of parse() + [W] search/index.php section/admin.php topic/admin.php + Notice squashing + [W] Section.class, Topic.class + Improvements to logic + presentation of validation process + 2004-July 2 Peter Cruickshank <kr...@us...> [WBT]Clean up of Group.class group/admin.php templates/en/permissionList.tpl and groupList.tpl |
From: Peter C. <kr...@us...> - 2004-07-07 17:45:21
|
Update of /cvsroot/phpslash/phpslash-dev/include/modules/topic In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19089 Modified Files: admin.php Topic.class Log Message: Notice squashing. Improvements to logic + presentation of validation process Index: admin.php =================================================================== RCS file: /cvsroot/phpslash/phpslash-dev/include/modules/topic/admin.php,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** admin.php 15 May 2003 18:19:55 -0000 1.2 --- admin.php 7 Jul 2004 17:45:12 -0000 1.3 *************** *** 13,19 **** $xsiteobject = pslgetText("Administration"); // Defines The META TAG Page Type ! if (!is_object($sess)) { ! page_open($_PSL['page_features']); ! } /***************************** --- 13,19 ---- $xsiteobject = pslgetText("Administration"); // Defines The META TAG Page Type ! #if (!is_object($sess)) { ! # page_open($_PSL['page_features']); ! #} /***************************** *************** *** 26,29 **** --- 26,30 ---- $content = ''; + $option = ''; if(!empty($HTTP_POST_VARS['submit'])) { Index: Topic.class =================================================================== RCS file: /cvsroot/phpslash/phpslash-dev/include/modules/topic/Topic.class,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** Topic.class 12 Mar 2003 16:12:56 -0000 1.1.1.1 --- Topic.class 7 Jul 2004 17:45:12 -0000 1.2 *************** *** 62,70 **** $this->topic_templ->set_block("listtopic","row","rows"); $this->topic_templ->set_block("listtopic", "row2", "rows2"); ! while ($this->db->next_record()) { $image = $this->psl['topicimageurl'] . "/" . $this->db->Record['image']; ! $topic_id = $this->db->Record[topic_id]; if ($this->perm->have_perm("topicEdit")) { $admin = "<A HREF=\"" . $this->psl['phpself'] . "?submit=edit" . $this->psl['amp'] . "topic_id=$topic_id\">".pslgetText("[Edit]")."</A>"; --- 62,71 ---- $this->topic_templ->set_block("listtopic","row","rows"); $this->topic_templ->set_block("listtopic", "row2", "rows2"); ! ! $i = 0; while ($this->db->next_record()) { $image = $this->psl['topicimageurl'] . "/" . $this->db->Record['image']; ! $topic_id = $this->db->Record['topic_id']; if ($this->perm->have_perm("topicEdit")) { $admin = "<A HREF=\"" . $this->psl['phpself'] . "?submit=edit" . $this->psl['amp'] . "topic_id=$topic_id\">".pslgetText("[Edit]")."</A>"; *************** *** 122,148 **** // debug("Topic.class::saveTopic::ary", $ary); ! /* We don't test for topic_id because no topic_id means, that this is a new topic. */ ! if ($ary[topic_name] == "") { ! $this->message .= "There is no topic_name in Topic.class::saveTopic"; ! return false; } ! if ($ary[image] == "") { ! $this->message .= "There is no image in Topic.class::saveTopic"; return false; } ! ! /* calculate height and width */ ! $imagesize = getimagesize( $this->psl[topicimagedir] . "/" . $ary['image']); $ary['width'] = $imagesize[0]; $ary['height'] = $imagesize[1]; ! ! if ($ary[alt_text] == "") { ! $this->message .= "There is no alt_text in Topic.class::saveTopic"; ! return false; ! } ! /* doesn't error out anymore. Just defaults 'onlinkbar ! to zero */ if ($ary['onlinkbar'] == "") { $ary['onlinkbar'] = "0"; --- 123,155 ---- // debug("Topic.class::saveTopic::ary", $ary); ! $isOk = true; ! ! /* We don't test for topic_id because no topic_id means, that this is a new topic. */ ! if ($ary['topic_name'] == "") { ! $this->message .= getError("There is no topic_name in Topic.class::saveTopic"); ! $isOk = false; } ! if ($ary['image'] == "") { ! $this->message .= getError("There is no image in Topic.class::saveTopic"); ! $isOk = false; ! } ! ! if ($ary['alt_text'] == "") { ! $this->message .= getError("There is no alt_text in Topic.class::saveTopic"); ! $isOk = false; ! } ! ! if (!$isOk) { return false; } ! ! // calculate height and width ! $imagesize = @getimagesize( $this->psl['topicimagedir'] . "/" . $ary['image']); $ary['width'] = $imagesize[0]; $ary['height'] = $imagesize[1]; ! ! // doesn't error out anymore. Just defaults 'onlinkbar to zero if ($ary['onlinkbar'] == "") { $ary['onlinkbar'] = "0"; *************** *** 168,172 **** } else { ! $ary[topic_id] = generateID("psl_topic_seq"); $q = "INSERT INTO psl_topic --- 175,179 ---- } else { ! $ary['topic_id'] = generateID("psl_topic_seq"); $q = "INSERT INTO psl_topic *************** *** 275,279 **** function newTopic($ary="") { ! if($ary["topic_id"] == "") { $this->topic_templ->set_var(array( 'TITLEBAR' => getTitlebar("100%","Add a new Topic"), --- 282,286 ---- function newTopic($ary="") { ! if (empty($ary['topic_id'])) { $this->topic_templ->set_var(array( 'TITLEBAR' => getTitlebar("100%","Add a new Topic"), *************** *** 321,325 **** )); $this->topic_templ->set_var('IMAGE_SELECTED',""); ! if ($this->db->Record['image'] == $eachfile ){ $this->topic_templ->set_var('IMAGE_SELECTED',"SELECTED"); } --- 328,333 ---- )); $this->topic_templ->set_var('IMAGE_SELECTED',""); ! ! if (@$this->db->Record['image'] == $eachfile ){ // Image may not be set if topic_id has no value $this->topic_templ->set_var('IMAGE_SELECTED',"SELECTED"); } *************** *** 345,349 **** function displayTopics($option="") { ! $this->topic_templ = pslNew("slashTemplate",$this->psl[templatedir]); $this->topic_templ->debug = 0; $this->topic_templ->set_file(array( --- 353,357 ---- function displayTopics($option="") { ! $this->topic_templ = pslNew("slashTemplate"); //,$this->psl['templatedir']); $this->topic_templ->debug = 0; $this->topic_templ->set_file(array( |
From: Peter C. <kr...@us...> - 2004-07-07 17:40:49
|
Update of /cvsroot/phpslash/phpslash-dev/include/modules/section In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18190 Modified Files: Section.class Log Message: Notice squashing. Improvements to logic + presentation of validation process Index: Section.class =================================================================== RCS file: /cvsroot/phpslash/phpslash-dev/include/modules/section/Section.class,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** Section.class 16 May 2003 17:09:52 -0000 1.3 --- Section.class 7 Jul 2004 17:40:40 -0000 1.4 *************** *** 50,53 **** --- 50,54 ---- $this->sec_templ->set_block("listsection","row2","rows2"); + $count = 0; while ($this->db->next_record()) { *************** *** 110,118 **** $ary["section_name"] = str_replace(" "," ",$ary["section_name"]); ! $optionname_ary = $ary[optionname]; ! $optionval_ary = $ary[optionval]; ! ! for( $i=1 ; $i <= count($optionname_ary) ; $i++) { if( $optionname_ary[$i] != "") { $optname = $optionname_ary[$i]; --- 111,119 ---- $ary["section_name"] = str_replace(" "," ",$ary["section_name"]); ! $optionname_ary = $ary['optionname']; ! $optionval_ary = $ary['optionval']; + if (@is_array($optionname_ary)) { + for( $i=0 ; $i < count($optionname_ary) ; $i++) { if( $optionname_ary[$i] != "") { $optname = $optionname_ary[$i]; *************** *** 123,126 **** --- 124,130 ---- } $serial_opts=addslashes(serialize($section_options_ary)); + } else { + $serial_opts = NULL; + } // if a record exists, then we update, else we insert a new section! *************** *** 163,166 **** --- 167,181 ---- $go_ahead = true; + // We need to fetch section's title, so might as well check for people trying + // to mess with the system + $section_id = intval($section_id); + $q = "SELECT section_name FROM psl_section WHERE section_id = $section_id"; + $this->db->query($q); + if (!$this->db->next_record()) { + $this->message .= getError(pslgettext('Attempting to delete non-existent section:') . " $section_id"); + return false; + } + $section_name = $this->db->Record['section_name']; + $q = "SELECT psl_story.title, psl_story.story_id *************** *** 168,172 **** psl_section_lut WHERE psl_story.story_id = psl_section_lut.story_id ! AND psl_section_lut.section_id = '$section_id'"; $this->db->query($q); while ($this->db->next_record()) { --- 183,188 ---- psl_section_lut WHERE psl_story.story_id = psl_section_lut.story_id ! AND psl_section_lut.section_id = '$section_id' ! ORDER BY psl_story.title"; $this->db->query($q); while ($this->db->next_record()) { *************** *** 174,179 **** $title = $this->db->Record["title"]; $story_id = $this->db->Record["story_id"]; ! $section_name = $this->db->Record["section_name"]; ! $this->message .= "STORY: '$title' "; } --- 190,194 ---- $title = $this->db->Record["title"]; $story_id = $this->db->Record["story_id"]; ! $this->message .= getError(pslgettext("Still linked to Story:") . " '$title'"); } *************** *** 183,187 **** psl_section_submission_lut WHERE psl_submission.story_id = psl_section_submission_lut.story_id ! AND psl_section_submission_lut.section_id = '$section_id'"; $this->db->query($q); while ($this->db->next_record()) { --- 198,203 ---- psl_section_submission_lut WHERE psl_submission.story_id = psl_section_submission_lut.story_id ! AND psl_section_submission_lut.section_id = '$section_id' ! ORDER BY psl_submission.title"; $this->db->query($q); while ($this->db->next_record()) { *************** *** 189,196 **** $title = $this->db->Record["title"]; $story_id = $this->db->Record["story_id"]; ! $section_name = $this->db->Record["section_name"]; ! $this->message .= "SUBMISSION: '$title' "; } $q = "SELECT psl_block.title, psl_block.id --- 205,215 ---- $title = $this->db->Record["title"]; $story_id = $this->db->Record["story_id"]; ! $this->message .= getError(pslgettext("Still linked to Submission:") . " '$title'"); } + // I am not sure if this check makes sense from the user's point of view + // - it's a real pain deleting all the blocks one at a time. + // Much better to just silently clear out psl_section_block_lut I think + // - pac Jul-2004 $q = "SELECT psl_block.title, psl_block.id *************** *** 198,202 **** psl_section_block_lut WHERE psl_block.id = psl_section_block_lut.block_id ! AND psl_section_block_lut.section_id = '$section_id'"; $this->db->query($q); while ($this->db->next_record()) { --- 217,222 ---- psl_section_block_lut WHERE psl_block.id = psl_section_block_lut.block_id ! AND psl_section_block_lut.section_id = '$section_id' ! ORDER BY psl_block.title"; $this->db->query($q); while ($this->db->next_record()) { *************** *** 204,221 **** $title = $this->db->Record["title"]; $block_id = $this->db->Record["id"]; ! $section_name = $this->db->Record["section_name"]; ! $this->message .= "BLOCK($block_id): $title "; } if (!$go_ahead) { return false; ! } else { $q = "DELETE FROM psl_section where section_id = '$section_id'"; $this->db->query($q); ! $this->message .= pslgetText(sprintf("Section %s(%s) deleted", $section_name, $section_id)); return true; } ! } /** --- 224,243 ---- $title = $this->db->Record["title"]; $block_id = $this->db->Record["id"]; ! $this->message .= getError(pslgettext("Still linked to Block:") . " '$title' ($block_id)"); } if (!$go_ahead) { + $this->message = getError(sprintf(pslGetText("Could not delete Section '%s' (%s)"), $section_name, $section_id)) + . $this->message; return false; ! } ! $q = "DELETE FROM psl_section where section_id = '$section_id'"; $this->db->query($q); ! $this->message .= getError(sprintf(pslGetText("Section '%s' (%s) deleted"), $section_name, $section_id)); return true; } ! /** |
From: Peter C. <kr...@us...> - 2004-07-07 17:38:16
|
Update of /cvsroot/phpslash/phpslash-dev/include/modules/search In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17694 Modified Files: index.php Log Message: Notice squashing Index: index.php =================================================================== RCS file: /cvsroot/phpslash/phpslash-dev/include/modules/search/index.php,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** index.php 22 Jun 2004 21:09:05 -0000 1.4 --- index.php 7 Jul 2004 17:37:53 -0000 1.5 *************** *** 12,16 **** $maxsearchresults = $_PSL['search_maxresults']; ! if ($_GET['use_comments'] == 'on' && $_PSL['allow_comment_search']) { $search_comments = TRUE; } else { --- 12,16 ---- $maxsearchresults = $_PSL['search_maxresults']; ! if (@$_GET['use_comments'] == 'on' && $_PSL['allow_comment_search']) { $search_comments = TRUE; } else { *************** *** 22,25 **** --- 22,26 ---- $topic_image_width = ""; $topic_image_height = ""; + $topic_alttext = ""; /* *************** *** 149,153 **** /* Templates */ ! $templ = pslNew("slashTemplate" ,$_PSL[templatedir]); $templ->debug = false; $templ->set_file ("searchpage", "searchPage.tpl"); --- 150,154 ---- /* Templates */ ! $templ = pslNew("slashTemplate" ,$_PSL['templatedir']); $templ->debug = false; $templ->set_file ("searchpage", "searchPage.tpl"); *************** *** 276,280 **** /* print matches */ ! if ($ary['min'] == "") { $ary['min'] = 0; } --- 277,281 ---- /* print matches */ ! if (empty($ary['min'])) { $ary['min'] = 0; } |
From: Peter C. <kr...@us...> - 2004-07-07 17:33:30
|
Update of /cvsroot/phpslash/phpslash-dev/include/modules/block/blocktypes In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16812 Modified Files: Block_render_topic.class Log Message: Tidy up logic - incl move parse_str to top of parse() Index: Block_render_topic.class =================================================================== RCS file: /cvsroot/phpslash/phpslash-dev/include/modules/block/blocktypes/Block_render_topic.class,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** Block_render_topic.class 12 Mar 2003 16:12:55 -0000 1.1.1.1 --- Block_render_topic.class 7 Jul 2004 17:33:21 -0000 1.2 *************** *** 34,55 **** function topics( $block_info) { $db = pslNew("slashDB"); $mode = ''; ! $default_template = "topicsblock.tpl"; $site_homesection = 'Home'; ! if( !empty($this->psl['site_homesection'])) { $site_homesection = $this->psl['site_homesection']; } - $options = $block_info["source_url"]; - - parse_str( $options); $template = pslNew("slashTemplate"); $template->debug = 0; ! if( $tpl == '') { $template->set_file( 'template', $default_template); } elseif ( $template->set_file('template' , basename($tpl) . ".tpl" )) { --- 34,56 ---- function topics( $block_info) { + // At top to avoid accidentally overwriting variables + $options = $block_info["source_url"]; + parse_str( $options); + $db = pslNew("slashDB"); $mode = ''; ! $default_template = "topicsblock.tpl"; $site_homesection = 'Home'; ! if( !empty($this->psl['site_homesection'])) { $site_homesection = $this->psl['site_homesection']; } $template = pslNew("slashTemplate"); $template->debug = 0; ! if (empty($tpl)) { $template->set_file( 'template', $default_template); } elseif ( $template->set_file('template' , basename($tpl) . ".tpl" )) { *************** *** 79,91 **** AND psl_section_lut.section_id = '$section_id' "; } elseif ( isset($section)) { ! $q = "SELECT DISTINCT psl_topic.topic_id, psl_topic.topic_name, psl_section_lut.section_id FROM psl_topic "; ! $q .= ",psl_topic_lut, ! psl_section_lut, psl_section ! WHERE psl_topic.topic_id = psl_topic_lut.topic_id AND psl_topic_lut.story_id = psl_section_lut.story_id AND psl_section_lut.section_id = psl_section.section_id --- 80,92 ---- AND psl_section_lut.section_id = '$section_id' "; } elseif ( isset($section)) { ! $q = "SELECT DISTINCT psl_topic.topic_id, psl_topic.topic_name, psl_section_lut.section_id FROM psl_topic "; ! $q .= ",psl_topic_lut, ! psl_section_lut, psl_section ! WHERE psl_topic.topic_id = psl_topic_lut.topic_id AND psl_topic_lut.story_id = psl_section_lut.story_id AND psl_section_lut.section_id = psl_section.section_id *************** *** 95,99 **** $q .= ", psl_topic_lut WHERE psl_topic.topic_id = psl_topic_lut.topic_id \n"; ! } } --- 96,100 ---- $q .= ", psl_topic_lut WHERE psl_topic.topic_id = psl_topic_lut.topic_id \n"; ! } } *************** *** 101,105 **** $db->query($q); ! while ($db->next_record()) { $template->set_var (array ( --- 102,106 ---- $db->query($q); ! while ($db->next_record()) { $template->set_var (array ( *************** *** 107,118 **** 'TOPIC_NAME' => $db->Record['topic_name'] )); ! if ( (!empty($section_id)) AND ( $section != $site_homesection) AND ($ary['section_id'] != $this->psl['home_section_id']) ) { ! $template->set_var (array ( 'TOPIC_ID' => $db->Record['topic_id'] . "&section_id=" . $section_id )); ! } elseif ( ($section != "") AND ( $section != $site_homesection)) { ! $template->set_var (array ( 'TOPIC_ID' => $db->Record['topic_id'] . "&section_id=" . $db->Record['section_id'] --- 108,119 ---- 'TOPIC_NAME' => $db->Record['topic_name'] )); ! if ( (!empty($section_id)) AND ( $section != $site_homesection) AND ($ary['section_id'] != $this->psl['home_section_id']) ) { ! $template->set_var (array ( 'TOPIC_ID' => $db->Record['topic_id'] . "&section_id=" . $section_id )); ! } elseif ( !empty($section) AND ( $section != $site_homesection)) { ! $template->set_var (array ( 'TOPIC_ID' => $db->Record['topic_id'] . "&section_id=" . $db->Record['section_id'] *************** *** 121,125 **** $template->parse ("topic_block", "each_topic", true); } ! $template->set_var(array( 'ROOTDIR' => $this->psl['rooturl'], --- 122,126 ---- $template->parse ("topic_block", "each_topic", true); } ! $template->set_var(array( 'ROOTDIR' => $this->psl['rooturl'], *************** *** 127,137 **** 'MAINPAGE' => $this->psl['mainpage'] )); ! $output = $template->parse('OUT','template'); unset($db); return $output; ! } } ! ! ?> --- 128,137 ---- 'MAINPAGE' => $this->psl['mainpage'] )); ! $output = $template->parse('OUT','template'); unset($db); return $output; ! } } ! ?> \ No newline at end of file |
From: Peter C. <kr...@us...> - 2004-07-07 17:31:49
|
Update of /cvsroot/phpslash/phpslash-dev/include/modules/block/blocktypes In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16414 Modified Files: Block_render_query.class Log Message: Fix generation of topic_id and section_id plus some minor tidyup of logic Index: Block_render_query.class =================================================================== RCS file: /cvsroot/phpslash/phpslash-dev/include/modules/block/blocktypes/Block_render_query.class,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** Block_render_query.class 22 Jun 2004 21:09:04 -0000 1.3 --- Block_render_query.class 7 Jul 2004 17:31:40 -0000 1.4 *************** *** 72,80 **** $stories_ary = $stories->extractStories( $ary); ! if (is_array($stories_ary)) { ! for ($i = 0 ; $i < count($stories_ary) ; $i++) { ! $story_id = $stories_ary[$i]['story_id']; if (!empty($ary['section_id'])) { if($ary['section_id'] != $this->psl['home_section_id']) { --- 72,83 ---- $stories_ary = $stories->extractStories( $ary); ! if (is_array($stories_ary)) { ! ! $count = count($stories_ary); ! for ($i = 0 ; $i < $count ; $i++) { ! $story_id = $stories_ary[$i]['story_id']; + if (!empty($ary['section_id'])) { if($ary['section_id'] != $this->psl['home_section_id']) { *************** *** 82,98 **** } } elseif ( (!empty($ary['section'])) AND ( $ary['section'] != $site_homesection)) { ! AddClassRequirement("section",$this->psl['moduledir'] ."/section/Section.class"); ! $section = pslNew("Section"); ! $section_name = $section->getId($ary['section']); ! $story_id .= $amp . 'section=' . $section_name; ! } ! if (isset($topic_id)) { $story_id .= $amp . 'topic_id=' . $ary['topic_id']; } elseif (!empty($ary['topic'])) { ! AddClassRequirement("topic",$this->psl['moduledir'] ."/topic/Topic.class"); ! $topic = pslNew("Topic"); ! $topic_name = $topic->getId($ary['topic']); ! $story_id .= $amp . 'topic=' . $topic_name; } --- 85,101 ---- } } elseif ( (!empty($ary['section'])) AND ( $ary['section'] != $site_homesection)) { ! AddClassRequirement("section",$this->psl['moduledir'] ."/section/Section.class"); ! $section = pslNew("Section"); ! $section_name = $section->getId($ary['section']); ! $story_id .= $amp . 'section_id=' . $section_name; ! } ! if (isset($topic_id)) { $story_id .= $amp . 'topic_id=' . $ary['topic_id']; } elseif (!empty($ary['topic'])) { ! AddClassRequirement("topic",$this->psl['moduledir'] ."/topic/Topic.class"); ! $topic = pslNew("Topic"); ! $topic_name = $topic->getId($ary['topic']); ! $story_id .= $amp . 'topic_id=' . $topic_name; } *************** *** 114,119 **** 'ALTTEXT' => $stories_ary[$i]['alt_text'] )); ! ! $template->parse ('query_block', 'each_query', true); } --- 117,121 ---- 'ALTTEXT' => $stories_ary[$i]['alt_text'] )); ! $template->parse('query_block', 'each_query', true); } |
From: Peter C. <kr...@us...> - 2004-07-07 17:28:14
|
Update of /cvsroot/phpslash/phpslash-dev/include/modules/block/blocktypes In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15518 Modified Files: Block_render_header.class Log Message: Make section name available to slashHead template. (There may be a more elegant way of doing this) Index: Block_render_header.class =================================================================== RCS file: /cvsroot/phpslash/phpslash-dev/include/modules/block/blocktypes/Block_render_header.class,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** Block_render_header.class 12 Nov 2003 21:55:58 -0000 1.2 --- Block_render_header.class 7 Jul 2004 17:28:05 -0000 1.3 *************** *** 10,35 **** function Block_render_header() { $this->Block_render_i(); ! $this->type = "header"; /* set the 'type' */ ! $this->description = "A block that displays the parsed contents of slashHead.tpl"; } function parse($block_info) { - $tpl = ''; if (is_array($block_info['block_options'])) { ! ! if(array_key_exists('tpl', $block_info['block_options'])) { // the template is set in the block admin $tpl = $block_info['block_options']['tpl']; } - } ! $this->output = getHeader($GLOBALS['pagetitle'],$this->psl['metatags'],'',$tpl); return true; } } ?> --- 10,57 ---- function Block_render_header() { $this->Block_render_i(); ! $this->type = "header"; /* set the 'type' */ ! $this->description = "A block that displays the parsed contents of slashHead.tpl"; } function parse($block_info) { $tpl = ''; if (is_array($block_info['block_options'])) { ! if (array_key_exists('tpl', $block_info['block_options'])) { // the template is set in the block admin $tpl = $block_info['block_options']['tpl']; } } ! $sectionTitle = array('SECTION' => $this->getSectionTitle()); ! $this->output = getHeader($GLOBALS['pagetitle'],$this->psl['metatags'],$sectionTitle,$tpl); return true; } + + function getSectionTitle() { + global $ary; + #debug('ary',$ary); + if (empty($ary['section'])) { + $out = $this->psl['site_homesection']; + if (!empty($ary['section_id'])) { + $q = 'SELECT section_name FROM psl_section WHERE section_id='.intval($ary['section_id']); + $db = pslNew('slashDB'); + #debug('q',$q); + $db->query($q); + if ($db->next_record()) { + $out = $db->Record['section_name']; + } + } + # $ary['section'] = $out; // Setting this value screws things badly. Don't know why - pac Jul 2004 + } else { + $out = $ary['section']; + } + + return $out; + } + } + ?> |
From: Peter C. <kr...@us...> - 2004-07-07 17:26:09
|
Update of /cvsroot/phpslash/phpslash-dev/include/modules/author In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14967 Modified Files: index.php Log Message: Bugfix: Check for existance of jpcache_gc function before attempting to call it Index: index.php =================================================================== RCS file: /cvsroot/phpslash/phpslash-dev/include/modules/author/index.php,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** index.php 20 May 2003 17:07:10 -0000 1.4 --- index.php 7 Jul 2004 17:26:00 -0000 1.5 *************** *** 35,40 **** $content .= getMessage("Profile Updated"); ! // expire cache for this session ! jpcache_gc('string', "-slashSess-" . $sess->id, "100"); } else { $content .= getError("Profile not updated"); --- 35,42 ---- $content .= getMessage("Profile Updated"); ! if (function_exists('jpcache_gc')) { ! // expire cache for this session ! jpcache_gc('string', "-slashSess-" . $sess->id, "100"); ! } } else { $content .= getError("Profile not updated"); |
From: Peter C. <kr...@us...> - 2004-07-07 17:22:42
|
Update of /cvsroot/phpslash/phpslash-dev/include/class In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14189 Modified Files: slashTemplate.class Log Message: Bugfix: Comment out portion of code that was causing infinite recursion when attempting to find default skins template Index: slashTemplate.class =================================================================== RCS file: /cvsroot/phpslash/phpslash-dev/include/class/slashTemplate.class,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** slashTemplate.class 1 Dec 2003 19:07:06 -0000 1.6 --- slashTemplate.class 7 Jul 2004 17:22:32 -0000 1.7 *************** *** 117,123 **** $filepath = $templatedir ."/". $this->psl['module'][$this->psl['module']['module.current']] ."/". basename($filename); $status = Template::set_file($varname, $filepath); ! } elseif($this->set_file($varname, $filename, $this->psl['defaultskin'], $this->psl['language.default'])) { ! // template in default language / default skin ! $status = true; } else { // template isn't in the defaults either - bail out --- 117,124 ---- $filepath = $templatedir ."/". $this->psl['module'][$this->psl['module']['module.current']] ."/". basename($filename); $status = Template::set_file($varname, $filepath); ! #Commented out: This leads an infinite loop since the skin directory is not used. ! # } elseif($this->set_file($varname, $filename, $this->psl['defaultskin'], $this->psl['language.default'])) { ! # // template in default language / default skin ! # $status = true; } else { // template isn't in the defaults either - bail out *************** *** 130,141 **** } else { reset($varname); while(list($v, $f) = each($varname)) { if(!$this->set_file($v, $f)) { ! ! return false; } } - $status = true; } --- 131,142 ---- } else { reset($varname); + $status = true; while(list($v, $f) = each($varname)) { if(!$this->set_file($v, $f)) { ! $status = false; ! break; } } } |