phpslash-commit Mailing List for phpSlash (Page 84)
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...> - 2002-06-17 18:02:08
|
Update of /cvsroot/phpslash/phpslash-ft/public_html In directory usw-pr-cvs1:/tmp/cvs-serv8907/phpslash-ft/public_html Modified Files: mailinglist.php3 Log Message: list method returns Index: mailinglist.php3 =================================================================== RCS file: /cvsroot/phpslash/phpslash-ft/public_html/mailinglist.php3,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** mailinglist.php3 16 Mar 2002 17:15:12 -0000 1.5 --- mailinglist.php3 17 Jun 2002 18:02:05 -0000 1.6 *************** *** 14,25 **** *****************************/ ! $_PSL['metatags']['object'] = $xsiteobject; ! ! slashhead($pagetitle,$_PSL['metatags']); /* DEBUG */ ! debug("HTTP_POST_VARS", $HTTP_POST_VARS); ! debug("HTTP_GET_VARS", $HTTP_GET_VARS); /* DEBUG */ --- 14,31 ---- *****************************/ ! if ((!$section) AND (!$section_id)){ ! $section = $_PSL['site_homesection']; ! if(!$section) { ! $section = "Home"; ! } ! $ary['section'] = $section; ! } else { ! $pagetitle .= " - $section"; ! } /* DEBUG */ ! // debug("HTTP_POST_VARS", $HTTP_POST_VARS); ! // debug("HTTP_GET_VARS", $HTTP_GET_VARS); /* DEBUG */ *************** *** 27,51 **** $list = new MailingList; switch ($action) { case "subscribe": if($list->subscribe($HTTP_POST_VARS)) { ! echo message($list->message); } else { ! error($list->message); } break; case "unsubscribe": if($list->unsubscribe($unsubscribe_address)) { ! echo message($list->message); } else { ! error($list->message); } break; default: ! $list->newList(); } slashfoot(); page_close(); ?> --- 33,111 ---- $list = new MailingList; + $content = ''; + switch ($action) { case "subscribe": if($list->subscribe($HTTP_POST_VARS)) { ! $content .= getMessage($list->message); } else { ! $content .= getError($list->message); } break; case "unsubscribe": if($list->unsubscribe($unsubscribe_address)) { ! $content .= getMessage($list->message); } else { ! $content .= getError($list->message); } break; default: ! $content .= $list->newList(); ! } ! ! $block = new 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 = new Template($_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(); + ?> |
From: Joe S. <joe...@us...> - 2002-06-17 16:54:54
|
Update of /cvsroot/phpslash/phpslash-ft/public_html In directory usw-pr-cvs1:/tmp/cvs-serv18719/phpslash-ft/public_html Modified Files: poll.php3 Log Message: poll method returns Index: poll.php3 =================================================================== RCS file: /cvsroot/phpslash/phpslash-ft/public_html/poll.php3,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** poll.php3 28 Apr 2002 01:55:08 -0000 1.12 --- poll.php3 17 Jun 2002 16:54:51 -0000 1.13 *************** *** 3,80 **** /* $Id$ */ ! $pagetitle = "Polls"; // The name to be displayed in the header ! $xsiteobject = "Poll Booth"; //Defines The META TAG Page Type require("config.php3"); page_open(array("sess"=>"slashSess","auth"=>"slashAuth","perm"=>"slashPerm")); ! /* parse cmd line variables into array */ ! while ( list($key, $val) = each($HTTP_GET_VARS )) { ! $ary[$key] = $val; ! } ! ! $_PSL['metatags']['object'] = $xsiteobject; ! slashhead($pagetitle,$_PSL['metatags']); ! // TODO: Make this work with $HTTP_*_VARS ! /* the comment stuff is using "story_id" so we have to funky ! fix it here. */ ! if (!$ary['question_id'] && $ary['story_id']) { ! $question_id = $ary['story_id']; ! } else { ! $question_id = $ary['question_id']; ! } - $as = arg_separator("1"); # Default: = & $poll = new Poll; ! debug("HTTP_POST_VARS", $HTTP_POST_VARS); ! debug("HTTP_GET_VARS", $HTTP_GET_VARS); ! ! ! /* setting up the possible comment variables... */ ! $cmtary['mode'] = $ary['mode']; ! $cmtary['order'] = $ary['order']; ! $cmtary['question_id'] = $question_id; ! switch ($ary['submit']) { ! case "vote": ! $poll->vote($question_id, $answer_id, $REMOTE_ADDR); ! echo pslgetText('VOTE: ') . $poll->message . "<BR>\n"; ! /* NOTE: there's no "break" here, cause after you vote, we ! roll down and "viewresults" */ ! case "viewresults": ! /* we register the "return link" in case they post a comment */ ! $return_link = $HTTP_SERVER_VARS["REQUEST_URI"]; ! $sess->register("return_link"); ! $poll->resultPage($cmtary); ! break; ! case "viewbooth": ! titlebar ("100%", pslgetText("View Pollbooth")); ! echo "<center>\n"; ! fancybox (210, sprintf(pslgetText("%s Poll"), $_PSL['site_name']), $poll->getPollBooth($question_id), "nc"); ! echo "</center>\n"; ! break; ! case "list": ! $poll->listPolls ($ary['min']); ! break; ! default: ! if ($question_id) { ! $poll->resultPage($cmtary); ! } else { ! // Umm min isn't defined anywhere for a default ! $poll->listPolls ($ary['min']); ! } } slashfoot(); page_close(); ?> --- 3,125 ---- /* $Id$ */ ! $pagetitle = "Poll Administration"; // The name to be displayed in the header ! $xsiteobject = "Administration"; // Defines The META TAG Page Type require("config.php3"); page_open(array("sess"=>"slashSess","auth"=>"slashAuth","perm"=>"slashPerm")); ! /***************************** ! START OF PAGE ! *****************************/ ! $auth->login_if(!$perm->have_perm('pollList')); ! /* DEBUG STUFF */ ! // debug("HTTP_POST_VARS" , $HTTP_POST_VARS); ! // debug("HTTP_GET_VARS" , $HTTP_GET_VARS); ! /* END DEBUG STUFF */ $poll = new Poll; ! $content = ''; ! switch ($submit) { ! case "edit": ! if ($perm->have_perm("pollEdit")) { ! $content .= $poll->editPoll($question_id); ! } ! break; ! case "new": ! if ($perm->have_perm("pollNew")) { ! $content .= $poll->newPoll(); ! } ! break; ! case "save": ! if ($perm->have_perm("pollPut")) { ! if ($poll->savePoll($HTTP_POST_VARS)) { ! $content .= "<center>"; ! $content .= getFancybox(210, $_PSL['site_name'] ."Poll", $poll->getPollBooth($HTTP_POST_VARS['question_id']), "r"); ! $content .= "</center>"; ! } else { ! $content .= getError($poll->message); ! } ! } ! break; ! case "delete": ! $content .= getTitlebar ("100%", "Deleting poll"); ! if($poll->deletePoll($question_id)) { ! $content .= getMessage($poll->message); ! } else { ! $content .= getError($poll->message); ! } ! case "makecurrent": ! if(!$poll->makeCurrent($question_id)) { ! $content .= getError($poll->message); ! } ! default: ! if ($perm->have_perm("pollList")) { ! $content .= $poll->listPolls($min); ! } ! } ! ! if($content == '') { ! $content = getTitlebar("100%","Error! Invalid Privileges"); ! $content .= "Sorry. You do not have the necessary privilege to view this page."; ! } ! $block = new 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 = new Template($_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(); + ?> |
From: Joe S. <joe...@us...> - 2002-06-17 16:54:54
|
Update of /cvsroot/phpslash/phpslash-ft In directory usw-pr-cvs1:/tmp/cvs-serv18719/phpslash-ft Modified Files: CHANGES Log Message: poll method returns Index: CHANGES =================================================================== RCS file: /cvsroot/phpslash/phpslash-ft/CHANGES,v retrieving revision 1.518 retrieving revision 1.519 diff -C2 -d -r1.518 -r1.519 *** CHANGES 17 Jun 2002 15:31:19 -0000 1.518 --- CHANGES 17 Jun 2002 16:54:50 -0000 1.519 *************** *** 13,16 **** --- 13,21 ---- 9 - Removal of something (kill -9 :) + 2002-June-17 11:30AM CDT Joe Stewart <joe...@us...> + [WTD] - Poll.class, poll.php3, pollAdmin.php3, pollList.tpl, + pollResultPage.tpl, phpslash.sgml - poll methods return message + and status to caller. + 2002-June-17 10:00AM CDT Joe Stewart <joe...@us...> [WTD] - Submission.class, submission.php3, submissionAdmin.php3, |
From: Joe S. <joe...@us...> - 2002-06-17 16:54:54
|
Update of /cvsroot/phpslash/phpslash-ft/public_html/templates/en/default In directory usw-pr-cvs1:/tmp/cvs-serv18719/phpslash-ft/public_html/templates/en/default Modified Files: pollList.tpl pollResultPage.tpl Log Message: poll method returns Index: pollList.tpl =================================================================== RCS file: /cvsroot/phpslash/phpslash-ft/public_html/templates/en/default/pollList.tpl,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** pollList.tpl 28 Apr 2002 01:55:08 -0000 1.5 --- pollList.tpl 17 Jun 2002 16:54:51 -0000 1.6 *************** *** 1,3 **** --- 1,4 ---- <!-- listPoll.tpl --> + {TITLEBAR} <BR> <!-- BEGIN newpollbutton --> Index: pollResultPage.tpl =================================================================== RCS file: /cvsroot/phpslash/phpslash-ft/public_html/templates/en/default/pollResultPage.tpl,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** pollResultPage.tpl 3 Aug 2001 00:05:30 -0000 1.2 --- pollResultPage.tpl 17 Jun 2002 16:54:51 -0000 1.3 *************** *** 1,4 **** --- 1,5 ---- <!-- start pollResultPage.tpl --> + {TITLEBAR} {RESULT} |
From: Joe S. <joe...@us...> - 2002-06-17 16:54:54
|
Update of /cvsroot/phpslash/phpslash-ft/doc/html In directory usw-pr-cvs1:/tmp/cvs-serv18719/phpslash-ft/doc/html Modified Files: phpslash.sgml Log Message: poll method returns Index: phpslash.sgml =================================================================== RCS file: /cvsroot/phpslash/phpslash-ft/doc/html/phpslash.sgml,v retrieving revision 1.41 retrieving revision 1.42 diff -C2 -d -r1.41 -r1.42 *** phpslash.sgml 17 Jun 2002 15:31:19 -0000 1.41 --- phpslash.sgml 17 Jun 2002 16:54:51 -0000 1.42 *************** *** 779,782 **** --- 779,784 ---- loginformCR.tpl navbarBlock.tpl + pollList.tpl + pollResultPage.tpl registerform.tpl openbox.tpl |
From: Joe S. <joe...@us...> - 2002-06-17 16:54:54
|
Update of /cvsroot/phpslash/phpslash-ft/public_html/templates/en/basic In directory usw-pr-cvs1:/tmp/cvs-serv18719/phpslash-ft/public_html/templates/en/basic Modified Files: pollList.tpl pollResultPage.tpl Log Message: poll method returns Index: pollList.tpl =================================================================== RCS file: /cvsroot/phpslash/phpslash-ft/public_html/templates/en/basic/pollList.tpl,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** pollList.tpl 28 Apr 2002 01:55:08 -0000 1.3 --- pollList.tpl 17 Jun 2002 16:54:51 -0000 1.4 *************** *** 1,3 **** --- 1,4 ---- <!-- Start pollList.tpl --> + {TITLEBAR} <div id="pollList"> <!-- BEGIN newpollbutton --> Index: pollResultPage.tpl =================================================================== RCS file: /cvsroot/phpslash/phpslash-ft/public_html/templates/en/basic/pollResultPage.tpl,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** pollResultPage.tpl 9 Apr 2002 16:57:06 -0000 1.2 --- pollResultPage.tpl 17 Jun 2002 16:54:51 -0000 1.3 *************** *** 1,3 **** --- 1,4 ---- <!-- start pollResultPage.tpl --> + {TITLEBAR} <div id="pollResult"> {RESULT} |
From: Joe S. <joe...@us...> - 2002-06-17 16:54:54
|
Update of /cvsroot/phpslash/phpslash-ft/class In directory usw-pr-cvs1:/tmp/cvs-serv18719/phpslash-ft/class Modified Files: Poll.class Log Message: poll method returns Index: Poll.class =================================================================== RCS file: /cvsroot/phpslash/phpslash-ft/class/Poll.class,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -d -r1.17 -r1.18 *** Poll.class 20 May 2002 15:38:29 -0000 1.17 --- Poll.class 17 Jun 2002 16:54:51 -0000 1.18 *************** *** 60,66 **** function newPoll() { - titlebar('100%', 'Create A New Poll'); - $this->templ->set_var(array( 'QUESTION_ID' => '', 'QUESTION' => '', --- 60,65 ---- function newPoll() { $this->templ->set_var(array( + 'TITLEBAR' => getTitlebar('100%', 'Create A New Poll'), 'QUESTION_ID' => '', 'QUESTION' => '', *************** *** 76,81 **** $this->templ->parse('choices', 'each_choice', true); }; ! $this->templ->parse('FORM', 'editpoll'); ! $this->templ->p('FORM'); } --- 75,80 ---- $this->templ->parse('choices', 'each_choice', true); }; ! return $this->templ->parse('FORM', 'editpoll'); ! // $this->templ->p('FORM'); } *************** *** 155,160 **** } else { - titlebar('100%', 'Edit An Existing Poll'); - if ($this->db->f('current')) { $current = 'checked'; --- 154,157 ---- *************** *** 164,167 **** --- 161,165 ---- $this->templ->set_var(array( + 'TITLEBAR' => getTitlebar('100%', 'Edit An Existing Poll'), 'QUESTION_ID' => $question_id, 'QUESTION' => $this->db->f('question_text'), *************** *** 201,206 **** } ! $this->templ->parse('FORM', 'editpoll'); ! $this->templ->p('FORM'); } ## end if!! --- 199,204 ---- } ! return $this->templ->parse('FORM', 'editpoll'); ! // $this->templ->p('FORM'); } ## end if!! *************** *** 216,221 **** $choice_ary = $ary['choice_ary']; - titlebar("100%", "Saving Poll"); - if (empty($question)) { $this->message = 'Silly admin! You need to have a question before you can have a poll.'; --- 214,217 ---- *************** *** 341,345 **** /* * This function deletes the poll (question, answers and voters) from the DB. ! * Is this is the active poll, ask the admin to make another one current * before deleting it and errors out. * Used only by admin --- 337,341 ---- /* * This function deletes the poll (question, answers and voters) from the DB. ! * If this is the active poll, ask the admin to make another one current * before deleting it and errors out. * Used only by admin *************** *** 491,496 **** $maxvotes = $this->db->f('maxvotes'); - titlebar('100%',$question); - $query = "SELECT answer_text, votes --- 487,490 ---- *************** *** 519,522 **** --- 513,517 ---- $this->templ->set_var(array( + 'TITLEBAR' => getTitlebar('100%',$question), 'ANSWER' => $this->db->f('answer_text'), 'ROOTDIR' => $this->psl['rooturl'], *************** *** 557,561 **** $this->db->query($q); ! titlebar('100%', $this->psl['site_name'] . ' Polls'); $this->templ->set_block('listpoll', 'newpollbutton'); --- 552,556 ---- $this->db->query($q); ! $this->templ->set_var('TITLEBAR', getTitlebar('100%', $this->psl['site_name'] . ' Polls')); $this->templ->set_block('listpoll', 'newpollbutton'); *************** *** 591,596 **** $this->templ->set_var('newpollbutton',''); } ! $this->templ->parse('OUT','listpoll'); ! $this->templ->p('OUT'); } --- 586,592 ---- $this->templ->set_var('newpollbutton',''); } ! ! return $this->templ->parse('OUT','listpoll'); ! // $this->templ->p('OUT'); } *************** *** 660,667 **** 'COMMENT' => $cmt->getAllComments($ary) )); ! $this->templ->parse('OUT', 'resultpage'); ! $this->templ->p('OUT'); } } // end class Poll --- 656,676 ---- 'COMMENT' => $cmt->getAllComments($ary) )); ! ! return $this->templ->parse('OUT', 'resultpage'); ! // $this->templ->p('OUT'); ! ! } + /** + * getMessage - returns message text + * + * simply returns the contents of the message variable + * + * @access public + */ + function getMessage() { + return pslgetText($this->message); } + } // end class Poll |
From: Joe S. <joe...@us...> - 2002-06-17 15:31:23
|
Update of /cvsroot/phpslash/phpslash-ft/doc/html In directory usw-pr-cvs1:/tmp/cvs-serv26666/phpslash-ft/doc/html Modified Files: phpslash.sgml Log Message: submission method returns Index: phpslash.sgml =================================================================== RCS file: /cvsroot/phpslash/phpslash-ft/doc/html/phpslash.sgml,v retrieving revision 1.40 retrieving revision 1.41 diff -C2 -d -r1.40 -r1.41 *** phpslash.sgml 14 Jun 2002 20:25:32 -0000 1.40 --- phpslash.sgml 17 Jun 2002 15:31:19 -0000 1.41 *************** *** 785,788 **** --- 785,789 ---- skinsblock.tpl storyNew.tpl + submissionForm.tpl topicList.tpl topicNew.tpl |
From: Joe S. <joe...@us...> - 2002-06-17 15:31:23
|
Update of /cvsroot/phpslash/phpslash-ft/public_html/templates/en/basic In directory usw-pr-cvs1:/tmp/cvs-serv26666/phpslash-ft/public_html/templates/en/basic Modified Files: submissionForm.tpl Log Message: submission method returns Index: submissionForm.tpl =================================================================== RCS file: /cvsroot/phpslash/phpslash-ft/public_html/templates/en/basic/submissionForm.tpl,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** submissionForm.tpl 9 Apr 2002 16:57:06 -0000 1.2 --- submissionForm.tpl 17 Jun 2002 15:31:20 -0000 1.3 *************** *** 72,75 **** --- 72,76 ---- </tr> </table> + </form> </div> <!-- id="submissionForm" --> <!-- submissionForm.tpl --> |
From: Joe S. <joe...@us...> - 2002-06-17 15:31:23
|
Update of /cvsroot/phpslash/phpslash-ft/public_html/admin In directory usw-pr-cvs1:/tmp/cvs-serv26666/phpslash-ft/public_html/admin Modified Files: submissionAdmin.php3 Log Message: submission method returns Index: submissionAdmin.php3 =================================================================== RCS file: /cvsroot/phpslash/phpslash-ft/public_html/admin/submissionAdmin.php3,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** submissionAdmin.php3 3 Feb 2002 22:09:12 -0000 1.6 --- submissionAdmin.php3 17 Jun 2002 15:31:19 -0000 1.7 *************** *** 2,6 **** // $id: submissionAdmin.php3,v 1.0 2000/04/25 12:08:03 ajay Exp $ ! $pagetitle = "Administration"; # The name to be displayed in the header $xsiteobject = "Administration";#Defines The META TAG Page Type --- 2,6 ---- // $id: submissionAdmin.php3,v 1.0 2000/04/25 12:08:03 ajay Exp $ ! $pagetitle = "Submission Administration"; # The name to be displayed in the header $xsiteobject = "Administration";#Defines The META TAG Page Type *************** *** 19,103 **** *****************************/ ! slashhead($pagetitle,$xsiteobject); ! debug("HTTP_POST_VARS" , $HTTP_POST_VARS); ! debug("HTTP_GET_VARS" , $HTTP_GET_VARS); ! debug("topic_id_ary" , $topic_id_ary); ! debug("submission_id_ary" , $submission_id_ary); ! $submission = new Submission; ! /* this is all really unsecure code. TODO, secure it! */ ! if ($perm->have_perm("submission")) { switch ($submit) { case "delete": ! $count = count($submission_id_ary); ! if ($count > 0 ) { ! for ($i = 0 ; $i < $count ; $i++) { ! $submission->deleteSubmission($submission_id_ary[$i]); } ! echo "$count record deleted<BR>\n"; ! $submission->listSubmission(0); ! } else { ! echo "<BR><BR>This would work <B>SO</B> much better if ! you actually selected something to delete!<BR>\n"; ! } break; case "save": ! /* this code is duplicated below for the people with no security ! priviliges */ ! if ($submission->saveSubmission($HTTP_POST_VARS)) { ! logwrite("Story Submission", "$REMOTE_ADDR submitted a story as an admin"); ! echo "Thanks for this submission. We have it and will set our fearless editorial staff upon it right this second.<br>\n"; ! } else { ! echo "<FONT COLOR=RED>Something broke, I'm not sure what though??</FONT>\n"; ! } break; case "preview": ! $submission->showSubmission($HTTP_POST_VARS); ! titlebar("100%","Edit Submission"); ! $submission->newSubmission($HTTP_POST_VARS,"array"); break; case "editasstory": ! # echo "<B>EDIT AS STORY</B><BR>\n"; ! $submission->editasStory($submission_id); ! if ($_PSL['submission_autodelete']) { ! $submission->deleteSubmission($submission_id); ! }; break; case "edit": ! # echo "<B>EDIT SUBMISSION</B><BR>\n"; ! $submission->displaySubmission($submission_id); ! titlebar("100%","Edit Submission"); ! $ary['submission_id'] = $submission_id; ! $submission->newSubmission($ary,"database"); break; ! case "new": ! # echo "<B>NEW SUBMISSION</B><BR>\n"; ! $submission->newSubmission($HTTP_POST_VARS,"array"); break; default: ! if (!$submission->listSubmission($next)) { ! echo "when you don't see the submission, it means there aren't any.<BR>\n"; } } /* end of switch */ ! } else { ! echo "no permissions..."; ! }; slashfoot(); page_close(); ?> --- 19,180 ---- *****************************/ ! $auth->login_if(!$perm->have_perm('submissionEdit')); ! $content = ''; ! // debug("HTTP_POST_VARS" , $HTTP_POST_VARS); ! // debug("HTTP_GET_VARS" , $HTTP_GET_VARS); ! // debug("topic_id_ary" , $topic_id_ary); ! // debug("submission_id_ary" , $submission_id_ary); ! $submission = new Submission; ! if ($perm->have_perm("submissionEdit")) { switch ($submit) { case "delete": ! if ($perm->have_perm("submissionDelete")) { ! $count = count($submission_id_ary); ! if ($count > 0 ) { ! for ($i = 0 ; $i < $count ; $i++) { ! $submission->deleteSubmission($submission_id_ary[$i]); ! } ! $content .= "$count record deleted<BR>\n"; ! } else { ! $content .= "<BR><BR>This would work <B>SO</B> much better if you actually selected something to delete!<BR>\n"; } ! } break; case "save": ! if ($perm->have_perm("submissionSave")) { ! if ($submission->saveSubmission($HTTP_POST_VARS)) { ! logwrite("Story Submission", "$REMOTE_ADDR submitted a story as an admin"); ! $content .= pslgetText('Submission Saved'); ! } else { ! $content .= getError($submission->getMessage()); ! } ! } break; case "preview": ! if ($perm->have_perm("submissionEdit")) { ! $content .= getTitlebar("100%","Submission Preview"); ! $content .= $submission->showSubmission($HTTP_POST_VARS); ! $content .= getTitlebar("100%","Edit Submission"); ! $content .= $submission->newSubmission($HTTP_POST_VARS,"array"); ! } break; case "editasstory": ! if ($perm->have_perm("submissioneditasstory")) { ! if($submission->editasStory($submission_id)) { ! $content .= $submission->getMessage(); ! if ($_PSL['submission_autodelete']) { ! $submission->deleteSubmission($submission_id); ! } ! } ! } break; case "edit": ! if ($perm->have_perm("submissionEdit")) { ! if($submission->displaySubmission($submission_id)) { ! $content .= getTitlebar("100%","Submission Preview"); ! $content .= $submission->getMessage(); ! } ! $content .= getTitlebar("100%","Edit Submission"); ! $ary['submission_id'] = $submission_id; ! $content .= $submission->newSubmission($ary,"database"); ! } break; ! case "new": ! if ($perm->have_perm("submissionNew")) { ! $content .= $submission->newSubmission($HTTP_POST_VARS,"array"); ! } break; default: ! /* ! $returned = $submission->listSubmission($next); ! if($returned) { ! $content .= $returned; ! } else { ! $content .= pslgetText("When you don't see the submission, it means there aren't any."); } + */ + break; } /* end of switch */ + $returned = $submission->listSubmission($next); + if($returned) { + $content .= getTitlebar("100%","Current Submissions"); + $content .= $returned; + } else { + $content .= pslgetText("When you don't see the submission, it means there aren't any."); + } ! } else { ! $content = getTitlebar("100%","Error! Invalid Privileges"); ! $content .= "Sorry. You do not have the necessary privilege to view this page."; ! } ! $block = new 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 = new Template($_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(); + + ?> |
From: Joe S. <joe...@us...> - 2002-06-17 15:31:22
|
Update of /cvsroot/phpslash/phpslash-ft/public_html In directory usw-pr-cvs1:/tmp/cvs-serv26666/phpslash-ft/public_html Modified Files: submission.php3 Log Message: submission method returns Index: submission.php3 =================================================================== RCS file: /cvsroot/phpslash/phpslash-ft/public_html/submission.php3,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** submission.php3 31 May 2002 19:30:28 -0000 1.8 --- submission.php3 17 Jun 2002 15:31:19 -0000 1.9 *************** *** 19,30 **** *****************************/ $_PSL['metatags']['object'] = $xsiteobject; ! slashhead($pagetitle,$_PSL['metatags']); ! debug("HTTP_POST_VARS" , $HTTP_POST_VARS); ! debug("HTTP_GET_VARS" , $HTTP_GET_VARS); ! debug("topic_id_ary" , $topic_id_ary); ! debug("submission_id_ary" , $submission_id_ary); $submission = new Submission; --- 19,32 ---- *****************************/ + $ary = $HTTP_GET_VARS; + $_PSL['metatags']['object'] = $xsiteobject; ! $content = ''; ! // debug("HTTP_POST_VARS" , $HTTP_POST_VARS); ! // debug("HTTP_GET_VARS" , $HTTP_GET_VARS); ! // debug("topic_id_ary" , $topic_id_ary); ! // debug("submission_id_ary" , $submission_id_ary); $submission = new Submission; *************** *** 33,39 **** case "save": ! if ($submission->saveSubmission($HTTP_POST_VARS)) { logwrite("Story Submission", "$REMOTE_ADDR submitted a story"); ! echo pslgetText('Thanks for this submission. We have it and will set our fearless editorial staff upon it right this second.') . "<br>\n"; // send email for new submission. if ($_PSL[submitnotify]) { --- 35,42 ---- case "save": ! $returned = $submission->saveSubmission($HTTP_POST_VARS); ! if ($returned) { logwrite("Story Submission", "$REMOTE_ADDR submitted a story"); ! $content .= pslgetText('Thanks for this submission. We have it and will set our fearless editorial staff upon it right this second.') . "<br>\n"; // send email for new submission. if ($_PSL[submitnotify]) { *************** *** 43,63 **** } } else { ! echo "<FONT COLOR=RED>".pslgetText("Something broke, I'm not sure what though??")."</FONT>\n"; } break; case "preview": ! $submission->showSubmission($HTTP_POST_VARS); ! titlebar("100%","Edit Submission"); ! $submission->newSubmission($HTTP_POST_VARS,"array"); break; default: ! titlebar("100%",pslgetText("New Submission")); ! $submission->newSubmission("","array"); ! } /* end of no-permission switch */ slashfoot(); page_close(); ?> --- 46,129 ---- } } else { ! $content .= "<FONT COLOR=RED>".pslgetText("Something broke, I'm not sure what though??")."</FONT>\n"; } break; case "preview": ! $content .= getTitlebar("100%","Submission Preview"); ! $content .= $submission->showSubmission($HTTP_POST_VARS); ! $content .= getTitlebar("100%","Edit Submission"); ! $content .= $submission->newSubmission($HTTP_POST_VARS,"array"); break; default: ! $content .= getTitlebar("100%",pslgetText("New Submission")); ! $content .= $submission->newSubmission("","array"); ! } /* end of switch */ ! ! $block = new Block_i; ! ! if ((!$section) AND (!$section_id)){ ! $section = $_PSL['site_homesection']; ! if(!$section) { ! $section = "Home"; ! } ! $ary['section'] = $section; ! } else { ! $pagetitle .= " - $section"; ! } ! ! $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 = new Template($_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(); + ?> |
From: Joe S. <joe...@us...> - 2002-06-17 15:31:22
|
Update of /cvsroot/phpslash/phpslash-ft In directory usw-pr-cvs1:/tmp/cvs-serv26666/phpslash-ft Modified Files: CHANGES Log Message: submission method returns Index: CHANGES =================================================================== RCS file: /cvsroot/phpslash/phpslash-ft/CHANGES,v retrieving revision 1.517 retrieving revision 1.518 diff -C2 -d -r1.517 -r1.518 *** CHANGES 14 Jun 2002 20:25:31 -0000 1.517 --- CHANGES 17 Jun 2002 15:31:19 -0000 1.518 *************** *** 13,16 **** --- 13,21 ---- 9 - Removal of something (kill -9 :) + 2002-June-17 10:00AM CDT Joe Stewart <joe...@us...> + [WTD] - Submission.class, submission.php3, submissionAdmin.php3, + submissionForm.tpl, phpslash.sgml - submission methods return message + and status to caller. + 2002-June-14 3:00PM CDT Joe Stewart <joe...@us...> [B] - functions.inc::getError - needed to return value. |
From: Joe S. <joe...@us...> - 2002-06-17 15:31:22
|
Update of /cvsroot/phpslash/phpslash-ft/class In directory usw-pr-cvs1:/tmp/cvs-serv26666/phpslash-ft/class Modified Files: Submission.class Log Message: submission method returns Index: Submission.class =================================================================== RCS file: /cvsroot/phpslash/phpslash-ft/class/Submission.class,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** Submission.class 3 Feb 2002 02:49:40 -0000 1.9 --- Submission.class 17 Jun 2002 15:31:19 -0000 1.10 *************** *** 4,8 **** class Submission { ! var $templ, $db, $psl; function Submission () { --- 4,8 ---- class Submission { ! var $templ, $db, $psl, $message; function Submission () { *************** *** 11,14 **** --- 11,15 ---- $this->db = new slashDB; $this->psl = $_PSL; + $this->message = ''; /* Templates */ *************** *** 49,64 **** $ary['datef'] = $this->db->f("datef"); ! $this->showSubmission($ary); } else { ! error("No Submission Found: $submission_id"); ! }; } function showSubmission($ary) { - titlebar("100%",$ary[subject]); - $this->templ->set_var(array( 'TITLE' => stripslashes($ary['subject']), 'INTROTEXT' => stripslashes($ary['story']), --- 50,68 ---- $ary['datef'] = $this->db->f("datef"); ! $this->message = $this->showSubmission($ary); ! $success = true; } else { ! $this->message = sprintf(pslgetText("No Submission Found: %s"), $submission_id); ! $success = false; ! } ! ! return $success; } function showSubmission($ary) { $this->templ->set_var(array( + 'TITLEBAR' => getTitlebar("100%",$ary[subject]), 'TITLE' => stripslashes($ary['subject']), 'INTROTEXT' => stripslashes($ary['story']), *************** *** 70,75 **** )); ! $this->templ->parse('OUT', "displaysubmission"); ! $this->templ->p('OUT'); } --- 74,79 ---- )); ! return $this->templ->parse('OUT', "displaysubmission"); ! // $this->templ->p('OUT'); } *************** *** 79,83 **** /* TODO: Just a temporary link so I can get to the add routine when logged in as God */ ! echo "<A HREF=\"" . $this->psl['phpself'] . "?submit=new\">View New Submission Page</A><BR><BR>\n"; $cmt_list = 10; /* num of comments to display before the "more" link */ --- 83,87 ---- /* TODO: Just a temporary link so I can get to the add routine when logged in as God */ ! $this->message = "<A HREF=\"" . $this->psl['phpself'] . "?submit=new\">View New Submission Page</A><BR><BR>\n"; $cmt_list = 10; /* num of comments to display before the "more" link */ *************** *** 124,128 **** /* if the count hasn't increased, then return and don't parse ANYTHING! */ if ($count <= 0) { ! return 0; }; --- 128,132 ---- /* if the count hasn't increased, then return and don't parse ANYTHING! */ if ($count <= 0) { ! return false; }; *************** *** 138,144 **** } ! $this->templ->parse('OUT', array("listsubmission")); ! $this->templ->p('OUT'); ! return 1; } --- 142,148 ---- } ! return $this->templ->parse('OUT', array("listsubmission")); ! // $this->templ->p('OUT'); ! // return 1; } *************** *** 273,278 **** } ! $this->templ->parse('OUT', "formsubmission"); ! $this->templ->p('OUT'); } --- 277,282 ---- } ! return $this->templ->parse('OUT', "formsubmission"); ! // $this->templ->p('OUT'); } *************** *** 290,307 **** if ($topic_id_ary[0] == "") { ! error ("You need to select at least one <B>topic</B> in Submission.class::saveSubmission"); ! return; } if ($section_id_ary[0] == "") { ! error ("You need to select at least one <B>section</B> in Submission.class::saveSubmission"); ! return; } if ($ary['subject'] == "") { ! error ("There is no subject in Submission.class::saveSubmission"); ! return; } if ($ary['story'] == "") { ! error ("There is no story in Submission.class::saveSubmission"); ! return; } if ($ary['name'] == "") { --- 294,311 ---- if ($topic_id_ary[0] == "") { ! $this->message = pslgetText("You need to select at least one <B>topic</B> in Submission.class::saveSubmission"); ! return false; } if ($section_id_ary[0] == "") { ! $this->message = pslgetText("You need to select at least one <B>section</B> in Submission.class::saveSubmission"); ! return false; } if ($ary['subject'] == "") { ! $this->message = pslgetText("There is no subject in Submission.class::saveSubmission"); ! return false; } if ($ary['story'] == "") { ! $this->message = pslgetText("There is no story in Submission.class::saveSubmission"); ! return false; } if ($ary['name'] == "") { *************** *** 430,437 **** $affected = $this->db->affected_rows(); # echo "The Query: <BR><BR>$submission<BR><BR>affected $affected row(s)<BR><BR>\n"; } else { ! echo "can't find Submission_id ('$submission_id') in psl_submission!<BR>\n"; } --- 434,443 ---- $affected = $this->db->affected_rows(); # echo "The Query: <BR><BR>$submission<BR><BR>affected $affected row(s)<BR><BR>\n"; + return true; } else { ! $this->message = sprintf(pslgetText("Can't find Submission_id ('%s') in psl_submission!"), $submission_id); ! return false; } *************** *** 453,457 **** } else { ! $story = new Story; $ary = $this->db->Record; --- 459,463 ---- } else { ! $story = new Story_admin; $ary = $this->db->Record; *************** *** 492,497 **** $ary['dept'] = ""; $ary["story_id"] = ""; ! $story->newStory($ary,"array"); } } --- 498,515 ---- $ary['dept'] = ""; $ary["story_id"] = ""; ! $this->message = $story->newStory($ary,"array"); } + return true; + } + + /** + * getMessage - returns message text + * + * simply returns the contents of the message variable + * + * @access public + */ + function getMessage() { + return pslgetText($this->message); } |
From: Joe S. <joe...@us...> - 2002-06-14 21:31:11
|
Update of /cvsroot/phpslash/phpslash-ft/public_html/templates/en/basic In directory usw-pr-cvs1:/tmp/cvs-serv1556 Modified Files: sectionList.tpl Log Message: section admin method return Index: sectionList.tpl =================================================================== RCS file: /cvsroot/phpslash/phpslash-ft/public_html/templates/en/basic/sectionList.tpl,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** sectionList.tpl 14 Jun 2002 20:27:01 -0000 1.3 --- sectionList.tpl 14 Jun 2002 21:31:08 -0000 1.4 *************** *** 35,39 **** <tr class="secondRow"> <td> ! {SECTION_NAME}" </td> <td> --- 35,39 ---- <tr class="secondRow"> <td> ! {SECTION_NAME} </td> <td> |
From: Joe S. <joe...@us...> - 2002-06-14 20:27:04
|
Update of /cvsroot/phpslash/phpslash-ft/public_html/templates/en/default In directory usw-pr-cvs1:/tmp/cvs-serv16393/default Modified Files: sectionList.tpl sectionNew.tpl Log Message: section admin method return Index: sectionList.tpl =================================================================== RCS file: /cvsroot/phpslash/phpslash-ft/public_html/templates/en/default/sectionList.tpl,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** sectionList.tpl 6 May 2000 09:31:26 -0000 1.1 --- sectionList.tpl 14 Jun 2002 20:27:01 -0000 1.2 *************** *** 1,36 **** <!-- sectionList.tpl --> ! <FORM ACTION="{ACTION_URL}" METHOD=POST> <TABLE BORDER=0 CELLPADDING=3> ! <TR> ! <TD> ! <INPUT TYPE=SUBMIT NAME="submit" VALUE="update"> ! <INPUT TYPE=SUBMIT NAME="submit" VALUE="delete"> ! </TD> ! </TR> ! <TR> ! <TH>Delete</TH> <TH>Name</TH> <TH>Description</TH> </TR> <!-- BEGIN row --> ! <TR ALIGN=CENTER> <TD> ! <INPUT TYPE=CHECKBOX name="section_del[]" VALUE="{SECTION_ID}"> ! <INPUT TYPE=HIDDEN name="section_id[]" VALUE="{SECTION_ID}"> </TD> <TD> ! <INPUT TYPE=TEXT SIZE=20 NAME="section_name[]" VALUE="{SECTION_NAME}"> </TD> <TD> ! <TEXTAREA NAME="description[]" WRAP=PHYSICAL cols=30 rows=4>{SECTION_DESC}</TEXTAREA> </TD> </TR> <!-- END row --> ! <TR> <TD> ! <INPUT TYPE=SUBMIT NAME="submit" VALUE="update"> ! <INPUT TYPE=SUBMIT NAME="submit" VALUE="delete"> </TD> </TR> </TABLE> </FORM> --- 1,44 ---- <!-- sectionList.tpl --> ! {TITLEBAR} <TABLE BORDER=0 CELLPADDING=3> ! <TR ALIGN=LEFT> <TH>Name</TH> <TH>Description</TH> + <TH>Section ID</TH> + <TH>Actions</TH> </TR> <!-- BEGIN row --> ! <TR ALIGN=LEFT> <TD> ! {SECTION_NAME} </TD> <TD> ! {SECTION_DESC} </TD> <TD> ! {SECTION_ID} ! </TD> ! <TD> ! {ADMIN} </TD> </TR> <!-- END row --> ! <!-- BEGIN row2 --> ! <TR ALIGN=LEFT bgcolor="#eeeeee"> <TD> ! {SECTION_NAME} ! </TD> ! <TD> ! {SECTION_DESC} ! </TD> ! <TD> ! {SECTION_ID} ! </TD> ! <TD> ! {ADMIN} </TD> </TR> + <!-- END row2 --> + </TABLE> </FORM> Index: sectionNew.tpl =================================================================== RCS file: /cvsroot/phpslash/phpslash-ft/public_html/templates/en/default/sectionNew.tpl,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** sectionNew.tpl 26 Jun 2000 05:47:17 -0000 1.3 --- sectionNew.tpl 14 Jun 2002 20:27:01 -0000 1.4 *************** *** 1,4 **** --- 1,7 ---- <!-- sectionNew.tpl --> + {TITLEBAR} <FORM ACTION="{ACTION_URL}" METHOD=POST> + <INPUT TYPE=HIDDEN NAME="section_id" VALUE="{SECTION_ID}"> + <TABLE BORDER=0> <TR> *************** *** 12,18 **** </TD> </TR> <TR> <TD> </TD> ! <TD><INPUT TYPE=SUBMIT NAME="submit" VALUE="new"></TD> </TR> </TABLE> --- 15,39 ---- </TD> </TR> + <!-- BEGIN each_default_option --> + <TR> + <TD> + <INPUT TYPE=hidden name={DOPTION_NAME} value="{DOPTION_NAME_VAL}"><B>{DOPTION_NAME_VAL}</B></TD> + <TD> + <INPUT TYPE=text name={DOPTION_VALUE} value="{DOPTION_VALUE_VAL}" size=20> </TD> + </TR> + <!-- END each_default_option --> + <!-- BEGIN each_option --> + <TR> + <TD> + <INPUT TYPE=text name={OPTION_NAME} value="{OPTION_NAME_VAL}" size=20> + </TD> + <TD> + <INPUT TYPE=text name={OPTION_VALUE} value="{OPTION_VALUE_VAL}" size=20> + </TD> + </TR> + <!-- END each_option --> <TR> <TD> </TD> ! <TD><INPUT TYPE=SUBMIT NAME="submit" VALUE="update"></TD> </TR> </TABLE> |
From: Joe S. <joe...@us...> - 2002-06-14 20:27:04
|
Update of /cvsroot/phpslash/phpslash-ft/public_html/templates/en/basic In directory usw-pr-cvs1:/tmp/cvs-serv16393/basic Modified Files: sectionList.tpl sectionNew.tpl Log Message: section admin method return Index: sectionList.tpl =================================================================== RCS file: /cvsroot/phpslash/phpslash-ft/public_html/templates/en/basic/sectionList.tpl,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** sectionList.tpl 9 Apr 2002 16:57:06 -0000 1.2 --- sectionList.tpl 14 Jun 2002 20:27:01 -0000 1.3 *************** *** 1,3 **** --- 1,4 ---- <!-- start sectionList.tpl --> + {TITLEBAR} <div id="sectionList"> <form action="{ACTION_URL}" method="post"> *************** *** 10,28 **** </tr> <tr> - <th>Delete</th> <th>Name</th> <th>Description</th> </tr> <!-- BEGIN row --> <tr class="firstRow"> <td> ! <input type="checkbox" name="section_del[]" value="{SECTION_ID}" /> ! <input type="hidden" name="section_id[]" value="{SECTION_ID}" /> </td> <td> ! <input type="text" size="20" name="section_name[]" value="{SECTION_NAME}" /> </td> <td> ! <textarea name="description[]" wrap="physical" cols="30" rows="4">{SECTION_DESC}</textarea> </td> </tr> --- 11,32 ---- </tr> <tr> <th>Name</th> <th>Description</th> + <th>Section ID</th> + <th>Actions</th> </tr> <!-- BEGIN row --> <tr class="firstRow"> <td> ! {SECTION_NAME}" </td> <td> ! {SECTION_DESC} </td> <td> ! {SECTION_ID} ! </td> ! <td> ! {ADMIN} </td> </tr> *************** *** 31,42 **** <tr class="secondRow"> <td> ! <input type="checkbox" name="section_del[]" value="{SECTION_ID}" /> ! <input type="hidden" name="section_id[]" value="{SECTION_ID}" /> </td> <td> ! <input type="text" size="20" name="section_name[]" value="{SECTION_NAME}" /> </td> <td> ! <textarea name="description[]" wrap="physical" cols="30" rows="4">{SECTION_DESC}</textarea> </td> </tr> --- 35,48 ---- <tr class="secondRow"> <td> ! {SECTION_NAME}" </td> <td> ! {SECTION_DESC} </td> <td> ! {SECTION_ID} ! </td> ! <td> ! {ADMIN} </td> </tr> Index: sectionNew.tpl =================================================================== RCS file: /cvsroot/phpslash/phpslash-ft/public_html/templates/en/basic/sectionNew.tpl,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** sectionNew.tpl 9 Apr 2002 16:57:06 -0000 1.2 --- sectionNew.tpl 14 Jun 2002 20:27:01 -0000 1.3 *************** *** 1,3 **** --- 1,4 ---- <!-- start sectionNew.tpl --> + {TITLEBAR} <div id="sectionNew"> <form action="{ACTION_URL}" method="post"> *************** *** 13,16 **** --- 14,29 ---- </td> </tr> + <!-- BEGIN each_default_option --> + <tr> + <td class="descr"><input type="hidden" name="{DOPTION_NAME}" value="{DOPTION_NAME_VAL}" size="15" />{DOPTION_NAME_VAL}</td> + <td class="text"><input type="text" name="{DOPTION_VALUE}" value="{DOPTION_VALUE_VAL}" size="20" /></td> + </tr> + <!-- END each_default_option --> + <!-- BEGIN each_option --> + <tr> + <td class="descr"><input type="text" name="{OPTION_NAME}" value="{OPTION_NAME_VAL}" size="15" /></td> + <td class="descr"><input type="text" name="{OPTION_VALUE}" value="{OPTION_VALUE_VAL}" size="20" /></td> + <!-- END each_option --> + <tr> <td> </td> |
From: Joe S. <joe...@us...> - 2002-06-14 20:25:36
|
Update of /cvsroot/phpslash/phpslash-ft/public_html/admin In directory usw-pr-cvs1:/tmp/cvs-serv15996/phpslash-ft/public_html/admin Modified Files: sectionAdmin.php3 Log Message: section admin method return Index: sectionAdmin.php3 =================================================================== RCS file: /cvsroot/phpslash/phpslash-ft/public_html/admin/sectionAdmin.php3,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** sectionAdmin.php3 3 Feb 2002 22:09:12 -0000 1.4 --- sectionAdmin.php3 14 Jun 2002 20:25:32 -0000 1.5 *************** *** 15,82 **** *****************************/ ! slashhead($pagetitle,$xsiteobject); ! ! /* DEBUG */ ! debug( "HTTP_POST_VARS", $HTTP_POST_VARS); ! debug( "HTTP_GET_VARS", $HTTP_GET_VARS); ! debug( "section_del", $section_del ); ! debug( "section_ary", $section_ary ); ! debug( "description", $description ); /* DEBUG */ $section = new Section; ! if ($perm->have_perm("section")) { switch ($submit) { case "delete": ! while ( list( $key, $val ) = each( $section_del ) ) { ! $section->deleteSection($section_del[$key]); ! }; ! $section->newSection(); ! $section->listSection(); ! break; ! ! ! case "new": ! $section->saveSection($HTTP_POST_VARS); ! $section->newSection(); ! $section->listSection(); break; case "update": ! # $section->saveSection($HTTP_POST_VARS); ! # $section->listSection(); ! reset ($section_id); ! while ( list( $key, $val ) = each( $section_id ) ) { ! # echo "SECTION_ARY: $key => $val<br> \n"; ! # echo "ID: $section_ary[$key]<BR>\n"; ! # echo "NAME: $section_name[$key]<BR>\n"; ! # echo "DESC: $description[$key]<BR>\n"; ! $ary['section_id'] = $section_id[$key]; ! $ary['section_name'] = $section_name[$key]; ! $ary['description'] = $description[$key]; ! $section->saveSection($ary); ! echo "$section_name[$key] has been updated<BR>\n"; ! } ! $section->listSection(); ! break; ! default: ! $section->newSection(); ! $section->listSection(); } } else { ! titlebar("100%","Error! Invalid Privileges"); ! echo "Sorry. You do not have the necessary privilege to view this page."; } ! slashfoot(); page_close(); --- 15,130 ---- *****************************/ ! $auth->login_if(!$perm->have_perm('sectionList')); ! $content = ''; /* DEBUG */ + // debug( "HTTP_POST_VARS", $HTTP_POST_VARS); + // debug( "HTTP_GET_VARS", $HTTP_GET_VARS); + // debug( "section_del", $section_del ); + // debug( "section_ary", $section_ary ); + // debug( "description", $description ); + $section = new Section; ! $ary = ''; ! ! if ($perm->have_perm("sectionList")) { switch ($submit) { case "delete": ! if ($perm->have_perm("sectionDelete")) { ! $success = $section->deleteSection($section_id); ! if($success) { ! $content .= getMessage($section->getMessage()); ! } else { ! $content .= getError($section->getMessage()); ! } ! } break; + case "edit": + if ($perm->have_perm("sectionEdit")) { + $ary["section_id"] = $section_id; + } + break; case "update": ! if ($perm->have_perm("sectionSave")) { ! $success = $section->saveSection($HTTP_POST_VARS); ! debug("message", $section->getMessage()); ! if($success) { ! $content .= getMessage($section->getMessage()); ! } else { ! $content .= getError($section->getMessage()); ! } ! } ! break; ! default: ! } ! if ($perm->have_perm("sectionNew")) { ! $content .= $section->newSection($ary); ! } ! if ($perm->have_perm("sectionList")) { ! $content .= $section->listSection(); ! } ! } else { ! $content = getTitlebar("100%","Error! Invalid Privileges"); ! $content .= "Sorry. You do not have the necessary privilege to view this page."; ! } ! $block = new 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 = new Template($_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(); |
From: Joe S. <joe...@us...> - 2002-06-14 20:25:36
|
Update of /cvsroot/phpslash/phpslash-ft/tables/0.7 In directory usw-pr-cvs1:/tmp/cvs-serv15996/phpslash-ft/tables/0.7 Modified Files: 65_to_7.sql slash-all.sql Log Message: section admin method return Index: 65_to_7.sql =================================================================== RCS file: /cvsroot/phpslash/phpslash-ft/tables/0.7/65_to_7.sql,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** 65_to_7.sql 13 Jun 2002 20:05:11 -0000 1.5 --- 65_to_7.sql 14 Jun 2002 20:25:32 -0000 1.6 *************** *** 1,4 **** ALTER TABLE psl_story ADD story_options TEXT; ! # ALTER TABLE psl_section ADD section_options TEXT; ALTER TABLE psl_author ADD author_options TEXT; INSERT INTO db_sequence VALUES ('psl_permission_seq',80); --- 1,4 ---- ALTER TABLE psl_story ADD story_options TEXT; ! ALTER TABLE psl_section ADD section_options TEXT; ALTER TABLE psl_author ADD author_options TEXT; INSERT INTO db_sequence VALUES ('psl_permission_seq',80); Index: slash-all.sql =================================================================== RCS file: /cvsroot/phpslash/phpslash-ft/tables/0.7/slash-all.sql,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** slash-all.sql 13 Jun 2002 20:03:44 -0000 1.5 --- slash-all.sql 14 Jun 2002 20:25:32 -0000 1.6 *************** *** 953,956 **** --- 953,957 ---- description varchar(128), artcount int(11), + section_options text, PRIMARY KEY (section_id), UNIQUE section_name (section_name) |
From: Joe S. <joe...@us...> - 2002-06-14 20:25:36
|
Update of /cvsroot/phpslash/phpslash-ft/doc/html In directory usw-pr-cvs1:/tmp/cvs-serv15996/phpslash-ft/doc/html Modified Files: phpslash.sgml psldeveloper.sgml Log Message: section admin method return Index: phpslash.sgml =================================================================== RCS file: /cvsroot/phpslash/phpslash-ft/doc/html/phpslash.sgml,v retrieving revision 1.39 retrieving revision 1.40 diff -C2 -d -r1.39 -r1.40 *** phpslash.sgml 13 Jun 2002 20:03:44 -0000 1.39 --- phpslash.sgml 14 Jun 2002 20:25:32 -0000 1.40 *************** *** 781,784 **** --- 781,786 ---- registerform.tpl openbox.tpl + sectionsList.tpl + sectionsNew.tpl skinsblock.tpl storyNew.tpl Index: psldeveloper.sgml =================================================================== RCS file: /cvsroot/phpslash/phpslash-ft/doc/html/psldeveloper.sgml,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** psldeveloper.sgml 14 Jun 2002 12:24:23 -0000 1.1 --- psldeveloper.sgml 14 Jun 2002 20:25:32 -0000 1.2 *************** *** 422,426 **** <item>getPermissions </itemize> - </itemize> <sect1>Logging --- 422,425 ---- |
From: Joe S. <joe...@us...> - 2002-06-14 20:25:36
|
Update of /cvsroot/phpslash/phpslash-ft/class In directory usw-pr-cvs1:/tmp/cvs-serv15996/phpslash-ft/class Modified Files: Section.class functions.inc Log Message: section admin method return Index: Section.class =================================================================== RCS file: /cvsroot/phpslash/phpslash-ft/class/Section.class,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** Section.class 11 Mar 2002 19:01:37 -0000 1.10 --- Section.class 14 Jun 2002 20:25:32 -0000 1.11 *************** *** 9,13 **** */ class Section { ! var $sec_templ,$db,$psl; /** --- 9,13 ---- */ class Section { ! var $sec_templ,$db,$psl, $message; /** *************** *** 21,24 **** --- 21,25 ---- $this->db = new slashDB; $this->psl = $_PSL; + $this->message = ''; /* Templates */ *************** *** 46,64 **** $this->db->query($q); - titlebar("100%","Edit Sections"); - $this->sec_templ->set_block("listsection","row","rows"); ! while ($this->db->next_record()) { $this->sec_templ->set_var(array( 'ACTION_URL' => $this->psl['phpself'], 'SECTION_ID' => $this->db->Record['section_id'], 'SECTION_NAME' => $this->db->Record['section_name'], ! 'SECTION_DESC' => $this->db->Record['description'] )); ! $this->sec_templ->parse("rows","row",true); ! }; ! $this->sec_templ->parse('OUT',array("listsection")); ! $this->sec_templ->p('OUT'); } --- 47,76 ---- $this->db->query($q); $this->sec_templ->set_block("listsection","row","rows"); ! $this->sec_templ->set_block("listsection","row2","rows2"); ! while ($this->db->next_record()) { + + $section_id = $this->db->Record['section_id']; + $admin = "<A HREF=\"" . $this->psl['phpself'] ."?submit=edit". $this->psl['amp'] ."section_id=$section_id\">[Edit]</A>"; + $admin .= " <A HREF=\"" . $this->psl['phpself'] ."?submit=delete". $this->psl['amp'] ."section_id=$section_id\">[Delete]</A>"; + $this->sec_templ->set_var(array( + 'TITLEBAR' => getTitlebar("100%","Change Existing Sections"), 'ACTION_URL' => $this->psl['phpself'], 'SECTION_ID' => $this->db->Record['section_id'], 'SECTION_NAME' => $this->db->Record['section_name'], ! 'SECTION_DESC' => $this->db->Record['description'], ! 'ADMIN' => $admin )); ! if ($count%2 == 0) { ! $this->sec_templ->parse("rows","row","true"); ! } else { ! $this->sec_templ->parse("rows","row2","true"); ! } ! $count++; ! } ! return $this->sec_templ->parse('OUT',array("listsection")); ! // $this->sec_templ->p('OUT'); } *************** *** 81,98 **** if ($ary['section_name'] == "") { ! error("There is no section_name in Section.class::saveSection"); ! return; } if ($ary['description'] == "") { ! error("There is no description in Section.class::saveSection"); ! return; } /* addslashes for the (') AND str_replace for the (") */ ! $ary["description"] = addslashes(str_replace('\"',""",stripslashes($ary["description"]))); ! $ary["section_name"] = addslashes(str_replace('\"',""",$ary["section_name"])); $ary["section_name"] = str_replace(" "," ",$ary["section_name"]); /* if a record exists, then we update, else we insert a new section! */ $q = "SELECT section_id --- 93,124 ---- if ($ary['section_name'] == "") { ! $this->message = "There is no section_name in Section.class::saveSection"; ! return false; } if ($ary['description'] == "") { ! $this->message = "There is no description in Section.class::saveSection"; ! return false; } /* addslashes for the (') AND str_replace for the (") */ ! $ary["description"] = clean($ary["description"]); ! $ary["section_name"] = clean($ary["section_name"]); $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]; + $optval = $optionval_ary[$i]; + $section_options_ary[$optname] = $optval; + } + + } + $serial_opts=addslashes(serialize($section_options_ary)); + /* if a record exists, then we update, else we insert a new section! */ $q = "SELECT section_id *************** *** 103,107 **** $q = "UPDATE psl_section SET section_name = '$ary[section_name]', ! description = '$ary[description]' WHERE section_id = '$ary[section_id]'"; } else { --- 129,134 ---- $q = "UPDATE psl_section SET section_name = '$ary[section_name]', ! description = '$ary[description]', ! section_options = '$serial_opts' WHERE section_id = '$ary[section_id]'"; } else { *************** *** 110,118 **** $q = "INSERT INTO psl_section "; ! $q .= "(section_id,section_name,description) "; ! $q .= "VALUES ('$ary[section_id]','$ary[section_name]','$ary[description]')"; } # echo "<BR><BR><B>QUERY: $q</B><BR><BR>\n"; return $this->db->query($q); } --- 137,146 ---- $q = "INSERT INTO psl_section "; ! $q .= "(section_id,section_name,description,section_options) "; ! $q .= "VALUES ('$ary[section_id]','$ary[section_name]','$ary[description]','$serial_opts')"; } # echo "<BR><BR><B>QUERY: $q</B><BR><BR>\n"; + $this->message = "Section saved"; return $this->db->query($q); } *************** *** 140,144 **** $story_id = $this->db->Record["story_id"]; $section_name = $this->db->Record["section_name"]; ! echo "<FONT COLOR=RED>STORY</FONT>: '$title'<BR>\n"; } --- 168,172 ---- $story_id = $this->db->Record["story_id"]; $section_name = $this->db->Record["section_name"]; ! $this->message .= "STORY: '$title' "; } *************** *** 155,159 **** $story_id = $this->db->Record["story_id"]; $section_name = $this->db->Record["section_name"]; ! echo "<FONT COLOR=RED>SUBMISSION</FONT>: '$title'<BR>\n"; } --- 183,187 ---- $story_id = $this->db->Record["story_id"]; $section_name = $this->db->Record["section_name"]; ! $this->message .= "SUBMISSION: '$title' "; } *************** *** 170,174 **** $block_id = $this->db->Record["id"]; $section_name = $this->db->Record["section_name"]; ! error("<FONT COLOR=RED>BLOCK</FONT>($block_id): $title"); } --- 198,202 ---- $block_id = $this->db->Record["id"]; $section_name = $this->db->Record["section_name"]; ! $this->message .= "BLOCK($block_id): $title "; } *************** *** 179,182 **** --- 207,211 ---- $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; } *************** *** 191,205 **** * @access public */ ! function newSection() { ! titlebar("100%","New Section"); ! $this->sec_templ->set_var(array( ! 'ACTION_URL' => $this->psl['phpself'], ! 'SECTION_NAME' => "", ! 'SECTION_DESC' => "" ! )); ! $this->sec_templ->parse('OUT',array("newsection")); ! $this->sec_templ->p('OUT'); } --- 220,265 ---- * @access public */ ! function newSection($ary='') { ! if($ary['section_id'] == "") { ! $this->sec_templ->set_var(array( ! 'TITLEBAR' => getTitlebar("100%","New Section"), ! 'ACTION_URL' => $this->psl['phpself'], ! 'SECTION_NAME' => "", ! 'SECTION_DESC' => "" ! )); ! ! $this->sec_templ = displayoptions('section', $this->sec_templ, "newsection", ''); ! ! } else { ! ! $q = "SELECT * ! FROM psl_section ! WHERE section_id = '$ary[section_id]'"; ! $this->db->query($q); ! $this->db->next_record(); ! ! $this->sec_templ->set_block("newsection","each_option", "options"); ! ! $this->sec_templ->set_var(array( ! 'TITLEBAR' => getTitlebar("100%","Edit Section"), ! 'SECTION_ID' => $this->db->Record['section_id'], ! 'SECTION_NAME' => $this->db->Record['section_name'], ! 'SECTION_DESC' => $this->db->Record['description'] ! )); ! ! // options ! $temparray = unserialize($this->db->Record['section_options']); ! if (is_array($temparray)) { ! reset($temparray); ! } ! ! $this->sec_templ = displayoptions('section', $this->sec_templ, "newsection", $temparray); ! } ! ! ! return $this->sec_templ->parse('OUT',array("newsection")); ! // $this->sec_templ->p('OUT'); } *************** *** 272,275 **** --- 332,346 ---- return $section_array; + } + + /** + * getMessage - returns message text + * + * simply returns the contents of the message variable + * + * @access public + */ + function getMessage() { + return pslgetText($this->message); } Index: functions.inc =================================================================== RCS file: /cvsroot/phpslash/phpslash-ft/class/functions.inc,v retrieving revision 1.106 retrieving revision 1.107 diff -C2 -d -r1.106 -r1.107 *** functions.inc 3 Jun 2002 18:04:54 -0000 1.106 --- functions.inc 14 Jun 2002 20:25:32 -0000 1.107 *************** *** 9,13 **** function getError ($msg) { ! getMessage( $msg, "error"); } --- 9,13 ---- function getError ($msg) { ! return getMessage( $msg, "error"); } |
From: Joe S. <joe...@us...> - 2002-06-14 20:25:36
|
Update of /cvsroot/phpslash/phpslash-ft In directory usw-pr-cvs1:/tmp/cvs-serv15996/phpslash-ft Modified Files: CHANGES Log Message: section admin method return Index: CHANGES =================================================================== RCS file: /cvsroot/phpslash/phpslash-ft/CHANGES,v retrieving revision 1.516 retrieving revision 1.517 diff -C2 -d -r1.516 -r1.517 *** CHANGES 14 Jun 2002 12:24:23 -0000 1.516 --- CHANGES 14 Jun 2002 20:25:31 -0000 1.517 *************** *** 13,16 **** --- 13,22 ---- 9 - Removal of something (kill -9 :) + 2002-June-14 3:00PM CDT Joe Stewart <joe...@us...> + [B] - functions.inc::getError - needed to return value. + [WSTD] - Section.class, sectionAdmin.php3, sectionList.tpl, sectionNew.tpl, + phpslash.sgml, 65_to_7.sql, slash-all.sql - section action methods + return message and status to caller. + 2002-June-14 7:00AM CDT Joe Stewart <joe...@us...> [D] - psldeveloper.sgml, doc/html/Makefile - Initial checkin of very rough |
From: Joe S. <joe...@us...> - 2002-06-14 12:24:26
|
Update of /cvsroot/phpslash/phpslash-ft/doc/html In directory usw-pr-cvs1:/tmp/cvs-serv533/phpslash-ft/doc/html Modified Files: Makefile Added Files: psldeveloper.sgml Log Message: initial commit of developer docs --- NEW FILE: psldeveloper.sgml --- <!doctype linuxdoc system> <!-- This is the initial SGML'ed PHPSlash developer documentation. TODO: --> <article> <!-- Title information --> <title>phpSlash: The Developer's Reference. <author> <url url="http://phpslash.sourceforge.net/" name="The phpSlash Group"> <date>v0.1, June 8, 2002 <abstract> phpSlash is a PHP weblog and almost-CMS. Originally it was a port of Rob Malda's <url url="http://www.slashcode.org/" name="slashcode"> from perl to php. </abstract> <!-- The SGML generator will insert the Table of Contents here --> <toc> <!-- Begin the document --> <!-- START SECTION: Introduction --> <sect>Introduction <p> <!-- SECTION START: Public Access Script Documentation --> <sect> Public Access Script Documentation <p> All use these templates: <itemize> <item>slashHead.tpl( possibly navbar.tpl, topicbar.tpl) <p>Template Variables: <itemize> <item>SITE_NAME <item>SITE_OWNER <item>SITE_SLOGAN <item>SITE_TITLE <item>SECTION <item>ROOTDIR <item>IMAGEDIR <item>SITETITLE <item>SEARCH_ACTION_URL <item>NAVBAR <item>TOPICBAR <item>BLOCKS_COLUMN <item>SKIN </itemize> <item>slashFoot.tpl ( possibly navbarFooter.tpl) <p>Template Variables: <itemize> <item>BASEDIR - rooturl <item>NAVBAR </itemize> </itemize> <sect1>about.php3 <p> The text for the "About" page is set in the about.tpl template. The rest of the page is generated the same as the index page. <sect1>article.php3 <p> Additional Templates used: <itemize> <item>index*.tpl <p>Template Variables: <itemize> <item>TITLE <item>BREADCRUMB <item>STORY_ID <item>ROOTDIR <item>IMAGEDIR <item>STORY_COLUMN <item>LEFT_BLOCK_COLUMN <item>CENTER_BLOCK_COLUMN <item>RIGHT_BLOCK_COLUMN </itemize> <item>story.tpl <p>Template Variables: <itemize> <item>SKIN <item>STORY_ID <item>TITLEBAR <item>TITLE <item>INTRO_TEXT <item>DEPT <item>URL <item>NAME - realname <item>DATEF <item>TOPIC_ID <item>TOPIC_NAME <item>TOPICIMAGE <item>TOPICWIDTH <item>TOPICHEIGHT <item>ALTTEXT <item>RELATED <item>ARROWS <item>LIST_TOPIC_ID <item>LIST_TOPIC_NAME <item>LIST_TOPIC_URL </itemize> <item>storyRelated.tpl <p>Template Variables: <itemize> <item>ROOTDIR <item>PHP_SELF <item>STORY_ID <item>TOPIC_ID <item>TOPIC_NAME <item>AUTHOR_ID <item>AUTHOR_NAME <item>LINK </itemize> <item>article-pf.tpl <p>Template Variables: <itemize> <item>STORY_URL <item>PAGETITLE <item>TITLE <item>NAME <item>DATEF <item>DEPT <item>INTRO_TEXT <item>BODY_TEXT <item>XSITEOBJECT <item>NAVBAR <item>TOPICBAR <item>BLOCKS_COLUMN <item>SKIN </itemize> </itemize> <sect1>backend.php3 <p> <p>Possible templates: <itemize> <item>backendBlock.tpl <item>backendHTML.tpl <item>backendJS.tpl <item>backendJSData.tpl <item>backendMozilla.tpl <item>backendOpml.tpl <item>backendRSS91.tpl <item>backendRSS92.tp <item>backendTxt.tpl <item>backendWml.tpl <item>backendRSS1.tpl </itemize> <p>Template Variables: <itemize> <item>SITE_NAME <item>SITE_TITLE <item>SITE_SLOGAN <item>SITE_OWNER <item>SITE_HOST <item>DESCRIPTION <item>PHP_SELF <item>ROOTDIR <item>DATE <item>IMAGEDIR <item>TARGET <item>COUNT <item>STORY_ID <item>TITLE <item>INTRO_TEXT <item>IDX <item>DATEF </itemize> <sect1>comment.php3 <p> <sect1>db_xfer.php3.disabled <p> Script to migrate a PHPSlash database from v 0.5x to 0.6. Unused in upgrading from 0.6 to 0.65. <sect1>errordocument.php3 <p> A custom error (404) page using phpSlash. <p>To activate - create or edit a .htaccess file containing the directive: ErrorDocument 404 /errordocument.php3 <p>To customize the text, edit the notfound.tpl template. <sect1>glossary.php3 <p> <sect1>index.php3 <p> <sect1>login.php3 <p> <sect1>mailinglist.php3 <p> <sect1>poll.php3 <p> <sect1>profile.php3 <p> <sect1>search.php3 <p> <sect1>submission.php3 <p> <sect1>test.php3 <p> <sect1>url_test.php3 <p> <!-- SECTION START: Admin Documentation --> <sect> Admin Script Documentation <p> <sect1>authorAdmin.php3 <p> <itemize> <item>delete <item>edit <item>lostpw <item>update <item>new </itemize> <sect1>blockAdmin.php3 <p> <itemize> <item>delete <item>view <item>new <item>edit <item>update </itemize> <sect1>commentAdmin.php3 <p> <sect1>config.php3 <p> This simply redirects to the main config.php3. It centralizes the path to the config file. A few optional uses are to move the config file outside of web access, to override or use different settings than the main config file. <sect1>glossaryAdmin.php3 <p> <sect1>groupAdmin.php3 <p> <sect1>index.php3 <p> <sect1>infologAdmin.php3 <p> <sect1>mailinglistAdmin.php3 <p> <sect1>pollAdmin.php3 <p> <sect1>sectionAdmin.php3 <p> <sect1>storyAdmin.php3 <p> <sect1>submissionAdmin.php3 <p> <sect1>topicAdmin.php3 <p> <sect1>variableAdmin.php3 <p> <!-- SECTION START: Class Documentation --> <sect> Class Documentation <p> <sect1>Authors <p>methods <p> <itemize> <item>Author <item>listAuthor <item>saveAuthor <item>saveProfile <item>deleteAuthor <item>newAuthor <item>editAuthor <item>getName <item>getId <item>getAuthors <item>lostpw </itemize> <p> <tscreen><code> optional configuration variables: $_PSL['author_optioncount'] = integer value for additional author information [0]. $_PSL['default_author_options'] = array of default values of options for all authors. [none] example: $default_author_options[] = array( 'name' => "ICQ", 'value' => "" ); $_PSL['default_author_options'] = $default_author_options; </code></tscreen> <sect1>Blocks <p> <tscreen><code> optional configuration variables: $_PSL['block_optioncount'] = integer value for additional block information [0]. $_PSL['default_block_options'] = array of default values of options for all authors. [none] example: $default_block_options[] = array( 'name' => "column", 'value' => "right" ); $_PSL['default_block_options'] = $default_block_options; </code></tscreen> <sect2>Block_i.class <p>methods <p> <itemize> <item>Block_i <item>getAllBlocksForIndex <item>getBlocks <item>parseBlock </itemize> <sect2>Block_admin.class <p>methods <p> <itemize> <item>Block_admin <item>newBlock <item>editBlock <item>listBlock <item>listBlockTypes </itemize> <sect2>Block.class <p>methods <p> <itemize> <item>Block <item>reset <item>Types <item>putType <item>deleteType <item>getBlock <item>putBlock <item>checkTime <item>doBlock <item>getParser <item>doParse <item>storeParse <item>delBlock <item>extractBlocks </itemize> <sect2>Block_render_cal.class <p> <sect2>Block_render_html.class <p> <sect2>Block_render_login.class <p> <sect2>Block_render_navbar.class <p> <sect2>Block_render_poll.class <p> <sect2>Block_render_query.class <p> <sect2>Block_render_quote.class <p> <sect2>Block_render_rss.class <p> <sect2>Block_render_section.class <p> <sect2>Block_render_skin.class <p> <sect2>Block_render_submission.class <p> <sect2>Block_render_topic.class <p> <sect2>Block_render_url.class <sect1>Logging <p> <sect1>Mailing List <p> <sect1>Glossary <p> <sect1>Group <p>methods <p> <itemize> <item>Group <item>listGroup <item>saveGroup <item>deleteGroup <item>newGroup <item>editGroup <item>getName <item>getId <item>getGroups <item>getMessage <item>listPermission <item>savePermission <item>deletePermission <item>editPermission <item>getName <item>getId <item>getPermissions </itemize> </itemize> <sect1>Logging <p> <sect1>Mailing List <p> <sect1>Polls <p> <sect1> Sections <p> <sect1>Story <p> <tscreen><code> optional configuration variables: Seconds to cache the formatted output in a serialized variable saveStory clears the cache. Default is no cache. always set expirerelated >= expirestory $_PSL['expirestory'] = integer value for story cache time. [0] $_PSL['expirerelated'] = integer value for related links cache time. [0] $_PSL['story_optioncount'] = integer value for additional story information [0]. $_PSL['default_story_options'] = array of default values of options for all stories. [none] example: $default_story_options[] = array( 'name' => "storyimage", 'value' => "/images/layout/blank.gif" ); $_PSL['default_story_options'] = $default_story_options; </code></tscreen> <sect2>Story.class <p>methods <p> <itemize> <item>Story <item>displayStory <item>printStory <item>getTitle <item>getRelated <item>getNextPrev <item>getStory <item>getStories <item>emailStory </itemize> <sect2>Story_admin.class <p>methods <p> <itemize> <item>Story_admin <item>deleteStory <item>showStory <item>listStory <item>newStory </itemize> <sect2>Story_base.class <p>methods <p> <itemize> <item>Story_base <item>extractStory <item>extractStories <item>saveStory <item>cacheStory </itemize> <sect1>Submissions <p> <sect1>Topics <p> <sect1>Variables <p> <sect>Other Files and Directories <p> <sect1>config.php3 <p> <sect1> functions.inc <p>functions <p> <itemize> <item>getError <item>getMessage <item>error <item>message <item>arg_separator <item>stripBadHTML <item>getTitleBar <item>titlebar <item>getFancyBox <item>fancybox <item>generateID <item>logwrite <item>debug <item>debug_array <item>slashhead <item>getHeader <item>slashfoot <item>getFooter <item>clean <item>dirty <item>breadcrumb <item>is_valid_email <item>psl_censor <item>pslgetText <item>setLang <item>setLangTpl <item>setSkinTpl <item>str_html <item>pslgetAllPerms <item>emailNotify <item>displayOptions </itemize> <p> <sect1> Documentation <p>phpSlash documentation is contained in central sgml files in the linuxdoc format. <p>Current documentation files: <itemize> <item>phpslash.sgml - phpSlash: The Definitive Guide - User and Admin Manual <item>psldeveloper.sgml - phpSlash: The Developers Reference - Manual for site developers and programmers extending phpSlash capabilities. </itemize> <p>To generate new documentation, type "make" while in the doc/html directory. The Makefile generates all versions of the documentation from the sgml source files. <sect1> Translation files <p>Files located in the class/locale directory are called by the function pslgetText to translate strings contained in the code to the chosen language. <sect1> censor.php3 <p>An array of words or phrases that will not be allowed to be used in comments. Called by the function psl_censor. <p>The file and path is set by the config variable - $_PSL['censorfile']. <p>Users of phorum can point the $_PSL['censorfile'] variable to the file used in phorum and only manage one censor file. </article> Index: Makefile =================================================================== RCS file: /cvsroot/phpslash/phpslash-ft/doc/html/Makefile,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** Makefile 23 Nov 2001 20:37:40 -0000 1.2 --- Makefile 14 Jun 2002 12:24:23 -0000 1.3 *************** *** 5,15 **** # nathan hruby <nh...@ds...> ! # It's wise to note that the rules in this Makefile will *allways* ! # evaluate to TURE, and therefore be "made" becasue the targets of the ! # rules do not exsist in the filesystem. Thus entering "make" for ! # anything will result in it being remade fromt he SGML source # Location/name of master file ! master = phpslash.sgml # Make all the docs --- 5,15 ---- # nathan hruby <nh...@ds...> ! # It's wise to note that the rules in this Makefile will *always* ! # evaluate to TRUE, and therefore be "made" because the targets of the ! # rules do not exist in the filesystem. Thus entering "make" for ! # anything will result in it being remade from the SGML source # Location/name of master file ! master = *.sgml # Make all the docs *************** *** 23,29 **** longhtml : $(master) @echo "----------- Making single page HTML doc from SGML in single/" ! cp $(master) single/ ! cd single ; sgml2html -s 0 $(master) ; cd ../ ! rm single/$(master) # Make seperate html files --- 23,31 ---- longhtml : $(master) @echo "----------- Making single page HTML doc from SGML in single/" ! # cp $(master) single/ ! # cd single ; sgml2html -s 0 $(master) ; cd ../ ! # rm single/$(master) ! sgml2html -s 0 $(master) ! mv *.html single/ # Make seperate html files *************** *** 34,42 **** # Make a text version too txt : $(master) ! @echo "----------- Making single page text docs from SGML" sgml2txt $(master) ! clean : @echo "----------- Removing all generated docs" ! rm -f *.html *.txt single/phpslash.html --- 36,44 ---- # Make a text version too txt : $(master) ! @echo "----------- Making single page text docs from SGML in single/" sgml2txt $(master) ! mv *.txt single/ clean : @echo "----------- Removing all generated docs" ! rm -f *.html single/*.txt single/*.html |
From: Joe S. <joe...@us...> - 2002-06-14 12:24:26
|
Update of /cvsroot/phpslash/phpslash-ft In directory usw-pr-cvs1:/tmp/cvs-serv533/phpslash-ft Modified Files: CHANGES Log Message: initial commit of developer docs Index: CHANGES =================================================================== RCS file: /cvsroot/phpslash/phpslash-ft/CHANGES,v retrieving revision 1.515 retrieving revision 1.516 diff -C2 -d -r1.515 -r1.516 *** CHANGES 13 Jun 2002 20:10:09 -0000 1.515 --- CHANGES 14 Jun 2002 12:24:23 -0000 1.516 *************** *** 13,16 **** --- 13,20 ---- 9 - Removal of something (kill -9 :) + 2002-June-14 7:00AM CDT Joe Stewart <joe...@us...> + [D] - psldeveloper.sgml, doc/html/Makefile - Initial checkin of very rough + developer reference docs. + 2002-June-13 2:30PM CDT Joe Stewart <joe...@us...> [B] - authorNew.tpl, blockEdit.tpl - corrected html typo. |
From: Joe S. <joe...@us...> - 2002-06-13 20:18:08
|
Update of /cvsroot/phpslash/phpslash-ft/public_html/templates/en/basic In directory usw-pr-cvs1:/tmp/cvs-serv8105 Modified Files: blockEdit.tpl Log Message: story action methods return output Index: blockEdit.tpl =================================================================== RCS file: /cvsroot/phpslash/phpslash-ft/public_html/templates/en/basic/blockEdit.tpl,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** blockEdit.tpl 13 Jun 2002 20:07:27 -0000 1.4 --- blockEdit.tpl 13 Jun 2002 20:18:04 -0000 1.5 *************** *** 1,3 **** --- 1,4 ---- <!-- start blockEdit.tpl --> + {TITLEBAR} <div id="blockEdit"> <form action="{ACTION_URL}" method="post"> |
From: Joe S. <joe...@us...> - 2002-06-13 20:10:16
|
Update of /cvsroot/phpslash/phpslash-ft In directory usw-pr-cvs1:/tmp/cvs-serv4120 Modified Files: CHANGES Log Message: story action methods return output Index: CHANGES =================================================================== RCS file: /cvsroot/phpslash/phpslash-ft/CHANGES,v retrieving revision 1.514 retrieving revision 1.515 diff -C2 -d -r1.514 -r1.515 *** CHANGES 13 Jun 2002 20:03:41 -0000 1.514 --- CHANGES 13 Jun 2002 20:10:09 -0000 1.515 *************** *** 14,18 **** 2002-June-13 2:30PM CDT Joe Stewart <joe...@us...> - [B] - authorNew.tpl, blockEdit.tpl - corrected html typo. [WSTD] - Story.class, Story_base.class, Story_admin.class, storyAdmin.php3, --- 14,17 ---- |