phpslash-commit Mailing List for phpSlash (Page 85)
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-13 20:07:30
|
Update of /cvsroot/phpslash/phpslash-ft/public_html/templates/en/basic In directory usw-pr-cvs1:/tmp/cvs-serv2754/basic Modified Files: storyNew.tpl authorNew.tpl blockEdit.tpl Log Message: story action methods return output Index: storyNew.tpl =================================================================== RCS file: /cvsroot/phpslash/phpslash-ft/public_html/templates/en/basic/storyNew.tpl,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** storyNew.tpl 19 Apr 2002 17:26:37 -0000 1.5 --- storyNew.tpl 13 Jun 2002 20:07:27 -0000 1.6 *************** *** 106,109 **** --- 106,121 ---- </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="descr"><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> Index: authorNew.tpl =================================================================== RCS file: /cvsroot/phpslash/phpslash-ft/public_html/templates/en/basic/authorNew.tpl,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** authorNew.tpl 3 Jun 2002 18:04:55 -0000 1.5 --- authorNew.tpl 13 Jun 2002 20:07:27 -0000 1.6 *************** *** 35,39 **** <tr> <td class="descr"><input type="hidden" name="{DOPTION_NAME}" value="{DOPTION_NAME_VAL}" size="15" />{DOPTION_NAME_VAL}</td> ! <td class="descr"><input type="text" name="{DOPTION_VALUE}" value="{DOPTION_VALUE_VAL}" size="20" /></td> <!-- END each_default_option --> <!-- BEGIN each_option --> --- 35,40 ---- <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 --> Index: blockEdit.tpl =================================================================== RCS file: /cvsroot/phpslash/phpslash-ft/public_html/templates/en/basic/blockEdit.tpl,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** blockEdit.tpl 7 Jun 2002 16:35:57 -0000 1.3 --- blockEdit.tpl 13 Jun 2002 20:07:27 -0000 1.4 *************** *** 1,4 **** <!-- start blockEdit.tpl --> - {TITLEBAR} <div id="blockEdit"> <form action="{ACTION_URL}" method="post"> --- 1,3 ---- *************** *** 73,76 **** --- 72,81 ---- <td class="descr">Variable Value</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> |
From: Joe S. <joe...@us...> - 2002-06-13 20:07:30
|
Update of /cvsroot/phpslash/phpslash-ft/public_html/templates/en/default In directory usw-pr-cvs1:/tmp/cvs-serv2754/default Modified Files: storyNew.tpl Log Message: story action methods return output Index: storyNew.tpl =================================================================== RCS file: /cvsroot/phpslash/phpslash-ft/public_html/templates/en/default/storyNew.tpl,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** storyNew.tpl 19 Apr 2002 16:34:38 -0000 1.14 --- storyNew.tpl 13 Jun 2002 20:07:27 -0000 1.15 *************** *** 108,111 **** --- 108,132 ---- <input type=radio {EXTTRANS_CHKBOX} name=content value="exttrans"> Extended Translation</TD> </TR> + + <!-- BEGIN each_default_option --> + <TR> + <TD> + <INPUT TYPE=hidden name={DOPTION_NAME} value="{DOPTION_NAME_VAL}">{DOPTION_NAME_VAL}</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> *************** *** 114,117 **** --- 135,139 ---- <input type="submit" name="submit" value="preview"></TD> </TR> + </TABLE> <!-- storyNew.tpl --> |
From: Joe S. <joe...@us...> - 2002-06-13 20:05:16
|
Update of /cvsroot/phpslash/phpslash-ft/tables/0.7 In directory usw-pr-cvs1:/tmp/cvs-serv1807/0.7 Modified Files: 65_to_7.sql Log Message: story action methods return output Index: 65_to_7.sql =================================================================== RCS file: /cvsroot/phpslash/phpslash-ft/tables/0.7/65_to_7.sql,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** 65_to_7.sql 31 May 2002 16:45:56 -0000 1.4 --- 65_to_7.sql 13 Jun 2002 20:05:11 -0000 1.5 *************** *** 1,3 **** ! # ALTER TABLE psl_story ADD story_options TEXT; # ALTER TABLE psl_section ADD section_options TEXT; ALTER TABLE psl_author ADD author_options TEXT; --- 1,3 ---- ! ALTER TABLE psl_story ADD story_options TEXT; # ALTER TABLE psl_section ADD section_options TEXT; ALTER TABLE psl_author ADD author_options TEXT; |
From: Joe S. <joe...@us...> - 2002-06-13 20:03:47
|
Update of /cvsroot/phpslash/phpslash-ft/tables/0.7 In directory usw-pr-cvs1:/tmp/cvs-serv944/phpslash-ft/tables/0.7 Modified Files: slash-all.sql Log Message: story action methods return output Index: slash-all.sql =================================================================== RCS file: /cvsroot/phpslash/phpslash-ft/tables/0.7/slash-all.sql,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** slash-all.sql 7 Jun 2002 16:24:59 -0000 1.4 --- slash-all.sql 13 Jun 2002 20:03:44 -0000 1.5 *************** *** 1055,1058 **** --- 1055,1059 ---- hits int(11) unsigned, topic_cache text, + story_options text, PRIMARY KEY (story_id) ); *************** *** 1062,1070 **** # ! INSERT INTO psl_story (story_id, user_id, title, dept, time, intro_text, body_text, hits, topic_cache) VALUES ( '19', '1', 'Congratulations! It Works!', 'new-stuff-is-cool', '2000-12-04 17:29:56', 'Welcome to phpslash! <br> <br> Now, login to the Admin Section with the default username of \'god\' and password of \'password\' and delete this story! <br> <br> ! Then, add yourself as an author (remember to give yourself all Security permissions) and logout / login again. ', '', '1', ''); # -------------------------------------------------------- --- 1063,1071 ---- # ! INSERT INTO psl_story (story_id, user_id, title, dept, time, intro_text, body_text, hits, topic_cache, story_options) VALUES ( '19', '1', 'Congratulations! It Works!', 'new-stuff-is-cool', '2000-12-04 17:29:56', 'Welcome to phpslash! <br> <br> Now, login to the Admin Section with the default username of \'god\' and password of \'password\' and delete this story! <br> <br> ! Then, add yourself as an author (remember to give yourself all Security permissions) and logout / login again. ', '', '1', '', ''); # -------------------------------------------------------- |
From: Joe S. <joe...@us...> - 2002-06-13 20:03:47
|
Update of /cvsroot/phpslash/phpslash-ft/class In directory usw-pr-cvs1:/tmp/cvs-serv944/phpslash-ft/class Modified Files: Story.class Story_base.class Story_admin.class Log Message: story action methods return output Index: Story.class =================================================================== RCS file: /cvsroot/phpslash/phpslash-ft/class/Story.class,v retrieving revision 1.36 retrieving revision 1.37 diff -C2 -d -r1.36 -r1.37 *** Story.class 12 Jun 2002 14:22:20 -0000 1.36 --- Story.class 13 Jun 2002 20:03:43 -0000 1.37 *************** *** 239,242 **** --- 239,272 ---- }; + if (is_array($ary['story_options'])) { + while( list( $key, $val) = @each( $ary['story_options'] )) { + + switch($key) { + + /* Stub for future needs. + case "example": + debug("Story::getStory::story_option[$key]", $val); + $ary['story_options'][$key] = ''; + break; + */ + + default: + + // pluggable user defined function + if ($this->psl['story_options_udf'] != '') { + $ary = $this->psl['story_options_udf']($key,$ary['story_options'][$key] , $ary); + } + // let the template parse any story options left over. + $this->template->set_var(array(strtoupper($key) => $ary['story_options'][$key])); + $ary['story_options'][$key] = ''; + // what is left over? + // debug("block_options[$key]", $val); + break; + + } + } + } + + /* story html, and related links html, can be cached inside the db. This may save a db call or a template parse. Index: Story_base.class =================================================================== RCS file: /cvsroot/phpslash/phpslash-ft/class/Story_base.class,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** Story_base.class 27 Apr 2002 20:31:10 -0000 1.12 --- Story_base.class 13 Jun 2002 20:03:44 -0000 1.13 *************** *** 34,41 **** function Story_base () { $this->db = new slashDB; ! // NH: Umm.. do we mean the global $auth and $perm varables here? ! // If so pass them by reference from $GLOBALS ! $this->auth = $auth; ! $this->perm = $perm; $this->message = ''; } --- 34,39 ---- function Story_base () { $this->db = new slashDB; ! $this->auth = $GLOBALS['auth']; ! $this->perm = $GLOBALS['perm']; $this->message = ''; } *************** *** 55,58 **** --- 53,57 ---- story.body_text, story.topic_cache, + story.story_options, psl_author.author_name AS name, psl_author.author_realname AS realname, *************** *** 101,105 **** $this->story_ary['user_id'] = $this->db->Record["user_id"]; $this->story_ary['topic_cache']= $this->db->Record["topic_cache"]; ! $this->story_ary['url'] = $this->db->Record["url"]; $this->story_ary['name'] = $this->db->Record["name"]; $this->story_ary['realname'] = $this->db->Record["realname"]; --- 100,105 ---- $this->story_ary['user_id'] = $this->db->Record["user_id"]; $this->story_ary['topic_cache']= $this->db->Record["topic_cache"]; ! $this->story_ary['story_options']= unserialize($this->db->Record["story_options"]); ! $this->story_ary['url'] = $this->db->Record["url"]; $this->story_ary['name'] = $this->db->Record["name"]; $this->story_ary['realname'] = $this->db->Record["realname"]; *************** *** 171,175 **** psl_story.dept, psl_story.hits, ! psl_author.author_name, psl_author.author_realname, psl_author.url, --- 171,176 ---- psl_story.dept, psl_story.hits, ! psl_story.story_options, ! psl_author.author_name, psl_author.author_realname, psl_author.url, *************** *** 374,378 **** $stories_ary[$i]['alt_text'] = $this->db->Record["alt_text"]; $stories_ary[$i]['cmtcount'] = $this->db->Record["cmtcount"]; ! // debug("Story::extractStories.stories_ary", $stories_ary[$i]); } $unique_stories++; --- 375,380 ---- $stories_ary[$i]['alt_text'] = $this->db->Record["alt_text"]; $stories_ary[$i]['cmtcount'] = $this->db->Record["cmtcount"]; ! $stories_ary[$i]['story_options'] = unserialize($this->db->Record["story_options"]); ! // debug("Story::extractStories.stories_ary", $stories_ary[$i]); } $unique_stories++; *************** *** 423,427 **** // Normal users can't edit another user's stories ! if((!$this->perm->have_perm('story,storyeditor')) AND ( $ary['author_id'] != $this->auth->auth['uid'])) { $this->message = pslgetText("Sorry. You do not have the necessary privilege to view this page."); --- 425,429 ---- // Normal users can't edit another user's stories ! if((!$this->perm->have_perm('storyeditothers')) AND ( $ary['author_id'] != $this->auth->auth['uid'])) { $this->message = pslgetText("Sorry. You do not have the necessary privilege to view this page."); *************** *** 477,480 **** --- 479,496 ---- // echo "<BR><BR>STORYID: $ary['story_id']<BR><BR>SID: $story_id<BR><BR>\n"; + $optionname_ary = $ary[optionname]; + $optionval_ary = $ary[optionval]; + + for( $i=0 ; $i < count($ary[optionname]) ; $i++) { + + if( $optionname_ary[$i] != "") { + $optname = $optionname_ary[$i]; + $optval = $optionval_ary[$i]; + $story_options_ary[$optname] = $optval; + } + + } + $serial_opts=addslashes(serialize($story_options_ary)); + $this->db->query("SELECT story_id FROM psl_story *************** *** 488,492 **** intro_text = '$ary[intro_text]', body_text = '$ary[body_text]', ! topic_cache = '' WHERE story_id = '$ary[story_id]'"; --- 504,509 ---- intro_text = '$ary[intro_text]', body_text = '$ary[body_text]', ! topic_cache = '', ! story_options = '$serial_opts' WHERE story_id = '$ary[story_id]'"; *************** *** 534,538 **** body_text, time, ! hits) VALUES ('$ary[story_id]', '$ary[author_id]', --- 551,557 ---- body_text, time, ! hits, ! topic_cache, ! story_options) VALUES ('$ary[story_id]', '$ary[author_id]', *************** *** 542,546 **** '$ary[body_text]', '$ary[datetime]', ! '0')"; // echo "<PRE>INSERT INTO: $q</PRE>\n"; $this->db->query($q); --- 561,567 ---- '$ary[body_text]', '$ary[datetime]', ! '0', ! '', ! '$serial_opts')"; // echo "<PRE>INSERT INTO: $q</PRE>\n"; $this->db->query($q); Index: Story_admin.class =================================================================== RCS file: /cvsroot/phpslash/phpslash-ft/class/Story_admin.class,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** Story_admin.class 1 Jun 2002 16:11:46 -0000 1.1 --- Story_admin.class 13 Jun 2002 20:03:44 -0000 1.2 *************** *** 79,83 **** $user_id = $story_ary['user_id']; ! if((!$this->perm->have_perm('story,storyeditor')) AND ( $user_id != $this->auth->auth['uid'])) { return false; --- 79,83 ---- $user_id = $story_ary['user_id']; ! if((!$this->perm->have_perm('storydeleteothers')) AND ( $user_id != $this->auth->auth['uid'])) { return false; *************** *** 245,250 **** } } ! $this->template->parse('OUT', "printStory"); ! $this->template->p('OUT'); $this->template->set_var(array( --- 245,250 ---- } } ! $output = $this->template->parse('OUT', "printStory"); ! // $this->template->p('OUT'); $this->template->set_var(array( *************** *** 253,256 **** --- 253,258 ---- )); + return $output; + } *************** *** 287,291 **** $user_id = $this->auth->auth[uid]; // if you're not a storyeditor, then you can only view your own stories. ! if (!$this->perm->have_perm("story,storyeditor")) { $q .= "AND '$user_id' = story.user_id AND '$user_id' = author.author_id "; --- 289,293 ---- $user_id = $this->auth->auth[uid]; // if you're not a storyeditor, then you can only view your own stories. ! if (!$this->perm->have_perm("storylistothers")) { $q .= "AND '$user_id' = story.user_id AND '$user_id' = author.author_id "; *************** *** 436,441 **** } ! $this->template->parse('OUT', array("liststory")); ! $this->template->p('OUT'); } --- 438,443 ---- } ! return $this->template->parse('OUT', array("liststory")); ! // $this->template->p('OUT'); } *************** *** 498,502 **** )); // $this->template->set_block("newstory","datetime_row","datetime_rows"); ! if (!$this->perm->have_perm("story,storyeditor")) { $this->template->set_var(array( 'TYPE' => "hidden", --- 500,504 ---- )); // $this->template->set_block("newstory","datetime_row","datetime_rows"); ! if (!$this->perm->have_perm("storychangedate")) { $this->template->set_var(array( 'TYPE' => "hidden", *************** *** 584,588 **** $this->template->parse("datetimeset_rows","datetimeset_row",true); } ! if ($ary['content'] == "plain") { $this->template->set_var('PLAIN_CHKBOX',"CHECKED"); --- 586,592 ---- $this->template->parse("datetimeset_rows","datetimeset_row",true); } ! ! $this->template = displayOptions('story', $this->template, "newstory", ''); ! if ($ary['content'] == "plain") { $this->template->set_var('PLAIN_CHKBOX',"CHECKED"); *************** *** 655,659 **** // Normal users can't edit another user's stories ! if((!$this->perm->have_perm('story,storyeditor')) AND ( $user_id != $this->auth->auth['uid'])) { return false; --- 659,663 ---- // Normal users can't edit another user's stories ! if((!$this->perm->have_perm('storyeditothers')) AND ( $user_id != $this->auth->auth['uid'])) { return false; *************** *** 661,665 **** /* if storyeditor, enable setting of date, otherwise display date */ ! if (!$this->perm->have_perm("story,storyeditor")) { $this->template->set_var(array( 'TYPE' => "hidden", --- 665,669 ---- /* if storyeditor, enable setting of date, otherwise display date */ ! if (!$this->perm->have_perm("storychangedate")) { $this->template->set_var(array( 'TYPE' => "hidden", *************** *** 753,757 **** } ! $this->template->set_var(array( 'ACTION_URL' => "storyAdmin.php3", --- 757,763 ---- } ! ! $temparray = unserialize($this->db->Record['story_options']); ! $this->template->set_var(array( 'ACTION_URL' => "storyAdmin.php3", *************** *** 806,810 **** } ! if (!$this->perm->have_perm("story,storyeditor")) { $this->template->set_var(array( 'AUTHOR_ID' => $this->auth->auth['uid'], --- 812,816 ---- } ! if (!$this->perm->have_perm("storylistothers")) { $this->template->set_var(array( 'AUTHOR_ID' => $this->auth->auth['uid'], *************** *** 837,846 **** } } $description = sprintf( "%s (%s) added new story %s as userid %s", $this->auth->auth['uname'], $this->auth->auth['uid'], $story_id, $user_id); logwrite("Story Admin", $description); ! $this->template->parse('OUT',array("newstory")); ! $this->template->p('OUT'); ! return true; } --- 843,854 ---- } + $this->template = displayOptions('story', $this->template, "newstory", $temparray); + } $description = sprintf( "%s (%s) added new story %s as userid %s", $this->auth->auth['uname'], $this->auth->auth['uid'], $story_id, $user_id); logwrite("Story Admin", $description); ! return $this->template->parse('OUT',array("newstory")); ! // $this->template->p('OUT'); ! // return true; } |
From: Joe S. <joe...@us...> - 2002-06-13 20:03:47
|
Update of /cvsroot/phpslash/phpslash-ft/public_html/admin In directory usw-pr-cvs1:/tmp/cvs-serv944/phpslash-ft/public_html/admin Modified Files: storyAdmin.php3 Log Message: story action methods return output Index: storyAdmin.php3 =================================================================== RCS file: /cvsroot/phpslash/phpslash-ft/public_html/admin/storyAdmin.php3,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** storyAdmin.php3 1 Jun 2002 16:11:46 -0000 1.10 --- storyAdmin.php3 13 Jun 2002 20:03:44 -0000 1.11 *************** *** 17,78 **** $ary['section_id'] = $section_id; ! slashhead($pagetitle,$xsiteobject); $story = new Story_admin; ! if ($perm->have_perm("story")) { switch ($submit) { case "delete": ! if(!$story->deleteStory($story_id)) { ! error(pslgetText("Sorry. You do not have the necessary privilege to view this page.")); } - $story->listStory($ary,$next); break; case "save": ! $success = $story->saveStory($HTTP_POST_VARS); ! if( $success == false) { ! error($story->message); ! $story->newStory($HTTP_POST_VARS, "array"); } ! $story->listStory($ary,$next); break; case "modify": ! $story->listStory($ary,$next); break; case "preview": $HTTP_POST_VARS['name'] = $HTTP_POST_VARS['author_id']; ! $story->showStory($HTTP_POST_VARS); ! titlebar("100%", "Edit Story"); $HTTP_POST_VARS['title'] = stripslashes($HTTP_POST_VARS['title']); $HTTP_POST_VARS['intro_text'] = stripslashes($HTTP_POST_VARS['intro_text']); $HTTP_POST_VARS['body_text'] = stripslashes($HTTP_POST_VARS['body_text']); ! $story->newStory($HTTP_POST_VARS, "array"); break; case "edit": ! $HTTP_POST_VARS['story_id'] = $story_id; ! if(!$story->newStory($HTTP_POST_VARS, "database")) { ! error(pslgetText("Sorry. You do not have the necessary privilege to view this page.")); } break; ! case "new": ! $story->newStory($HTTP_POST_VARS, "array"); break; default: ! $story->listStory($ary, $next); } } else { ! titlebar("100%", "Error! Invalid Privileges"); ! error(pslgetText("Sorry. You do not have the necessary privilege to view this page.")); } ! slashfoot(); page_close(); --- 17,151 ---- $ary['section_id'] = $section_id; ! $auth->login_if(!$perm->have_perm('storyList')); ! ! $content = ''; $story = new Story_admin; ! if ($perm->have_perm("storyList")) { ! switch ($submit) { case "delete": ! if ($perm->have_perm("storyDelete")) { ! if(!$story->deleteStory($story_id)) { ! $content .= getError(pslgetText("Sorry. You do not have the necessary privilege to view this page.")); ! } ! } ! if ($perm->have_perm("storyList")) { ! $content .= $story->listStory($ary,$next); } break; case "save": ! if ($perm->have_perm("storySave")) { ! $success = $story->saveStory($HTTP_POST_VARS); ! if( $success == false) { ! $content .= getError($story->message); ! $content .= $story->newStory($HTTP_POST_VARS, "array"); ! } } ! if ($perm->have_perm("storyList")) { ! $content .= $story->listStory($ary,$next); ! } break; case "modify": ! if ($perm->have_perm("storyList")) { ! $content .= $story->listStory($ary,$next); ! } break; case "preview": $HTTP_POST_VARS['name'] = $HTTP_POST_VARS['author_id']; ! $content .= $story->showStory($HTTP_POST_VARS); ! $content .= getTitlebar("100%", "Edit Story"); $HTTP_POST_VARS['title'] = stripslashes($HTTP_POST_VARS['title']); $HTTP_POST_VARS['intro_text'] = stripslashes($HTTP_POST_VARS['intro_text']); $HTTP_POST_VARS['body_text'] = stripslashes($HTTP_POST_VARS['body_text']); ! $content .= $story->newStory($HTTP_POST_VARS, "array"); break; case "edit": ! if ($perm->have_perm("storyEdit")) { ! $HTTP_POST_VARS['story_id'] = $story_id; ! $returned = $story->newStory($HTTP_POST_VARS, "database"); ! if(isset($returned)) { ! $content .= $returned; ! } else { ! $content .= getError(pslgetText("Sorry. You do not have the necessary privilege to view this page.")); ! } } break; ! case "new": ! if ($perm->have_perm("storyNew")) { ! $content .= $story->newStory($HTTP_POST_VARS, "array"); ! } break; default: ! if ($perm->have_perm("storyList")) { ! $content .= $story->listStory($ary,$next); ! } } } else { ! $content = getTitlebar("100%", "Error! Invalid Privileges"); ! $content .= getError(pslgetText("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-13 20:03:46
|
Update of /cvsroot/phpslash/phpslash-ft/doc/html In directory usw-pr-cvs1:/tmp/cvs-serv944/phpslash-ft/doc/html Modified Files: phpslash.sgml Log Message: story action methods return output Index: phpslash.sgml =================================================================== RCS file: /cvsroot/phpslash/phpslash-ft/doc/html/phpslash.sgml,v retrieving revision 1.38 retrieving revision 1.39 diff -C2 -d -r1.38 -r1.39 *** phpslash.sgml 12 Jun 2002 18:07:57 -0000 1.38 --- phpslash.sgml 13 Jun 2002 20:03:44 -0000 1.39 *************** *** 782,785 **** --- 782,786 ---- openbox.tpl skinsblock.tpl + storyNew.tpl topicList.tpl topicNew.tpl |
From: Joe S. <joe...@us...> - 2002-06-13 20:03:46
|
Update of /cvsroot/phpslash/phpslash-ft In directory usw-pr-cvs1:/tmp/cvs-serv944/phpslash-ft Modified Files: CHANGES Log Message: story action methods return output Index: CHANGES =================================================================== RCS file: /cvsroot/phpslash/phpslash-ft/CHANGES,v retrieving revision 1.513 retrieving revision 1.514 diff -C2 -d -r1.513 -r1.514 *** CHANGES 12 Jun 2002 18:10:30 -0000 1.513 --- CHANGES 13 Jun 2002 20:03:41 -0000 1.514 *************** *** 13,16 **** --- 13,23 ---- 9 - Removal of something (kill -9 :) + 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, + storyNew.tpl, phpslash.sgml, 65_to_7.sql, slash-all.sql - story + action methods return message and status to caller. + 2002-June-12 1:00PM CDT Joe Stewart <joe...@us...> [WTD] - Topic.class, topicAdmin.php3, topicList.tpl, topicNew.tpl, |
From: Joe S. <joe...@us...> - 2002-06-12 18:10:34
|
Update of /cvsroot/phpslash/phpslash-ft In directory usw-pr-cvs1:/tmp/cvs-serv2832/phpslash-ft Modified Files: CHANGES Log Message: topic methods return output Index: CHANGES =================================================================== RCS file: /cvsroot/phpslash/phpslash-ft/CHANGES,v retrieving revision 1.512 retrieving revision 1.513 diff -C2 -d -r1.512 -r1.513 *** CHANGES 12 Jun 2002 14:22:19 -0000 1.512 --- CHANGES 12 Jun 2002 18:10:30 -0000 1.513 *************** *** 13,16 **** --- 13,21 ---- 9 - Removal of something (kill -9 :) + 2002-June-12 1:00PM CDT Joe Stewart <joe...@us...> + [WTD] - Topic.class, topicAdmin.php3, topicList.tpl, topicNew.tpl, + topicsDisplay.tpl, phpslash.sgml - topic action methods return message + and status to caller. + 2002-June-12 9:00AM CDT Joe Stewart <joe...@us...> [B] - article.php3, Story.class::getRelated - printer friendly article and |
From: Joe S. <joe...@us...> - 2002-06-12 18:10:34
|
Update of /cvsroot/phpslash/phpslash-ft/public_html/templates/en/basic In directory usw-pr-cvs1:/tmp/cvs-serv2832/phpslash-ft/public_html/templates/en/basic Modified Files: topicList.tpl topicNew.tpl topicsDisplay.tpl Log Message: topic methods return output Index: topicList.tpl =================================================================== RCS file: /cvsroot/phpslash/phpslash-ft/public_html/templates/en/basic/topicList.tpl,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** topicList.tpl 9 Apr 2002 16:57:06 -0000 1.2 --- topicList.tpl 12 Jun 2002 18:10:30 -0000 1.3 *************** *** 1,3 **** --- 1,4 ---- <!-- start topicList.tpl --> + {TITLEBAR} <div id="topicList"> <table border="0" cellpadding="3"> Index: topicNew.tpl =================================================================== RCS file: /cvsroot/phpslash/phpslash-ft/public_html/templates/en/basic/topicNew.tpl,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** topicNew.tpl 9 Apr 2002 16:57:06 -0000 1.2 --- topicNew.tpl 12 Jun 2002 18:10:30 -0000 1.3 *************** *** 1,3 **** --- 1,4 ---- <!-- Start topicNew.tpl --> + {TITLEBAR} <div id="topicNew"> <form action="{ACTION_URL}" method="post"> Index: topicsDisplay.tpl =================================================================== RCS file: /cvsroot/phpslash/phpslash-ft/public_html/templates/en/basic/topicsDisplay.tpl,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** topicsDisplay.tpl 9 Apr 2002 16:57:06 -0000 1.2 --- topicsDisplay.tpl 12 Jun 2002 18:10:30 -0000 1.3 *************** *** 1,3 **** --- 1,5 ---- <!-- Start topicsDisplay.tpl --> + {TITLEBAR} + {MESSAGE} <div id="topicsDisplay"> <table border="0" cellpadding="3"> |
From: Joe S. <joe...@us...> - 2002-06-12 18:08:02
|
Update of /cvsroot/phpslash/phpslash-ft/public_html/admin In directory usw-pr-cvs1:/tmp/cvs-serv1889/phpslash-ft/public_html/admin Modified Files: topicAdmin.php3 Log Message: topic methods return output Index: topicAdmin.php3 =================================================================== RCS file: /cvsroot/phpslash/phpslash-ft/public_html/admin/topicAdmin.php3,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** topicAdmin.php3 1 Feb 2002 04:23:52 -0000 1.3 --- topicAdmin.php3 12 Jun 2002 18:07:57 -0000 1.4 *************** *** 13,18 **** *****************************/ - slashhead($pagetitle,$xsiteobject); - /* DEBUG */ --- 13,16 ---- *************** *** 28,67 **** /* DEBUG */ $topic = new Topic; ! if ($perm->have_perm("topic")) { switch ($submit) { case "delete": ! $topic->deleteTopic($topic_id); ! $topic->newTopic(); ! $topic->listTopic(); break; case "submit": ! $topic->saveTopic($HTTP_POST_VARS); ! $topic->newTopic(); ! $topic->listTopic(); ! break; case "edit": ! $ary["topic_id"] = $topic_id; ! $topic->newTopic($ary); ! $topic->listTopic(); ! $topic->displayTopics(); break; default: ! $topic->newTopic(); ! $topic->listTopic(); ! $topic->displayTopics($option); } } else { ! titlebar("100%","Error! Invalid Privileges"); ! echo "Sorry. You do not have the necessary privilege to view this page."; } ! slashfoot(); page_close(); ?> --- 26,142 ---- /* DEBUG */ + $auth->login_if(!$perm->have_perm('topicList')); + $topic = new Topic; ! $content = ''; ! ! ! if ($perm->have_perm("topicList")) { switch ($submit) { case "delete": ! if ($perm->have_perm("topicDelete")) { ! if($topic->deleteTopic($topic_id)) { ! $content .= getMessage($topic->getMessage()); ! } else { ! $content .= getError($topic->getMessage()); ! } ! } ! if ($perm->have_perm("topicNew")) { ! $content .= $topic->newTopic(); ! } break; case "submit": ! if ($perm->have_perm("topicSave")) { ! if($topic->saveTopic($HTTP_POST_VARS)) { ! $content .= getMessage($topic->getMessage()); ! } else { ! $content .= getError($topic->getMessage()); ! } ! } ! if ($perm->have_perm("topicNew")) { ! $content .= $topic->newTopic(); ! } ! break; case "edit": ! if ($perm->have_perm("topicEdit")) { ! $ary["topic_id"] = $topic_id; ! $content .= $topic->newTopic($ary); ! } break; default: ! if ($perm->have_perm("topicNew")) { ! $content .= $topic->newTopic(); ! } ! break; } + if ($perm->have_perm("topicList")) { + $content .= $topic->listTopic(); + $content .= $topic->displayTopics($option); + } + } 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-12 18:08:02
|
Update of /cvsroot/phpslash/phpslash-ft/doc/html In directory usw-pr-cvs1:/tmp/cvs-serv1889/phpslash-ft/doc/html Modified Files: phpslash.sgml Log Message: topic methods return output Index: phpslash.sgml =================================================================== RCS file: /cvsroot/phpslash/phpslash-ft/doc/html/phpslash.sgml,v retrieving revision 1.37 retrieving revision 1.38 diff -C2 -d -r1.37 -r1.38 *** phpslash.sgml 7 Jun 2002 16:24:04 -0000 1.37 --- phpslash.sgml 12 Jun 2002 18:07:57 -0000 1.38 *************** *** 782,785 **** --- 782,788 ---- openbox.tpl skinsblock.tpl + topicList.tpl + topicNew.tpl + topicsDisplay.tpl </code></tscreen> |
From: Joe S. <joe...@us...> - 2002-06-12 18:08:01
|
Update of /cvsroot/phpslash/phpslash-ft/public_html/templates/en/default In directory usw-pr-cvs1:/tmp/cvs-serv1889/phpslash-ft/public_html/templates/en/default Modified Files: topicList.tpl topicNew.tpl topicsDisplay.tpl Log Message: topic methods return output Index: topicList.tpl =================================================================== RCS file: /cvsroot/phpslash/phpslash-ft/public_html/templates/en/default/topicList.tpl,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** topicList.tpl 27 Nov 2000 22:05:19 -0000 1.3 --- topicList.tpl 12 Jun 2002 18:07:57 -0000 1.4 *************** *** 1,4 **** <!-- topicList.tpl --> ! <TABLE BORDER=0 CELLPADDING=3> <TR> --- 1,4 ---- <!-- topicList.tpl --> ! {TITLEBAR} <TABLE BORDER=0 CELLPADDING=3> <TR> *************** *** 24,27 **** --- 24,42 ---- </TR> <!-- END row --> + <!-- BEGIN row2 --> + <TR bgcolor="#eeeeee"> + <TD> + <A HREF="{IMAGE_SRC}"><IMG SRC="{IMAGE_SRC}" + ALT="{ALT_TEXT}" WIDTH="{WIDTH}" HEIGHT="{HEIGHT}" BORDER="0"></A> + <BR> + </TD> + <TD>{TOPIC_NAME}</TD> + <TD>{IMAGE}</TD> + <TD>{ALT_TEXT}</TD> + <TD>{ONLINKBAR}</TD> + <TD>{ADMIN}</TD> + </TR> + <!-- END row2 --> + </TABLE> <!-- topicList.tpl --> Index: topicNew.tpl =================================================================== RCS file: /cvsroot/phpslash/phpslash-ft/public_html/templates/en/default/topicNew.tpl,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** topicNew.tpl 27 Nov 2000 22:04:49 -0000 1.5 --- topicNew.tpl 12 Jun 2002 18:07:57 -0000 1.6 *************** *** 1,3 **** --- 1,4 ---- <!-- topicNew.tpl --> + {TITLEBAR} <FORM ACTION="{ACTION_URL}" METHOD=POST> <INPUT TYPE=HIDDEN NAME="topic_id" VALUE="{TOPIC_ID}"> Index: topicsDisplay.tpl =================================================================== RCS file: /cvsroot/phpslash/phpslash-ft/public_html/templates/en/default/topicsDisplay.tpl,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** topicsDisplay.tpl 27 Nov 2000 22:06:27 -0000 1.1 --- topicsDisplay.tpl 12 Jun 2002 18:07:57 -0000 1.2 *************** *** 1,4 **** ! <!-- topicList.tpl --> ! <TABLE BORDER=0 CELLPADDING=3> <TR> --- 1,5 ---- ! <!-- topicsDisplay.tpl --> ! {TITLEBAR} ! {MESSAGE} <TABLE BORDER=0 CELLPADDING=3> <TR> *************** *** 21,23 **** <!-- END row --> </TABLE> ! <!-- topicList.tpl --> --- 22,24 ---- <!-- END row --> </TABLE> ! <!-- topicsDisplay.tpl --> |
From: Joe S. <joe...@us...> - 2002-06-12 18:08:01
|
Update of /cvsroot/phpslash/phpslash-ft/class In directory usw-pr-cvs1:/tmp/cvs-serv1889/phpslash-ft/class Modified Files: Topic.class Log Message: topic methods return output Index: Topic.class =================================================================== RCS file: /cvsroot/phpslash/phpslash-ft/class/Topic.class,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** Topic.class 20 Mar 2002 18:55:00 -0000 1.12 --- Topic.class 12 Jun 2002 18:07:57 -0000 1.13 *************** *** 15,18 **** --- 15,19 ---- var $perm; /* our local version of the perm object */ var $psl; /* our local version of the _PSL array */ + var $message; /** *************** *** 30,34 **** $this->perm = $perm; $this->psl = $_PSL; ! /* Templates */ --- 31,35 ---- $this->perm = $perm; $this->psl = $_PSL; ! $this->message = ''; /* Templates */ *************** *** 59,71 **** $this->db->query($q); - titlebar("100%","Change existing Topics"); - $this->topic_templ->set_block("listtopic","row","rows"); ! while ($this->db->next_record()) { $image = $this->psl['topicimageurl'] . "/" . $this->db->Record['image']; $topic_id = $this->db->Record[topic_id]; ! if ($this->perm->have_perm("topic,root")) { $admin = "<A HREF=\"" . $this->psl['phpself'] . "?submit=edit" . $this->psl['amp'] . "topic_id=$topic_id\">[Edit]</A>"; $admin .= " <A HREF=\"" . $this->psl['phpself'] . "?submit=delete" . $this->psl['amp'] . "topic_id=$topic_id\">[Delete]</A>"; --- 60,71 ---- $this->db->query($q); $this->topic_templ->set_block("listtopic","row","rows"); ! $this->topic_templ->set_block("listtopic", "row2", "rows2"); ! while ($this->db->next_record()) { $image = $this->psl['topicimageurl'] . "/" . $this->db->Record['image']; $topic_id = $this->db->Record[topic_id]; ! if ($this->perm->have_perm("topicEdit")) { $admin = "<A HREF=\"" . $this->psl['phpself'] . "?submit=edit" . $this->psl['amp'] . "topic_id=$topic_id\">[Edit]</A>"; $admin .= " <A HREF=\"" . $this->psl['phpself'] . "?submit=delete" . $this->psl['amp'] . "topic_id=$topic_id\">[Delete]</A>"; *************** *** 75,78 **** --- 75,79 ---- } $this->topic_templ->set_var(array( + 'TITLEBAR' => getTitlebar("100%","Change existing Topics"), 'IMAGE_SRC' => $image, 'TOPIC_NAME' => $this->db->Record['topic_name'], *************** *** 86,93 **** 'ADMIN' => $admin )); ! $this->topic_templ->parse("rows","row",true); }; ! $this->topic_templ->parse('OUT',array("listtopic")); ! $this->topic_templ->p('OUT'); } --- 87,99 ---- 'ADMIN' => $admin )); ! if ($i%2 == 0) { ! $this->topic_templ->parse("rows","row",true); ! } else { ! $this->topic_templ->parse("rows","row2",true); ! } ! $i++; }; ! return $this->topic_templ->parse('OUT',array("listtopic")); ! // $this->topic_templ->p('OUT'); } *************** *** 119,127 **** this is a new topic. */ if ($ary[topic_name] == "") { ! error("There is no topic_name in Topic.class::saveTopic"); return false; } if ($ary[image] == "") { ! error("There is no image in Topic.class::saveTopic"); return false; } --- 125,133 ---- this is a new topic. */ if ($ary[topic_name] == "") { ! $this->message .= "There is no topic_name in Topic.class::saveTopic"; return false; } if ($ary[image] == "") { ! $this->message .= "There is no image in Topic.class::saveTopic"; return false; } *************** *** 134,138 **** if ($ary[alt_text] == "") { ! error("There is no alt_text in Topic.class::saveTopic"); return false; } --- 140,144 ---- if ($ary[alt_text] == "") { ! $this->message .= "There is no alt_text in Topic.class::saveTopic"; return false; } *************** *** 223,228 **** $story_id = $this->db->Record["story_id"]; $topic_name = $this->db->Record["topic_name"]; ! echo "Sorry, ths story is assigned to this topic:"; ! echo "<font color=\"red\">'$title'</font><br />\n"; } --- 229,234 ---- $story_id = $this->db->Record["story_id"]; $topic_name = $this->db->Record["topic_name"]; ! $this->message .= "Sorry, ths story is assigned to this topic:"; ! $this->message .= "<font color=\"red\">'$title'</font><br />\n"; } *************** *** 241,246 **** $story_id = $this->db->Record["story_id"]; $topic_name = $this->db->Record["topic_name"]; ! echo "Sorry, this submission is assigned to this topic:"; ! echo "<font color=\"red\">'$title'</font><br />\n"; } --- 247,252 ---- $story_id = $this->db->Record["story_id"]; $topic_name = $this->db->Record["topic_name"]; ! $this->message .= "Sorry, this submission is assigned to this topic:"; ! $this->message .= "<font color=\"red\">'$title'</font><br />\n"; } *************** *** 252,256 **** WHERE topic_id = '$topic_id'"; $this->db->query($q); ! echo "<i>Topic deleted</i>"; return true; --- 258,262 ---- WHERE topic_id = '$topic_id'"; $this->db->query($q); ! $this->message .= "<i>Topic deleted</i>"; return true; *************** *** 270,275 **** if($ary["topic_id"] == "") { - titlebar("100%","Add a new Topic"); $this->topic_templ->set_var(array( 'TOPICIMAGESDIR' => $this->psl['topicimagedir'], 'TOPIC_ID' => "", --- 276,281 ---- if($ary["topic_id"] == "") { $this->topic_templ->set_var(array( + 'TITLEBAR' => getTitlebar("100%","Add a new Topic"), 'TOPICIMAGESDIR' => $this->psl['topicimagedir'], 'TOPIC_ID' => "", *************** *** 281,285 **** } else { - titlebar("100%","Edit Topic"); $q = "SELECT topic_id, topic_name, --- 287,290 ---- *************** *** 292,295 **** --- 297,301 ---- $this->db->next_record(); $this->topic_templ->set_var(array( + 'TITLEBAR' => getTitlebar("100%","Edit Topic"), 'IMAGE_SRC' => $image, 'TOPICIMAGESDIR' => $this->psl['topicimagedir'], *************** *** 323,328 **** } ! $this->topic_templ->parse('OUT',array("newtopic")); ! $this->topic_templ->p('OUT'); } --- 329,334 ---- } ! return $this->topic_templ->parse('OUT',array("newtopic")); ! // $this->topic_templ->p('OUT'); } *************** *** 345,353 **** )); - titlebar("100%","Display Topic Images"); - if( $option != "all") { ! echo "<A HREF=" . $this->psl['phpself'] . "?submit=display" . $this->psl['amp'] . "option=all>[Display all possible topic images]</A>"; } else { $this->topic_templ->set_block("displaytopics","row","rows"); --- 351,360 ---- )); if( $option != "all") { ! $result = getTitlebar("100%","Display Topic Images"); ! $result .= "<A HREF=" . $this->psl['phpself'] . "?submit=display" . $this->psl['amp'] . "option=all>[Display all possible topic images]</A>"; } else { + $this->topic_templ->set_var("TITLEBAR", getTitlebar("100%","Display Topic Images")); + $this->topic_templ->set_block("displaytopics","row","rows"); *************** *** 379,385 **** } ! $this->topic_templ->parse('OUT',array("displaytopics")); ! $this->topic_templ->p('OUT'); } } --- 386,393 ---- } ! $result = $this->topic_templ->parse('OUT',array("displaytopics")); ! // $this->topic_templ->p('OUT'); } + return $result; } *************** *** 592,595 **** --- 600,614 ---- } // end is_onlinkbar } // end renormTopic() + + /** + * getMessage - returns message text + * + * simply returns the contents of the message variable + * + * @access public + */ + function getMessage() { + return pslgetText($this->message); + } } /* end of Topic.class */ |
From: Joe S. <joe...@us...> - 2002-06-12 14:22:23
|
Update of /cvsroot/phpslash/phpslash-ft/class In directory usw-pr-cvs1:/tmp/cvs-serv9550/phpslash-ft/class Modified Files: Story.class Log Message: author real name Index: Story.class =================================================================== RCS file: /cvsroot/phpslash/phpslash-ft/class/Story.class,v retrieving revision 1.35 retrieving revision 1.36 diff -C2 -d -r1.35 -r1.36 *** Story.class 1 Jun 2002 16:11:46 -0000 1.35 --- Story.class 12 Jun 2002 14:22:20 -0000 1.36 *************** *** 133,136 **** --- 133,137 ---- 'AUTHOR_ID' => $ary['user_id'], 'AUTHOR_NAME' => $ary['name'], + 'AUTHOR_REALNAME' => $ary['realname'], 'rows' => "" )); |
From: Joe S. <joe...@us...> - 2002-06-12 14:22:23
|
Update of /cvsroot/phpslash/phpslash-ft/public_html In directory usw-pr-cvs1:/tmp/cvs-serv9550/phpslash-ft/public_html Modified Files: article.php3 profile.php3 Log Message: author real name Index: article.php3 =================================================================== RCS file: /cvsroot/phpslash/phpslash-ft/public_html/article.php3,v retrieving revision 1.65 retrieving revision 1.66 diff -C2 -d -r1.65 -r1.66 *** article.php3 7 Jun 2002 20:58:44 -0000 1.65 --- article.php3 12 Jun 2002 14:22:19 -0000 1.66 *************** *** 67,70 **** --- 67,71 ---- 'TITLE' => $ttitle, 'NAME' => $story->story_ary["name"], + 'REALNAME' => $story->story_ary["realname"], 'DATEF' => $story->story_ary["datef"], 'DEPT' => $story->story_ary["dept"], Index: profile.php3 =================================================================== RCS file: /cvsroot/phpslash/phpslash-ft/public_html/profile.php3,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** profile.php3 21 May 2002 20:07:24 -0000 1.2 --- profile.php3 12 Jun 2002 14:22:20 -0000 1.3 *************** *** 26,30 **** $auth->login_if(!$perm->have_perm('user')); - slashhead($pagetitle,$xsiteobject); /* DEBUG */ --- 26,29 ---- *************** *** 45,48 **** --- 44,49 ---- $author = new Author; + $content = ''; + if ($perm->have_perm("user")) { *************** *** 50,70 **** case "update": if($author->saveProfile($HTTP_POST_VARS)) { ! echo message("Profile Updated"); } else { ! error("Profile not updated"); } case "edit": default: ! $author->editAuthor($auth->auth['uid'], 'authorProfile'); } } else { ! titlebar("100%","Error! Invalid Privileges"); ! echo "Sorry. You do not have the necessary privilege to view this page."; } ! slashfoot(); page_close(); ?> --- 51,135 ---- case "update": if($author->saveProfile($HTTP_POST_VARS)) { ! $content .= getMessage("Profile Updated"); } else { ! $content .= getError("Profile not updated"); } case "edit": default: ! $content .= $author->editAuthor($auth->auth['uid'], 'authorProfile'); } } else { ! $content = getTitlebar("100%","Error! Invalid Privileges"); ! $content .= "Sorry. You do not have the necessary privilege to view this page."; } ! $block = new Block_i; ! ! $section = "Admin"; ! ! /* defaults for main "index" page */ ! if ((!$section) AND (!$section_id)){ ! $section = $_PSL['site_homesection']; ! if(!$section) { ! $section = "Home"; ! } ! $ary['section'] = $section; ! } else { ! $pagetitle .= " - $section"; ! } ! $ary['section'] = $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-12 14:22:23
|
Update of /cvsroot/phpslash/phpslash-ft In directory usw-pr-cvs1:/tmp/cvs-serv9550/phpslash-ft Modified Files: CHANGES Log Message: author real name Index: CHANGES =================================================================== RCS file: /cvsroot/phpslash/phpslash-ft/CHANGES,v retrieving revision 1.511 retrieving revision 1.512 diff -C2 -d -r1.511 -r1.512 *** CHANGES 7 Jun 2002 20:58:44 -0000 1.511 --- CHANGES 12 Jun 2002 14:22:19 -0000 1.512 *************** *** 13,16 **** --- 13,21 ---- 9 - Removal of something (kill -9 :) + 2002-June-12 9:00AM CDT Joe Stewart <joe...@us...> + [B] - article.php3, Story.class::getRelated - printer friendly article and + related links can use author's real name in template. + profile.php3 - updated to output correctly from Author.class. + 2002-June-07 4:00PM CDT Joe Stewart <joe...@us...> [B] - article.php3 - article_updatehits wasn't working. |
From: Joe S. <joe...@us...> - 2002-06-07 20:58:47
|
Update of /cvsroot/phpslash/phpslash-ft In directory usw-pr-cvs1:/tmp/cvs-serv22553/phpslash-ft Modified Files: CHANGES Log Message: article_updatehits Index: CHANGES =================================================================== RCS file: /cvsroot/phpslash/phpslash-ft/CHANGES,v retrieving revision 1.510 retrieving revision 1.511 diff -C2 -d -r1.510 -r1.511 *** CHANGES 7 Jun 2002 16:24:04 -0000 1.510 --- CHANGES 7 Jun 2002 20:58:44 -0000 1.511 *************** *** 13,16 **** --- 13,19 ---- 9 - Removal of something (kill -9 :) + 2002-June-07 4:00PM CDT Joe Stewart <joe...@us...> + [B] - article.php3 - article_updatehits wasn't working. + 2002-June-07 11:00AM CDT Joe Stewart <joe...@us...> [WT] - Block.class, Block_i.class, Block_admin.class, blockAdmin.php3, |
From: Joe S. <joe...@us...> - 2002-06-07 20:58:47
|
Update of /cvsroot/phpslash/phpslash-ft/public_html In directory usw-pr-cvs1:/tmp/cvs-serv22553/phpslash-ft/public_html Modified Files: article.php3 Log Message: article_updatehits Index: article.php3 =================================================================== RCS file: /cvsroot/phpslash/phpslash-ft/public_html/article.php3,v retrieving revision 1.64 retrieving revision 1.65 diff -C2 -d -r1.64 -r1.65 *** article.php3 10 May 2002 20:57:03 -0000 1.64 --- article.php3 7 Jun 2002 20:58:44 -0000 1.65 *************** *** 170,174 **** $updatearticlehits = $_PSL["article_updatehits"]; if (($updatearticlehits) AND ! (is_int($story_id)) ) { $q = "UPDATE psl_story SET hits = hits + 1 --- 170,174 ---- $updatearticlehits = $_PSL["article_updatehits"]; if (($updatearticlehits) AND ! ($story_html) ) { $q = "UPDATE psl_story SET hits = hits + 1 |
From: Joe S. <joe...@us...> - 2002-06-07 16:35:59
|
Update of /cvsroot/phpslash/phpslash-ft/public_html/templates/en/basic In directory usw-pr-cvs1:/tmp/cvs-serv2449/phpslash-ft/public_html/templates/en/basic Modified Files: blockList.tpl blockEdit.tpl Log Message: block admin cleanup Index: blockList.tpl =================================================================== RCS file: /cvsroot/phpslash/phpslash-ft/public_html/templates/en/basic/blockList.tpl,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** blockList.tpl 9 Apr 2002 16:57:06 -0000 1.2 --- blockList.tpl 7 Jun 2002 16:35:57 -0000 1.3 *************** *** 1,3 **** --- 1,4 ---- <!-- start blockList.tpl --> + {TITLEBAR} <div id="blockList"> <form action="{ACTION_URL}" method="post"> Index: blockEdit.tpl =================================================================== RCS file: /cvsroot/phpslash/phpslash-ft/public_html/templates/en/basic/blockEdit.tpl,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** blockEdit.tpl 9 Apr 2002 16:57:06 -0000 1.2 --- blockEdit.tpl 7 Jun 2002 16:35:57 -0000 1.3 *************** *** 1,3 **** --- 1,4 ---- <!-- start blockEdit.tpl --> + {TITLEBAR} <div id="blockEdit"> <form action="{ACTION_URL}" method="post"> |
From: Joe S. <joe...@us...> - 2002-06-07 16:26:02
|
Update of /cvsroot/phpslash/phpslash-ft/public_html/templates/en/default In directory usw-pr-cvs1:/tmp/cvs-serv31729/phpslash-ft/public_html/templates/en/default Modified Files: blockEdit.tpl blockList.tpl Log Message: block admin cleanup Index: blockEdit.tpl =================================================================== RCS file: /cvsroot/phpslash/phpslash-ft/public_html/templates/en/default/blockEdit.tpl,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** blockEdit.tpl 2 Feb 2002 15:26:02 -0000 1.7 --- blockEdit.tpl 7 Jun 2002 16:25:59 -0000 1.8 *************** *** 1,3 **** --- 1,4 ---- <!-- blockEdit.tpl --> + {TITLEBAR} <FORM ACTION="{ACTION_URL}" METHOD=POST> <INPUT TYPE=HIDDEN NAME="block_id" VALUE="{BLOCK_ID}"> *************** *** 68,71 **** --- 69,80 ---- <TD> <b>Variable Value</b> </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> Index: blockList.tpl =================================================================== RCS file: /cvsroot/phpslash/phpslash-ft/public_html/templates/en/default/blockList.tpl,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** blockList.tpl 20 Mar 2002 22:16:42 -0000 1.5 --- blockList.tpl 7 Jun 2002 16:25:59 -0000 1.6 *************** *** 1,3 **** --- 1,4 ---- <!-- sectionList.tpl --> + {TITLEBAR} <FORM ACTION="{ACTION_URL}" METHOD="POST"> <TABLE CELLPADDING=2 CELLSPACING=1 BORDER=0> |
From: Joe S. <joe...@us...> - 2002-06-07 16:25:03
|
Update of /cvsroot/phpslash/phpslash-ft/tables/0.7 In directory usw-pr-cvs1:/tmp/cvs-serv31354/phpslash-ft/tables/0.7 Modified Files: slash-all.sql Log Message: block admin cleanup Index: slash-all.sql =================================================================== RCS file: /cvsroot/phpslash/phpslash-ft/tables/0.7/slash-all.sql,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** slash-all.sql 31 May 2002 16:45:56 -0000 1.3 --- slash-all.sql 7 Jun 2002 16:24:59 -0000 1.4 *************** *** 965,969 **** INSERT INTO psl_section (section_id, section_name, description, artcount) VALUES ( '3', 'Home', 'Everything that\'s associated with this section appears on the main index page.', NULL); INSERT INTO psl_section (section_id, section_name, description, artcount) VALUES ( '7', 'test', 'foo', NULL); ! INSERT INTO psl_section VALUES( '8', 'Admin', 'Administration section - no stories', NULL); # -------------------------------------------------------- --- 965,970 ---- INSERT INTO psl_section (section_id, section_name, description, artcount) VALUES ( '3', 'Home', 'Everything that\'s associated with this section appears on the main index page.', NULL); INSERT INTO psl_section (section_id, section_name, description, artcount) VALUES ( '7', 'test', 'foo', NULL); ! INSERT INTO psl_section VALUES (8,'User','Logged in users section - no stories',NULL); ! INSERT INTO psl_section VALUES (9,'Admin','Administration section - no stories',NULL); # -------------------------------------------------------- |
From: Joe S. <joe...@us...> - 2002-06-07 16:25:03
|
Update of /cvsroot/phpslash/phpslash-ft/public_html In directory usw-pr-cvs1:/tmp/cvs-serv31354/phpslash-ft/public_html Modified Files: login.php3 Log Message: block admin cleanup Index: login.php3 =================================================================== RCS file: /cvsroot/phpslash/phpslash-ft/public_html/login.php3,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -d -r1.19 -r1.20 *** login.php3 20 May 2002 19:59:10 -0000 1.19 --- login.php3 7 Jun 2002 16:24:58 -0000 1.20 *************** *** 57,61 **** } ! $ary['section'] = "Admin"; $breadcrumb = breadcrumb( $ary); --- 57,61 ---- } ! $ary['section'] = "User"; $breadcrumb = breadcrumb( $ary); |
From: Joe S. <joe...@us...> - 2002-06-07 16:25:02
|
Update of /cvsroot/phpslash/phpslash-ft/public_html/admin In directory usw-pr-cvs1:/tmp/cvs-serv31354/phpslash-ft/public_html/admin Modified Files: authorAdmin.php3 blockAdmin.php3 Log Message: block admin cleanup Index: authorAdmin.php3 =================================================================== RCS file: /cvsroot/phpslash/phpslash-ft/public_html/admin/authorAdmin.php3,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** authorAdmin.php3 3 Jun 2002 18:38:13 -0000 1.9 --- authorAdmin.php3 7 Jun 2002 16:24:59 -0000 1.10 *************** *** 95,101 **** slashhead($pagetitle,$_PSL['metatags']); ! $leftblocks = $block->getBlocks($ary, "leftadmin"); ! $centerblocks = $block->getBlocks($ary, "centeradmin"); ! $rightblocks = $block->getBlocks($ary, "rightadmin"); if (empty($leftblocks)) { --- 95,101 ---- slashhead($pagetitle,$_PSL['metatags']); ! $leftblocks = $block->getBlocks($ary, "left"); ! $centerblocks = $block->getBlocks($ary, "center"); ! $rightblocks = $block->getBlocks($ary, "right"); if (empty($leftblocks)) { Index: blockAdmin.php3 =================================================================== RCS file: /cvsroot/phpslash/phpslash-ft/public_html/admin/blockAdmin.php3,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** blockAdmin.php3 1 Jun 2002 15:52:35 -0000 1.4 --- blockAdmin.php3 7 Jun 2002 16:24:59 -0000 1.5 *************** *** 22,63 **** *****************************/ ! slashhead($pagetitle,$xsiteobject); ! if ($perm->have_perm("block")) { ! /* First do stuff that we have to */ ! switch ($submit) { ! case "delete": if ($block->delBlock($id)) { ! echo "The Block has been Deleted<BR>\n"; } ! $block->newBlock(); /* prints the new block form */ ! $block->listBlock(); /* prints a list of current blocks */ ! break; ! case "view": ! print $block->doBlock($id); ! $block->listBlock(); /* prints a list of current blocks */ ! break; ! case "new": ! $block->putBlock($HTTP_POST_VARS); ! break; ! case "edit": ! $block->editBlock($id); ! break; ! case "update": ! $block->putBlock($HTTP_POST_VARS); ! # break; ! default: ! $block->newBlock(); /* prints the new block form */ ! $block->listBlock(); /* prints a list of current blocks */ ! $block->listBlockTypes($option, $name); /* optional block type management */ } } else { ! titlebar("100%","Error! Invalid Privileges"); ! echo "Sorry. You do not have the necessary privileges to view this page.\n"; } ! /* We be done. Clean up this mess */ slashfoot(); page_close(); ?> --- 22,135 ---- *****************************/ ! $auth->login_if(!$perm->have_perm('blockList')); ! $content = ''; ! ! /* First do stuff that we have to */ ! switch ($submit) { ! case "delete": ! if ($perm->have_perm("blockDelete")) { if ($block->delBlock($id)) { ! $content .= "The Block has been Deleted<BR>\n"; } ! } ! if ($perm->have_perm("blockNew")) { ! $content .= $block->newBlock(); /* prints the new block form */ ! } ! if ($perm->have_perm("blockList")) { ! $content .= $block->listBlock(); /* prints a list of current blocks */ ! } ! break; ! case "view": ! $content .= $block->doBlock($id); ! if ($perm->have_perm("blockList")) { ! $content .= $block->listBlock(); /* prints a list of current blocks */ ! } ! break; ! case "new": ! if ($perm->have_perm("blockPut")) { ! $content .= $block->putBlock($HTTP_POST_VARS); ! } ! break; ! case "edit": ! if ($perm->have_perm("blockEdit")) { ! $content .= $block->editBlock($id); ! } ! break; ! case "update": ! if ($perm->have_perm("blockPut")) { ! $content .= $block->putBlock($HTTP_POST_VARS); ! } ! # break; ! default: ! if ($perm->have_perm("blockNew")) { ! $content .= $block->newBlock(); /* prints the new block form */ ! } ! if ($perm->have_perm("blockList")) { ! $content .= $block->listBlock(); /* prints a list of current blocks */ ! $content .= $block->listBlockTypes($option, $name); /* optional block type management */ ! } } + + 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-07 16:24:07
|
Update of /cvsroot/phpslash/phpslash-ft/doc/html In directory usw-pr-cvs1:/tmp/cvs-serv31036/phpslash-ft/doc/html Modified Files: phpslash.sgml Log Message: block admin cleanup Index: phpslash.sgml =================================================================== RCS file: /cvsroot/phpslash/phpslash-ft/doc/html/phpslash.sgml,v retrieving revision 1.36 retrieving revision 1.37 diff -C2 -d -r1.36 -r1.37 *** phpslash.sgml 31 May 2002 19:29:24 -0000 1.36 --- phpslash.sgml 7 Jun 2002 16:24:04 -0000 1.37 *************** *** 771,774 **** --- 771,776 ---- authorNew.tpl authorProfile.tpl + blockEdit.tpl + blockList.tpl emailNotifyComment.tpl emailNotifySubmission.tpl |