phpslash-commit Mailing List for phpSlash (Page 44)
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...> - 2003-06-24 19:32:38
|
Update of /cvsroot/phpslash/phpslash-dev/public_html In directory sc8-pr-cvs1:/tmp/cvs-serv25920/phpslash-dev/public_html Modified Files: article.php comment.php config-dist.ini.php config-dist.php errordocument.php index.php Log Message: various bugfixes and classes into modules Index: article.php =================================================================== RCS file: /cvsroot/phpslash/phpslash-dev/public_html/article.php,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** article.php 12 Mar 2003 16:12:56 -0000 1.1.1.1 --- article.php 24 Jun 2003 19:32:34 -0000 1.2 *************** *** 1,257 **** <?php ! /* $Id$ */ ! ! require("config.php"); ! ! AddClassRequirement("story_base",$_PSL['moduledir'] . "/story/Story_base.class"); ! AddClassRequirement("story","story_base"); ! AddClassRequirement("story",$_PSL['moduledir'] . "/story/Story.class"); ! ! $pagetitle = pslgetText("Articles"); // The name to be displayed in the header ! $xsiteobject = pslgetText("Articles"); // Defines The META TAG Page Type ! ! /************************************* ! START OF PAGE ! *************************************/ ! ! $db = pslNew("slashDB"); ! $story = pslNew("Story"); ! ! $return_link = $HTTP_SERVER_VARS["REQUEST_URI"]; ! $sess->register("return_link"); ! ! // correction for register_globals OFF ! $story_id = $ary['story_id']; ! $submit = $ary['submit']; ! ! $story_html = $story->getStory($story_id, "full", $ary); ! ! $t = pslNew("slashTemplate",$_PSL['templatedir'], "remove"); ! ! if ($story_html) { ! ! $title = $story->getTitle($story_id); ! $ttitle = stripslashes(ereg_replace("<([^>]*)>", "", $title)); ! ! switch($submit) { ! ! case "pda": ! ! $t->set_file(article, "article-pf.tpl"); ! $t->set_var(array( ! 'STORY_URL' => $_PSL['rooturl']."/article.php?story_id=".$story_id, ! 'SITENAME' => $_PSL['site_name'], ! 'PAGETITLE' => $pagetitle, ! 'TITLE' => $ttitle, ! 'NAME' => $story->story_ary["name"], ! 'REALNAME' => $story->story_ary["realname"], ! 'DATEF' => $story->story_ary["datef"], ! 'DEPT' => $story->story_ary["dept"], ! 'INTRO_TEXT' => $story->story_ary["intro_text"], ! 'BODY_TEXT' => $story->story_ary["body_text"], ! 'XSITEOBJECT' => $xsiteobject ! )); ! $t->parse('PAGE', 'article'); ! $t->p('PAGE'); ! break; ! ! case "wml": ! header("Content-type: text/vnd.wap.wml"); ! $t->set_file(article, "article-wml.tpl"); ! $t->set_var(array( ! 'STORY_URL' => $_PSL['rooturl']."/article.php?story_id=".$story_id, ! 'SITENAME' => $_PSL['site_name'], ! 'PAGETITLE' => $pagetitle, ! 'TITLE' => $ttitle, ! 'NAME' => $story->story_ary["name"], ! 'REALNAME' => $story->story_ary["realname"], ! 'DATEF' => $story->story_ary["datef"], ! 'DEPT' => $story->story_ary["dept"], ! 'INTRO_TEXT' => $str = ereg_replace("<([^>]+)>", "", $story->story_ary["intro_text"]), ! 'BODY_TEXT' => $str = ereg_replace("<([^>]+)>", "", $story->story_ary["body_text"]), ! 'XSITEOBJECT' => $xsiteobject ! )); ! $t->parse('PAGE', 'article'); ! $t->p('PAGE'); ! break; ! ! case "xhtmlb": ! header("Content-type: text/html"); ! $t->set_file(article, "article-xhtmlb.tpl"); ! $t->set_var(array( ! 'STORY_URL' => $_PSL['rooturl']."/article.php?story_id=".$story_id, ! 'SITENAME' => $_PSL['site_name'], ! 'PAGETITLE' => $pagetitle, ! 'TITLE' => $ttitle, ! 'NAME' => $story->story_ary["name"], ! 'REALNAME' => $story->story_ary["realname"], ! 'DATEF' => $story->story_ary["datef"], ! 'DEPT' => $story->story_ary["dept"], ! 'INTRO_TEXT' => $str = ereg_replace("<([^>]+)>", "", $story->story_ary["intro_text"]), ! 'BODY_TEXT' => $str = ereg_replace("<([^>]+)>", "", $story->story_ary["body_text"]), ! 'XSITEOBJECT' => $xsiteobject ! )); ! $t->parse('PAGE', 'article'); ! $t->p('PAGE'); ! break; ! ! case "print": ! ! $p_intro_text = eregi_replace("<img([^>]*)src=\"?([^\"]*)\"?([^>]*)>","",$story->story_ary["intro_text"]); ! $p_intro_text = eregi_replace("<a ([^>]*)href=\"?([^\"]*)\"?([^>]*)>","",$p_intro_text); ! $p_intro_text = eregi_replace("</a>","",$p_intro_text); ! $p_intro_text = stripslashes( $p_intro_text); ! ! $p_body_text = eregi_replace("<img([^>]*)src=\"?([^\"]*)\"?([^>]*)>","",$story->story_ary["body_text"]); ! $p_body_text = eregi_replace("<a ([^>]*)href=\"?([^\"]*)\"?([^>]*)>","",$p_body_text); ! $p_body_text = eregi_replace("</a>","",$p_body_text); ! $p_body_text = stripslashes( $p_body_text); ! ! $t->set_file(article, "article-pf.tpl"); ! $t->set_var(array( ! 'STORY_URL' => $_PSL['rooturl']."/article.php?story_id=".$story_id, ! 'SITENAME' => $_PSL['site_name'], ! 'PAGETITLE' => $pagetitle, ! 'TITLE' => $ttitle, ! 'NAME' => $story->story_ary["name"], ! 'REALNAME' => $story->story_ary["realname"], ! 'DATEF' => $story->story_ary["datef"], ! 'DEPT' => $story->story_ary["dept"], ! 'INTRO_TEXT' => $p_intro_text, ! 'BODY_TEXT' => $p_body_text, ! 'XSITEOBJECT' => $xsiteobject ! )); ! $t->parse('PAGE', 'article'); ! $t->p('PAGE'); ! break; ! ! case "email": ! ! $emailform = ""; ! $emailform = $story->emailStory($story_id, $action); ! ! default: ! ! if (!isset($ary['parent_id'])) { ! $ary['parent_id'] = 0; ! } ! ! $t->set_file(article, "article.tpl"); ! ! $breadcrumb = breadcrumb($ary); ! ! $_PSL['metatags']['object'] = $xsiteobject; ! // override description metatag to include first 150 chars of article ! $_PSL['metatags']['description'] = substr(strip_tags($story->story_ary["intro_text"]), 0, 150); ! ! // $titlebar = getTitlebar("100%", $title); // here if you need it. ! ! $related = $story->getRelated($story_id); ! if($perm->have_perm('story')) { ! if( ($auth->auth['uid'] == $story->story_ary['user_id']) OR ! ($perm->have_perm('storyeditor'))) { ! $related .= "<a href=\"".$_PSL['adminurl']."/storyAdmin.php?submit=edit&story_id=".$story_id."\">".pslgetText('Modify Story')."</a>"; ! } ! } ! $arrows = $story->getNextPrev($story_id); ! ! // setup the block module ! $_PSL['module']['module.current'] = $_PSL['module']['Block']; ! include($_PSL['moduledir'] ."/". $_PSL['module']['module.current'] ."/index.php"); ! ! $block = pslNew("Block_i"); ! $leftblocks = $block->getBlocks($ary, "left" ); ! $centerblocks = $block->getBlocks($ary, "center" ); ! $rightblocks = $block->getBlocks($ary, "right" ); ! ! if (empty($leftblocks)) { ! if (empty($rightblocks)) { ! // $centerblocks = $block->getBlocks($ary); ! // $centerblocks .= $related; ! // $tplfile = "index1col.tpl"; ! // default to 2 column for transparent upgrade ! $rightblocks = $block->getBlocks($ary); ! $rightblocks .= $related; ! $tplfile = "index2colright.tpl"; ! ! } else { ! $tplfile = "index2colright.tpl"; ! $rightblocks = $related . $rightblocks; ! } ! } elseif (empty($rightblocks)) { ! $tplfile = "index2colleft.tpl"; ! $leftblocks .= $related; ! } else { ! $tplfile = "index3col.tpl"; ! $rightblocks = $related . $rightblocks; ! } ! ! $t->set_file(article, $tplfile); //"article.tpl"); ! ! /* Now the comments */ ! if ($_PSL['module']['Comment']) { ! $cmtary['mode'] = $ary['mode']; ! $cmtary['order'] = $ary['order']; ! $cmtary['story_id'] = $ary['story_id']; ! $cmtary['parent_id'] = $ary['parent_id']; ! $cmt = pslNew("Comment",$cmtary); ! $comments = $cmt->getAllComments($cmtary); ! } else { ! $comments = ''; ! } ! ! $t->set_var('COMMENTS', $comments); ! ! /* Display the story */ ! $t->set_var(array( ! 'TITLE' => $title, ! 'BREADCRUMB' => $breadcrumb, ! 'STORY_ID' => $story_id, ! 'ROOTDIR' => $_PSL['rooturl'], ! 'IMAGEDIR' => $_PSL['imageurl'], ! 'STORY_COLUMN' => $emailform."\n".$story_html."\n".$comments, ! 'LEFT_BLOCK_COLUMN' => $leftblocks, ! 'CENTER_TOP_BLOCK_COLUMN' => $centertopblocks, ! 'RIGHT_BLOCK_COLUMN' => $rightblocks, ! // 'HEADER' => $header, ! // 'EMAILFORM' => $emailform, ! // 'STORY' => $story_html, ! // 'ARROWS' => $arrows, ! // 'FOOTER' => $footer, ! // 'RELATED' => $related, ! )); ! ! ! $updatearticlehits = $_PSL["article_updatehits"]; ! if (($updatearticlehits) AND ! ($story_html) ) { ! $q = "UPDATE psl_story ! SET hits = hits + 1 ! WHERE story_id = $story_id"; ! $db->query($q); ! } ! ! slashhead($ttitle,$_PSL['metatags']); ! debug('HTTP_COOKIE_VARS',$HTTP_COOKIE_VARS); ! $t->parse('PAGE', 'article'); ! $t->p('PAGE'); ! slashfoot(); ! } /* end of switch */ ! } else { ! slashhead("Article",$xsiteobject); ! titlebar("100%", "I´m sorry, no Article Number ".htmlentities($story_id)." found."); ! echo "<BR><BR>Maybe you're looking for a Poll? Try this <A HREF=\"" . $_PSL['rooturl'] . "/poll.php?submit=viewbooth&question_id=".htmlentities($story_id)."\">link</A>.<BR><BR>\n"; ! echo "If that doesn't work, then use the <a href=\"" . $_PSL['rooturl'] . "/search.php\">Search</A> Page."; ! slashfoot(); ! } page_close(); - ?> --- 1,26 ---- <?php + // $Id$ ! require('config.php'); ! $pagetitle = pslgetText('Home'); // The name to be displayed in the header ! $xsiteobject = pslgetText('Home Page'); // This Defines The META Tag Object Type ! // Show login form if requested ! if(!empty($HTTP_GET_VARS['login'])) { ! $auth->login_if($HTTP_GET_VARS['login']); ! } ! $_PSL['metatags']['object'] = $xsiteobject; ! // Is the page specified? - if not use module index.php ! $modulefilename = 'index.php'; ! // setup the block module ! $content = include($_PSL['moduledir'] ."/". $_PSL['module']['Block'] ."/". $modulefilename); ! // show page ! echo $content; page_close(); ?> Index: comment.php =================================================================== RCS file: /cvsroot/phpslash/phpslash-dev/public_html/comment.php,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** comment.php 28 Apr 2003 15:26:52 -0000 1.2 --- comment.php 24 Jun 2003 19:32:34 -0000 1.3 *************** *** 1,238 **** <?php ! /* $Id$ */ ! ! require("config.php"); ! ! AddClassRequirement("story_base",$_PSL['moduledir'] . "/story/Story_base.class"); ! AddClassRequirement("story","story_base"); ! AddClassRequirement("story",$_PSL['moduledir'] . "/story/Story.class"); ! ! $pagetitle = pslgetText("Comment Display"); # Defines the page title. ! $xsiteobject = pslgetText("Comment Display"); # Defines The META TAG Page Type ! ! // page_open(array("sess"=>"slashSess","auth"=>"slashAuth","perm"=>"slashPerm")); ! ! $auth->login_if(!$perm->have_perm('commentView')); ! ! $content = ''; ! ! if(!empty($HTTP_POST_VARS['submit'])) { ! ! $submit = $HTTP_POST_VARS['submit']; ! $ary = clean($HTTP_POST_VARS, true); ! ! $name = $ary['name']; ! $email = $ary['email']; ! $url = $ary['url']; ! ! if(!empty($ary['name'])) { ! $comment_name = $ary['name']; ! $comment_email = $ary['email']; ! $comment_url = $ary['url']; ! ! $sess->register("comment_name"); ! $sess->register("comment_email"); ! $sess->register("comment_url"); ! } ! ! ! $cmt = pslNew("Comment",$ary); ! ! switch( $submit) { ! ! case "preview": ! ! // when you are previewing a comment before submitting ! $ary['ip'] = gethostbyaddr($HTTP_SERVER_VARS['REMOTE_ADDR']); /* add the poster's IP addr */ ! ! $ary['replying_to'] = $cmt->formatComment($ary); ! $content .= $cmt->getForm($ary); ! break; ! ! case "save": ! case "Submit Comment": ! ! $content .= "<BR>Click <A HREF=\"" . $return_link . "\">here</A> to go back<BR>\n"; ! if ($ary['parent_id']) { ! $content .= "<A HREF=\"" . $_PSL['rooturl'] . "/comment.php?submit=view&story_id=$ary[story_id]&comment_id=$ary[parent_id]&mode=flat\">".pslgetText("View Parent Comment")."</A>\n"; ! } ! ! $content .= getTitlebar("100%", "Submitted Comment"); ! $ary['ip'] = $HTTP_SERVER_VARS['REMOTE_ADDR']; /* add the poster's IP addr */ ! ! $id = $cmt->update($ary); ! if ($id) { ! ! // expire cache for this story_id ! if(function_exists('jpcache_gc')) { ! jpcache_gc('string', "-story_id-" . $ary['story_id'], "100"); ! jpcache_gc('string', "-question_id-" . $ary['story_id'], "100"); ! } ! $content .= getMessage($cmt->getMessage()); ! $comment_ary = $cmt->getCommentArray($id); ! $content .= $cmt->formatComment($comment_ary); ! // send email for new submission. ! if (array_key_exists('commentnotify',$_PSL)) { ! $mail_ary['tpl'] = "emailNotifyComment"; ! $ary['comment_id'] = $id; ! $mail_ary['vars'] = $ary; ! $success = emailNotify($mail_ary); ! } ! } else { ! $content .= getError($cmt->getMessage()); ! } ! header("Location: $return_link"); ! break; ! ! } ! ! ! } elseif (!empty($HTTP_GET_VARS['submit'])) { ! ! $submit = $HTTP_GET_VARS['submit']; ! $ary = clean($HTTP_GET_VARS); ! ! if (empty($ary['parent_id'])) { ! $ary['parent_id'] = 0; ! } ! ! if ($sess->is_registered("comment_name")) { ! $ary['name'] = $comment_name; ! $ary['email'] = $comment_email; ! } ! ! $cmt = pslNew("Comment",$ary); ! ! switch( $submit) { ! ! case "post": ! ! if( !$perm->have_perm('commentPost')) { ! $auth->auth['error'] = pslgetText("Login required to post comments"); ! $auth->login_if(true); ! } ! if ($ary['parent_id'] != 0) { ! $parent_ary = $cmt->getCommentArray($ary['parent_id']); ! $ary['replying_to'] = $cmt->formatComment($parent_ary); ! } else { ! $story = pslNew("Story"); ! $ary['replying_to'] = $story->getStory($ary['story_id'],"full"); ! } ! ! if ($parent_ary['subject'] == "") { ! //$ary[subject] = pslgetText("No Subject Given"); ! } elseif( preg_match ("/Re\:/i",$parent_ary['subject'])) { ! $ary['subject'] = $parent_ary['subject']; ! } else { ! $ary['subject'] = pslgetText("Re: ") . $parent_ary['subject']; ! } ! ! $ary['action_url'] = $_PSL['phpself']; ! $ary['siteowner'] = $_PSL['site_owner']; ! ! // session variables ! // if(isset($name)) { ! // $ary['name'] = $name; ! // } ! // if(isset($email)) { ! // $ary['email'] = $email; ! // } ! // if(isset($url)) { ! // $ary['url'] = $url; ! // } ! ! // either start a new object or getForm not reuse template vars. ! $cmt = pslNew("Comment",$ary); ! ! $content .= $cmt->getForm($ary); ! break; ! ! case "view": ! case "Change": ! ! // the basic viewing of the comments ! ! $content .= getTitlebar("100%", pslgetText("Comments")); ! $content .= $cmt->getAllComments($ary); ! break; ! ! } ! ! } ! if($content == '') { ! $content = getTitlebar("100%","Comment Error!"); ! $content .= getError(pslgetText("You didn't supply a good submit value")); ! } ! if ((!$HTTP_GET_VARS['section']) AND (!$HTTP_GET_VARS['section_id'])){ ! $section = $_PSL['site_homesection']; ! if(!$section) { ! $section = "Home"; ! } ! $ary['section'] = $section; ! } else { ! $pagetitle .= " - $section"; } - // setup the block module - $_PSL['module']['module.current'] = $_PSL['module']['Block']; - include($_PSL['moduledir'] ."/". $_PSL['module']['module.current'] ."/index.php"); - $block = pslNew("Block_i"); - - $breadcrumb = breadcrumb($ary); - $_PSL['metatags']['object'] = $xsiteobject; ! slashhead($pagetitle,$_PSL['metatags']); ! ! $leftblocks = $block->getBlocks($ary, "left"); ! $centerblocks = $block->getBlocks($ary, "center"); ! $rightblocks = $block->getBlocks($ary, "right"); ! ! if (empty($leftblocks)) { ! if (empty($rightblocks)) { ! // $centerblocks = $block->getBlocks($ary); ! $tplfile = "index1col.tpl"; ! } else { ! $tplfile = 'index2colright.tpl'; ! } ! } elseif (empty($rightblocks)) { ! $tplfile = 'index2colleft.tpl'; ! } else { ! $tplfile = 'index3col.tpl'; } ! $template = pslNew("slashTemplate",$_PSL['templatedir']); ! $template->debug = 0; ! $template->set_file(array( ! 'index' => $tplfile //"index3col.tpl" ! )); ! ! if( !empty($GLOBALS['QUERY_STRING'])) { ! $QUERY_STRING = '?'.$GLOBALS['QUERY_STRING']; ! } else { ! $QUERY_STRING = ''; ! } ! ! $template->set_var(array( ! 'SKIN' => $_PSL['skin'], ! 'QUERYSTRING' => $QUERY_STRING, ! 'ROOTDIR' => $_PSL['rooturl'], ! 'IMAGEDIR' => $_PSL['imageurl'], ! 'BREADCRUMB' => $breadcrumb, ! 'STORY_COLUMN' => $content, ! 'LEFT_BLOCK_COLUMN' => $leftblocks, ! 'CENTER_BLOCK_COLUMN' => $centerblocks, ! 'RIGHT_BLOCK_COLUMN' => $rightblocks ! )); ! $template->parse('OUT','index'); ! $template->p('OUT'); - slashfoot(); page_close(); - ?> --- 1,31 ---- <?php + // $Id$ ! $HTTP_GET_VARS['section'] = 'Comment'; ! require('config.php'); + $pagetitle = pslgetText('Comment Display'); // The name to be displayed in the header + $xsiteobject = pslgetText('Comment Display'); // This Defines The META Tag Object Type ! // Show login form if requested ! if(!empty($HTTP_GET_VARS['login'])) { ! $auth->login_if($HTTP_GET_VARS['login']); } $_PSL['metatags']['object'] = $xsiteobject; ! // Is the page specified? - if not use module index.php ! $modulefilename = 'index.php'; ! if(array_key_exists('page', $ary)) { ! $modulefilename = basename($ary['page']) .".php"; } ! // setup the block module ! $content = include($_PSL['moduledir'] ."/". $_PSL['module']['Block'] ."/". $modulefilename); ! // show page ! echo $content; page_close(); ?> Index: config-dist.ini.php =================================================================== RCS file: /cvsroot/phpslash/phpslash-dev/public_html/config-dist.ini.php,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** config-dist.ini.php 12 Mar 2003 16:12:57 -0000 1.1.1.1 --- config-dist.ini.php 24 Jun 2003 19:32:34 -0000 1.2 *************** *** 170,173 **** --- 170,176 ---- ;;; + ;; jpcache + jpcache.enable = internal + ;;; ;; RSS Exporter Values: *************** *** 475,484 **** Block = block ;; Allow users of your site to leave and peruse comments. ! Comment = true ;; Show a row of icons relating to topics for which stories have been ;; posted recently. ! TopicBar = true ;; Show a row of links relating to various modules within the site. ! NavBar = true ;; Allow administrators to create polls on your site. Poll = poll --- 478,487 ---- Block = block ;; Allow users of your site to leave and peruse comments. ! Comment = comment ;; Show a row of icons relating to topics for which stories have been ;; posted recently. ! TopicBar = topicbar ;; Show a row of links relating to various modules within the site. ! NavBar = navbar ;; Allow administrators to create polls on your site. Poll = poll *************** *** 505,509 **** ;; Search page module. Search = search ! ;; default module [default] = Story --- 508,513 ---- ;; Search page module. Search = search ! ;; Error page module ( Page not found) ! Error = error ;; default module [default] = Story Index: config-dist.php =================================================================== RCS file: /cvsroot/phpslash/phpslash-dev/public_html/config-dist.php,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** config-dist.php 23 May 2003 16:02:13 -0000 1.4 --- config-dist.php 24 Jun 2003 19:32:34 -0000 1.5 *************** *** 26,32 **** */ ! // require "/path/to/jpcache.php"; - if(array_key_exists('JPCACHE_TYPE', $GLOBALS)) { $varkey = ''; if (!empty($HTTP_COOKIE_VARS['slashSess'])) { --- 26,34 ---- */ ! if($_PSL['jpcache.enable'] == 'external') { ! // if(array_key_exists('JPCACHE_TYPE', $GLOBALS)) { ! ! // require "/path/to/jpcache.php"; $varkey = ''; if (!empty($HTTP_COOKIE_VARS['slashSess'])) { *************** *** 263,267 **** // begin built-in jpcache ! if(empty($GLOBALS['JPCACHE_TYPE'])) { // jpcachedir -> the full directory path to the jpcache scripts. --- 265,270 ---- // begin built-in jpcache ! if($_PSL['jpcache.enable'] == 'internal') { ! // if(empty($GLOBALS['JPCACHE_TYPE'])) { // jpcachedir -> the full directory path to the jpcache scripts. *************** *** 597,601 **** * Rest of the class information **/ ! AddClassRequirement("comment",$_PSL['classdir'] . "/Comment.class"); // AddClassRequirement("group",$_PSL['classdir'] . "/Group.class"); AddClassRequirement("infolog",$_PSL['classdir'] . "/Infolog.class"); --- 600,604 ---- * Rest of the class information **/ ! // AddClassRequirement("comment",$_PSL['classdir'] . "/Comment.class"); // AddClassRequirement("group",$_PSL['classdir'] . "/Group.class"); AddClassRequirement("infolog",$_PSL['classdir'] . "/Infolog.class"); Index: errordocument.php =================================================================== RCS file: /cvsroot/phpslash/phpslash-dev/public_html/errordocument.php,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** errordocument.php 12 Mar 2003 16:12:57 -0000 1.1.1.1 --- errordocument.php 24 Jun 2003 19:32:34 -0000 1.2 *************** *** 2,99 **** // $Id$ ! require("config.php"); ! $pagetitle = pslgetText("Page not found"); // The name to be displayed in the header ! $xsiteobject = pslgetText("Error Document"); // This Defines The META Tag Object Type ! // page_open(array("sess"=>"slashSess","auth"=>"slashAuth","perm"=>"slashPerm")); if(!empty($HTTP_GET_VARS['login'])) { $auth->login_if($HTTP_GET_VARS['login']); } - // Objects - - $block = pslNew("Block_i"); - $db = pslNew("slashDB"); - - // Start of Page - $ary = array(); - if(!empty($HTTP_GET_VARS)) { - $ary = clean($HTTP_GET_VARS); - } - - if ((empty($ary['section'])) AND (empty($ary['section_id']))){ - $section = $_PSL['site_homesection']; - if(!$section) { - $section = "Home"; - } - $ary['section'] = $section; - } else { - $pagetitle .= $ary['section']; - } - - $breadcrumb = breadcrumb( $ary); - $_PSL['metatags']['object'] = $xsiteobject; ! slashhead($pagetitle,$_PSL['metatags']); ! ! // log 404's if you don't have access server logs in the infolog ! // logwrite("404", "File Not Found " . $REDIRECT_URL); ! ! $template = pslNew("slashTemplate",$_PSL['templatedir']); ! $template->debug = 0; ! $template->set_file(array( ! index => "notfound.tpl" ! )); ! ! $template->set_var(array( ! ROOTDIR => $_PSL['rooturl'], ! IMAGEDIR => $_PSL['imagedir'], ! ERRORURL => htmlentities($REDIRECT_URL) ! )); ! ! $allstories = $template->parse(OUT,"index"); ! $leftblocks = $block->getBlocks($ary, "left"); ! $centerblocks = $block->getBlocks($ary, "center"); ! $rightblocks = $block->getBlocks($ary, "right"); ! ! if (empty($leftblocks)) { ! if (empty($rightblocks)) { ! // $centerblocks = $block->getBlocks($ary); ! // $tplfile = "index1col.tpl"; ! // default to 2 column for transparent upgrade ! $rightblocks = $block->getBlocks($ary); ! $tplfile = "index2colright.tpl"; ! } else { ! $tplfile = "index2colright.tpl"; ! } ! } elseif (empty($rightblocks)) { ! $tplfile = "index2colleft.tpl"; ! } else { ! $tplfile = "index3col.tpl"; ! } ! $template = pslNew("slashTemplate",$_PSL['templatedir']); ! $template->debug = 0; ! $template->set_file(array( ! 'index' => $tplfile //"index3col.tpl" ! )); ! ! $template->set_var(array( ! 'ROOTDIR' => $_PSL['rooturl'], ! 'IMAGEDIR' => $_PSL['imageurl'], ! 'BREADCRUMB' => $breadcrumb, ! 'STORY_COLUMN' => $allstories, ! 'LEFT_BLOCK_COLUMN' => $leftblocks, ! 'CENTER_BLOCK_COLUMN' => $centerblocks, ! 'RIGHT_BLOCK_COLUMN' => $rightblocks ! )); ! $template->parse('OUT',"index"); ! $template->p('OUT'); - slashfoot(); page_close(); ?> --- 2,28 ---- // $Id$ ! $HTTP_GET_VARS['section'] = 'Error'; ! require('config.php'); ! $pagetitle = pslgetText('Page not found'); // The name to be displayed in the header ! $xsiteobject = pslgetText('Error Document'); // This Defines The META Tag Object Type + // Show login form if requested if(!empty($HTTP_GET_VARS['login'])) { $auth->login_if($HTTP_GET_VARS['login']); } $_PSL['metatags']['object'] = $xsiteobject; ! // Is the page specified? - if not use module index.php ! $modulefilename = 'index.php'; ! // setup the block module ! $content = include($_PSL['moduledir'] ."/". $_PSL['module']['Block'] ."/". $modulefilename); ! // show page ! echo $content; page_close(); ?> Index: index.php =================================================================== RCS file: /cvsroot/phpslash/phpslash-dev/public_html/index.php,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** index.php 15 May 2003 19:34:53 -0000 1.4 --- index.php 24 Jun 2003 19:32:35 -0000 1.5 *************** *** 14,29 **** $_PSL['metatags']['object'] = $xsiteobject; - // Is the page specified? - if not use module index.php $modulefilename = 'index.php'; - /* - if(array_key_exists('page', $ary)) { - $modulefilename = basename($ary['page']) .".php"; - } - */ - // setup the block module - $_PSL['module']['module.current'] = $_PSL['module']['Block']; - $content = include($_PSL['moduledir'] ."/". $_PSL['module']['module.current'] ."/". $modulefilename); // show page --- 14,22 ---- $_PSL['metatags']['object'] = $xsiteobject; // Is the page specified? - if not use module index.php $modulefilename = 'index.php'; + // setup the block module + $content = include($_PSL['moduledir'] ."/". $_PSL['module']['Block'] ."/". $modulefilename); // show page |
From: Joe S. <joe...@us...> - 2003-06-24 19:32:38
|
Update of /cvsroot/phpslash/phpslash-dev/include/modules/story In directory sc8-pr-cvs1:/tmp/cvs-serv25920/phpslash-dev/include/modules/story Modified Files: Story.class article.php index.php Log Message: various bugfixes and classes into modules Index: Story.class =================================================================== RCS file: /cvsroot/phpslash/phpslash-dev/include/modules/story/Story.class,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** Story.class 15 May 2003 18:19:54 -0000 1.4 --- Story.class 24 Jun 2003 19:32:34 -0000 1.5 *************** *** 133,137 **** 'AUTHOR_ID' => $ary['user_id'], 'AUTHOR_NAME' => $ary['name'], ! 'AUTHOR_REALNAME' => $ary['realname'], 'rows' => "" )); --- 133,137 ---- 'AUTHOR_ID' => $ary['user_id'], 'AUTHOR_NAME' => $ary['name'], ! 'AUTHOR_REALNAME' => $ary['realname'], 'rows' => "" )); *************** *** 149,153 **** $related_contents = $this->template->get('RELATED'); ! $related = getFancyBox("100%", pslgetText("Related Links"), $related_contents); } } --- 149,154 ---- $related_contents = $this->template->get('RELATED'); ! $related = $related_contents; ! // $related = getFancyBox("100%", pslgetText("Related Links"), $related_contents); } } Index: article.php =================================================================== RCS file: /cvsroot/phpslash/phpslash-dev/include/modules/story/article.php,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** article.php 12 Mar 2003 16:12:54 -0000 1.1.1.1 --- article.php 24 Jun 2003 19:32:34 -0000 1.2 *************** *** 1,249 **** <?php ! /* $Id$ */ ! ! require("config.php"); ! $pagetitle = pslgetText("Articles"); // The name to be displayed in the header ! $xsiteobject = pslgetText("Articles"); // Defines The META TAG Page Type ! /************************************* ! START OF PAGE ! *************************************/ - $db = pslNew("slashDB"); $story = pslNew("Story"); ! $return_link = $HTTP_SERVER_VARS["REQUEST_URI"]; ! $sess->register("return_link"); ! ! // correction for register_globals OFF ! $story_id = $ary['story_id']; ! $submit = $ary['submit']; ! ! $story_html = $story->getStory($story_id, "full", $ary); ! ! $t = pslNew("slashTemplate",$_PSL['templatedir'], "remove"); ! ! if ($story_html) { ! ! $title = $story->getTitle($story_id); ! $ttitle = stripslashes(ereg_replace("<([^>]*)>", "", $title)); ! ! switch($submit) { ! ! case "pda": ! ! $t->set_file(article, "article-pf.tpl"); ! $t->set_var(array( ! 'STORY_URL' => $_PSL['rooturl']."/article.php?story_id=".$story_id, ! 'SITENAME' => $_PSL['site_name'], ! 'PAGETITLE' => $pagetitle, ! 'TITLE' => $ttitle, ! 'NAME' => $story->story_ary["name"], ! 'REALNAME' => $story->story_ary["realname"], ! 'DATEF' => $story->story_ary["datef"], ! 'DEPT' => $story->story_ary["dept"], ! 'INTRO_TEXT' => $story->story_ary["intro_text"], ! 'BODY_TEXT' => $story->story_ary["body_text"], ! 'XSITEOBJECT' => $xsiteobject ! )); ! $t->parse('PAGE', 'article'); ! $t->p('PAGE'); ! break; ! ! case "wml": ! header("Content-type: text/vnd.wap.wml"); ! $t->set_file(article, "article-wml.tpl"); ! $t->set_var(array( ! 'STORY_URL' => $_PSL['rooturl']."/article.php?story_id=".$story_id, ! 'SITENAME' => $_PSL['site_name'], ! 'PAGETITLE' => $pagetitle, ! 'TITLE' => $ttitle, ! 'NAME' => $story->story_ary["name"], ! 'REALNAME' => $story->story_ary["realname"], ! 'DATEF' => $story->story_ary["datef"], ! 'DEPT' => $story->story_ary["dept"], ! 'INTRO_TEXT' => $str = ereg_replace("<([^>]+)>", "", $story->story_ary["intro_text"]), ! 'BODY_TEXT' => $str = ereg_replace("<([^>]+)>", "", $story->story_ary["body_text"]), ! 'XSITEOBJECT' => $xsiteobject ! )); ! $t->parse('PAGE', 'article'); ! $t->p('PAGE'); ! break; ! ! case "xhtmlb": ! header("Content-type: text/html"); ! $t->set_file(article, "article-xhtmlb.tpl"); ! $t->set_var(array( ! 'STORY_URL' => $_PSL['rooturl']."/article.php?story_id=".$story_id, ! 'SITENAME' => $_PSL['site_name'], ! 'PAGETITLE' => $pagetitle, ! 'TITLE' => $ttitle, ! 'NAME' => $story->story_ary["name"], ! 'REALNAME' => $story->story_ary["realname"], ! 'DATEF' => $story->story_ary["datef"], ! 'DEPT' => $story->story_ary["dept"], ! 'INTRO_TEXT' => $str = ereg_replace("<([^>]+)>", "", $story->story_ary["intro_text"]), ! 'BODY_TEXT' => $str = ereg_replace("<([^>]+)>", "", $story->story_ary["body_text"]), ! 'XSITEOBJECT' => $xsiteobject ! )); ! $t->parse('PAGE', 'article'); ! $t->p('PAGE'); ! break; ! ! case "print": ! ! $p_intro_text = eregi_replace("<img([^>]*)src=\"?([^\"]*)\"?([^>]*)>","",$story->story_ary["intro_text"]); ! $p_intro_text = eregi_replace("<a ([^>]*)href=\"?([^\"]*)\"?([^>]*)>","",$p_intro_text); ! $p_intro_text = eregi_replace("</a>","",$p_intro_text); ! $p_intro_text = stripslashes( $p_intro_text); ! ! $p_body_text = eregi_replace("<img([^>]*)src=\"?([^\"]*)\"?([^>]*)>","",$story->story_ary["body_text"]); ! $p_body_text = eregi_replace("<a ([^>]*)href=\"?([^\"]*)\"?([^>]*)>","",$p_body_text); ! $p_body_text = eregi_replace("</a>","",$p_body_text); ! $p_body_text = stripslashes( $p_body_text); ! ! $t->set_file(article, "article-pf.tpl"); ! $t->set_var(array( ! 'STORY_URL' => $_PSL['rooturl']."/article.php?story_id=".$story_id, ! 'SITENAME' => $_PSL['site_name'], ! 'PAGETITLE' => $pagetitle, ! 'TITLE' => $ttitle, ! 'NAME' => $story->story_ary["name"], ! 'REALNAME' => $story->story_ary["realname"], ! 'DATEF' => $story->story_ary["datef"], ! 'DEPT' => $story->story_ary["dept"], ! 'INTRO_TEXT' => $p_intro_text, ! 'BODY_TEXT' => $p_body_text, ! 'XSITEOBJECT' => $xsiteobject ! )); ! $t->parse('PAGE', 'article'); ! $t->p('PAGE'); ! break; ! ! case "email": ! ! $emailform = ""; ! $emailform = $story->emailStory($story_id, $action); ! ! default: ! ! if (!isset($ary['parent_id'])) { ! $ary['parent_id'] = 0; ! } ! ! $t->set_file(article, "article.tpl"); ! ! $breadcrumb = breadcrumb($ary); ! ! $_PSL['metatags']['object'] = $xsiteobject; ! // override description metatag to include first 150 chars of article ! $_PSL['metatags']['description'] = substr(strip_tags($story->story_ary["intro_text"]), 0, 150); ! ! // $titlebar = getTitlebar("100%", $title); // here if you need it. ! ! $related = $story->getRelated($story_id); ! if($perm->have_perm('story')) { ! if( ($auth->auth['uid'] == $story->story_ary['user_id']) OR ! ($perm->have_perm('storyeditor'))) { ! $related .= "<a href=\"".$_PSL['adminurl']."/storyAdmin.php?submit=edit&story_id=".$story_id."\">".pslgetText('Modify Story')."</a>"; ! } ! } ! $arrows = $story->getNextPrev($story_id); ! ! $block = pslNew("Block_i"); ! $leftblocks = $block->getBlocks($ary, "left" ); ! $centerblocks = $block->getBlocks($ary, "center" ); ! $rightblocks = $block->getBlocks($ary, "right" ); ! ! if (empty($leftblocks)) { ! if (empty($rightblocks)) { ! // $centerblocks = $block->getBlocks($ary); ! // $centerblocks .= $related; ! // $tplfile = "index1col.tpl"; ! // default to 2 column for transparent upgrade ! $rightblocks = $block->getBlocks($ary); ! $rightblocks .= $related; ! $tplfile = "index2colright.tpl"; ! ! } else { ! $tplfile = "index2colright.tpl"; ! $rightblocks = $related . $rightblocks; ! } ! } elseif (empty($rightblocks)) { ! $tplfile = "index2colleft.tpl"; ! $leftblocks .= $related; ! } else { ! $tplfile = "index3col.tpl"; ! $rightblocks = $related . $rightblocks; ! } ! ! $t->set_file(article, $tplfile); //"article.tpl"); ! ! /* Now the comments */ ! ! if ($_PSL['module']['Comment']) { ! $cmtary['mode'] = $ary['mode']; ! $cmtary['order'] = $ary['order']; ! $cmtary['story_id'] = $ary['story_id']; ! $cmtary['parent_id'] = $ary['parent_id']; ! $cmt = pslNew("Comment",$cmtary); ! $comments = $cmt->getAllComments($cmtary); ! } else { ! $comments = ''; ! } ! ! $t->set_var('COMMENTS', $comments); ! ! /* Display the story */ ! ! $t->set_var(array( ! 'TITLE' => $title, ! 'BREADCRUMB' => $breadcrumb, ! 'STORY_ID' => $story_id, ! 'ROOTDIR' => $_PSL['rooturl'], ! 'IMAGEDIR' => $_PSL['imageurl'], ! 'STORY_COLUMN' => $emailform."\n".$story_html."\n".$comments, ! 'LEFT_BLOCK_COLUMN' => $leftblocks, ! 'CENTER_TOP_BLOCK_COLUMN' => $centertopblocks, ! 'RIGHT_BLOCK_COLUMN' => $rightblocks, ! // 'HEADER' => $header, ! // 'EMAILFORM' => $emailform, ! // 'STORY' => $story_html, ! // 'ARROWS' => $arrows, ! // 'FOOTER' => $footer, ! // 'RELATED' => $related, ! )); ! ! ! $updatearticlehits = $_PSL["article_updatehits"]; ! if (($updatearticlehits) AND ! ($story_html) ) { ! $q = "UPDATE psl_story ! SET hits = hits + 1 ! WHERE story_id = $story_id"; ! $db->query($q); ! } ! ! slashhead($ttitle,$_PSL['metatags']); ! ! debug('HTTP_COOKIE_VARS',$HTTP_COOKIE_VARS); ! ! $t->parse('PAGE', 'article'); ! $t->p('PAGE'); ! slashfoot(); ! ! } /* end of switch */ ! ! } else { ! slashhead("Article",$xsiteobject); ! titlebar("100%", "I´m sorry, no Article Number ".htmlentities($story_id)." found."); ! echo "<BR><BR>Maybe you're looking for a Poll? Try this <A HREF=\"" . $_PSL['rooturl'] . "/poll.php?submit=viewbooth&question_id=".htmlentities($story_id)."\">link</A>.<BR><BR>\n"; ! echo "If that doesn't work, then use the <a href=\"" . $_PSL['rooturl'] . "/search.php\">Search</A> Page."; ! slashfoot(); ! } ! ! page_close(); ?> --- 1,18 ---- <?php + // $Id$ ! global $_PSL, $ary; ! AddClassRequirement("story_base",$_PSL['moduledir'] . "/story/Story_base.class"); ! AddClassRequirement("story","story_base"); ! AddClassRequirement("story",$_PSL['moduledir'] . "/story/Story.class"); ! $pagetitle = pslgetText('Home'); // The name to be displayed in the header ! $xsiteobject = pslgetText('Home Page'); // This Defines The META Tag Object Type $story = pslNew("Story"); ! $content = $story->getStory($ary['story_id'], "full", $ary); + return $content; ?> Index: index.php =================================================================== RCS file: /cvsroot/phpslash/phpslash-dev/include/modules/story/index.php,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** index.php 22 May 2003 19:45:47 -0000 1.5 --- index.php 24 Jun 2003 19:32:34 -0000 1.6 *************** *** 13,17 **** $story = pslNew("Story"); ! $content = $story->getStories($ary); return $content; --- 13,23 ---- $story = pslNew("Story"); ! if(array_key_exists('story_id', $ary)) { ! // one particular story requested ! $content = $story->getStory($ary['story_id'], "full", $ary); ! } else { ! // otherwise show stories for the section ! $content = $story->getStories($ary); ! } return $content; |
From: Joe S. <joe...@us...> - 2003-06-24 19:32:38
|
Update of /cvsroot/phpslash/phpslash-dev/include/modules/block In directory sc8-pr-cvs1:/tmp/cvs-serv25920/phpslash-dev/include/modules/block Modified Files: Block_admin.class admin.php index.php Log Message: various bugfixes and classes into modules Index: Block_admin.class =================================================================== RCS file: /cvsroot/phpslash/phpslash-dev/include/modules/block/Block_admin.class,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** Block_admin.class 20 May 2003 17:52:00 -0000 1.3 --- Block_admin.class 24 Jun 2003 19:32:34 -0000 1.4 *************** *** 296,303 **** if( $option == "all") { ! $fulldirlist = dir($this->psl['moduledir'] ."/". $this->psl['module']['module.current'] ."/blocktypes/" ); $i=1; while( $eachfile = $fulldirlist->read()) { ! $each = $this->psl['moduledir'] ."/". $this->psl['module']['module.current'] ."/blocktypes/". $eachfile; if( (is_file($each)) AND ( preg_match('/Block_render_/i', $each)) AND --- 296,303 ---- if( $option == "all") { ! $fulldirlist = dir($this->psl['moduledir'] ."/". $this->psl['module']['Block'] ."/blocktypes/" ); $i=1; while( $eachfile = $fulldirlist->read()) { ! $each = $this->psl['moduledir'] ."/". $this->psl['module']['Block'] ."/blocktypes/". $eachfile; if( (is_file($each)) AND ( preg_match('/Block_render_/i', $each)) AND Index: admin.php =================================================================== RCS file: /cvsroot/phpslash/phpslash-dev/include/modules/block/admin.php,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** admin.php 20 May 2003 16:57:42 -0000 1.2 --- admin.php 24 Jun 2003 19:32:34 -0000 1.3 *************** *** 5,14 **** global $_PSL, $HTTP_POST_VARS, $HTTP_GET_VARS, $auth, $perm; ! AddClassRequirement("block",$_PSL['moduledir'] ."/block/Block.class"); AddClassRequirement("block_i","block"); ! AddClassRequirement("block_i",$_PSL['moduledir'] ."/block/Block_i.class"); ! AddClassRequirement("block_render_i",$_PSL['moduledir'] ."/block/Block_render_i.class"); AddClassRequirement("block_admin","block_i"); ! AddClassRequirement("block_admin",$_PSL['moduledir'] ."/block/Block_admin.class"); /* header title */ --- 5,14 ---- global $_PSL, $HTTP_POST_VARS, $HTTP_GET_VARS, $auth, $perm; ! AddClassRequirement("block",$_PSL['moduledir'] ."/". $_PSL['module']['Block'] ."/Block.class"); AddClassRequirement("block_i","block"); ! AddClassRequirement("block_i",$_PSL['moduledir'] ."/". $_PSL['module']['Block'] ."/Block_i.class"); ! AddClassRequirement("block_render_i",$_PSL['moduledir'] ."/". $_PSL['module']['Block'] ."/Block_render_i.class"); AddClassRequirement("block_admin","block_i"); ! AddClassRequirement("block_admin",$_PSL['moduledir'] ."/". $_PSL['module']['Block'] ."/Block_admin.class"); /* header title */ *************** *** 80,90 **** // expire cache for these section_id's ! $section_id_ary = $HTTP_POST_VARS['section_id_ary']; ! if(is_array($section_id_ary)) { ! foreach($section_id_ary as $key => $value) { ! jpcache_gc('string', "-section_id-" . $value, "100"); } } - } # break; --- 80,91 ---- // expire cache for these section_id's ! if(function_exists('jpcache_gc')) { ! $section_id_ary = $HTTP_POST_VARS['section_id_ary']; ! if(is_array($section_id_ary)) { ! foreach($section_id_ary as $key => $value) { ! jpcache_gc('string', "-section_id-" . $value, "100"); ! } } } } # break; Index: index.php =================================================================== RCS file: /cvsroot/phpslash/phpslash-dev/include/modules/block/index.php,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** index.php 15 May 2003 18:19:53 -0000 1.3 --- index.php 24 Jun 2003 19:32:34 -0000 1.4 *************** *** 5,12 **** // specify classes to load ! AddClassRequirement("block",$_PSL['moduledir'] ."/". $_PSL['module']['module.current'] ."/Block.class"); AddClassRequirement("block_i","block"); ! AddClassRequirement("block_i",$_PSL['moduledir'] ."/". $_PSL['module']['module.current'] ."/Block_i.class"); ! AddClassRequirement("block_render_i",$_PSL['moduledir'] ."/". $_PSL['module']['module.current'] ."/Block_render_i.class"); AddClassRequirement("block_admin","block_i"); --- 5,12 ---- // specify classes to load ! AddClassRequirement("block",$_PSL['moduledir'] ."/". $_PSL['module']['Block'] ."/Block.class"); AddClassRequirement("block_i","block"); ! AddClassRequirement("block_i",$_PSL['moduledir'] ."/". $_PSL['module']['Block'] ."/Block_i.class"); ! AddClassRequirement("block_render_i",$_PSL['moduledir'] ."/". $_PSL['module']['Block'] ."/Block_render_i.class"); AddClassRequirement("block_admin","block_i"); |
From: Joe S. <joe...@us...> - 2003-06-24 19:32:38
|
Update of /cvsroot/phpslash/phpslash-dev/public_html/admin In directory sc8-pr-cvs1:/tmp/cvs-serv25920/phpslash-dev/public_html/admin Modified Files: commentAdmin.php Log Message: various bugfixes and classes into modules Index: commentAdmin.php =================================================================== RCS file: /cvsroot/phpslash/phpslash-dev/public_html/admin/commentAdmin.php,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** commentAdmin.php 12 Mar 2003 16:12:57 -0000 1.1.1.1 --- commentAdmin.php 24 Jun 2003 19:32:35 -0000 1.2 *************** *** 1,213 **** <?php ! /* $Id$ */ ! ! /* TODO: */ ! ! require("config.php"); ! ! $pagetitle = pslgetText("Comment Administration"); // The name to be displayed in the header ! $xsiteobject = pslgetText("Administration"); // Defines The META TAG Page Type ! ! if (!is_object($sess)) { ! page_open($_PSL['page_features']); ! } ! /***************************** ! START OF PAGE ! *****************************/ ! ! $auth->login_if(!$perm->have_perm('comment')); ! ! /* DEBUG */ ! // debug("HTTP_POST_VARS", $HTTP_POST_VARS); ! // debug("HTTP_GET_VARS", $HTTP_GET_VARS); ! // debug("BulkDelete Array", $HTTP_POST_VARS[bulkdel_ary]); ! ! /* END DEBUG */ ! ! $cmt = pslNew("Comment"); ! ! $content = ''; ! ! if(!empty($HTTP_POST_VARS['action'])) { ! $action = clean($HTTP_POST_VARS['action'], true); ! } elseif (!empty($HTTP_GET_VARS['action'])) { ! $action = clean($HTTP_GET_VARS['action']); ! } else { ! $action = ''; ! } ! ! if($perm->have_perm("comment")) { ! switch ($action) { ! ! case "delete": ! if ($cmt->delete($HTTP_GET_VARS['comment_id'], $HTTP_GET_VARS['story_id'])) { ! $content .= pslgetText("The comment was deleted")."<br>\n"; ! ! // expire cache for this story_id ! jpcache_gc('string', "-story_id-" . $HTTP_GET_VARS['story_id'], "100"); ! ! } else { ! $content .= getError($cmt->getMessage()); ! } ! break; ! ! case pslgetText("Show Pending"): ! $content .= $cmt->showPending($HTTP_GET_VARS['story_id']); ! break; ! ! case pslgetText("Bulk Delete"): ! $bulkdel_ary = $HTTP_POST_VARS['bulkdel_ary']; ! if (count($bulkdel_ary) == 0) { ! $content .= getMessage("You didn't select any items to delete!"); ! } else { ! for ($i = 0 ; $i < count($bulkdel_ary) ; $i++) { ! if ($cmt->delete($bulkdel_ary[$i], $HTTP_POST_VARS['story_id'])) { ! $content .= sprintf(pslgetText("Comment # %s has been deleted."), $bulkdel_ary[$i])."\n"; ! // expire cache for this story_id ! jpcache_gc('string', "-story_id-" . $HTTP_POST_VARS['story_id'], "100"); ! ! } else { ! $content .= pslgetText("There was an ERROR deleting comment #") . $bulkdel_ary[$i] . "\n"; ! } ! } ! } ! break; ! ! case "markpend": ! $content .= getTitlebar("100%", "Mark Comment Pending"); ! if ($cmt->markPending($HTTP_GET_VARS['comment_id'], $HTTP_GET_VARS['story_id'])) { ! $content .= getMessage(sprintf(pslgetText("Marked comment # %s as pending"), $HTTP_GET_VARS['comment_id'])); ! } else { ! $content .= getError(sprintf(pslgetText("There was an ERROR marking comment # %s as pending."), $HTTP_GET_VARS['comment_id'])); ! } ! break; ! case "unmarkpend": ! $content .= getTitlebar("100%","Unmark Pending Comment"); ! if ($cmt->unmarkPending($HTTP_GET_VARS['comment_id'], $HTTP_GET_VARS['story_id'])) { ! $content .= getMessage(sprintf(pslgetText("Unmarked pending comment %s"), $HTTP_GET_VARS['comment_id'])); ! } else { ! $content .= getError("There was an ERROR unmarking the comment as pending."); ! } ! break; ! ! case "reparentupone": ! if ($cmt->reparentUp($HTTP_GET_VARS['comment_id'], $HTTP_GET_VARS['story_id'])) { ! $content .= getMessage("The comment was moved up one level."); ! ! // expire cache for this story_id ! jpcache_gc('string', "-story_id-" . $HTTP_GET_VARS['story_id'], "100"); ! ! } else { ! $content .= getError($cmt->getMessage()); ! } ! break; ! ! case "reparentuptop": ! if ($cmt->reparentTop($HTTP_GET_VARS['comment_id'], $HTTP_GET_VARS['story_id'])) { ! $content .= getMessage("The comment was moved to the top."); ! ! // expire cache for this story_id ! jpcache_gc('string', "-story_id-" . $HTTP_GET_VARS['story_id'], "100"); ! ! } else { ! $content .= getError($cmt->getMessage()); ! } ! break; ! ! case "edit": ! $content .= getTitlebar("100%","Edit Comment"); ! $returned = $cmt->commentEdit($HTTP_GET_VARS); ! if($returned) { ! $content .= $returned; ! } else { ! $content .= getError($cmt->getMessage()); ! } ! break; ! ! case "update": ! if($cmt->update($HTTP_POST_VARS)) { ! $content .= getMessage($cmt->getMessage()); ! ! // expire cache for this story_id ! jpcache_gc('string', "-story_id-" . $HTTP_POST_VARS['story_id'], "100"); ! ! } else { ! $content .= getError($cmt->getMessage()); ! } ! $returned = $cmt->commentEdit(); ! if($returned) { ! $content .= $returned; ! } else { ! $content .= getError($cmt->getMessage()); ! } ! break; ! default: ! $content .= getTitlebar("100%", "Error! No Action"); ! $content .= "This is how the Comment Administration works. You tell the \$action variable what you want to do, and then I go about doing it. You're getting this message because I didn't find an \$action variable that I could use. This is what \$action is right now: '$action'\n"; ! } ! } else { ! $content = getTitlebar("100%","Error! Invalid Privileges"); ! $content .= "Sorry. You do not have the necessary privilege to view this page."; } - $block = pslNew("Block_i"); - $ary['section'] = "Admin"; - - // $breadcrumb = breadcrumb($ary); - $_PSL['metatags']['object'] = $xsiteobject; ! slashhead($pagetitle,$_PSL['metatags']); ! ! $leftblocks = $block->getBlocks($ary, "left"); ! $centerblocks = $block->getBlocks($ary, "center"); ! $rightblocks = $block->getBlocks($ary, "right"); ! if (empty($leftblocks)) { ! if (empty($rightblocks)) { ! // $centerblocks = $block->getBlocks($ary); ! $tplfile = "index1col.tpl"; ! } else { ! $tplfile = 'index2colright.tpl'; ! } ! } elseif (empty($rightblocks)) { ! $tplfile = 'index2colleft.tpl'; ! } else { ! $tplfile = 'index3col.tpl'; ! } ! $template = pslNew("slashTemplate",$_PSL['templatedir']); ! $template->debug = 0; ! $template->set_file(array( ! 'index' => $tplfile //"index3col.tpl" ! )); ! if( !empty($GLOBALS['QUERY_STRING'])) { ! $QUERY_STRING = '?'.$GLOBALS['QUERY_STRING']; ! } else { ! $QUERY_STRING = ''; ! } ! ! $template->set_var(array( ! 'QUERYSTRING' => $QUERY_STRING, ! 'ROOTDIR' => $_PSL['rooturl'], ! 'IMAGEDIR' => $_PSL['imageurl'], ! 'BREADCRUMB' => $breadcrumb, ! 'STORY_COLUMN' => $content, ! 'LEFT_BLOCK_COLUMN' => $leftblocks, ! 'CENTER_BLOCK_COLUMN' => $centerblocks, ! 'RIGHT_BLOCK_COLUMN' => $rightblocks ! )); ! $template->parse('OUT','index'); ! $template->p('OUT'); - slashfoot(); page_close(); - - - ?> --- 1,30 ---- <?php + // $Id$ ! require('config.php'); ! $pagetitle = pslgetText('Comment') .' '. pslgetText('Administration'); // The name to be displayed in the header ! $xsiteobject = pslgetText('Comment') .' '. pslgetText('Administration Page'); // This Defines The META Tag Object Type ! if(!empty($HTTP_GET_VARS['login'])) { ! $auth->login_if($HTTP_GET_VARS['login']); } $_PSL['metatags']['object'] = $xsiteobject; ! // Objects ! $ary['module'] = 'Comment'; ! $ary['section'] = 'Admin'; ! $ary['page'] = 'admin'; ! // setup the block module ! $content = include($_PSL['moduledir'] ."/". $_PSL['module']['Block'] ."/index.php"); ! $block = pslNew("Block_i"); ! //show Page ! echo $content; page_close(); ?> |
Update of /cvsroot/phpslash/phpslash-dev/include/modules/block/blocktypes In directory sc8-pr-cvs1:/tmp/cvs-serv25920/phpslash-dev/include/modules/block/blocktypes Modified Files: Block_render_module.class Block_render_navbar.class Block_render_poll.class Block_render_topicbar.class Log Message: various bugfixes and classes into modules Index: Block_render_module.class =================================================================== RCS file: /cvsroot/phpslash/phpslash-dev/include/modules/block/blocktypes/Block_render_module.class,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** Block_render_module.class 17 Apr 2003 23:33:47 -0000 1.1 --- Block_render_module.class 24 Jun 2003 19:32:34 -0000 1.2 *************** *** 50,56 **** // assemble the full file path $modulefilepath = $moduledir ."/". $modulefilename .".php"; ! // get the data from the module ! $this->output = include($modulefilepath); return true; --- 50,64 ---- // assemble the full file path $modulefilepath = $moduledir ."/". $modulefilename .".php"; ! ! // set the current module ( for finding the templates) ! $this->psl['module']['module.current'] = $module; ! // get the data from the module ! if(file_exists($modulefilepath)) { ! $this->output = include($modulefilepath); ! } ! ! // reset the current module ! $this->psl['module']['module.current'] = ''; return true; Index: Block_render_navbar.class =================================================================== RCS file: /cvsroot/phpslash/phpslash-dev/include/modules/block/blocktypes/Block_render_navbar.class,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** Block_render_navbar.class 4 Jun 2003 20:02:45 -0000 1.2 --- Block_render_navbar.class 24 Jun 2003 19:32:34 -0000 1.3 *************** *** 15,19 **** function parse($block_info) { ! $default_tpl = "navbarBlock"; --- 15,21 ---- function parse($block_info) { ! ! addClassRequirement("navbar",$this->psl['moduledir'] ."/". $this->psl['module']['NavBar'] ."/NavBar.class"); ! $default_tpl = "navbarBlock"; Index: Block_render_poll.class =================================================================== RCS file: /cvsroot/phpslash/phpslash-dev/include/modules/block/blocktypes/Block_render_poll.class,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** Block_render_poll.class 6 Jun 2003 17:00:09 -0000 1.3 --- Block_render_poll.class 24 Jun 2003 19:32:34 -0000 1.4 *************** *** 22,26 **** AddClassRequirement("poll",$_PSL['moduledir'] . "/poll/Poll.class"); ! $this->poll = pslNew("Poll"); --- 22,28 ---- AddClassRequirement("poll",$_PSL['moduledir'] . "/poll/Poll.class"); ! ! $this->psl['module']['module.current'] = 'Poll'; ! $this->poll = pslNew("Poll"); *************** *** 32,35 **** --- 34,40 ---- } $this->output = $this->poll->getPollBooth($question_id); + + $this->psl['module']['module.current'] = ''; + unset($this->poll); } Index: Block_render_topicbar.class =================================================================== RCS file: /cvsroot/phpslash/phpslash-dev/include/modules/block/blocktypes/Block_render_topicbar.class,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** Block_render_topicbar.class 17 Apr 2003 23:33:47 -0000 1.1 --- Block_render_topicbar.class 24 Jun 2003 19:32:34 -0000 1.2 *************** *** 17,20 **** --- 17,22 ---- function parse($block_info) { + addClassRequirement("topicbar",$this->psl['moduledir'] ."/". $this->psl['module']['TopicBar'] ."/TopicBar.class"); + $topicbar = pslNew("TopicBar"); $this->output = $topicbar->getTopicBar(); |
From: Joe S. <joe...@us...> - 2003-06-24 19:32:37
|
Update of /cvsroot/phpslash/phpslash-dev/include/modules/author In directory sc8-pr-cvs1:/tmp/cvs-serv25920/phpslash-dev/include/modules/author Modified Files: admin.php Log Message: various bugfixes and classes into modules Index: admin.php =================================================================== RCS file: /cvsroot/phpslash/phpslash-dev/include/modules/author/admin.php,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** admin.php 20 May 2003 16:40:23 -0000 1.3 --- admin.php 24 Jun 2003 19:32:34 -0000 1.4 *************** *** 3,7 **** /* $Id$ */ ! global $_PSL, $HTTP_POST_VARS, $HTTP_GET_VARS, $auth, $perm; AddClassRequirement("author",$_PSL['moduledir'] ."/author/Author.class"); --- 3,7 ---- /* $Id$ */ ! global $_PSL, $HTTP_POST_VARS, $HTTP_GET_VARS, $sess, $auth, $perm; AddClassRequirement("author",$_PSL['moduledir'] ."/author/Author.class"); |
From: Joe S. <joe...@us...> - 2003-06-24 19:32:37
|
Update of /cvsroot/phpslash/phpslash-dev/include/class In directory sc8-pr-cvs1:/tmp/cvs-serv25920/phpslash-dev/include/class Modified Files: slashTemplate.class Log Message: various bugfixes and classes into modules Index: slashTemplate.class =================================================================== RCS file: /cvsroot/phpslash/phpslash-dev/include/class/slashTemplate.class,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** slashTemplate.class 21 May 2003 20:51:51 -0000 1.4 --- slashTemplate.class 24 Jun 2003 19:32:34 -0000 1.5 *************** *** 87,124 **** // module templates in skin directory $status = Template::set_file($varname, $filepath); ! // disabled until further testing can be done - jvs - 05/21/2003 ! // } elseif(file_exists($this->psl['moduledir'] ."/". $this->psl['module'][$this->ary['module']] ."/templates/" . basename($filename))) { ! // module templates in module subdirectory ! // $filepath = $this->psl['moduledir'] ."/". $this->psl['module'][$this->ary['module']] ."/templates/" . basename($filename); ! // $status = Template::set_file($varname, $filepath); ! // } elseif( file_exists($templatedir ."/". $this->psl['module'][$this->ary['module']] ."/". basename($filename))) { ! // module templates in subdirectory of skin ! // $filepath = $templatedir ."/". $this->psl['module'][$this->ary['module']] ."/". basename($filename); ! // $status = Template::set_file($varname, $filepath); ! } elseif(!file_exists($templatedir ."/skin.ini")) { ! // no parent skin ! // see if the defaults work ! if(!$this->set_file($varname, $filename, $this->psl['defaultskin'], $this->psl['language.default'])) { ! // 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; ! } ! $status = true; ! } else { $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)) { ! $status = true; } elseif($this->set_file($varname, $filename, $skin_cfg['skin.parent'], $this->psl['language.default'])) { ! $status = true; } // $status = false; // $this->message = "set_file: set_file: For varname $varname filename $filepath is invalid."; // $this->halt($this->message); ! } // return $status; --- 87,128 ---- // 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); ! } elseif(!$this->set_file($varname, $filename, $this->psl['defaultskin'], $this->psl['language.default'])) { ! // 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; ! } ! // $status = true; ! } // return $status; |
From: Joe S. <joe...@us...> - 2003-06-09 19:10:22
|
Update of /cvsroot/phpslash/phpslash-dev In directory sc8-pr-cvs1:/tmp/cvs-serv4184/phpslash-dev Modified Files: CHANGES Log Message: submission/index.php - display specific save errors. Index: CHANGES =================================================================== RCS file: /cvsroot/phpslash/phpslash-dev/CHANGES,v retrieving revision 1.31 retrieving revision 1.32 diff -C2 -d -r1.31 -r1.32 *** CHANGES 6 Jun 2003 17:00:08 -0000 1.31 --- CHANGES 9 Jun 2003 19:10:18 -0000 1.32 *************** *** 13,16 **** --- 13,20 ---- 9 - Removal of something (kill -9 :) + 2003-June 9 2:00PM CDT Joe Stewart <joe...@us...> + [B] - submission/index.php - display specific save errors. Closes + bug [ 750107 ] Submittal errors don't display correct error message. + 2003-June 5 4:00PM CDT Joe Stewart <joe...@us...> [B] - Block_render_poll.class - remove module directive. |
From: Joe S. <joe...@us...> - 2003-06-09 19:10:22
|
Update of /cvsroot/phpslash/phpslash-dev/include/modules/submission In directory sc8-pr-cvs1:/tmp/cvs-serv4184/phpslash-dev/include/modules/submission Modified Files: index.php Log Message: submission/index.php - display specific save errors. Index: index.php =================================================================== RCS file: /cvsroot/phpslash/phpslash-dev/include/modules/submission/index.php,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** index.php 15 May 2003 18:19:54 -0000 1.3 --- index.php 9 Jun 2003 19:10:18 -0000 1.4 *************** *** 4,9 **** global $_PSL, $HTTP_POST_VARS, $ary; - global $_PSL, $HTTP_POST_VARS, $ary; - AddClassRequirement("submission",$_PSL['moduledir'] . "/submission/Submission.class"); --- 4,7 ---- *************** *** 45,49 **** } } else { ! $content .= "<FONT COLOR=RED>".pslgetText("Something broke, I'm not sure what though??")."</FONT>\n"; } break; --- 43,47 ---- } } else { ! $content .= getError($submission->getMessage()); } break; |
From: Joe S. <joe...@us...> - 2003-06-09 19:09:18
|
Update of /cvsroot/phpslash/phpslash-ft/public_html In directory sc8-pr-cvs1:/tmp/cvs-serv3840/phpslash-ft/public_html Modified Files: submission.php3 Log Message: submission.php - display specific save errors. Index: submission.php3 =================================================================== RCS file: /cvsroot/phpslash/phpslash-ft/public_html/submission.php3,v retrieving revision 1.22 retrieving revision 1.23 diff -C2 -d -r1.22 -r1.23 *** submission.php3 3 Apr 2003 20:08:47 -0000 1.22 --- submission.php3 9 Jun 2003 19:09:13 -0000 1.23 *************** *** 58,62 **** } } else { ! $content .= "<FONT COLOR=RED>".pslgetText("Something broke, I'm not sure what though??")."</FONT>\n"; } break; --- 58,62 ---- } } else { ! $content .= getError($submission->getMessage()); } break; |
From: Joe S. <joe...@us...> - 2003-06-09 19:09:17
|
Update of /cvsroot/phpslash/phpslash-ft In directory sc8-pr-cvs1:/tmp/cvs-serv3840/phpslash-ft Modified Files: CHANGES Log Message: submission.php - display specific save errors. Index: CHANGES =================================================================== RCS file: /cvsroot/phpslash/phpslash-ft/CHANGES,v retrieving revision 1.773 retrieving revision 1.774 diff -C2 -d -r1.773 -r1.774 *** CHANGES 3 Jun 2003 16:48:50 -0000 1.773 --- CHANGES 9 Jun 2003 19:09:13 -0000 1.774 *************** *** 13,16 **** --- 13,20 ---- 9 - Removal of something (kill -9 :) + 2003-June 9 2:00PM CDT Joe Stewart <joe...@us...> + [B] - submission.php - display specific save errors. Closes + bug [ 750107 ] Submittal errors don't display correct error message. + 2003-June 3 11:30AM CDT Joe Stewart <joe...@us...> [B] - functions.inc - clean function recursive call was overwriting its |
From: Joe S. <joe...@us...> - 2003-06-06 17:06:50
|
Update of /cvsroot/phpslash/phpslash-dev/tables/0.7 In directory sc8-pr-cvs1:/tmp/cvs-serv31771/phpslash-dev/tables/0.7 Modified Files: slash-all.sql Log Message: poll block - remove poll module directive Index: slash-all.sql =================================================================== RCS file: /cvsroot/phpslash/phpslash-dev/tables/0.7/slash-all.sql,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** slash-all.sql 16 May 2003 21:10:22 -0000 1.7 --- slash-all.sql 6 Jun 2003 17:06:47 -0000 1.8 *************** *** 203,207 **** -- ! INSERT INTO psl_block (id, type, title, expire_length, location, source_url, cache_data, block_options, ordernum, date_issued) VALUES (131,5,'PHPSlash Poll',1200,'','','','a:2:{s:5:\"width\";s:3:\"160\";s:6:\"column\";s:5:\"right\";}',0,1052418103); INSERT INTO psl_block (id, type, title, expire_length, location, source_url, cache_data, block_options, ordernum, date_issued) VALUES (139,7,'Sections',3600,'','','','a:2:{s:6:\"column\";s:4:\"left\";s:5:\"width\";s:3:\"160\";}',90,1053009559); INSERT INTO psl_block (id, type, title, expire_length, location, source_url, cache_data, block_options, ordernum, date_issued) VALUES (130,4,'%%',3600,'','','','a:2:{s:6:\"column\";s:5:\"right\";s:5:\"width\";s:3:\"160\";}',89,1052418103); --- 203,207 ---- -- ! INSERT INTO psl_block (id, type, title, expire_length, location, source_url, cache_data, block_options, ordernum, date_issued) VALUES (131,5,'PHPSlash Poll',1200,'','','','a:2:{s:5:\"width\";s:3:\"160\";s:6:\"column\";s:5:\"right\";}',20,1052418103); INSERT INTO psl_block (id, type, title, expire_length, location, source_url, cache_data, block_options, ordernum, date_issued) VALUES (139,7,'Sections',3600,'','','','a:2:{s:6:\"column\";s:4:\"left\";s:5:\"width\";s:3:\"160\";}',90,1053009559); INSERT INTO psl_block (id, type, title, expire_length, location, source_url, cache_data, block_options, ordernum, date_issued) VALUES (130,4,'%%',3600,'','','','a:2:{s:6:\"column\";s:5:\"right\";s:5:\"width\";s:3:\"160\";}',89,1052418103); |
From: Joe S. <joe...@us...> - 2003-06-06 17:00:13
|
Update of /cvsroot/phpslash/phpslash-dev/include/modules/poll In directory sc8-pr-cvs1:/tmp/cvs-serv28136/phpslash-dev/include/modules/poll Modified Files: admin.php Log Message: poll block - remove poll module directive Index: admin.php =================================================================== RCS file: /cvsroot/phpslash/phpslash-dev/include/modules/poll/admin.php,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** admin.php 20 May 2003 17:07:10 -0000 1.2 --- admin.php 6 Jun 2003 17:00:08 -0000 1.3 *************** *** 17,28 **** $min = ''; if(!empty($HTTP_POST_VARS['submit'])) { $submit = clean($HTTP_POST_VARS['submit']); ! $question_id = clean($HTTP_POST_VARS['question_id']); } elseif (!empty($HTTP_GET_VARS['submit'])) { $submit = clean($HTTP_GET_VARS['submit']); ! $question_id = clean($HTTP_GET_VARS['question_id']); ! $min = clean($HTTP_GET_VARS['min']); } else { $submit = ''; --- 17,35 ---- $min = ''; + $question_id = ''; if(!empty($HTTP_POST_VARS['submit'])) { $submit = clean($HTTP_POST_VARS['submit']); ! if(array_key_exists('question_id', $HTTP_POST_VARS)) { ! $question_id = clean($HTTP_POST_VARS['question_id']); ! } } elseif (!empty($HTTP_GET_VARS['submit'])) { $submit = clean($HTTP_GET_VARS['submit']); ! if(array_key_exists('question_id', $HTTP_GET_VARS)) { ! $question_id = clean($HTTP_GET_VARS['question_id']); ! } ! if(array_key_exists('min', $HTTP_GET_VARS)) { ! $min = clean($HTTP_GET_VARS['min']); ! } } else { $submit = ''; *************** *** 48,53 **** // expire cache for this question_id ! jpcache_gc('string', "-question_id-" . $HTTP_POST_VARS['question_id'], "100"); ! } else { $content .= getError($poll->message); --- 55,61 ---- // expire cache for this question_id ! if(function_exists('jpcache_gc')) { ! jpcache_gc('string', "-question_id-" . $HTTP_POST_VARS['question_id'], "100"); ! } } else { $content .= getError($poll->message); |
From: Joe S. <joe...@us...> - 2003-06-06 17:00:13
|
Update of /cvsroot/phpslash/phpslash-dev/include/modules/story In directory sc8-pr-cvs1:/tmp/cvs-serv28136/phpslash-dev/include/modules/story Modified Files: Story_base.class Log Message: poll block - remove poll module directive Index: Story_base.class =================================================================== RCS file: /cvsroot/phpslash/phpslash-dev/include/modules/story/Story_base.class,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** Story_base.class 5 Jun 2003 21:25:22 -0000 1.5 --- Story_base.class 6 Jun 2003 17:00:07 -0000 1.6 *************** *** 304,311 **** $start = 0; - - // disable setting the start point in the url till - // memory problems corrected. - jvs - 06/05/2003 - /* $start_set = FALSE; if (empty($argv_ary['start'])) { --- 304,307 ---- *************** *** 316,323 **** $start = $argv_ary['start']; } ! */ ! $start = 0; ! $start_set = TRUE; ! $argv_ary['start'] = 0; /* --- 312,316 ---- $start = $argv_ary['start']; } ! /* |
From: Joe S. <joe...@us...> - 2003-06-06 17:00:13
|
Update of /cvsroot/phpslash/phpslash-dev/include/modules/block/blocktypes In directory sc8-pr-cvs1:/tmp/cvs-serv28136/phpslash-dev/include/modules/block/blocktypes Modified Files: Block_render_poll.class Log Message: poll block - remove poll module directive Index: Block_render_poll.class =================================================================== RCS file: /cvsroot/phpslash/phpslash-dev/include/modules/block/blocktypes/Block_render_poll.class,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** Block_render_poll.class 15 May 2003 18:19:54 -0000 1.2 --- Block_render_poll.class 6 Jun 2003 17:00:09 -0000 1.3 *************** *** 23,28 **** AddClassRequirement("poll",$_PSL['moduledir'] . "/poll/Poll.class"); - $ary['module'] = "Poll"; - $this->poll = pslNew("Poll"); --- 23,26 ---- |
From: Joe S. <joe...@us...> - 2003-06-06 17:00:13
|
Update of /cvsroot/phpslash/phpslash-dev/include/modules/block In directory sc8-pr-cvs1:/tmp/cvs-serv28136/phpslash-dev/include/modules/block Modified Files: Block.class Log Message: poll block - remove poll module directive Index: Block.class =================================================================== RCS file: /cvsroot/phpslash/phpslash-dev/include/modules/block/Block.class,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** Block.class 16 May 2003 17:09:52 -0000 1.6 --- Block.class 6 Jun 2003 17:00:08 -0000 1.7 *************** *** 494,498 **** // register the class AddClassRequirement($parserName,"block_render_i"); ! AddClassRequirement($parserName,$this->psl['moduledir'] ."/". $this->psl['module']['module.current'] ."/blocktypes/". $parserFile); static $parser_arr; --- 494,498 ---- // register the class AddClassRequirement($parserName,"block_render_i"); ! AddClassRequirement($parserName,$this->psl['moduledir'] ."/block/blocktypes/". $parserFile); static $parser_arr; |
From: Joe S. <joe...@us...> - 2003-06-06 17:00:13
|
Update of /cvsroot/phpslash/phpslash-dev In directory sc8-pr-cvs1:/tmp/cvs-serv28136/phpslash-dev Modified Files: CHANGES Log Message: poll block - remove poll module directive Index: CHANGES =================================================================== RCS file: /cvsroot/phpslash/phpslash-dev/CHANGES,v retrieving revision 1.30 retrieving revision 1.31 diff -C2 -d -r1.30 -r1.31 *** CHANGES 5 Jun 2003 21:24:17 -0000 1.30 --- CHANGES 6 Jun 2003 17:00:08 -0000 1.31 *************** *** 14,17 **** --- 14,23 ---- 2003-June 5 4:00PM CDT Joe Stewart <joe...@us...> + [B] - Block_render_poll.class - remove module directive. + poll/admin.php - reduce php warnings + block/admin.php - sess object definition + Story_base.class - extractStories - restore start from url variables. + + 2003-June 5 4:00PM CDT Joe Stewart <joe...@us...> [B] - Story_base.class - extractStories - remove start from url variables. Attempting to kill a memory allocation bug. |
From: Joe S. <joe...@us...> - 2003-06-05 21:33:14
|
Update of /cvsroot/phpslash/phpslash-dev/public_html/admin In directory sc8-pr-cvs1:/tmp/cvs-serv17946/phpslash-dev/public_html/admin Modified Files: blockAdmin.php Log Message: extractStories - remove start from url variables. Index: blockAdmin.php =================================================================== RCS file: /cvsroot/phpslash/phpslash-dev/public_html/admin/blockAdmin.php,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** blockAdmin.php 16 May 2003 17:09:52 -0000 1.4 --- blockAdmin.php 5 Jun 2003 21:24:16 -0000 1.5 *************** *** 23,27 **** $_PSL['module']['module.current'] = $_PSL['module']['Block']; $content = include($_PSL['moduledir'] ."/". $_PSL['module']['module.current'] ."/index.php"); - $block = pslNew("Block_i"); //show Page --- 23,26 ---- |
From: Joe S. <joe...@us...> - 2003-06-05 21:33:13
|
Update of /cvsroot/phpslash/phpslash-dev In directory sc8-pr-cvs1:/tmp/cvs-serv17946/phpslash-dev Modified Files: CHANGES Log Message: extractStories - remove start from url variables. Index: CHANGES =================================================================== RCS file: /cvsroot/phpslash/phpslash-dev/CHANGES,v retrieving revision 1.29 retrieving revision 1.30 diff -C2 -d -r1.29 -r1.30 *** CHANGES 4 Jun 2003 20:02:44 -0000 1.29 --- CHANGES 5 Jun 2003 21:24:17 -0000 1.30 *************** *** 13,16 **** --- 13,21 ---- 9 - Removal of something (kill -9 :) + 2003-June 5 4:00PM CDT Joe Stewart <joe...@us...> + [B] - Story_base.class - extractStories - remove start from url variables. + Attempting to kill a memory allocation bug. + blockAdmin.php - don't start a new block object. + 2003-June 4 3:00PM CDT Joe Stewart <joe...@us...> [W] - Block_render_navbar.class, Block_render_page.class, |
From: Joe S. <joe...@us...> - 2003-06-05 21:28:43
|
Update of /cvsroot/phpslash/phpslash-dev/include/class In directory sc8-pr-cvs1:/tmp/cvs-serv19870/phpslash-dev/include/class Modified Files: functions.inc Log Message: extractStories - remove start from url variables. Index: functions.inc =================================================================== RCS file: /cvsroot/phpslash/phpslash-dev/include/class/functions.inc,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** functions.inc 3 Jun 2003 20:00:16 -0000 1.6 --- functions.inc 5 Jun 2003 21:28:40 -0000 1.7 *************** *** 680,684 **** if(is_array($val)) { // recursively call - if array value is itself an array. ! $clean = clean($val, $allow_html); } else { if ($allow_html) { --- 680,684 ---- if(is_array($val)) { // recursively call - if array value is itself an array. ! $clean[$key] = clean($val, $allow_html); } else { if ($allow_html) { |
From: Joe S. <joe...@us...> - 2003-06-05 21:25:26
|
Update of /cvsroot/phpslash/phpslash-dev/include/modules/story In directory sc8-pr-cvs1:/tmp/cvs-serv18333/phpslash-dev/include/modules/story Modified Files: Story_base.class Log Message: extractStories - remove start from url variables. Index: Story_base.class =================================================================== RCS file: /cvsroot/phpslash/phpslash-dev/include/modules/story/Story_base.class,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** Story_base.class 3 Jun 2003 20:00:17 -0000 1.4 --- Story_base.class 5 Jun 2003 21:25:22 -0000 1.5 *************** *** 304,307 **** --- 304,311 ---- $start = 0; + + // disable setting the start point in the url till + // memory problems corrected. - jvs - 06/05/2003 + /* $start_set = FALSE; if (empty($argv_ary['start'])) { *************** *** 312,316 **** $start = $argv_ary['start']; } ! /* --- 316,323 ---- $start = $argv_ary['start']; } ! */ ! $start = 0; ! $start_set = TRUE; ! $argv_ary['start'] = 0; /* |
From: Luis M <le...@us...> - 2003-06-05 17:48:03
|
Update of /cvsroot/phpslash/phpslash-dev/public_html In directory sc8-pr-cvs1:/tmp/cvs-serv8061 Modified Files: .cvsignore Log Message: added htaccess file to ignore Index: .cvsignore =================================================================== RCS file: /cvsroot/phpslash/phpslash-dev/public_html/.cvsignore,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** .cvsignore 16 Apr 2003 19:48:50 -0000 1.1 --- .cvsignore 5 Jun 2003 17:48:00 -0000 1.2 *************** *** 1,2 **** --- 1,3 ---- config.php config.ini.php + .htaccess |
From: Joe S. <joe...@us...> - 2003-06-04 20:02:49
|
Update of /cvsroot/phpslash/phpslash-dev In directory sc8-pr-cvs1:/tmp/cvs-serv2591/phpslash-dev Modified Files: CHANGES Log Message: reduce php warnings Index: CHANGES =================================================================== RCS file: /cvsroot/phpslash/phpslash-dev/CHANGES,v retrieving revision 1.28 retrieving revision 1.29 diff -C2 -d -r1.28 -r1.29 *** CHANGES 28 May 2003 02:11:42 -0000 1.28 --- CHANGES 4 Jun 2003 20:02:44 -0000 1.29 *************** *** 13,16 **** --- 13,20 ---- 9 - Removal of something (kill -9 :) + 2003-June 4 3:00PM CDT Joe Stewart <joe...@us...> + [W] - Block_render_navbar.class, Block_render_page.class, + Block_render_template.class - reduce php warnings. + 2003-May 28 02:07 UTC Luis Mondesi < le...@ho... > [B] - locale/es.php missing comma at line 325. Thanks to Jose Reyes for reporting this. |
From: Joe S. <joe...@us...> - 2003-06-04 20:02:49
|
Update of /cvsroot/phpslash/phpslash-dev/include/modules/block/blocktypes In directory sc8-pr-cvs1:/tmp/cvs-serv2591/phpslash-dev/include/modules/block/blocktypes Modified Files: Block_render_navbar.class Block_render_page.class Block_render_template.class Log Message: reduce php warnings Index: Block_render_navbar.class =================================================================== RCS file: /cvsroot/phpslash/phpslash-dev/include/modules/block/blocktypes/Block_render_navbar.class,v retrieving revision 1.1.1.1 retrieving revision 1.2 diff -C2 -d -r1.1.1.1 -r1.2 *** Block_render_navbar.class 12 Mar 2003 16:12:55 -0000 1.1.1.1 --- Block_render_navbar.class 4 Jun 2003 20:02:45 -0000 1.2 *************** *** 28,32 **** $navbar = pslNew("NavBar"); //$navbar->getNavBar("navbarBlock"); ! $this->output = $navbar->getNavBar( $tpl, $this->psl[$menu_ary]); //$block_info["cache_data"]; return 1; --- 28,36 ---- $navbar = pslNew("NavBar"); //$navbar->getNavBar("navbarBlock"); ! if (!empty($menu_ary)) { ! $this->output = $navbar->getNavBar( $tpl, $this->psl[$menu_ary]); ! } else { ! $this->output = $navbar->getNavBar( $tpl); ! } //$block_info["cache_data"]; return 1; Index: Block_render_page.class =================================================================== RCS file: /cvsroot/phpslash/phpslash-dev/include/modules/block/blocktypes/Block_render_page.class,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** Block_render_page.class 23 May 2003 16:45:31 -0000 1.3 --- Block_render_page.class 4 Jun 2003 20:02:45 -0000 1.4 *************** *** 73,77 **** ! if(is_object($GLOBALS['template'])) { $template = $GLOBALS['template']; } else { --- 73,77 ---- ! if(array_key_exists('template', $GLOBALS) && is_object($GLOBALS['template'])) { $template = $GLOBALS['template']; } else { *************** *** 95,99 **** 'IMAGEDIR' => $this->psl['imageurl'], 'BREADCRUMB' => $breadcrumb, ! 'STORY_COLUMN' => $allstories, 'TOP' => $topblocks, 'LEFT_BLOCK_COLUMN' => $leftblocks, --- 95,99 ---- 'IMAGEDIR' => $this->psl['imageurl'], 'BREADCRUMB' => $breadcrumb, ! // 'STORY_COLUMN' => $allstories, 'TOP' => $topblocks, 'LEFT_BLOCK_COLUMN' => $leftblocks, Index: Block_render_template.class =================================================================== RCS file: /cvsroot/phpslash/phpslash-dev/include/modules/block/blocktypes/Block_render_template.class,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** Block_render_template.class 16 May 2003 21:10:22 -0000 1.1 --- Block_render_template.class 4 Jun 2003 20:02:45 -0000 1.2 *************** *** 27,31 **** if(!empty($tpl)){ ! if(is_object($GLOBALS['template'])) { $template = $GLOBALS['template']; } else { --- 27,31 ---- if(!empty($tpl)){ ! if(array_key_exists('template', $GLOBALS) && is_object($GLOBALS['template'])) { $template = $GLOBALS['template']; } else { |
From: Luis M <le...@us...> - 2003-06-03 20:00:50
|
Update of /cvsroot/phpslash/phpslash-dev/include/class In directory sc8-pr-cvs1:/tmp/cvs-serv28824/include/class Modified Files: functions.inc Log Message: upload file option for php Index: functions.inc =================================================================== RCS file: /cvsroot/phpslash/phpslash-dev/include/class/functions.inc,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** functions.inc 23 May 2003 16:44:47 -0000 1.5 --- functions.inc 3 Jun 2003 20:00:16 -0000 1.6 *************** *** 1746,1748 **** --- 1746,1870 ---- } // end of function displayOptions + /** + * parse_upload - parse file uploaded via forms + * + * @access private + * @param PATH to file + * + * @return string + */ + + + function parse_upload($PATH){ + + $fp = @fopen($PATH,"r"); // is file here? + + if ($fp) { + $binary_junk = fread($fp, @filesize($PATH)); + } else { + // this should call debug() here + $binary_junk = "ERROR: Missing filename or filename not found. PATH: $PATH"; + } + // you may want to do a lot of nice things to the text + // before returning it... but, let's leave it as is for now + $binary_junk = ereg_replace("((\015\012)|(\015)|(\012))","<br>\n",$binary_junk); + return $binary_junk; + } + + /************************************************************* + * The following function helps replace international characters + * when emailing, from HTML to plain text code mappings + * Luis Mondesi < le...@ho... > + **************************************************************/ + function clean_latin($s = "") { + // I like perl regex (preg_replace) better, but + // ereg_replace does the job better in this case + // clean swedish characters: + $s=ereg_replace("Å",197,$s); // do not be insensitive + $s=ereg_replace("Ä",196,$s); + $s=ereg_replace("Ö",214,$s); + $s=ereg_replace("å",229,$s); + $s=ereg_replace("ä",228,$s); + $s=ereg_replace("ö",246,$s); + + // clean remaining latin characters: + $s=ereg_replace("ñ",241,$s); + $s=ereg_replace("Ñ",209,$s); + // some french + $s=ereg_replace("î",238,$s); + $s=ereg_replace("Î",206,$s); + // some spanish + $s=ereg_replace("á",225,$s); // lower case + $s=ereg_replace("é",233,$s); // these vowels almost + $s=ereg_replace("í",237,$s); // never are to be used + $s=ereg_replace("ó",243,$s); // upper case -- at least + $s=ereg_replace("ú",250,$s); // not in spanish + $s=ereg_replace("Á",193,$s); + $s=ereg_replace("É",201,$s); + $s=ereg_replace("Í",205,$s); + $s=ereg_replace("Ó",211,$s); + $s=ereg_replace("Ú",218,$s); + + // other important characters... i know this is + // going to be a slow function, but... + $s=ereg_replace("®",174,$s); + $s=ereg_replace("©",169,$s); + $s=ereg_replace("¡",161,$s); + $s=ereg_replace("¿",191,$s); + + $s=ereg_replace("<",139,$s); + $s=ereg_replace(">",155,$s); + return $s; + } + // end luis' clean_latin(); + + /************************************************************* + * The following function does the opposite of the last one: + * helps replace international characters + * to HTML from plain text code mappings + * Luis Mondesi < le...@ho... > + **************************************************************/ + function put_latin($s = "") { + // I like perl regex (preg_replace) better, but + // ereg_replace does the job better in this case + // clean swedish characters: + $s=ereg_replace(197,"Å",$s); // do not be insensitive + $s=ereg_replace(196,"Ä",$s); + $s=ereg_replace(214,"Ö",$s); + $s=ereg_replace(229,"å",$s); + $s=ereg_replace(228,"ä",$s); + $s=ereg_replace(246,"ö",$s); + + //clean remaining latin characters: + $s=ereg_replace(241,"ñ",$s); + $s=ereg_replace(209,"Ñ",$s); + + $s=ereg_replace(225,"á",$s); // lower case + $s=ereg_replace(233,"é",$s); // these vowels almost + $s=ereg_replace(237,"í",$s); // never are to be used + $s=ereg_replace(243,"ó",$s); // upper case -- at least + $s=ereg_replace(250,"ú",$s); // not in spanish + $s=ereg_replace(193,"Á",$s); + $s=ereg_replace(201,"É",$s); + $s=ereg_replace(205,"Í",$s); + $s=ereg_replace(211,"Ó",$s); + $s=ereg_replace(218,"Ú",$s); + + // other important characters... i know this is + // going to be a slow function, but... + $s=ereg_replace(174,"®",$s); + $s=ereg_replace(169,"©",$s); + $s=ereg_replace(161,"¡",$s); + $s=ereg_replace(191,"¿",$s); + + // these two are used by HTML, so... + // we cannot replace by the mapping code + // unless we specify what we want.... + // which is not the point of this function + #$s=ereg_replace(139,"<",$s); + #$s=ereg_replace(155,">",$s); + return $s; + } + // end luis' put_latin(); + ?> |