phpslash-commit Mailing List for phpSlash (Page 108)
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...> - 2001-11-17 17:17:36
|
Update of /cvsroot/phpslash/phpslash-ft In directory usw-pr-cvs1:/tmp/cvs-serv3885 Modified Files: CHANGES Log Message: bugfix - no browser lang Index: CHANGES =================================================================== RCS file: /cvsroot/phpslash/phpslash-ft/CHANGES,v retrieving revision 1.317 retrieving revision 1.318 diff -C2 -d -r1.317 -r1.318 *** CHANGES 2001/11/14 18:07:48 1.317 --- CHANGES 2001/11/17 17:17:33 1.318 *************** *** 11,14 **** --- 11,20 ---- R - RELEASE + 2001-Nov-17 11:15AM CST Joe Stewart <jo...@be...> + [B] - functions.inc - setLantTpl still wasn't setting the language dir + if the browser had no language preference in Mozilla. + Block_render_section.class - now templates can display the section + description and limit to a specific section. + 2001-Nov-14 12:00PM CST Joe Stewart <jo...@be...> [B] - functions.inc - getHeader had no method of passing alternative navbar |
From: Joe S. <joe...@us...> - 2001-11-17 17:17:06
|
Update of /cvsroot/phpslash/phpslash-ft/class In directory usw-pr-cvs1:/tmp/cvs-serv3745/class Modified Files: functions.inc Block_render_section.class Log Message: bugfix - no browser lang Index: functions.inc =================================================================== RCS file: /cvsroot/phpslash/phpslash-ft/class/functions.inc,v retrieving revision 1.80 retrieving revision 1.81 diff -C2 -d -r1.80 -r1.81 *** functions.inc 2001/11/14 18:06:30 1.80 --- functions.inc 2001/11/17 17:17:03 1.81 *************** *** 922,925 **** --- 922,928 ---- } + } else { + // no browser pref + $templatedir .= "/" . basename($_PSL['language']); } *************** *** 965,970 **** $templatedir = $_PSL[templatedir]; if( $new_skin == "..") { ! $new_skin = "default"; } if($new_skin) { --- 968,974 ---- $templatedir = $_PSL[templatedir]; + // no directory traversal if( $new_skin == "..") { ! $new_skin = $_PSL[defaultskin; } if($new_skin) { Index: Block_render_section.class =================================================================== RCS file: /cvsroot/phpslash/phpslash-ft/class/Block_render_section.class,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** Block_render_section.class 2001/10/09 23:21:45 1.4 --- Block_render_section.class 2001/11/17 17:17:03 1.5 *************** *** 11,14 **** --- 11,16 ---- * * mode = all [] show all sections ( even those with no stories) + * section_id = limit returned data to this section_id + * section = limit returned data to this section * tpl = template filename [sectionsblock] (no path or extension) */ *************** *** 81,85 **** $q = "SELECT DISTINCT psl_section.section_id, ! psl_section.section_name FROM psl_section "; /* "all" will show sections that don't have any stories */ --- 83,88 ---- $q = "SELECT DISTINCT psl_section.section_id, ! psl_section.section_name, ! psl_section.description FROM psl_section "; /* "all" will show sections that don't have any stories */ *************** *** 87,91 **** --- 90,101 ---- $q .= ", psl_section_lut WHERE psl_section.section_id = psl_section_lut.section_id "; + if ( $section_id) { + $q .= " AND psl_section.section_id = '$section_id' "; + } elseif( $section) { + $q .= " AND psl_section.section_name = '$section' "; + } + } + $q .= " ORDER BY section_name"; *************** *** 102,106 **** $template->set_var (array ( SECTION_LINK => $section_link, ! SECTION_NAME => $db->Record[section_name] )); $template->parse ("section_block", "each_section", true); --- 112,117 ---- $template->set_var (array ( SECTION_LINK => $section_link, ! SECTION_NAME => $db->Record[section_name], ! DESCRIPTION => $db->Record[description] )); $template->parse ("section_block", "each_section", true); |
From: Joe S. <joe...@us...> - 2001-11-14 18:07:54
|
Update of /cvsroot/phpslash/phpslash-ft In directory usw-pr-cvs1:/tmp/cvs-serv12859 Modified Files: CHANGES Log Message: hide email addresses from harvesters Index: CHANGES =================================================================== RCS file: /cvsroot/phpslash/phpslash-ft/CHANGES,v retrieving revision 1.316 retrieving revision 1.317 diff -C2 -d -r1.316 -r1.317 *** CHANGES 2001/11/13 22:03:45 1.316 --- CHANGES 2001/11/14 18:07:48 1.317 *************** *** 11,14 **** --- 11,21 ---- R - RELEASE + 2001-Nov-14 12:00PM CST Joe Stewart <jo...@be...> + [B] - functions.inc - getHeader had no method of passing alternative navbar + templates or menus. + [B] - functions.inc, Story.class, Comment.class - published email addresses + are converted to their ascii html equivalents, making it more difficult + for email harvesters to gather addresses for spamming. + 2001-Nov-13 4:00PM CST Joe Stewart <jo...@be...> [B] - Story.class - newStory can now edit correctly stories saved with |
From: Joe S. <joe...@us...> - 2001-11-14 18:07:29
|
Update of /cvsroot/phpslash/phpslash-ft/class In directory usw-pr-cvs1:/tmp/cvs-serv12763/class Modified Files: Comment.class Log Message: hide email addresses from harvesters Index: Comment.class =================================================================== RCS file: /cvsroot/phpslash/phpslash-ft/class/Comment.class,v retrieving revision 1.20 retrieving revision 1.21 diff -C2 -d -r1.20 -r1.21 *** Comment.class 2001/10/17 17:11:26 1.20 --- Comment.class 2001/11/14 18:07:23 1.21 *************** *** 234,240 **** if ($ary[email] != "") { $this->ctempl->set_var(array( ! EMAIL_LINK_ON => "<A HREF=\"mailto:" . $ary[email] . "\">", EMAIL_LINK_OFF => "</A>", ! EMAIL => $ary[email] )); } else { --- 234,240 ---- if ($ary[email] != "") { $this->ctempl->set_var(array( ! EMAIL_LINK_ON => "<A HREF=\"". str_html("mailto:" . $ary[email]) ."\">", EMAIL_LINK_OFF => "</A>", ! EMAIL => str_html($ary[email]) )); } else { |
From: Joe S. <joe...@us...> - 2001-11-14 18:06:33
|
Update of /cvsroot/phpslash/phpslash-ft/class In directory usw-pr-cvs1:/tmp/cvs-serv12587/class Modified Files: functions.inc Story.class Log Message: hide email addresses from harvesters Index: functions.inc =================================================================== RCS file: /cvsroot/phpslash/phpslash-ft/class/functions.inc,v retrieving revision 1.79 retrieving revision 1.80 diff -C2 -d -r1.79 -r1.80 *** functions.inc 2001/11/13 22:01:27 1.79 --- functions.inc 2001/11/14 18:06:30 1.80 *************** *** 352,356 **** Parameters : $title -> Title of the page being displayed $metaobject -> Extra stuff about the page (Admin, Home, Poll) ! Accepts an array of name/value pairs for metatags $section -> if supplied, generates blocks for this section Accepts an array to pass to getBlocks --- 352,358 ---- Parameters : $title -> Title of the page being displayed $metaobject -> Extra stuff about the page (Admin, Home, Poll) ! Accepts an array of name/value pairs for metatags. ! Alternative navbar template or menu can be passed in ! navbar_ary[tpl] or navbar_ary[menu_ary]. $section -> if supplied, generates blocks for this section Accepts an array to pass to getBlocks *************** *** 401,406 **** --- 403,413 ---- $templ->set_block ("header", "each_metatag", "metatag_block"); if ( is_array($metaobject)) { + $templ->set_var( XSITEOBJECT, $metaobject['object']); unset($metaobject['object']); + + $navbar_ary = $metaobject['navbar_ary']; + unset($metaobject['navbar_ary']); + while( list( $key, $value) = each( $metaobject )) { $templ->set_var (array ( *************** *** 429,433 **** SITETITLE => $title, SEARCH_ACTION_URL => $action_url, ! NAVBAR => $navbar->getNavBar(), TOPICBAR => $topicbar->getTopicBar(), BLOCKS_COLUMN => $allblocks, --- 436,440 ---- SITETITLE => $title, SEARCH_ACTION_URL => $action_url, ! NAVBAR => $navbar->getNavBar($navbar_ary[tpl],$navbar_ary[menu_ary]), TOPICBAR => $topicbar->getTopicBar(), BLOCKS_COLUMN => $allblocks, *************** *** 989,992 **** --- 996,1019 ---- return $templatedir; } + + /** + * function str_html - returns a "html/ascii" string + * + * The string is converted to its ascii html equivalent + * + * "nospam" becomes "nospam" + * + * @param string string + * + * @access public + * + * @return string ordhtml + */ + + function str_html( $string) { + $ordhtml = "&#" . implode(';&#',unpack('C*char', $string)) .";"; + return $ordhtml; + } + ?> Index: Story.class =================================================================== RCS file: /cvsroot/phpslash/phpslash-ft/class/Story.class,v retrieving revision 1.20 retrieving revision 1.21 diff -C2 -d -r1.20 -r1.21 *** Story.class 2001/11/13 22:01:27 1.20 --- Story.class 2001/11/14 18:06:31 1.21 *************** *** 306,310 **** BODY_TEXT => $ary[body_text], DEPT => $ary[dept], ! URL => $ary[url], NAME => $ary[realname], DATEF => $ary[datef], --- 306,310 ---- BODY_TEXT => $ary[body_text], DEPT => $ary[dept], ! URL => str_html($ary[url]), NAME => $ary[realname], DATEF => $ary[datef], *************** *** 457,461 **** BODY_TEXT => $body_text, DEPT => $stories_ary[$i][dept], ! URL => $stories_ary[$i][url], NAME => $stories_ary[$i][name], DATEF => $stories_ary[$i][datef], --- 457,461 ---- BODY_TEXT => $body_text, DEPT => $stories_ary[$i][dept], ! URL => str_html($stories_ary[$i][url]), NAME => $stories_ary[$i][name], DATEF => $stories_ary[$i][datef], |
From: Joe S. <joe...@us...> - 2001-11-13 22:03:48
|
Update of /cvsroot/phpslash/phpslash-ft In directory usw-pr-cvs1:/tmp/cvs-serv12569 Modified Files: CHANGES Log Message: extrans, title, and metatag tweaks Index: CHANGES =================================================================== RCS file: /cvsroot/phpslash/phpslash-ft/CHANGES,v retrieving revision 1.315 retrieving revision 1.316 diff -C2 -d -r1.315 -r1.316 *** CHANGES 2001/11/12 02:36:05 1.315 --- CHANGES 2001/11/13 22:03:45 1.316 *************** *** 11,14 **** --- 11,22 ---- R - RELEASE + 2001-Nov-13 4:00PM CST Joe Stewart <jo...@be...> + [B] - Story.class - newStory can now edit correctly stories saved with + "Extended Translation". + [B] - functions.inc - getHeader wasn't using the block array argument. + [B] - config.php3, functions.inc, index.php3, article.php3 - + put xsiteobject to use passing metatags. + [T] - slashHead.tpl - title and metatag tweaks + 2001-Nov-11 8:30PM CST Joe Stewart <jo...@be...> [B] - Story_base.class, Story.class - db object created in Story_base |
From: Joe S. <joe...@us...> - 2001-11-13 22:01:30
|
Update of /cvsroot/phpslash/phpslash-ft/class In directory usw-pr-cvs1:/tmp/cvs-serv11829/class Modified Files: Story.class functions.inc Log Message: extrans, title, and metatag tweaks Index: Story.class =================================================================== RCS file: /cvsroot/phpslash/phpslash-ft/class/Story.class,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -d -r1.19 -r1.20 *** Story.class 2001/11/12 02:34:11 1.19 --- Story.class 2001/11/13 22:01:27 1.20 *************** *** 1032,1037 **** $this->template->set_var(array( DEPT => stripslashes($this->db->Record[dept]), ! INTROTEXT => stripslashes($this->db->Record[intro_text]), ! BODYTEXT => stripslashes($this->db->Record[body_text]), TITLE => stripslashes($this->db->Record[title]), TIME => $this->db->Record['time'], --- 1032,1037 ---- $this->template->set_var(array( DEPT => stripslashes($this->db->Record[dept]), ! INTROTEXT => htmlspecialchars(stripslashes($this->db->Record[intro_text])), ! BODYTEXT => htmlspecialchars(stripslashes($this->db->Record[body_text])), TITLE => stripslashes($this->db->Record[title]), TIME => $this->db->Record['time'], Index: functions.inc =================================================================== RCS file: /cvsroot/phpslash/phpslash-ft/class/functions.inc,v retrieving revision 1.78 retrieving revision 1.79 diff -C2 -d -r1.78 -r1.79 *** functions.inc 2001/10/17 17:11:27 1.78 --- functions.inc 2001/11/13 22:01:27 1.79 *************** *** 352,356 **** --- 352,358 ---- Parameters : $title -> Title of the page being displayed $metaobject -> Extra stuff about the page (Admin, Home, Poll) + Accepts an array of name/value pairs for metatags $section -> if supplied, generates blocks for this section + Accepts an array to pass to getBlocks $tpl -> optional alternate template *******************************************************************************/ *************** *** 368,376 **** if ($section != '') { $block = new Block_i; ! $allblocks = $block->getAllBlocksForIndex($section); } else { $allblocks = ''; } /* Templates */ if( empty($tpl) ) { --- 370,385 ---- if ($section != '') { $block = new Block_i; ! // should be passing array now days ! if( is_array($section)) { ! $allblocks = $block->getBlocks($section); ! } else { ! $allblocks = $block->getAllBlocksForIndex($section); ! } } else { $allblocks = ''; } + + /* Templates */ if( empty($tpl) ) { *************** *** 389,392 **** --- 398,416 ---- header => $tpl )); + + $templ->set_block ("header", "each_metatag", "metatag_block"); + if ( is_array($metaobject)) { + $templ->set_var( XSITEOBJECT, $metaobject['object']); + unset($metaobject['object']); + while( list( $key, $value) = each( $metaobject )) { + $templ->set_var (array ( + METANAME => $key, + METADESCRIPTION => $value + )); + $templ->parse ("metatag_block", "each_metatag", true); + } + } else { + $templ->set_var( XSITEOBJECT, $metaobject); + } $action_url = "\"$_PSL[rooturl]/search.php3\""; *************** *** 396,404 **** $templ->set_var(array( ROOTDIR => $_PSL[rooturl], IMAGEDIR => $_PSL[imageurl], SITETITLE => $title, SEARCH_ACTION_URL => $action_url, - XSITEOBJECT => $metaobject, NAVBAR => $navbar->getNavBar(), TOPICBAR => $topicbar->getTopicBar(), --- 420,432 ---- $templ->set_var(array( + SITE_NAME => $_PSL[site_name], + SITE_OWNER => $_PSL[site_owner], + SITE_SLOGAN => $_PSL[site_slogan], + SITE_TITLE => $_PSL[site_title], + SECTION => $_PSL[section], ROOTDIR => $_PSL[rooturl], IMAGEDIR => $_PSL[imageurl], SITETITLE => $title, SEARCH_ACTION_URL => $action_url, NAVBAR => $navbar->getNavBar(), TOPICBAR => $topicbar->getTopicBar(), *************** *** 554,558 **** function : breadcrumb -> Parameters : $ary -> cmd line array ! returns : templated html for a "breadcrumb" link *******************************************************************************/ function breadcrumb ($ary) { --- 582,587 ---- function : breadcrumb -> Parameters : $ary -> cmd line array ! returns : templated html for a "breadcrumb" link and ! sets global name variables *******************************************************************************/ function breadcrumb ($ary) { *************** *** 563,566 **** --- 592,596 ---- $sec = new Section; $ary[section] = $sec->getName($ary[section_id]); + $_PSL[section] = $ary[section]; } else { // if there's no section_id, then default to home_section_id. $ary[section_id] = $_PSL[home_section_id]; *************** *** 570,577 **** --- 600,609 ---- $top = new Topic; $ary[topic] = $top->getName($ary[topic_id]); + $_PSL[topic] = $ary[topic]; } if ($ary[author_id]) { $author = new Author; $ary[author] = $author->getName($ary[author_id]); + $_PSL[author] = $ary[author]; } |
From: Joe S. <joe...@us...> - 2001-11-13 22:01:30
|
Update of /cvsroot/phpslash/phpslash-ft/public_html/templates/en/default In directory usw-pr-cvs1:/tmp/cvs-serv11829/public_html/templates/en/default Modified Files: slashHead.tpl Log Message: extrans, title, and metatag tweaks Index: slashHead.tpl =================================================================== RCS file: /cvsroot/phpslash/phpslash-ft/public_html/templates/en/default/slashHead.tpl,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** slashHead.tpl 2001/05/21 17:08:41 1.10 --- slashHead.tpl 2001/11/13 22:01:27 1.11 *************** *** 4,8 **** <html> <head> ! <title>{SITETITLE}</title> <!-- Enter Your Desired META Tags Below Here --> <!-- This Meta Tag is Defined In Each Page By Setting The Variable --- 4,8 ---- <html> <head> ! <title>{SITE_NAME} - {SECTION} {SITETITLE}</title> <!-- Enter Your Desired META Tags Below Here --> <!-- This Meta Tag is Defined In Each Page By Setting The Variable *************** *** 11,14 **** --- 11,17 ---- <META name="object" CONTENT="{XSITEOBJECT}"> <!-- Enter Your META Tags Above Here --> + <!-- BEGIN each_metatag --> + <META name="{METANAME}" CONTENT="{METADESCRIPTION}"> + <!-- END each_metatag --> </HEAD> <BODY BGCOLOR="#3F4469" text="#000000" link="#3F4469" vlink="#004469"> |
From: Joe S. <joe...@us...> - 2001-11-13 22:01:30
|
Update of /cvsroot/phpslash/phpslash-ft/public_html In directory usw-pr-cvs1:/tmp/cvs-serv11829/public_html Modified Files: config.php3 index.php3 article.php3 Log Message: extrans, title, and metatag tweaks Index: config.php3 =================================================================== RCS file: /cvsroot/phpslash/phpslash-ft/public_html/config.php3,v retrieving revision 1.115 retrieving revision 1.116 diff -C2 -d -r1.115 -r1.116 *** config.php3 2001/11/12 02:32:43 1.115 --- config.php3 2001/11/13 22:01:27 1.116 *************** *** 112,115 **** --- 112,122 ---- $_PSL[mailinglist_subject] = "PHPSlash Times"; + // metatags that may need to be overwritten later ( article description). + // other metatags should probably just reside in slashHead.tpl + $metatags['keywords'] = "weblog, content management, php"; + $metatags['description'] = "phpSlash is a port of the slash-0.2 code from Perl to PHP. Since it was first started, phpslash has become a different beast of its own. It currently boasts full HTML templates, an OO design, the ability to operate in a hosted environment, and a bunch of other goodies."; + + $_PSL[metatags] = $metatags; + /* the comment_defaultmode variable allows you to define how the comments Index: index.php3 =================================================================== RCS file: /cvsroot/phpslash/phpslash-ft/public_html/index.php3,v retrieving revision 1.47 retrieving revision 1.48 diff -C2 -d -r1.47 -r1.48 *** index.php3 2001/09/06 17:18:22 1.47 --- index.php3 2001/11/13 22:01:27 1.48 *************** *** 9,13 **** // Objects ! $poll = new Poll; $story = new Story; $block = new Block_i; --- 9,13 ---- // Objects ! // $poll = new Poll; $story = new Story; $block = new Block_i; *************** *** 34,41 **** } - slashhead($pagetitle,$xsiteobject); - debug("Auth", $auth->auth); - $allstories = breadcrumb( $ary); $allstories .= $story->getStories($ary); --- 34,42 ---- } $allstories = breadcrumb( $ary); + + $_PSL['metatags']['object'] = $xsiteobject; + + slashhead($pagetitle,$_PSL['metatags']); $allstories .= $story->getStories($ary); Index: article.php3 =================================================================== RCS file: /cvsroot/phpslash/phpslash-ft/public_html/article.php3,v retrieving revision 1.50 retrieving revision 1.51 diff -C2 -d -r1.50 -r1.51 *** article.php3 2001/09/21 00:02:48 1.50 --- article.php3 2001/11/13 22:01:27 1.51 *************** *** 82,87 **** $t->set_file(article, "article.tpl"); ! ! $header = getHeader($ttitle,$xsiteobject); $footer = getFooter(); --- 82,91 ---- $t->set_file(article, "article.tpl"); ! ! $_PSL['metatags']['object'] = $xsiteobject; ! // override description metatag to include first 150 chars of article ! $_PSL['metatags']['description'] = substr(strip_tags($story->story_ary["intro_text"]), 0, 150); ! ! $header = getHeader($ttitle,$_PSL['metatags']); $footer = getFooter(); |
From: Joe S. <joe...@us...> - 2001-11-12 02:36:08
|
Update of /cvsroot/phpslash/phpslash-ft In directory usw-pr-cvs1:/tmp/cvs-serv1302 Modified Files: CHANGES Log Message: db object correction Index: CHANGES =================================================================== RCS file: /cvsroot/phpslash/phpslash-ft/CHANGES,v retrieving revision 1.314 retrieving revision 1.315 diff -C2 -d -r1.314 -r1.315 *** CHANGES 2001/11/09 16:58:38 1.314 --- CHANGES 2001/11/12 02:36:05 1.315 *************** *** 11,16 **** R - RELEASE 2001-Nov-09 11:00AM CST Joe Stewart <jo...@be...> ! [B] - Poll.class - patched in Seth Hall's fix for mission poll comments. comment.php3 - patched in Seth Hall's fix for previewing comments. --- 11,24 ---- R - RELEASE + 2001-Nov-11 8:30PM CST Joe Stewart <jo...@be...> + [B] - Story_base.class, Story.class - db object created in Story_base + as it should have been. + Block_render_query.class - uses Story_base since all it needs is + extractStory. + config.php3 - require Story_base.class. + Section.class, Topic.class - minor quoting to getID queries. + 2001-Nov-09 11:00AM CST Joe Stewart <jo...@be...> ! [B] - Poll.class - patched in Seth Hall's fix for missing poll comments. comment.php3 - patched in Seth Hall's fix for previewing comments. |
From: Joe S. <joe...@us...> - 2001-11-12 02:34:14
|
Update of /cvsroot/phpslash/phpslash-ft/class In directory usw-pr-cvs1:/tmp/cvs-serv327 Modified Files: Story.class Story_base.class Block_render_query.class Section.class Topic.class Log Message: db object correction Index: Story.class =================================================================== RCS file: /cvsroot/phpslash/phpslash-ft/class/Story.class,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -d -r1.18 -r1.19 *** Story.class 2001/10/17 17:11:26 1.18 --- Story.class 2001/11/12 02:34:11 1.19 *************** *** 15,20 **** */ ! /* First let's bring in my parent class */ ! require($_PSL[classdir] . '/Story_base.class'); class Story extends Story_base { --- 15,20 ---- */ ! /* First let's bring in my parent class - moved to config.php3 - jvs - 1111/2001 */ ! // require($_PSL[classdir] . '/Story_base.class'); class Story extends Story_base { *************** *** 25,29 **** var $parent_name = "Story_base"; var $template; ! var $db; var $auth; var $perm; --- 25,29 ---- var $parent_name = "Story_base"; var $template; ! // var $db; var $auth; var $perm; *************** *** 36,41 **** global $auth, $perm, $_PSL; ! $this->db = new slashDB; $this->perm = $perm; $this->auth = $auth; --- 36,44 ---- global $auth, $perm, $_PSL; + + // call base class constructor + $this->Story_base(); ! // $this->db = new slashDB; $this->perm = $perm; $this->auth = $auth; Index: Story_base.class =================================================================== RCS file: /cvsroot/phpslash/phpslash-ft/class/Story_base.class,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** Story_base.class 2001/10/01 16:13:36 1.2 --- Story_base.class 2001/11/12 02:34:11 1.3 *************** *** 31,35 **** * CONSTRUCTORS */ ! /* * METHODS --- 31,37 ---- * CONSTRUCTORS */ ! function Story_base () { ! $this->db = new slashDB; ! } /* * METHODS Index: Block_render_query.class =================================================================== RCS file: /cvsroot/phpslash/phpslash-ft/class/Block_render_query.class,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** Block_render_query.class 2001/10/09 23:21:45 1.3 --- Block_render_query.class 2001/11/12 02:34:11 1.4 *************** *** 53,58 **** function query( $block_info) { ! $stories = new Story; $default_tpl = "queryblock.tpl"; --- 53,61 ---- function query( $block_info) { ! $stories = new Story_base; + $amp = $this->psl['amp']; + $site_homesection = $this->psl['site_homesection']; + $default_tpl = "queryblock.tpl"; *************** *** 85,91 **** if (is_array($stories_ary)) { for ($i = 0 ; $i < count($stories_ary) ; $i++) { $template->set_var(array( ! STORY_ID => $stories_ary[$i][story_id], TITLE => $stories_ary[$i][title], INTRO_TEXT => $stories_ary[$i][intro_text], --- 88,110 ---- if (is_array($stories_ary)) { for ($i = 0 ; $i < count($stories_ary) ; $i++) { + + $story_id = $stories_ary[$i][story_id]; + if ($ary['section_id'] != "") { + $story_id .= $amp . "section_id=" . $ary['section_id']; + } elseif ( ($ary['section'] != "") AND ( $ary['section'] != $site_homesection)) { + $section = new Section; + $section_name = $section->getId($ary['section']); + $story_id .= $amp . "section=" . $section_name; + } + if ($topic_id != "") { + $story_id .= $amp . "topic_id=" . $ary['topic_id']; + } elseif ($ary['topic'] != "") { + $topic = new Topic; + $topic_name = $topic->getId($ary['topic']); + $story_id .= $amp . "topic=" . $topic_name; + } $template->set_var(array( ! STORY_ID => $story_id, TITLE => $stories_ary[$i][title], INTRO_TEXT => $stories_ary[$i][intro_text], Index: Section.class =================================================================== RCS file: /cvsroot/phpslash/phpslash-ft/class/Section.class,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** Section.class 2001/11/07 21:35:34 1.5 --- Section.class 2001/11/12 02:34:11 1.6 *************** *** 204,208 **** $q = "SELECT section_name FROM psl_section ! WHERE section_id = $id"; $this->db->query($q); $this->db->next_record(); --- 204,208 ---- $q = "SELECT section_name FROM psl_section ! WHERE section_id = '$id'"; $this->db->query($q); $this->db->next_record(); *************** *** 226,230 **** $q = "SELECT section_id FROM psl_section ! WHERE section_name = $name"; $this->db->query($q); $this->db->next_record(); --- 226,230 ---- $q = "SELECT section_id FROM psl_section ! WHERE section_name = '$name'"; $this->db->query($q); $this->db->next_record(); Index: Topic.class =================================================================== RCS file: /cvsroot/phpslash/phpslash-ft/class/Topic.class,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** Topic.class 2001/11/07 21:35:34 1.6 --- Topic.class 2001/11/12 02:34:11 1.7 *************** *** 399,403 **** $q = "SELECT topic_name FROM psl_topic ! WHERE topic_id = $id"; $this->db->query($q); $this->db->next_record(); --- 399,403 ---- $q = "SELECT topic_name FROM psl_topic ! WHERE topic_id = '$id'"; $this->db->query($q); $this->db->next_record(); *************** *** 421,425 **** $q = "SELECT topic_id FROM psl_topic ! WHERE topic_name = $name"; $this->db->query($q); $this->db->next_record(); --- 421,425 ---- $q = "SELECT topic_id FROM psl_topic ! WHERE topic_name = '$name'"; $this->db->query($q); $this->db->next_record(); |
From: Joe S. <joe...@us...> - 2001-11-12 02:32:47
|
Update of /cvsroot/phpslash/phpslash-ft/public_html In directory usw-pr-cvs1:/tmp/cvs-serv32172 Modified Files: config.php3 Log Message: db object correction Index: config.php3 =================================================================== RCS file: /cvsroot/phpslash/phpslash-ft/public_html/config.php3,v retrieving revision 1.114 retrieving revision 1.115 diff -C2 -d -r1.114 -r1.115 *** config.php3 2001/10/17 17:11:27 1.114 --- config.php3 2001/11/12 02:32:43 1.115 *************** *** 353,356 **** --- 353,357 ---- } if ($_PSL[module][Story]) { + require($_PSL[classdir] . "/Story_base.class"); require($_PSL[classdir] . "/Story.class"); } |
From: Joe S. <joe...@us...> - 2001-11-09 16:59:13
|
Update of /cvsroot/phpslash/phpslash-ft/class In directory usw-pr-cvs1:/tmp/cvs-serv29390 Modified Files: Poll.class Log Message: bugfix - poll comments and comment preview Index: Poll.class =================================================================== RCS file: /cvsroot/phpslash/phpslash-ft/class/Poll.class,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** Poll.class 2001/08/04 19:46:01 1.10 --- Poll.class 2001/11/09 16:59:10 1.11 *************** *** 643,648 **** function resultPage ($ary) { ! $cmt = new Comment; ! # print "$results\n"; # print "Comments<BR><BR>$comments<BR><BR>\n"; --- 643,650 ---- function resultPage ($ary) { ! $cmt = new Comment($ary); ! $ary[story_id] = $ary[question_id]; ! $ary[parent_id] = 0; ! # print "$results\n"; # print "Comments<BR><BR>$comments<BR><BR>\n"; *************** *** 651,655 **** QUESTION_ID => $ary[question_id], RESULT => $this->getResults($ary[question_id]), ! COMMENT => $cmt->getAllComments($ary, $ary[question_id], 0) )); $this->templ->parse(OUT, resultpage); --- 653,657 ---- QUESTION_ID => $ary[question_id], RESULT => $this->getResults($ary[question_id]), ! COMMENT => $cmt->getAllComments($ary) )); $this->templ->parse(OUT, resultpage); |
From: Joe S. <joe...@us...> - 2001-11-09 16:58:58
|
Update of /cvsroot/phpslash/phpslash-ft/public_html In directory usw-pr-cvs1:/tmp/cvs-serv29330 Modified Files: comment.php3 Log Message: bugfix - poll comments and comment preview Index: comment.php3 =================================================================== RCS file: /cvsroot/phpslash/phpslash-ft/public_html/comment.php3,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** comment.php3 2001/09/25 19:23:53 1.8 --- comment.php3 2001/11/09 16:58:54 1.9 *************** *** 24,27 **** --- 24,28 ---- $cmtary[order] = $HTTP_GET_VARS[order]; $cmtary[story_id] = $story_id; + $cmtary[comment_id] = $comment_id; #if (!isset($HTTP_GET_VARS[parent_id])) { *************** *** 103,106 **** --- 104,108 ---- story_id => $cmtary[story_id], parent_id => $cmtary[parent_id], + comment_id => $cmtary[comment_id], comment_text => $comment_text, content => $content, |
From: Joe S. <joe...@us...> - 2001-11-09 16:58:41
|
Update of /cvsroot/phpslash/phpslash-ft In directory usw-pr-cvs1:/tmp/cvs-serv29275 Modified Files: CHANGES Log Message: bugfix - poll comments and comment preview Index: CHANGES =================================================================== RCS file: /cvsroot/phpslash/phpslash-ft/CHANGES,v retrieving revision 1.313 retrieving revision 1.314 diff -C2 -d -r1.313 -r1.314 *** CHANGES 2001/11/07 21:36:37 1.313 --- CHANGES 2001/11/09 16:58:38 1.314 *************** *** 11,14 **** --- 11,18 ---- R - RELEASE + 2001-Nov-09 11:00AM CST Joe Stewart <jo...@be...> + [B] - Poll.class - patched in Seth Hall's fix for mission poll comments. + comment.php3 - patched in Seth Hall's fix for previewing comments. + 2001-Nov-07 3:30PM CST Joe Stewart <jo...@be...> [B] - More Class and function documentation - Author.class, |
From: Joe S. <joe...@us...> - 2001-11-07 21:36:40
|
Update of /cvsroot/phpslash/phpslash-ft In directory usw-pr-cvs1:/tmp/cvs-serv14981 Modified Files: CHANGES Log Message: More Class and function documentation Index: CHANGES =================================================================== RCS file: /cvsroot/phpslash/phpslash-ft/CHANGES,v retrieving revision 1.312 retrieving revision 1.313 diff -C2 -d -r1.312 -r1.313 *** CHANGES 2001/11/07 19:40:52 1.312 --- CHANGES 2001/11/07 21:36:37 1.313 *************** *** 11,14 **** --- 11,20 ---- R - RELEASE + 2001-Nov-07 3:30PM CST Joe Stewart <jo...@be...> + [B] - More Class and function documentation - Author.class, + Block.class, Block_i.class, slashDB.class, slashPerm.class, + Section.class, Topic.class. PHPDoc work in progress can be + here: http://www.phpslash.org/phpdoc/phpslash-ft/ + 2001-Nov-07 1:30PM CST Joe Stewart <jo...@be...> [B] - Block.class - psl_section_block_lut_seq for the section_block_lut |
From: Joe S. <joe...@us...> - 2001-11-07 21:35:37
|
Update of /cvsroot/phpslash/phpslash-ft/class In directory usw-pr-cvs1:/tmp/cvs-serv14555 Modified Files: slashDB.class slashPerm.class Section.class Topic.class Log Message: More Class and function documentation Index: slashDB.class =================================================================== RCS file: /cvsroot/phpslash/phpslash-ft/class/slashDB.class,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** slashDB.class 2001/10/01 15:12:41 1.1 --- slashDB.class 2001/11/07 21:35:34 1.2 *************** *** 8,13 **** * Extends the phplib DB_Sql class. * - * @param array global _PSL - * */ --- 8,11 ---- *************** *** 27,32 **** * slashDB constructor * - * @param array global _PSL - * **/ function slashDB() { --- 25,28 ---- *************** *** 44,47 **** --- 40,45 ---- /** * Mysql error message + * + * @param string msg **/ function halt($msg) { Index: slashPerm.class =================================================================== RCS file: /cvsroot/phpslash/phpslash-ft/class/slashPerm.class,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** slashPerm.class 2001/10/01 15:13:02 1.1 --- slashPerm.class 2001/11/07 21:35:34 1.2 *************** *** 18,22 **** * slashPerm constructor * - * @param array global _PSL * **/ --- 18,21 ---- *************** *** 29,36 **** } ! /* * I had to redefine the perm_sel function so I can throw a "SIZE" * attribute in there. Other then that it's *exactly* the same * as the PHPLIB one. */ function perm_sel($name, $current = "", $class = "") { --- 28,40 ---- } ! /** * I had to redefine the perm_sel function so I can throw a "SIZE" * attribute in there. Other then that it's *exactly* the same * as the PHPLIB one. + * + * @param string name + * @param string current + * @param string class + * */ function perm_sel($name, $current = "", $class = "") { Index: Section.class =================================================================== RCS file: /cvsroot/phpslash/phpslash-ft/class/Section.class,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** Section.class 2001/10/17 17:11:26 1.4 --- Section.class 2001/11/07 21:35:34 1.5 *************** *** 3,9 **** /* $Id$ */ class Section { var $sec_templ,$db,$psl; ! function Section () { --- 3,18 ---- /* $Id$ */ + + /** + * Provides an API to the PHPSlash Section Management. + * + */ class Section { var $sec_templ,$db,$psl; ! ! /** ! * Section class constructor ! * @access private ! */ function Section () { *************** *** 22,26 **** } ! function listSection() { --- 31,42 ---- } ! ! /** ! * listSection - list all Section ! * ! * displays the complete list of sections ! * Used only by admin ! * @access public ! */ function listSection() { *************** *** 47,50 **** --- 63,76 ---- } + /** + * saveSection - save the section info to the DB + * + * Used only by admin + * + * @param array $ary + * + * @access public + */ + function saveSection($ary) { *************** *** 91,97 **** return $this->db->query($q); } ! ! /* deletes a section and is somewhat idiot-proof */ ! function deleteSection($section_id) { --- 117,127 ---- return $this->db->query($q); } ! ! /** ! * deleteSection - deletes a section and is somewhat idiot-proof ! * ! * @param integer section_id ! * @access public ! */ function deleteSection($section_id) { *************** *** 137,141 **** } ! /* just prints out the "form" and points the user to the "save" method */ function newSection() { --- 167,178 ---- } ! /** ! * newSection - spits out a blank form for input ! * ! * Just prints out the "form" and points the user to the "save" method ! * Used only by admin ! * ! * @access public ! */ function newSection() { *************** *** 152,156 **** } ! /* when given a section id, getName retuns the name */ function getName($id) { if (!$id) { --- 189,201 ---- } ! /** ! * getName - return name assign to id ! * ! * when given a section id, getName returns the name ! * ! * @param integer id ! * @access public ! * return section_name ! */ function getName($id) { if (!$id) { *************** *** 166,170 **** } ! /* when given a name, getId retuns the id */ function getId($name) { if (!$name) { --- 211,223 ---- } ! /** ! * getId - return id assign to name ! * ! * when given a name, getId returns the id ! * ! * @param string name ! * @access public ! * return section_id ! */ function getId($name) { if (!$name) { *************** *** 179,183 **** }; } ! function sectionSelect($varname,$selected) { --- 232,245 ---- }; } ! ! /** ! * sectionSelect - spit out section select box ! * ! * ! * @param string varname ! * @param string selected ! * @access public ! * return output ! */ function sectionSelect($varname,$selected) { Index: Topic.class =================================================================== RCS file: /cvsroot/phpslash/phpslash-ft/class/Topic.class,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** Topic.class 2001/10/17 17:11:27 1.5 --- Topic.class 2001/11/07 21:35:34 1.6 *************** *** 3,13 **** /* $Id$ */ ! /* ! * Class: Topic ! * ! * Layer: All ! * Desc.: ! * ! */ class Topic { var $topic_templ; /* the template object */ --- 3,13 ---- /* $Id$ */ ! /** ! * Provides an API to the PHPSlash Topic Management. ! * ! * This object is how we do anything with topics. ! * ! */ ! class Topic { var $topic_templ; /* the template object */ *************** *** 16,22 **** var $psl; /* our local version of the _PSL array */ ! /* ! * CONSTRUCTORS ! */ function Topic () { --- 16,26 ---- var $psl; /* our local version of the _PSL array */ ! /** ! * The Section Constructor ! * ! * sets up the local version of the global _PSL array, the templates ! * and a few other things ! * @access private ! */ function Topic () { *************** *** 41,48 **** */ ! /* ! * Just prints the form with the list of existing topics ! * Used only by admin ! */ function listTopic() { --- 45,55 ---- */ ! /** ! * listTopic - list all Topics ! * ! * displays the complete list of topics ! * Used only by admin ! * @access public ! */ function listTopic() { *************** *** 85,96 **** } ! /* ! * Saves the topic in the $ary array to the DB ! * Obligatory fields: topic_name, image, width, height, alt_text ! * Optional fields: topic_id (only if this topic is already in the DB), ! * onlinkbar (if blank, defaults to 0) ! * Returns true if sucessful (topic added or updated), false on error ! * Used only by admin ! */ function saveTopic($ary) { --- 92,110 ---- } ! ! /** ! * saveTopic - save the topic info to the DB ! * ! * Saves the topic in the $ary array to the DB ! * Obligatory fields: topic_name, image, width, height, alt_text ! * Optional fields: topic_id (only if this topic is already in the DB), ! * onlinkbar (if blank, defaults to 0) ! * Returns true if sucessful (topic added or updated), false on error ! * Used only by admin ! * ! * @param array $ary ! * ! * @access public ! */ function saveTopic($ary) { *************** *** 172,181 **** } ! /* Given the topic_id, it deletes that from the topic table. The * psl_topic_lut and psl_topic_submission_lut table must be cleaned * first by updating all the stories to point to different topics. It * will also check and make sure there are NO stories/submissions * associated with this topic before deleting it. Returns true if ! * topic is deleted, false if not. */ function deleteTopic($topic_id) { --- 186,203 ---- } ! ! /** ! * deleteTopic - deletes the topic info from the db ! * ! * Given the topic_id, it deletes that from the topic table. The * psl_topic_lut and psl_topic_submission_lut table must be cleaned * first by updating all the stories to point to different topics. It * will also check and make sure there are NO stories/submissions * associated with this topic before deleting it. Returns true if ! * topic is deleted, false if not. ! * ! * @param integer topic_id ! * ! * @access public */ function deleteTopic($topic_id) { *************** *** 236,243 **** } ! /* ! * Just prints out the "form" and points the user to the "save" method ! * Used only by admin ! */ function newTopic($ary="") { --- 258,270 ---- } ! /** ! * newTopic - spits out a blank form for input ! * ! * Just prints out the "form" and points the user to the "save" method ! * Used only by admin ! * ! * @param array ary ! * @access public ! */ function newTopic($ary="") { *************** *** 301,304 **** --- 328,340 ---- } + /** + * displayTopics - display a list of all available topic images + * + * displays the complete list of available topic images + * Used only by admin + * + * @param string option + * @access public + */ function displayTopics($option="") { *************** *** 348,352 **** } ! /* when given a section id, getName retuns the name */ function getName($id) { if (!$id) { --- 384,396 ---- } ! /** ! * getName - return name assign to id ! * ! * when given a topic id, getName returns the name ! * ! * @param integer id ! * @access public ! * return author_name ! */ function getName($id) { if (!$id) { *************** *** 362,366 **** } ! /* when given a name, getId retuns the id */ function getId($name) { if (!$name) { --- 406,418 ---- } ! /** ! * getId - return id assign to name ! * ! * when given a name, getId returns the id ! * ! * @param string name ! * @access public ! * return topic_id ! */ function getId($name) { if (!$name) { *************** *** 376,379 **** --- 428,440 ---- } + /** + * topicSelect - spit out topic select box + * + * + * @param string varname + * @param string selected + * @access public + * return output + */ function topicSelect($varname,$selected) { |
From: Joe S. <joe...@us...> - 2001-11-07 21:35:14
|
Update of /cvsroot/phpslash/phpslash-ft/class In directory usw-pr-cvs1:/tmp/cvs-serv14419 Modified Files: Block_i.class Log Message: More Class and function documentation Index: Block_i.class =================================================================== RCS file: /cvsroot/phpslash/phpslash-ft/class/Block_i.class,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** Block_i.class 2001/11/07 19:39:56 1.8 --- Block_i.class 2001/11/07 21:35:11 1.9 *************** *** 294,297 **** --- 294,300 ---- * compatibility. * + * @param array ary + * @param string column + * * @access public */ |
From: Joe S. <joe...@us...> - 2001-11-07 21:35:02
|
Update of /cvsroot/phpslash/phpslash-ft/class In directory usw-pr-cvs1:/tmp/cvs-serv14261 Modified Files: Block.class Log Message: More Class and function documentation Index: Block.class =================================================================== RCS file: /cvsroot/phpslash/phpslash-ft/class/Block.class,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** Block.class 2001/11/07 19:39:31 1.5 --- Block.class 2001/11/07 21:34:59 1.6 *************** *** 11,25 **** class Block { - /** - * Atributes of the base block methods - * @var object $db - * @var array $block_info - * @var object $parser - * @var string $parsedData - * @var array $parser_arr - * @var array $block_ary - * @var array $psl - */ - /* Var's to be constructed in constructor */ var $db, $block_info, $parser, $parsedData, $parser_arr, $block_ary, $_PSL; --- 11,14 ---- *************** *** 30,42 **** * Atributes of the base block methods setup here * ! * @var object $db ! * @var array $block_info ! * @var object $parser ! * @var string $parsedData ! * @var array $parser_arr ! * @var array $block_ary ! * @var array $psl ! * ! * @access private * */ --- 19,23 ---- * Atributes of the base block methods setup here * ! * @access private * */ |
From: Joe S. <joe...@us...> - 2001-11-07 21:34:51
|
Update of /cvsroot/phpslash/phpslash-ft/class In directory usw-pr-cvs1:/tmp/cvs-serv14164 Modified Files: Author.class Log Message: More Class and function documentation Index: Author.class =================================================================== RCS file: /cvsroot/phpslash/phpslash-ft/class/Author.class,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** Author.class 2001/11/07 19:40:28 1.7 --- Author.class 2001/11/07 21:34:48 1.8 *************** *** 184,188 **** * * @param integer author_id_to_delete ! * @param integer author_id * * @access public --- 184,188 ---- * * @param integer author_id_to_delete ! * @param string author_id * * @access public *************** *** 246,250 **** * points the user to the "save" method * Used only by admin ! * * @access public */ --- 246,251 ---- * points the user to the "save" method * Used only by admin ! * ! * @param integer id * @access public */ |
From: Joe S. <joe...@us...> - 2001-11-07 19:40:54
|
Update of /cvsroot/phpslash/phpslash-ft In directory usw-pr-cvs1:/tmp/cvs-serv10437 Modified Files: CHANGES Log Message: housekeeping Index: CHANGES =================================================================== RCS file: /cvsroot/phpslash/phpslash-ft/CHANGES,v retrieving revision 1.311 retrieving revision 1.312 diff -C2 -d -r1.311 -r1.312 *** CHANGES 2001/10/17 17:11:26 1.311 --- CHANGES 2001/11/07 19:40:52 1.312 *************** *** 11,14 **** --- 11,22 ---- R - RELEASE + 2001-Nov-07 1:30PM CST Joe Stewart <jo...@be...> + [B] - Block.class - psl_section_block_lut_seq for the section_block_lut + id's. Cleaned out doParse and other function tweaking. Globals + and phpdoc housekeeping. + Block_i.class - Globals and phpdoc housekeeping. + Author.class - getId uses correct fields. Globals and phpdoc + housekeeping. + 2001-Oct-09 4:23PM PDT Ajay Sharma <ss...@od...> [F] - The story admin is much friendly. You can select authors, |
From: Joe S. <joe...@us...> - 2001-11-07 19:40:34
|
Update of /cvsroot/phpslash/phpslash-ft/class In directory usw-pr-cvs1:/tmp/cvs-serv10320 Modified Files: Author.class Log Message: housekeeping Index: Author.class =================================================================== RCS file: /cvsroot/phpslash/phpslash-ft/class/Author.class,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** Author.class 2001/10/17 17:11:26 1.6 --- Author.class 2001/11/07 19:40:28 1.7 *************** *** 3,21 **** /* $Id$ */ ! /* ! * Class: Author ! * ! * Layer: All ! * Desc.: ! * ! * NOTES/TO-DO: ! * ! */ class Author { var $author_templ, $db, $perm, $psl; ! /* ! * CONSTRUCTORS ! */ function Author () { --- 3,23 ---- /* $Id$ */ ! /** ! * Provides an API to the PHPSlash Author Management. ! * ! * This object is how we do anything with authors. ! * ! */ class Author { var $author_templ, $db, $perm, $psl; ! /** ! * The Author Constructor ! * ! * sets up the local version of the global _PSL array, the templates ! * and a few other things ! * @access private ! */ ! function Author () { *************** *** 35,40 **** $this->author_templ->set_var( array( ! ROOTDIR => $rootdir, ! IMAGEDIR => $imagedir )); } --- 37,42 ---- $this->author_templ->set_var( array( ! ROOTDIR => $this->psl['rootur'], ! IMAGEDIR => $this->psl['imageurl'] )); } *************** *** 44,51 **** */ ! /* ! * Just prints the list of existing authors ! * Used only by admin ! */ function listAuthor() { --- 46,56 ---- */ ! /** ! * listAuthor - list all Authors ! * ! * displays the complete list of authors ! * Used only by admin ! * @access public ! */ function listAuthor() { *************** *** 85,96 **** } ! /* ! * Saves the author in the $ary array to the DB ! * Obligatory fields: author_name, image, width, height, alt_text ! * Optional fields: author_id (only if this author is already in the DB), ! * onlinkbar (if blank, defaults to 0) ! * Returns true if sucessful (author added or updated), false on error ! * Used only by admin ! */ function saveAuthor($ary) { --- 90,107 ---- } ! /** ! * saveAuthor - save the author info to the DB ! * ! * Saves the author in the $ary array to the DB ! * Obligatory fields: author_name, image, width, height, alt_text ! * Optional fields: author_id (only if this author is already in the DB), ! * onlinkbar (if blank, defaults to 0) ! * Returns true if sucessful (author added or updated), false on error ! * Used only by admin ! * ! * @param array $ary ! * ! * @access public ! */ function saveAuthor($ary) { *************** *** 162,171 **** } ! /* Given the author_id, it deletes that from the author table. The * psl_author_lut and psl_author_submission_lut table must be cleaned * first by updating all the stories to point to different authors. It * will also check and make sure there are NO stories/submissions * associated with this author before deleting it. Returns true if ! * author is deleted, false if not. */ function deleteAuthor($author_id_to_delete, $author_id="") { --- 173,190 ---- } ! /** ! * deleteAuthor - deletes the author info to the DB ! * ! * Given the author_id, it deletes that from the author table. The * psl_author_lut and psl_author_submission_lut table must be cleaned * first by updating all the stories to point to different authors. It * will also check and make sure there are NO stories/submissions * associated with this author before deleting it. Returns true if ! * author is deleted, false if not. ! * ! * @param integer author_id_to_delete ! * @param integer author_id ! * ! * @access public */ function deleteAuthor($author_id_to_delete, $author_id="") { *************** *** 191,198 **** } ! /* ! * Just prints out the "form" and points the user to the "save" method ! * Used only by admin ! */ function newAuthor() { --- 210,221 ---- } ! /** ! * newAuthor - spits out a blank form for input ! * ! * Just prints out the "form" and points the user to the "save" method ! * Used only by admin ! * ! * @access public ! */ function newAuthor() { *************** *** 216,223 **** } ! /* ! * Just prints out the "form" with the user's info and points the user to the "save" method ! * Used only by admin ! */ function editAuthor($id) { --- 239,252 ---- } ! ! /** ! * editAuthor - spits out a form for updating author info ! * ! * Just prints out the "form" with the user's info and ! * points the user to the "save" method ! * Used only by admin ! * ! * @access public ! */ function editAuthor($id) { *************** *** 255,260 **** } ! ! /* when given a section id, getName retuns the name */ function getName($id) { if (!$id) { --- 284,297 ---- } ! ! /** ! * getName - return name assign to id ! * ! * when given a author id, getName returns the name ! * ! * @param integer id ! * @access public ! * return author_name ! */ function getName($id) { if (!$id) { *************** *** 270,287 **** } ! /* when given a name, getId retuns the id */ function getId($name) { if (!$name) { return false; } else { ! $q = "SELECT topic_id ! FROM psl_topic ! WHERE topic_name = $name"; $this->db->query($q); $this->db->next_record(); ! return $this->db->f("topic_id"); }; } function authorSelect($varname,$selected) { --- 307,342 ---- } ! /** ! * getId - return id assign to name ! * ! * when given a name, getId returns the id ! * ! * @param string name ! * @access public ! * return author_id ! */ ! function getId($name) { if (!$name) { return false; } else { ! $q = "SELECT author_id ! FROM psl_author ! WHERE author_name = $name"; $this->db->query($q); $this->db->next_record(); ! return $this->db->f("author_id"); }; } + /** + * authorSelect - spit out author select box + * + * + * @param string varname + * @param string selected + * @access public + * return output + */ function authorSelect($varname,$selected) { |
From: Joe S. <joe...@us...> - 2001-11-07 19:39:59
|
Update of /cvsroot/phpslash/phpslash-ft/class In directory usw-pr-cvs1:/tmp/cvs-serv10051 Modified Files: Block_i.class Log Message: housekeeping Index: Block_i.class =================================================================== RCS file: /cvsroot/phpslash/phpslash-ft/class/Block_i.class,v retrieving revision 1.7 retrieving revision 1.8 diff -C2 -d -r1.7 -r1.8 *** Block_i.class 2001/10/09 23:21:45 1.7 --- Block_i.class 2001/11/07 19:39:56 1.8 *************** *** 7,19 **** require($_PSL[classdir] . '/Block.class'); class Block_i extends Block { /* Decare properties for class Block_i*/ ! var $templ, $debug; /* * class Block also defines the following properties: ! * slash, db, block_info, parser, parsedData */ ! function Block_i() { /* Constructor: Create sub-objects here, etc... */ --- 7,30 ---- require($_PSL[classdir] . '/Block.class'); + /** + * Interface Level access to the PHPSlash Block Engine. + * + * This object is how we display block data. It also + * provides the interface for block management. + * + */ class Block_i extends Block { /* Decare properties for class Block_i*/ ! var $psl, $templ, $debug; /* * class Block also defines the following properties: ! * psl, db, block_info, parser, parsedData */ ! ! /** ! * Block_i - constructor for the Block_i class ! * ! */ function Block_i() { /* Constructor: Create sub-objects here, etc... */ *************** *** 30,34 **** /* Start Template Object */ ! $this->templ = new Template($this->psl[templatedir]); $this->templ->debug = 0; --- 41,45 ---- /* Start Template Object */ ! $this->templ = new Template($this->psl['templatedir']); $this->templ->debug = 0; *************** *** 43,52 **** $this->templ->set_var( array( ROOTDIR => $this->psl[rooturl], ! IMAGEDIR => $this->psl[imageurl] )); } ! function newBlock() { - global $PHP_SELF; titlebar("100%", "Create a New Block"); --- 54,70 ---- $this->templ->set_var( array( ROOTDIR => $this->psl[rooturl], ! IMAGEDIR => $this->psl[imageurl] )); } ! ! ! /** ! * newBlock - Create a New Block ! * ! * Displays the form for entry of block info ! * ! * @access private ! */ function newBlock() { titlebar("100%", "Create a New Block"); *************** *** 90,94 **** /* display a blank form */ $this->templ->set_var(array( ! ACTION_URL => $PHP_SELF, BLOCK_TITLE => "", LOCATION => "", --- 108,112 ---- /* display a blank form */ $this->templ->set_var(array( ! ACTION_URL => $this->psl['phpself'], BLOCK_TITLE => "", LOCATION => "", *************** *** 103,109 **** $this->templ->p(OUT); } ! function editBlock($id) { - global $PHP_SELF; titlebar("100%", "Update a Block"); --- 121,134 ---- $this->templ->p(OUT); } ! ! /** ! * editBlock - Update a New Block ! * ! * displays the form for block edits ! * ! * @param integer id ! * @access private ! */ function editBlock($id) { titlebar("100%", "Update a Block"); *************** *** 201,205 **** $this->templ->set_var(array( ! ACTION_URL => $PHP_SELF, BLOCK_TITLE => $this->block_info["title"], LOCATION => $this->block_info["location"], --- 226,230 ---- $this->templ->set_var(array( ! ACTION_URL => $this->psl['phpself'], BLOCK_TITLE => $this->block_info["title"], LOCATION => $this->block_info["location"], *************** *** 216,224 **** } ! function listBlock() { - global $PHP_SELF,$_PSL; - $query = "SELECT block.id, title, --- 241,254 ---- } ! ! /** ! * listBlock - list all blocks ! * ! * displays the complete list of blocks ! * ! * @access private ! */ function listBlock() { $query = "SELECT block.id, title, *************** *** 236,242 **** $block_id = $this->db->f("id"); ! $modifyurl = "$_PSL[adminurl]/blockAdmin.php3?submit=edit&id=$block_id"; ! $delurl = "$_PSL[adminurl]/blockAdmin.php3?submit=delete&id=$block_id"; ! $viewurl = "$_PSL[adminurl]/blockAdmin.php3?submit=view&id=$block_id"; $this->templ->set_var(array( --- 266,272 ---- $block_id = $this->db->f("id"); ! $modifyurl = $this->psl['adminurl'] ."/blockAdmin.php3?submit=edit&id=". $block_id; ! $delurl = $this->psl['adminurl'] ."/blockAdmin.php3?submit=delete&id=". $block_id; ! $viewurl = $this->psl['adminurl'] ."/blockAdmin.php3?submit=view&id=". $block_id; $this->templ->set_var(array( *************** *** 258,261 **** --- 288,299 ---- } + /** + * getAllBlocksForIndex - wrapper to getBlocks + * + * Should use getBlocks instead, include for historical + * compatibility. + * + * @access public + */ function getAllBlocksForIndex($section, $column="") { $ary[section] = $section; *************** *** 294,298 **** } ! /* Takes an id and does stuff to return a html formatted block */ function parseBlock($ary, $column="") { --- 332,349 ---- } ! /** ! * parseBlock - Takes an id and does stuff to return a html formatted block ! * ! * @param array ary ! * ! * ary[section] = return html formatted blocks assigned to this section ! * ary[section_id] = return html formatted blocks assigned to this section_id ! * ! * @param string column ! * ! * @access private ! * ! * @return string output ! */ function parseBlock($ary, $column="") { |
From: Joe S. <joe...@us...> - 2001-11-07 19:39:34
|
Update of /cvsroot/phpslash/phpslash-ft/class In directory usw-pr-cvs1:/tmp/cvs-serv9901 Modified Files: Block.class Log Message: housekeeping Index: Block.class =================================================================== RCS file: /cvsroot/phpslash/phpslash-ft/class/Block.class,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** Block.class 2001/06/15 15:49:25 1.4 --- Block.class 2001/11/07 19:39:31 1.5 *************** *** 1,6 **** <?php /** ! * Block.class -> Primary methods for manipulating blocks ! * @version $Id$ */ --- 1,10 ---- <?php + /* @version $Id$ */ + /** ! * Database Level access to the PHPSlash Block Engine. ! * ! * This object is how we retrieve block data from the database. It also ! * provides the db interface for block management. */ *************** *** 9,28 **** /** * Atributes of the base block methods ! * @var string $db ! * @var string $block_info ! * @var string $parser * @var string $parsedData ! * @var string $parser_arr ! * @var string $block_ary */ /* Var's to be constructed in constructor */ ! var $db, $block_info, $parser, $parsedData, $parser_arr, $block_ary; function Block() { /* Constructor: Create sub-objects here, etc... */ $this->db = new slashDB; $this->db->Auto_Free = 1; /* Array to store block info in */ $this->block_info = array(); --- 13,54 ---- /** * Atributes of the base block methods ! * @var object $db ! * @var array $block_info ! * @var object $parser * @var string $parsedData ! * @var array $parser_arr ! * @var array $block_ary ! * @var array $psl */ /* Var's to be constructed in constructor */ ! var $db, $block_info, $parser, $parsedData, $parser_arr, $block_ary, $_PSL; + /** + * Block - constructor for the Block class + * + * Atributes of the base block methods setup here + * + * @var object $db + * @var array $block_info + * @var object $parser + * @var string $parsedData + * @var array $parser_arr + * @var array $block_ary + * @var array $psl + * + * @access private + * + */ + function Block() { /* Constructor: Create sub-objects here, etc... */ + global $_PSL; + $this->db = new slashDB; $this->db->Auto_Free = 1; + $this->psl = $_PSL; + /* Array to store block info in */ $this->block_info = array(); *************** *** 30,45 **** $this->block_array = array(); /* String for finally parsed data */ $this->parsedData = ""; } function reset() { ! /* Resets object to empty values */ unset($this->block_info); unset($this->parser); } function getTypes() { - /* Gets all the known types of Block data and returns an array */ $types = array(); $this->db->query("SELECT * FROM psl_block_type ORDER BY name"); --- 56,85 ---- $this->block_array = array(); + $this->parser = array(); + /* String for finally parsed data */ $this->parsedData = ""; } + /** + * reset - Resets object to empty values + * + * @access public + * + */ function reset() { ! unset($this->block_info); unset($this->parser); } + /** + * getTypes - Gets all the known types of Block data and returns an array + * + * @access public + * + * @return array types + */ function getTypes() { $types = array(); $this->db->query("SELECT * FROM psl_block_type ORDER BY name"); *************** *** 50,55 **** } function putType($type) { - /* Stores a block Type */ $id = generateID("psl_blocktype_seq"); $type = addslashes($type); --- 90,102 ---- } + /** + * putType - Stores a block Type + * + * @param string type + * + * @access public + * + */ function putType($type) { $id = generateID("psl_blocktype_seq"); $type = addslashes($type); *************** *** 63,67 **** /** ! * returns a block from an id * * @param integer id --- 110,114 ---- /** ! * getBlock - returns a block from an id * * @param integer id *************** *** 71,75 **** * @return array this->block_info */ - function getBlock($id) { /* Gets all data in db for block $id */ --- 118,121 ---- *************** *** 119,124 **** } function putBlock($block_array) { - /* Puts the array into the db as a block */ if(is_array($block_array)) { --- 165,177 ---- } + /** + * putBlock - Puts the array into the db as a block + * + * @param array block_array + * + * @access public + * + */ function putBlock($block_array) { if(is_array($block_array)) { *************** *** 201,205 **** if(is_array($section_id_ary) ) { while ( list( $key, $val ) = each( $section_id_ary ) ) { ! $lut_id = generateID("psl_section_lut_seq"); $lut_insert = "INSERT INTO psl_section_block_lut (lut_id, --- 254,258 ---- if(is_array($section_id_ary) ) { while ( list( $key, $val ) = each( $section_id_ary ) ) { ! $lut_id = generateID("psl_section_block_lut_seq"); $lut_insert = "INSERT INTO psl_section_block_lut (lut_id, *************** *** 231,236 **** } function checkTime() { - /* Check the refresh time and return true if the stored data is ok */ $last = intval($this->block_info["last_update"]); $update = intval($this->block_info["expire_length"]); --- 284,296 ---- } + /** + * checkTime - Check the refresh time and return true + * if the stored data is ok + * + * @access private + * + */ + function checkTime() { $last = intval($this->block_info["last_update"]); $update = intval($this->block_info["expire_length"]); *************** *** 249,253 **** } ! /* Takes an id and does stuff to create a block */ function doBlock($id, $column="") { --- 309,322 ---- } ! /** ! * doBlock - Takes an id and does stuff to create a block ! * ! * @param integer id ! * @param string column ! * ! * @access public ! * ! * return string html formatted block ! */ function doBlock($id, $column="") { *************** *** 299,304 **** } function getParser($mytype) { - global $classdir; /* Start a new object to render info */ --- 368,381 ---- } + /** + * getParser - get parser method for Block_render type + * + * @param string mytpe + * + * @access private + * + * return object this->parser + */ function getParser($mytype) { /* Start a new object to render info */ *************** *** 309,364 **** if( !$parser_arr[$mytype]) { - - include($classdir .'/'. $parserFile); - $parser_arr[$mytype] = new $parserName; } $this->parser = $parser_arr[$mytype]; ! } ! ! function doParse($autoStore) { ! /* Render the data we got, use $render if we can, or make new */ ! ! if (!is_object($this->parser)) { ! $type = $this->block_info["type"]; ! if (!$type) { /* if we don't have a type then don't even try to */ ! return; /* parse the block. */ ! } ! $this->getParser($this->block_info["type"]); ! } ! if ($this->parser->getType() != $this->block_info["type"]) { ! $this->getParser($this->block_info["type"]); ! } ! ! if ($this->parser->getType() == $this->block_info["type"]) { ! ! # echo "<B>Before: ParsedData: </B>$this->parsedData<BR>\n"; $this->parser->parse($this->block_info); $this->parsedData = $this->parser->getFinal(); ! # echo "<B>After: ParsedData: </B>$this->parsedData<BR>\n"; ! if ( $this->parsedData == "Error") { ! /* TODO: Insert errorlog function here -nh */ ! if ($this->debug) { ! $this->block_info["cache_data"] .= "<br>Parser error<br>"; ! } ! } else { ! /* Store in the current array */ ! $this->block_info["cache_data"] = $this->parsedData; ! if ($autoStore) { ! $this->storeParsed(); ! } ! } } else { ! if ($this->debug) { ! echo "Warning: Block Data is old and needs refeshing.<br>\n"; ! echo "Delaying becasue current parser isn't my type.<br>\n"; ! } } } ! function storeParsed() { - /* Store the pre-rendered data (minus fancybox) in db */ $this->parsedData = addslashes($this->parsedData); $id = $this->block_info["id"]; --- 386,433 ---- if( !$parser_arr[$mytype]) { + if( @file_exists($this->psl['classdir'] .'/'. $parserFile)) { + include($this->psl['classdir'] .'/'. $parserFile); + $parser_arr[$mytype] = new $parserName; + } else { + $parser_arr[$mytype] = false; + } } $this->parser = $parser_arr[$mytype]; ! return $parser_arr[$mytype]; } ! ! /** ! * doParse - parse the block, storing the parsedData in the db cache ! * ! * @param string autoStore ( deprecated) ! * ! * @access private ! * ! * return boolean success ! */ ! function doParse($autoStore="") { ! ! if ($this->getParser($this->block_info["type"])) { ! $thistype = $this->block_info["type"]; $this->parser->parse($this->block_info); $this->parsedData = $this->parser->getFinal(); ! $this->block_info["cache_data"] = $this->parsedData; ! $this->storeParsed(); ! return true; } else { ! $this->block_info["cache_data"] = "type = $this->block_info[type]<br>"; ! return false; } } ! ! /** ! * storeParsed - Store the pre-rendered data (minus fancybox) in db ! * ! * @access private ! * ! */ function storeParsed() { $this->parsedData = addslashes($this->parsedData); $id = $this->block_info["id"]; *************** *** 378,381 **** --- 447,459 ---- } + /** + * delBlock - delete a Block + * + * @param integer id + * + * @access private + * + * return boolean success + */ function delBlock($id) { *************** *** 463,469 **** $this->block_info = $this->block_ary[$i]; ! $this->doParse('1'); ! $this->block_ary[$i][cache_data] = $this->block_info["cache_data"]; ! } --- 541,547 ---- $this->block_info = $this->block_ary[$i]; ! if ($this->doParse('1')) { ! $this->block_ary[$i][cache_data] = $this->block_info["cache_data"]; ! } } |
From: Ajay S. <aja...@us...> - 2001-10-17 17:11:30
|
Update of /cvsroot/phpslash/phpslash-ft/public_html/templates/en/default In directory usw-pr-cvs1:/tmp/cvs-serv19148/phpslash-ft/public_html/templates/en/default Modified Files: storyList.tpl Log Message: easier navigation in StoryAdmin, some comment fixes too... Index: storyList.tpl =================================================================== RCS file: /cvsroot/phpslash/phpslash-ft/public_html/templates/en/default/storyList.tpl,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** storyList.tpl 2000/09/29 08:48:51 1.3 --- storyList.tpl 2001/10/17 17:11:27 1.4 *************** *** 2,5 **** --- 2,15 ---- <FORM ACTION="{ACTION_URL}" METHOD="POST"> <INPUT TYPE="submit" NAME="submit" VALUE="new"> + + <BR> + + {AUTHOR_SELECT} + {TOPIC_SELECT} + {SECTION_SELECT} + <INPUT TYPE="submit" NAME="submit" VALUE="modify"> + + <BR> + <TABLE CELLPADDING=2 CELLSPACING=1 BORDER=0> <TR> |