You can subscribe to this list here.
2003 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(120) |
Jun
(74) |
Jul
(97) |
Aug
(35) |
Sep
(35) |
Oct
(34) |
Nov
|
Dec
(6) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2004 |
Jan
(18) |
Feb
(8) |
Mar
(7) |
Apr
(23) |
May
(28) |
Jun
(31) |
Jul
(27) |
Aug
(34) |
Sep
(48) |
Oct
(511) |
Nov
(197) |
Dec
(333) |
2005 |
Jan
(212) |
Feb
(33) |
Mar
(94) |
Apr
(51) |
May
(16) |
Jun
|
Jul
(200) |
Aug
(43) |
Sep
(88) |
Oct
(60) |
Nov
(62) |
Dec
(41) |
2006 |
Jan
(94) |
Feb
(49) |
Mar
(54) |
Apr
|
May
(39) |
Jun
(39) |
Jul
(61) |
Aug
(36) |
Sep
(23) |
Oct
(76) |
Nov
(73) |
Dec
(32) |
2007 |
Jan
|
Feb
(87) |
Mar
|
Apr
(8) |
May
(36) |
Jun
(49) |
Jul
(54) |
Aug
(8) |
Sep
(50) |
Oct
(36) |
Nov
|
Dec
(3) |
2008 |
Jan
(133) |
Feb
(54) |
Mar
(39) |
Apr
(2) |
May
(6) |
Jun
(74) |
Jul
(97) |
Aug
(70) |
Sep
(12) |
Oct
(20) |
Nov
(64) |
Dec
(24) |
2009 |
Jan
(25) |
Feb
(49) |
Mar
(18) |
Apr
|
May
|
Jun
(3) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2011 |
Jan
(10) |
Feb
|
Mar
|
Apr
|
May
|
Jun
(7) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: Darren G. <dg...@us...> - 2004-09-23 19:07:42
|
Update of /cvsroot/phpwebsite-comm/modules/phpwsrssfeeds/inc In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20512/inc Modified Files: runtime.php Log Message: added multi-view ability to organize feeds by date Index: runtime.php =================================================================== RCS file: /cvsroot/phpwebsite-comm/modules/phpwsrssfeeds/inc/runtime.php,v retrieving revision 1.10 retrieving revision 1.11 diff -C2 -d -r1.10 -r1.11 *** runtime.php 2 Sep 2004 17:48:58 -0000 1.10 --- runtime.php 23 Sep 2004 19:07:02 -0000 1.11 *************** *** 28,33 **** //Check to see if items need updated if (isset($_SESSION['PHPWSRSSFEEDS']['update'])){ ! RSS::update_server(); ! unset($_SESSION['PHPWSRSSFEEDS']['update']); } --- 28,33 ---- //Check to see if items need updated if (isset($_SESSION['PHPWSRSSFEEDS']['update'])){ ! RSS::update_server(); ! unset($_SESSION['PHPWSRSSFEEDS']['update']); } |
From: Darren G. <dg...@us...> - 2004-09-23 19:07:41
|
Update of /cvsroot/phpwebsite-comm/modules/phpwsrssfeeds/docs In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20512/docs Modified Files: CHANGELOG Log Message: added multi-view ability to organize feeds by date Index: CHANGELOG =================================================================== RCS file: /cvsroot/phpwebsite-comm/modules/phpwsrssfeeds/docs/CHANGELOG,v retrieving revision 1.25 retrieving revision 1.26 diff -C2 -d -r1.25 -r1.26 *** CHANGELOG 17 Sep 2004 18:56:05 -0000 1.25 --- CHANGELOG 23 Sep 2004 19:07:01 -0000 1.26 *************** *** 2,5 **** --- 2,8 ---- # $Id$ + 21 Sep 2004; Darren Greene <dg49379 at user dot sourceforge dot net> + Added multiview ability to organize the feeds by date + 17 Sep 2004; Darren Greene <dg49379 at user dot sourceforge dot net> Added ability to custom sort feeds in a multiview |
From: Darren G. <dg...@us...> - 2004-09-23 19:07:40
|
Update of /cvsroot/phpwebsite-comm/modules/phpwsrssfeeds/conf In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20512/conf Modified Files: boost.php help.php Log Message: added multi-view ability to organize feeds by date Index: boost.php =================================================================== RCS file: /cvsroot/phpwebsite-comm/modules/phpwsrssfeeds/conf/boost.php,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -d -r1.19 -r1.20 *** boost.php 17 Sep 2004 18:56:05 -0000 1.19 --- boost.php 23 Sep 2004 19:06:59 -0000 1.20 *************** *** 30,34 **** $user_mod = 0; $active = "on"; ! $version = "0.3.4"; $depend = array("menuman", "search"); --- 30,34 ---- $user_mod = 0; $active = "on"; ! $version = "0.3.6"; $depend = array("menuman", "search"); Index: help.php =================================================================== RCS file: /cvsroot/phpwebsite-comm/modules/phpwsrssfeeds/conf/help.php,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** help.php 2 Aug 2004 20:14:19 -0000 1.9 --- help.php 23 Sep 2004 19:07:00 -0000 1.10 *************** *** 68,70 **** --- 68,72 ---- $catLink = $_SESSION["translate"]->it("Category Link"); $catLink_content = $_SESSION["translate"]->it("Select this option to enable a category link to see a listing of other feeds in the same category."); + $orgnByDate = $_SESSION["translate"]->it("Organize Feeds By Date"); + $orgnByDate_content = $_SESSION["translate"]->it("Select this option if the feeds for the multiview pertain to specific days. This option is ideal for an phpWS calendar module feeds."); ?> |
From: Darren G. <dg...@us...> - 2004-09-23 19:07:40
|
Update of /cvsroot/phpwebsite-comm/modules/phpwsrssfeeds/class In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20512/class Modified Files: Multi_RSS.php RSS.php backend.php Log Message: added multi-view ability to organize feeds by date Index: backend.php =================================================================== RCS file: /cvsroot/phpwebsite-comm/modules/phpwsrssfeeds/class/backend.php,v retrieving revision 1.26 retrieving revision 1.27 diff -C2 -d -r1.26 -r1.27 *** backend.php 17 Sep 2004 18:55:23 -0000 1.26 --- backend.php 23 Sep 2004 19:06:58 -0000 1.27 *************** *** 440,443 **** --- 440,444 ---- <link>http://$source_http</link> <description>".RSS_common::get_htmlentities(PHPWS_Text::parseOutput($this->_description),ENT_QUOTES)."</description>"; + if($this->_image['thumb_name']) $output .="<image rdf:resource=\"http://".$source_http."images/phpwsrssfeeds/thumbs/".$this->_image['thumb_name']."\" />"; *************** *** 557,560 **** --- 558,562 ---- $id = $calFeed['data'][$n]['id']; if($id){ + $title = PHPWS_Text::parseOutput($calFeed['data'][$n]['title']); $title = RSS_common::get_htmlentities($title, ENT_QUOTES); *************** *** 585,592 **** $endMinute = substr($endTime,2,2); $endHour = substr($endTime,0,2); if($calFeed['data'][$n]["eventType"]=="allday"){ ! $output .= "<br /><br />".$calFeed['FullDate']."<br />All Day Event"; ! $dcdate = $startYear."-".$startMonth."-".$startDay; }else{ //Determine AM or PM and set vars --- 587,598 ---- $endMinute = substr($endTime,2,2); $endHour = substr($endTime,0,2); + + $startTS = mktime(0,0,0,$startMonth, $startDay, $startYear); + $endTS = mktime(0,0,0,$endMonth, $endDay, $endYear); + $repeatTS = mktime(0,0,0, $repeatMonth, $repeatDay, $repeatYear); if($calFeed['data'][$n]["eventType"]=="allday"){ ! $output .= "<br />".$calFeed['FullDate']."<br />All Day Event"; ! }else{ //Determine AM or PM and set vars *************** *** 604,610 **** $deadline = ltrim($endHour,"\0x00").":".$endMinute; if($calFeed['data'][$n]["eventType"]=="deadline"){ ! $dcdate = $endYear."-".$endMonth."-".$endDay; ! $output .= "<br /><br />".$calFeed['FullDate']."<br />Deadline: ".$deadline.$eampm; } if($calFeed['data'][$n]["eventType"]=="interval" && ($endRepeat)){ $startHour = ($startHour + 1) > 12 ? $startHour - 12 : $startHour; --- 610,618 ---- $deadline = ltrim($endHour,"\0x00").":".$endMinute; if($calFeed['data'][$n]["eventType"]=="deadline"){ ! $output .= "<br />". ! "The deadline is ". ! $deadline.$eampm." on ".$calFeed['FullDate']."."; } + if($calFeed['data'][$n]["eventType"]=="interval" && ($endRepeat)){ $startHour = ($startHour + 1) > 12 ? $startHour - 12 : $startHour; *************** *** 614,623 **** $endHour = sprintf("%02d", $endHour==0 ? 12 : $endHour); $ends = ltrim($endHour,"\0x00").":".$endMinute; ! if($startDate == $endRepeat) ! $dcdate = $startYear."-".$startMonth."-".$startDay; ! else ! $dcdate = $startYear."-".$startMonth."-".$startDay."/".$repeatYear."-".$repeatMonth."-".$repeatDay; ! $output .= "<br /><br />".$calFeed['FullDate']."<br />".$starts.$sampm." - ".$ends.$eampm; } if($calFeed['data'][$n]["eventType"]=="interval" && (!$endRepeat)){ $startHour = ($startHour + 1) > 12 ? $startHour - 12 : $startHour; --- 622,630 ---- $endHour = sprintf("%02d", $endHour==0 ? 12 : $endHour); $ends = ltrim($endHour,"\0x00").":".$endMinute; ! ! $output .= "<br />Event is from ".$starts.$sampm." to ".$ends.$eampm . " on ".$calFeed['FullDate']."."; ! $dcdate = $calFeed["dcdate"]; } + if($calFeed['data'][$n]["eventType"]=="interval" && (!$endRepeat)){ $startHour = ($startHour + 1) > 12 ? $startHour - 12 : $startHour; *************** *** 627,637 **** $endHour = sprintf("%02d", $endHour==0 ? 12 : $endHour); $ends = ltrim($endHour,"\0x00").":".$endMinute; ! if($startDate == $endDate) ! $dcdate = $startYear."-".$startMonth."-".$startDay; ! else ! $dcdate = $startYear."-".$startMonth."-".$startDay."/".$endYear."-".$endMonth."-".$endDay; ! $output .= "<br /><br /><b>From: </b>" ! .$starts.$sampm.", ".$startYear."-".$startMonth."-".$startDay."<br /> ! <b>To: </b>".$ends.$eampm.", ".$endYear."-".$endMonth."-".$endDay; } if($calFeed['data'][$n]["eventType"]=="start"){ --- 634,648 ---- $endHour = sprintf("%02d", $endHour==0 ? 12 : $endHour); $ends = ltrim($endHour,"\0x00").":".$endMinute; ! ! if($endTS != $startTS) { ! $output .= "<br />Begins at " ! .$starts.$sampm." on ".$startMonth."/".$startDay."/".$startYear." and ends at ".$ends.$eampm." on ".$endMonth."/".$endDay."/".$endYear."."; ! } else { ! $output .= "<br />Event begins at " ! .$starts.$sampm." and ends at ".$ends.$eampm." on ". ! $startMonth."/".$startDay."/".$startYear."."; ! } ! ! } if($calFeed['data'][$n]["eventType"]=="start"){ *************** *** 642,650 **** $endHour = sprintf("%02d", $endHour==0 ? 12 : $endHour); $ends = ltrim($endHour,"\0x00").":".$endMinute; ! $dcdate = $startYear."-".$startMonth."-".$startDay; ! $output .= "<br /><br /><b>Starts: </b>" ! .$starts.$sampm.", ".$startYear."-".$startMonth."-".$startDay; } } $output .= "</description> <dc:date>$dcdate</dc:date> --- 653,663 ---- $endHour = sprintf("%02d", $endHour==0 ? 12 : $endHour); $ends = ltrim($endHour,"\0x00").":".$endMinute; ! ! $output .= "<br /><br />Event begins at " ! .$starts.$sampm." on ".$startYear."-".$startMonth."-".$startDay."."; } } + + $dcdate = $calFeed["dcdate"]; $output .= "</description> <dc:date>$dcdate</dc:date> *************** *** 697,703 **** $i = 0; $maxnum = 0; ! while($end->after($date)){ if ($events = PHPWS_Calendar::getEvents($date, $eventList)){ $thisdate = $date->format("%a. %e %b. %Y"); $num = 0; foreach ($events as $time=>$weekday){ --- 710,717 ---- $i = 0; $maxnum = 0; ! while($end->after($date)) { if ($events = PHPWS_Calendar::getEvents($date, $eventList)){ $thisdate = $date->format("%a. %e %b. %Y"); + $dcDate = $date->format("%Y-%m-%d"); $num = 0; foreach ($events as $time=>$weekday){ *************** *** 706,709 **** --- 720,724 ---- return $eventdata; $eventdata[$i]['FullDate'] = $thisdate; + $eventdata[$i]['dcdate'] = $dcDate; $eventdata[$i]['data'][$num]= $event; $num++; Index: Multi_RSS.php =================================================================== RCS file: /cvsroot/phpwebsite-comm/modules/phpwsrssfeeds/class/Multi_RSS.php,v retrieving revision 1.23 retrieving revision 1.24 diff -C2 -d -r1.23 -r1.24 *** Multi_RSS.php 17 Sep 2004 18:55:23 -0000 1.23 --- Multi_RSS.php 23 Sep 2004 19:06:57 -0000 1.24 *************** *** 68,71 **** --- 68,73 ---- var $_show_cat_link; var $_sort_order; + var $_orgn_by_date; + var $_days_ahead; var $_expandedFeed; var $_content; *************** *** 86,89 **** --- 88,93 ---- $this->_show_empty_feeds = 1; $this->_sort_order = 0; + $this->_orgn_by_date = 0; + $this->_days_ahead = 0; } *************** *** 167,170 **** --- 171,259 ---- }//End function getFeedLinks() + function showBlog($id) { + $allBlogs = array(); + foreach($this->_availFeeds as $feed) { + if($id == $feed["id"]) + continue; + $feedObj = RSS::getRSS($feed["id"]); + + //Standard error checking + if (is_object($feedObj->_error)) + continue; + + if($feedObj->_hidden || !$feedObj->_approved) + continue; + + if($feedObj->expired()) + $_SESSION['PHPWSRSSFEEDS']['update'][$feedObj->getId()] = $feedObj->getId(); + + $tags = $feedObj->_content; + if($this->_show_empty_feeds == 0 && empty($tags["MULTI_CONTENT"])) + continue; + + $today = mktime(0,0,0); + $endDate = NULL; + + if($this->_days_ahead != 0) { + $endDate = mktime(12,12,12,date("m"), date("d")+$this->_days_ahead, date("Y")); + } + + if(isset($tags["BLOG_DATES"])) { + foreach($tags["BLOG_DATES"] as $date=>$blog) { + if($date >= $today && + (!isset($endDate) || (isset($endDate) && $date <= $endDate))) + { + $allBlogs[$date][$tags["TITLE"]]["items"] = $blog; + $allBlogs[$date][$tags["TITLE"]]["id"] = $feedObj->_id; + } + } + } + } + + ksort($allBlogs); + + foreach($allBlogs as $date=>$feed) { + if($dateTags["DATE"] != date("l, F j, Y", $date)) { + $dateTags["DATE"] = date("l, F j, Y", $date); + if($dateTags["DATE"] == date("l, F j, Y")) + $dateTags["TODAY"] = $_SESSION["translate"]->it("Today"); + else + $dateTags["TODAY"] = NULL; + $content .= PHPWS_Template::processTemplate($dateTags, "phpwsrssfeeds", "multi_rss/date_blog/date.tpl"); + } + + $feedTags = array(); + foreach($feed as $title=>$feedContent) { + if($title == "id") + continue; + + $feedTags["FEED_TITLE"] = $title; + $feedTags["FEED_CONTENT"] = ""; + $itemCount = 0; + foreach($feedContent["items"] as $item) { + $itemCount++; + if($itemCount > $this->_max_multi_items) + break; + + if(isset($item["MODULE"]) && $item["MODULE"] == "calendar") { + $item["ITEM_TITLE"] = substr($item["ITEM_TITLE"], strpos($item["ITEM_TITLE"], '-')+2); + } + + $itemTags["ITEM_TITLE"] = $item["ITEM_TITLE"]; + $itemTags["ITEM_DESC"] = $item["ITEM_DESC"]; + + $feedTags["FEED_CONTENT"] .= PHPWS_Template::processTemplate($itemTags,"phpwsrssfeeds", "multi_rss/date_blog/item.tpl"); + } + + if($_SESSION['OBJ_user']->allow_access("phpwsrssfeeds", "edit")) + $feedTags["EDIT_FEED"] = PHPWS_Text::moduleLink($_SESSION["translate"]->it("Edit This Feed"), "phpwsrssfeeds", array("RSS_MAN_op"=>"edit", "PHPWS_MAN_ITEMS[]"=>$feedContent["id"])); + + $content .= PHPWS_Template::processTemplate($feedTags, "phpwsrssfeeds", "multi_rss/date_blog/feed.tpl"); + } + } + + return $content; + } + function getUnexpandedFeeds($id) { $item_count = 0; *************** *** 270,278 **** } ! $tags["UNEXPANDED_FEEDS"] = $this->getUnexpandedFeeds($omit_item); ! ! if(empty($tags["EXPANDED_FEED"]) && empty($tags["UNEXPANDED_FEEDS"])) { ! $tags["FEED_ITEMS"] = $_SESSION["translate"]->it("Feed currently unavailable"); ! } --- 359,373 ---- } ! if($this->_orgn_by_date) ! $tags["DATE_BLOGS"] = $this->showBlog($id); ! else ! $tags["UNEXPANDED_FEEDS"] = $this->getUnexpandedFeeds($omit_item); ! ! if(empty($tags["EXPANDED_FEED"]) && empty($tags["UNEXPANDED_FEEDS"]) && ! empty($tags["DATE_BLOGS"])) { ! if($this->_orgn_by_date) ! $tags["FEED_ITEMS"] = $_SESSION["translate"]->it("No items to show for the upcoming week."); ! else ! $tags["FEED_ITEMS"] = $_SESSION["translate"]->it("No feeds available to display"); } *************** *** 527,530 **** --- 622,629 ---- $form->setTab("SHOW_CAT_LINK", $tab++); + $form->add("ORGN_BY_DATE", "checkbox"); + $form->setMatch("ORGN_BY_DATE", $this->_orgn_by_date); + $form->setTab("ORGN_BY_DATE", $tab++); + $form->add("SUBMIT_BUTTON", "submit", $this->getId() ? $_SESSION["translate"]->it("Update") : $_SESSION["translate"]->it("Save")); *************** *** 533,541 **** "onClick=\"selectAll(this.form.elements['SHOW_MULTIVIEW_SEL[]'])\""); - $form->add("module", "hidden", "phpwsrssfeeds"); $form->add("PHPWS_MAN_ITEMS[]", "hidden", $this->getId()); $form->add("RSS_MULTI_MAN_op", "hidden", "save"); $tags = $form->getTemplate(true, true, $tags); --- 632,646 ---- "onClick=\"selectAll(this.form.elements['SHOW_MULTIVIEW_SEL[]'])\""); $form->add("module", "hidden", "phpwsrssfeeds"); $form->add("PHPWS_MAN_ITEMS[]", "hidden", $this->getId()); $form->add("RSS_MULTI_MAN_op", "hidden", "save"); + $ahead = array($_SESSION["translate"]->it("Any")); + for($i=1; $i < 15;$i++) + $ahead[] = $i; + + $form->add("DAYS_AHEAD", "select", $ahead); + $form->setMatch("DAYS_AHEAD", $this->_days_ahead); + $tags = $form->getTemplate(true, true, $tags); *************** *** 582,585 **** --- 687,693 ---- $tags["SHOW_CAT_LINK_HELP"] = RSS_common::show_link("phpwsrssfeeds", "catLink"); $tags["SHOW_CAT_LINK_LBL"] = $_SESSION['translate']->it("Show Category Link"); + $tags["ORGN_BY_DATE_HELP"] = RSS_common::show_link("phpwsrssfeeds", "orgnByDate"); + $tags["ORGN_BY_DATE_LBL"] = $_SESSION['translate']->it("Organize Feeds By Date"); + $tags["DAYS_AHEAD_LBL"] = $_SESSION["translate"]->it("Days Ahead"); $tags['YES'] = $_SESSION["translate"]->it("Yes"); $tags['NO'] = $_SESSION["translate"]->it("No"); *************** *** 658,661 **** --- 766,780 ---- $this->_show_empty_feeds = 0; + if(isset($_POST["ORGN_BY_DATE"])) + $this->_orgn_by_date = @$_POST["ORGN_BY_DATE"]; + else + $this->_orgn_by_date = 0; + + if(isset($_POST["DAYS_AHEAD"])) { + $this->_days_ahead = @$_POST["DAYS_AHEAD"]; + } else { + $this->_days_ahead = 0; + } + if(isset($_POST["SHOW_ANCHOR_LINKS"])) $this->_show_anchor_links = @$_POST["SHOW_ANCHOR_LINKS"]; Index: RSS.php =================================================================== RCS file: /cvsroot/phpwebsite-comm/modules/phpwsrssfeeds/class/RSS.php,v retrieving revision 1.36 retrieving revision 1.37 diff -C2 -d -r1.36 -r1.37 *** RSS.php 2 Sep 2004 17:48:57 -0000 1.36 --- RSS.php 23 Sep 2004 19:06:58 -0000 1.37 *************** *** 567,571 **** if(isset($_POST["fatcatProcess"])) { require_once(PHPWS_SOURCE_DIR.'mod/phpwsrssfeeds/class/RSS_Fatcat.php'); ! $element_link = "index.php?module=phpwsrssfeeds&RSS_MAN_op=sView&RSS_id=" . $_id; RSS_Fatcat::saveSelect($this->getLabel(), $element_link, $_id); } --- 567,571 ---- if(isset($_POST["fatcatProcess"])) { require_once(PHPWS_SOURCE_DIR.'mod/phpwsrssfeeds/class/RSS_Fatcat.php'); ! $element_link = "index.php?module=phpwsrssfeeds&RSS_MAN_op=view&PHPWS_MAN_ITEMS=" . $_id; RSS_Fatcat::saveSelect($this->getLabel(), $element_link, $_id); } *************** *** 665,765 **** */ function getContent(){ ! //Add PEAR RSS Class ! require_once ("XML/RSS.php"); ! ! //Get RSS Channel info an structure ! $rss =& new XML_RSS($this->_channel); ! $rss->parse(); ! $info = $rss->getChannelInfo(); ! $structure = $rss->getStructure(); ! //Check to see if we got anything ! if(sizeof(array_merge($info, $structure)) == '0') ! return FALSE; ! //Now we'll parse the new input for problems ! $info = $this->clean($info); ! $feed = array(); ! foreach($structure as $key => $value){ ! if($key == $this->_max_items) ! break; ! $item = $this->clean($value); ! if(!empty($item)) ! $feed[$key] = $item; ! } ! //Check for errors and pass on ! $rss_feed = array_merge($info, $feed); ! if(sizeof($rss_feed) == '0') ! return FALSE; ! return $rss_feed; }//end function_getContent ! function buildView() { ! $tags = array(); ! $tags["RSS_VIEW"] = PHPWS_Text::moduleLink($_SESSION["translate"]->it("More Feeds"), "phpwsrssfeeds", array("RSS_MAN_op"=>"list")); ! if($this->_show_title) ! $tags["TITLE"] = PHPWS_Text::parseOutput($this->getLabel()); ! if($this->_show_title && $this->_show_url){ ! $tags["TITLE_LINK"] = RSS_common::get_htmlentities($this->_content['link']); ! $tags["TITLE_TARGET"] = $this->_target; ! $tags["END_ANCHOR"] = ''; ! } ! ! if($this->_show_image && $this->_content[0]['type'] == 'image'){ ! $num = NULL; ! //add support for RSS 1.0 Dublin Core ! //add support for RSS 2.0 Garbage ! if(isset($this->_content[0]['url'])) /* this is a 2.0 feed */ ! $num = 0; ! elseif(isset($this->_content[1]['url'])) ! $num = 1; ! elseif(isset($this->_content[2]['url'])) ! $num = 2; ! if($num !== NULL){ ! $tags["CHANNEL_IMG_URL"] = RSS_common::get_htmlentities($this->_content[$num]['link']); ! $tags["CHANNEL_IMG_TARGET"] = $this->_target; ! $tags["CHANNEL_IMAGE"] = RSS_common::get_htmlentities($this->_content[$num]['url']); ! $tags["CHANNEL_IMG_ALT"] = $this->_content[$num]['title']; ! } ! } ! if($this->_show_desc) ! $tags["CHANNEL_DESC"] = $this->_content['description']; ! ! if($this->_footer) ! $tags["CHANNEL_FOOTER"] = PHPWS_Text::parseOutput($this->_footer); ! $item_count = 0; ! $items = ''; ! $block_items = ''; ! $multi_items = ''; ! foreach ($this->_content as $item) { ! if($item_count == $this->_max_items) ! break; ! if ($item['type'] == 'item'){ ! $elements['ITEM_LINK'] = RSS_common::get_htmlentities(@$item['link']); ! $elements['ITEM_TITLE'] = @$item['title']; ! if(isset($item['description'])) ! $elements['ITEM_DESC'] = $item['description']; ! //Stubbed this out for future inclusion in PEAR::XML_RSS ! elseif(isset($item['content:encoded'])) ! $elements['ITEM_DESC'] = $item['content:encoded']; ! $elements["TARGET"] = $this->_target; ! $multi_items[$item_count] = PHPWS_Template::processTemplate($elements, "phpwsrssfeeds", "multi_rss/unexpanded_feed_item.tpl"); ! $block_items .= PHPWS_Template::processTemplate($elements, "phpwsrssfeeds", "block_item.tpl"); ! $items .= PHPWS_Template::processTemplate($elements, "phpwsrssfeeds", "item.tpl"); ! $item_count++; ! } ! } ! ! if(!empty($items)) ! $tags["CONTENT"] = $items; ! else ! $tags["CONTENT"] = "<i>".$_SESSION["translate"]->it("Feed Contains No Content") . "</i>"; ! $tags["BLOCK_CONTENT"] = $block_items; ! ! $tags["MULTI_CONTENT"] = $multi_items; ! ! return $tags; ! } //END function buildView() /** * Cleans feed array for input into database --- 665,789 ---- */ function getContent(){ ! //Add PEAR RSS Class ! require_once ("XML/RSS.php"); ! ! //Get RSS Channel info an structure ! $rss =& new XML_RSS($this->_channel); ! $rss->parse(); ! $info = $rss->getChannelInfo(); ! $structure = $rss->getStructure(); ! //Check to see if we got anything ! if(sizeof(array_merge($info, $structure)) == '0') ! return FALSE; ! //Now we'll parse the new input for problems ! $info = $this->clean($info); ! $feed = array(); ! ! foreach($structure as $key => $value){ ! if($key == $this->_max_items) ! break; ! $item = $this->clean($value); ! if(!empty($item)) ! $feed[$key] = $item; ! } ! //Check for errors and pass on ! $rss_feed = array_merge($info, $feed); ! if(sizeof($rss_feed) == '0') ! return FALSE; ! ! return $rss_feed; }//end function_getContent ! function buildView() { ! $tags = array(); ! $tags["RSS_VIEW"] = PHPWS_Text::moduleLink($_SESSION["translate"]->it("More Feeds"), "phpwsrssfeeds", array("RSS_MAN_op"=>"list")); ! if($this->_show_title) ! $tags["TITLE"] = PHPWS_Text::parseOutput($this->getLabel()); ! if($this->_show_title && $this->_show_url){ ! $tags["TITLE_LINK"] = RSS_common::get_htmlentities($this->_content['link']); ! $tags["TITLE_TARGET"] = $this->_target; ! $tags["END_ANCHOR"] = ''; ! } ! ! if($this->_show_image && $this->_content[0]['type'] == 'image'){ ! $num = NULL; ! //add support for RSS 1.0 Dublin Core ! //add support for RSS 2.0 Garbage ! if(isset($this->_content[0]['url'])) /* this is a 2.0 feed */ ! $num = 0; ! elseif(isset($this->_content[1]['url'])) ! $num = 1; ! elseif(isset($this->_content[2]['url'])) ! $num = 2; ! if($num !== NULL){ ! $tags["CHANNEL_IMG_URL"] = RSS_common::get_htmlentities($this->_content[$num]['link']); ! $tags["CHANNEL_IMG_TARGET"] = $this->_target; ! $tags["CHANNEL_IMAGE"] = RSS_common::get_htmlentities($this->_content[$num]['url']); ! $tags["CHANNEL_IMG_ALT"] = $this->_content[$num]['title']; ! } ! } ! ! if($this->_show_desc) ! $tags["CHANNEL_DESC"] = $this->_content['description']; ! if($this->_footer) ! $tags["CHANNEL_FOOTER"] = PHPWS_Text::parseOutput($this->_footer); ! $item_count = 0; ! $items = ''; ! $block_items = ''; ! $multi_items = ''; ! $blog_items = array(); ! ! foreach ($this->_content as $item) { ! if($item_count == 0 && isset($item["link"])) { ! if(stristr($item["link"], "module=calendar")) { ! $elements["MODULE"] = "calendar"; ! } ! } ! ! if($item_count == $this->_max_items) ! break; + if ($item['type'] == 'item'){ + $elements['ITEM_LINK'] = RSS_common::get_htmlentities(@$item['link']); + $elements['ITEM_TITLE'] = @$item['title']; + + if(isset($item['description'])) + $elements['ITEM_DESC'] = $item['description']; + + //Stubbed this out for future inclusion in PEAR::XML_RSS + elseif(isset($item['content:encoded'])) + $elements['ITEM_DESC'] = $item['content:encoded']; + + $elements["TARGET"] = $this->_target; + $multi_items[$item_count] = PHPWS_Template::processTemplate($elements, "phpwsrssfeeds", "multi_rss/unexpanded_feed_item.tpl"); + $block_items .= PHPWS_Template::processTemplate($elements, "phpwsrssfeeds", "block_item.tpl"); + $items .= PHPWS_Template::processTemplate($elements, "phpwsrssfeeds", "item.tpl"); + + if(isset($item['dc:date'])) { + $date = explode('-', $item['dc:date']); + $timeTS = mktime(12,12,12, $date[1], $date[2], $date[0]); + $blog_items[$timeTS][] = $elements; + } + + $item_count++; + } + } + + if(!empty($items)) + $tags["CONTENT"] = $items; + else + $tags["CONTENT"] = "<i>".$_SESSION["translate"]->it("Feed Contains No Content") . "</i>"; + $tags["BLOCK_CONTENT"] = $block_items; + if(!empty($blog_items)) + $tags["BLOG_DATES"] = $blog_items; + else + $tags["BLOG_DATES"] = NULL; + + $tags["MULTI_CONTENT"] = $multi_items; + return $tags; + } //END function buildView() + /** * Cleans feed array for input into database *************** *** 948,952 **** */ function update($ids) { ! if(isset($ids)) { ignore_user_abort(1); set_time_limit(15); --- 972,976 ---- */ function update($ids) { ! if(isset($ids)) { ignore_user_abort(1); set_time_limit(15); *************** *** 979,985 **** $this->_content = $feed; $this->channel_desc = $this->_content['description']; $this->_content = $this->buildView(); // save the feed ! $this->commit(); } } --- 1003,1010 ---- $this->_content = $feed; $this->channel_desc = $this->_content['description']; + $this->_content = $this->buildView(); // save the feed ! $this->commit(); } } |
From: Darren G. <dg...@us...> - 2004-09-23 19:07:36
|
Update of /cvsroot/phpwebsite-comm/modules/phpwsrssfeeds/boost In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20512/boost Modified Files: install.sql update.php Log Message: added multi-view ability to organize feeds by date Index: install.sql =================================================================== RCS file: /cvsroot/phpwebsite-comm/modules/phpwsrssfeeds/boost/install.sql,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** install.sql 2 Aug 2004 20:14:18 -0000 1.12 --- install.sql 23 Sep 2004 19:06:55 -0000 1.13 *************** *** 26,30 **** target VARCHAR(10) NOT NULL DEFAULT '_blank', expire INT NOT NULL DEFAULT '60', ! max_items INT NOT NULL DEFAULT '20', PRIMARY KEY (id) ); --- 26,30 ---- target VARCHAR(10) NOT NULL DEFAULT '_blank', expire INT NOT NULL DEFAULT '60', ! max_items INT NOT NULL DEFAULT '20', PRIMARY KEY (id) ); *************** *** 68,71 **** --- 68,73 ---- show_cat_link SMALLINT NOT NULL DEFAULT '1', sort_order TEXT, + orgn_by_date SMALLINT NOT NULL DEFAULT '0', + days_ahead TEXT DEFAULT '0', PRIMARY KEY (id) ); Index: update.php =================================================================== RCS file: /cvsroot/phpwebsite-comm/modules/phpwsrssfeeds/boost/update.php,v retrieving revision 1.22 retrieving revision 1.23 diff -C2 -d -r1.22 -r1.23 *** update.php 10 Sep 2004 15:19:12 -0000 1.22 --- update.php 23 Sep 2004 19:06:55 -0000 1.23 *************** *** 134,136 **** --- 134,155 ---- CLS_help::setup_help("phpwsrssfeeds"); } + + if(version_compare($currentVersion, "0.35") < 0){ + if(!$GLOBALS["core"]->sqlColumnExists("mod_phpwsrssfeeds_multi", "orgn_by_date")) + if(!$GLOBALS['core']->query("ALTER TABLE mod_phpwsrssfeeds_multi ADD COLUMN `orgn_by_date` " . "SMALLINT NOT NULL DEFAULT '0' AFTER `sort_order`", TRUE)) { + $status = 0; + } + $content .= "Added Column for organizing feeds in a Multi-View by using dates.<br />"; + + CLS_help::uninstall_help("phpwsrssfeeds"); + CLS_help::setup_help("phpwsrssfeeds"); + + if(!$GLOBALS["core"]->sqlColumnExists("mod_phpwsrssfeeds_multi", "days_ahead")) + if(!$GLOBALS['core']->query("ALTER TABLE mod_phpwsrssfeeds_multi ADD COLUMN `days_ahead` " . "TEXT DEFAULT '0' AFTER `orgn_by_date`", TRUE)) { + $status = 0; + } + + $content .= "Added Column to specify days ahead for multiview date organization.<br />"; + + } ?> |
From: Darren G. <dg...@us...> - 2004-09-23 19:07:14
|
Update of /cvsroot/phpwebsite-comm/modules/phpwsrssfeeds/templates/multi_rss In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20512/templates/multi_rss Modified Files: edit.tpl view.tpl Log Message: added multi-view ability to organize feeds by date Index: view.tpl =================================================================== RCS file: /cvsroot/phpwebsite-comm/modules/phpwsrssfeeds/templates/multi_rss/view.tpl,v retrieving revision 1.8 retrieving revision 1.9 diff -C2 -d -r1.8 -r1.9 *** view.tpl 2 Aug 2004 20:25:27 -0000 1.8 --- view.tpl 23 Sep 2004 19:07:04 -0000 1.9 *************** *** 8,11 **** --- 8,14 ---- {UNEXPANDED_FEEDS} <!-- END UNEXPANDED_FEEDS --> + <!-- BEGIN DATE_BLOGS --> + {DATE_BLOGS} + <!-- END DATE_BLOGS --> <br class="clear" /> <!-- BEGIN CATEGORY --> Index: edit.tpl =================================================================== RCS file: /cvsroot/phpwebsite-comm/modules/phpwsrssfeeds/templates/multi_rss/edit.tpl,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** edit.tpl 17 Sep 2004 18:56:06 -0000 1.6 --- edit.tpl 23 Sep 2004 19:07:04 -0000 1.7 *************** *** 76,79 **** --- 76,84 ---- </div> <!-- END SHOW_CAT_LINK --> + <!-- BEGIN ORGN_BY_DATE --> + <div class="row"> + <div class="col1">{ORGN_BY_DATE_HELP}{ORGN_BY_DATE_LBL}:</div><div class="col2">{ORGN_BY_DATE} {DAYS_AHEAD_LBL}: {DAYS_AHEAD}</div> + </div> + <!-- END ORGN_BY_DATE --> <div class="submit"> {SUBMIT_BUTTON} |
From: Darren G. <dg...@us...> - 2004-09-23 19:07:14
|
Update of /cvsroot/phpwebsite-comm/modules/phpwsrssfeeds/templates/multi_rss/date_blog In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20512/templates/multi_rss/date_blog Added Files: date.tpl feed.tpl item.tpl Log Message: added multi-view ability to organize feeds by date --- NEW FILE: item.tpl --- <i>{ITEM_TITLE}</i><br /> {ITEM_DESC}<br /><br /> --- NEW FILE: date.tpl --- <div style="border:thin dotted #A2A2A2;padding-left:2px;background-color:#DFDFDF;"><span style="font-size:larger;">{DATE}</span> <!-- BEGIN TODAY --> <i>({TODAY})</i> <!-- END TODAY --> </div><br /> --- NEW FILE: feed.tpl --- <div style="margin-left:15px;"><b>{FEED_TITLE}</b> <div style="margin-left:20px">{FEED_CONTENT} <!-- BEGIN EDIT_FEED --> {EDIT_FEED}<br /> <!-- END EDIT_FEED --> </div> </div> <br /> |
From: Darren G. <dg...@us...> - 2004-09-23 19:07:13
|
Update of /cvsroot/phpwebsite-comm/modules/phpwsrssfeeds/templates In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20512/templates Modified Files: item.tpl Log Message: added multi-view ability to organize feeds by date Index: item.tpl =================================================================== RCS file: /cvsroot/phpwebsite-comm/modules/phpwsrssfeeds/templates/item.tpl,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** item.tpl 21 Jun 2004 21:15:19 -0000 1.3 --- item.tpl 23 Sep 2004 19:07:02 -0000 1.4 *************** *** 3,4 **** --- 3,7 ---- <dd style="margin-bottom: 1em">{ITEM_DESC}</dd> <!-- END ITEM_DESC --> + + + |
From: Darren G. <dg...@us...> - 2004-09-23 19:04:29
|
Update of /cvsroot/phpwebsite-comm/modules/phpwsrssfeeds/templates/multi_rss/date_blog In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19982/date_blog Log Message: Directory /cvsroot/phpwebsite-comm/modules/phpwsrssfeeds/templates/multi_rss/date_blog added to the repository |
From: Mike N. <mh...@us...> - 2004-09-21 19:05:12
|
Update of /cvsroot/phpwebsite-comm/scripts/benchmark In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29744 Modified Files: slashdot.sh Log Message: added comments Index: slashdot.sh =================================================================== RCS file: /cvsroot/phpwebsite-comm/scripts/benchmark/slashdot.sh,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** slashdot.sh 21 Sep 2004 18:28:05 -0000 1.3 --- slashdot.sh 21 Sep 2004 19:04:04 -0000 1.4 *************** *** 6,17 **** # HISTORY: 2004-09-?? David (neoamphian) Initial programming # 2004-09-21 Mike Noyes (mhnoyes) ! # RELATED: Flood -- http://httpd.apache.org/test/flood/ ! # JMeter -- http://jakarta.apache.org/jmeter/index.html ! # Daiquiri -- http://www.omniti.com/~jesus/projects/daiquiri.tar.gz ! # Siege -- http://www.joedog.org/siege/ ! # Gnuplot -- http://www.gnuplot.info/ ! # GD -- http://www.boutell.com/gd/ ! # Web Application Stress Testing -- ! # http://www.linuxjournal.com/print.php?sid=6691 cat /proc/loadavg | awk ' { print $1 }' >> ${1} --- 6,12 ---- # HISTORY: 2004-09-?? David (neoamphian) Initial programming # 2004-09-21 Mike Noyes (mhnoyes) ! # RELATED: Opensourcetesting.org -- Open source tools for ! # software testing professionals ! # http://www.opensourcetesting.org cat /proc/loadavg | awk ' { print $1 }' >> ${1} |
From: Mike N. <mh...@us...> - 2004-09-21 18:28:39
|
Update of /cvsroot/phpwebsite-comm/scripts/benchmark In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20514 Modified Files: slashdot.sh Log Message: added comments Index: slashdot.sh =================================================================== RCS file: /cvsroot/phpwebsite-comm/scripts/benchmark/slashdot.sh,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** slashdot.sh 21 Sep 2004 17:35:13 -0000 1.2 --- slashdot.sh 21 Sep 2004 18:28:05 -0000 1.3 *************** *** 2,5 **** --- 2,6 ---- # PROGRAM: slashdot.sh # PURPOSE: CMS Benchmark Test + # Simulate Slashdot Load # 30 simulated users, 5 repetitions, 300 transactions # HISTORY: 2004-09-?? David (neoamphian) Initial programming *************** *** 11,14 **** --- 12,17 ---- # Gnuplot -- http://www.gnuplot.info/ # GD -- http://www.boutell.com/gd/ + # Web Application Stress Testing -- + # http://www.linuxjournal.com/print.php?sid=6691 cat /proc/loadavg | awk ' { print $1 }' >> ${1} |
From: Mike N. <mh...@us...> - 2004-09-21 17:36:06
|
Update of /cvsroot/phpwebsite-comm/scripts/benchmark In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8877 Modified Files: slashdot.sh Log Message: added comments Index: slashdot.sh =================================================================== RCS file: /cvsroot/phpwebsite-comm/scripts/benchmark/slashdot.sh,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** slashdot.sh 17 Sep 2004 16:29:37 -0000 1.1 --- slashdot.sh 21 Sep 2004 17:35:13 -0000 1.2 *************** *** 1,3 **** --- 1,15 ---- #!/bin/bash + # PROGRAM: slashdot.sh + # PURPOSE: CMS Benchmark Test + # 30 simulated users, 5 repetitions, 300 transactions + # HISTORY: 2004-09-?? David (neoamphian) Initial programming + # 2004-09-21 Mike Noyes (mhnoyes) + # RELATED: Flood -- http://httpd.apache.org/test/flood/ + # JMeter -- http://jakarta.apache.org/jmeter/index.html + # Daiquiri -- http://www.omniti.com/~jesus/projects/daiquiri.tar.gz + # Siege -- http://www.joedog.org/siege/ + # Gnuplot -- http://www.gnuplot.info/ + # GD -- http://www.boutell.com/gd/ + cat /proc/loadavg | awk ' { print $1 }' >> ${1} for i in `seq 1 12`; |
From: Darren G. <dg...@us...> - 2004-09-17 18:56:17
|
Update of /cvsroot/phpwebsite-comm/modules/phpwsrssfeeds/templates In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29516/templates Modified Files: style.css Log Message: Added sorting option for multiview feeds Index: style.css =================================================================== RCS file: /cvsroot/phpwebsite-comm/modules/phpwsrssfeeds/templates/style.css,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** style.css 2 Sep 2004 21:38:27 -0000 1.1 --- style.css 17 Sep 2004 18:56:06 -0000 1.2 *************** *** 47,54 **** --- 47,61 ---- width: 100%; } + + div.fancyBorder { + border-bottom: 1px dashed #FFFFFF; + } + .submit { text-align: center; width: 100%; padding-top: 10px; + padding-bottom: 10px; + padding-right: 10px; clear: both; } |
From: Darren G. <dg...@us...> - 2004-09-17 18:56:17
|
Update of /cvsroot/phpwebsite-comm/modules/phpwsrssfeeds/templates/multi_rss In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29516/templates/multi_rss Modified Files: edit.tpl Added Files: sort.tpl sort_ind_feed.tpl sort_list.tpl Log Message: Added sorting option for multiview feeds Index: edit.tpl =================================================================== RCS file: /cvsroot/phpwebsite-comm/modules/phpwsrssfeeds/templates/multi_rss/edit.tpl,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** edit.tpl 2 Aug 2004 20:14:19 -0000 1.5 --- edit.tpl 17 Sep 2004 18:56:06 -0000 1.6 *************** *** 1,7 **** <div class="form bg_light"> {START_FORM} <!-- BEGIN TITLE --> <div class="row"> ! <div class="col1">{TITLE_HELP}{TITLE_LABEL}:</div><div class="col2">{TITLE}</div> </div> <!-- END TITLE --> --- 1,15 ---- + <div style="text-align:right;margin-right:3%;">{SORT_OPTION}</div> <div class="form bg_light"> {START_FORM} + <!-- BEGIN UPDATE_BUTTON --> + <div class="submit fancyBorder" style="text-align:right;"> + {UPDATE_BUTTON} + </div> + <!-- END UPDATE_BUTTON --> <!-- BEGIN TITLE --> <div class="row"> ! <div class="col1">{TITLE_HELP}{TITLE_LABEL}:</div> ! <div class="col2">{TITLE} ! </div> </div> <!-- END TITLE --> *************** *** 18,22 **** <!-- BEGIN SHOW_MULTIVIEW --> <div class="row"> ! <div class="col1comment">{SHOW_MULTIVIEW_HELP}{SHOW_MULTIVIEW_LABEL}:</div><div class="col2multiple">{SHOW_MULTIVIEW}</div> </div> <!-- END SHOW_MULTIVIEW --> --- 26,31 ---- <!-- BEGIN SHOW_MULTIVIEW --> <div class="row"> ! <div class="col1comment">{SHOW_MULTIVIEW_HELP}{SHOW_MULTIVIEW_LABEL}: ! </div><div class="col2multiple">{SHOW_MULTIVIEW}</div> </div> <!-- END SHOW_MULTIVIEW --> *************** *** 67,75 **** </div> <!-- END SHOW_CAT_LINK --> - <!-- BEGIN SUBMIT --> <div class="submit"> {SUBMIT_BUTTON} </div> - <!-- END SUBMIT --> {END_FORM} </div> --- 76,82 ---- --- NEW FILE: sort_list.tpl --- <!-- <table cellpadding="7"> <tr class="bg_light"><td colspan="2"><b>{ORDER_HDR}</b></td><td><b>{FEED_NAME_HDR}</b></td></tr> {ROWS} </table> --> <div class="row"> <div class="col1 bg_light" style="padding:5px;height:auto;width:5%;font-weight:bold;">{ORDER_HDR}</div><div class="col1 bg_light" style="padding:5px;height:auto;font-weight:bold;">{FEED_NAME_HDR}</div> {FEED_LISTING} </div> --- NEW FILE: sort.tpl --- {START_FORM} <div style="margin:15px;"> <i>{TITLE}</i> </div> <div class="row"> <div class="col1" style="width:2%"> {SORT_OPTIONS_1} </div> <div class="col2"> <b>{SORT_OPTION_ALPHA}</b> </div> </div> <div class="row"> <div class="col1" style="width:2%"> {SORT_OPTIONS_2} </div> <div class="col2"> <b>{SORT_OPTION_CUSTOM}</b> </div> </div> <div style="margin-left:5%"> {FEED_LISTING} </div> <br /><br /><br /> {UPDATE_SORT} {FINISHED} {END_FORM} --- NEW FILE: sort_ind_feed.tpl --- <div class="row"> <div class="col1" style="padding:5px;height:auto;width:5%;"> <!-- BEGIN MOVE_UP_LINK --> <a href="{MOVE_UP_LINK}"><img border="0" src="./images/up.gif"></a> <!-- END MOVE_UP_LINK --> <!-- BEGIN MOVE_DOWN_LINK --> <a href="{MOVE_DOWN_LINK}"><img border="0" src="./images/down.gif"></a> <!-- END MOVE_DOWN_LINK --> </div> <div class="col1" style="padding:5px;height:auto;"> {FEED_NAME} </div> </div> |
From: Darren G. <dg...@us...> - 2004-09-17 18:56:16
|
Update of /cvsroot/phpwebsite-comm/modules/phpwsrssfeeds/conf In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29516/conf Modified Files: boost.php manager.php Log Message: Added sorting option for multiview feeds Index: manager.php =================================================================== RCS file: /cvsroot/phpwebsite-comm/modules/phpwsrssfeeds/conf/manager.php,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** manager.php 2 Aug 2004 20:14:19 -0000 1.9 --- manager.php 17 Sep 2004 18:56:05 -0000 1.10 *************** *** 25,28 **** --- 25,29 ---- $desc = $_SESSION['translate']->it("Description"); $type = $_SESSION['translate']->it("Type"); + $customSort = $_SESSION['translate']->it("Ordering"); $numitems = $_SESSION['translate']->it("Items"); *************** *** 136,139 **** --- 137,141 ---- $multi_adminActions = array("edit"=>$edit, "view"=>$view, + "customSort"=>$customSort, "delete"=>$delete, "hide"=>$hide, *************** *** 143,146 **** --- 145,149 ---- $multi_adminPermissions = array("view"=>NULL, "edit"=>"multi_edit", + "customSort"=>NULL, "delete"=>"multi_delete", "hide"=>"multi_show_hide", Index: boost.php =================================================================== RCS file: /cvsroot/phpwebsite-comm/modules/phpwsrssfeeds/conf/boost.php,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -d -r1.18 -r1.19 *** boost.php 2 Sep 2004 17:48:58 -0000 1.18 --- boost.php 17 Sep 2004 18:56:05 -0000 1.19 *************** *** 30,34 **** $user_mod = 0; $active = "on"; ! $version = "0.3.3"; $depend = array("menuman", "search"); --- 30,34 ---- $user_mod = 0; $active = "on"; ! $version = "0.3.4"; $depend = array("menuman", "search"); |
From: Darren G. <dg...@us...> - 2004-09-17 18:56:16
|
Update of /cvsroot/phpwebsite-comm/modules/phpwsrssfeeds/docs In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29516/docs Modified Files: CHANGELOG Log Message: Added sorting option for multiview feeds Index: CHANGELOG =================================================================== RCS file: /cvsroot/phpwebsite-comm/modules/phpwsrssfeeds/docs/CHANGELOG,v retrieving revision 1.24 retrieving revision 1.25 diff -C2 -d -r1.24 -r1.25 *** CHANGELOG 2 Sep 2004 21:41:57 -0000 1.24 --- CHANGELOG 17 Sep 2004 18:56:05 -0000 1.25 *************** *** 2,5 **** --- 2,9 ---- # $Id$ + 17 Sep 2004; Darren Greene <dg49379 at user dot sourceforge dot net> + Added ability to custom sort feeds in a multiview + Fixed bug with backend calendar feeds when the ids are not consecutive + 02 Sep 2004; Wendall Cada <wen...@us...> Implemented css changes submitted by Mike Noyes |
From: Darren G. <dg...@us...> - 2004-09-17 18:56:16
|
Update of /cvsroot/phpwebsite-comm/modules/phpwsrssfeeds/class In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv29516/class Modified Files: Multi_RSS.php RSSManager.php RSSObjManager.php backend.php Log Message: Added sorting option for multiview feeds Index: backend.php =================================================================== RCS file: /cvsroot/phpwebsite-comm/modules/phpwsrssfeeds/class/backend.php,v retrieving revision 1.25 retrieving revision 1.26 diff -C2 -d -r1.25 -r1.26 *** backend.php 2 Aug 2004 20:14:19 -0000 1.25 --- backend.php 17 Sep 2004 18:55:23 -0000 1.26 *************** *** 314,402 **** } //END function _save ! /** ! * Asks for confirmation and, getting it, deletes the current position listing ! * ! * @author Wendall Cada <wen...@NO...> ! */ ! function _delete() { ! if (isset($_POST["YES_BUTTON"])) { ! foreach($_POST["PHPWS_MAN_ITEMS"] as $item){ ! $this->RSSFeeds_backend($item); ! //Standard error checking ! if (is_object($this->_error)) ! return FALSE; ! // delete feed from files ! unlink($GLOBALS['core']->home_dir.'files/phpwsrssfeeds/backend'.$this->_id.'.php'); ! // delete the current item ! $this->kill(); ! } ! if(isset($_POST["PHPWS_MAN_ITEMS"][1])) ! $content = RSS_common::_continueContent($_SESSION["translate"]->it("RSS Feeds deleted."), "list", "RSS_BACKEND_MAN_op"); ! else ! $content = RSS_common::_continueContent($_SESSION["translate"]->it("RSS Feed deleted."), "list", "RSS_BACKEND_MAN_op"); ! } elseif (isset($_POST["NO_BUTTON"])) { ! ! /* tell user all is still okay */ ! if(isset($_POST["PHPWS_MAN_ITEMS"][1])) ! $content = RSS_common::_continueContent($_SESSION["translate"]->it("RSS Feeds NOT deleted."), "list", "RSS_BACKEND_MAN_op"); ! else ! $content = RSS_common::_continueContent($_SESSION["translate"]->it("RSS Feed NOT deleted."), "list", "RSS_BACKEND_MAN_op"); ! ! } elseif (isset($_POST["PHPWS_MAN_ITEMS"]) ! && sizeof($_POST["PHPWS_MAN_ITEMS"]) > 0 ! && is_array($_POST["PHPWS_MAN_ITEMS"])) { ! require_once(PHPWS_SOURCE_DIR.'core/Form.php'); ! /* ask if the user is sure */ ! $form = new EZform("RSS_BACKEND_DELETE"); ! $form->add("YES_BUTTON", "submit", $_SESSION["translate"]->it("Yes")); ! $form->add("NO_BUTTON", "submit", $_SESSION["translate"]->it("No")); ! $form->add("module", "hidden", "phpwsrssfeeds"); ! $form->add("RSS_BACKEND_MAN_op", "hidden", "delete"); ! // note must indicate with [] that the id variable is in an array ! // I'll also build a sql query for the title list ! $num = 0; ! foreach($_POST["PHPWS_MAN_ITEMS"] as $id){ ! $man_item = "PHPWS_MAN_ITEMS[$num]"; ! $form->add($man_item, "hidden", $id); ! $num++; ! } ! $item_list = implode(" OR id = ", $_POST["PHPWS_MAN_ITEMS"]); ! $sql = "SELECT label FROM mod_phpwsrssfeeds_backend WHERE id = ".$item_list; ! $items = $GLOBALS["core"]->getAll($sql, TRUE); ! ! $tags = array(); ! $tags = $form->getTemplate(); ! $tags["MESSAGE"] = $_SESSION["translate"]->it("Delete "); ! foreach($items as $item){ ! $tags["MESSAGE"] .= $item['label'].", "; ! } ! $tags["MESSAGE"] = rtrim($tags["MESSAGE"], ", "); ! $tags["MESSAGE"] .= "?"; ! ! $content = PHPWS_Template::processTemplate($tags, "phpwsrssfeeds", "confirm.tpl"); ! ! } else { ! $content = RSS_common::_errorMessage("Sorry, there was a problem with that request."); ! } ! ! return $content; ! ! } //END function delete ! function _list(){ ! require_once(PHPWS_SOURCE_DIR.'mod/phpwsrssfeeds/class/RSSList.php'); ! $content = FALSE; ! $settings = array("_module" => "phpwsrssfeeds", ! "_table" => "mod_phpwsrssfeeds_backend", ! "_request" => "RSS_BACKEND_MAN_op"); ! $listObj = RSSList::getRSSList($settings); ! $listObj->init(); ! if ($_SESSION["OBJ_user"]->allow_access("phpwsrssfeeds")) ! $content = $listObj->getList("backend", $_SESSION["translate"]->it("Local RSS News Feeds")); ! ! return $content; ! }//End function _list() function CreateRDF($id = NULL){ $_REQUEST["lay_quiet"] = 1; --- 314,402 ---- } //END function _save ! /** ! * Asks for confirmation and, getting it, deletes the current position listing ! * ! * @author Wendall Cada <wen...@NO...> ! */ ! function _delete() { ! if (isset($_POST["YES_BUTTON"])) { ! foreach($_POST["PHPWS_MAN_ITEMS"] as $item){ ! $this->RSSFeeds_backend($item); ! //Standard error checking ! if (is_object($this->_error)) ! return FALSE; ! // delete feed from files ! unlink($GLOBALS['core']->home_dir.'files/phpwsrssfeeds/backend'.$this->_id.'.php'); ! // delete the current item ! $this->kill(); ! } ! if(isset($_POST["PHPWS_MAN_ITEMS"][1])) ! $content = RSS_common::_continueContent($_SESSION["translate"]->it("RSS Feeds deleted."), "list", "RSS_BACKEND_MAN_op"); ! else ! $content = RSS_common::_continueContent($_SESSION["translate"]->it("RSS Feed deleted."), "list", "RSS_BACKEND_MAN_op"); ! } elseif (isset($_POST["NO_BUTTON"])) { ! ! /* tell user all is still okay */ ! if(isset($_POST["PHPWS_MAN_ITEMS"][1])) ! $content = RSS_common::_continueContent($_SESSION["translate"]->it("RSS Feeds NOT deleted."), "list", "RSS_BACKEND_MAN_op"); ! else ! $content = RSS_common::_continueContent($_SESSION["translate"]->it("RSS Feed NOT deleted."), "list", "RSS_BACKEND_MAN_op"); ! ! } elseif (isset($_POST["PHPWS_MAN_ITEMS"]) ! && sizeof($_POST["PHPWS_MAN_ITEMS"]) > 0 ! && is_array($_POST["PHPWS_MAN_ITEMS"])) { ! require_once(PHPWS_SOURCE_DIR.'core/Form.php'); ! /* ask if the user is sure */ ! $form = new EZform("RSS_BACKEND_DELETE"); ! $form->add("YES_BUTTON", "submit", $_SESSION["translate"]->it("Yes")); ! $form->add("NO_BUTTON", "submit", $_SESSION["translate"]->it("No")); ! $form->add("module", "hidden", "phpwsrssfeeds"); ! $form->add("RSS_BACKEND_MAN_op", "hidden", "delete"); ! // note must indicate with [] that the id variable is in an array ! // I'll also build a sql query for the title list ! $num = 0; ! foreach($_POST["PHPWS_MAN_ITEMS"] as $id){ ! $man_item = "PHPWS_MAN_ITEMS[$num]"; ! $form->add($man_item, "hidden", $id); ! $num++; ! } ! $item_list = implode(" OR id = ", $_POST["PHPWS_MAN_ITEMS"]); ! $sql = "SELECT label FROM mod_phpwsrssfeeds_backend WHERE id = ".$item_list; ! $items = $GLOBALS["core"]->getAll($sql, TRUE); ! ! $tags = array(); ! $tags = $form->getTemplate(); ! $tags["MESSAGE"] = $_SESSION["translate"]->it("Delete "); ! foreach($items as $item){ ! $tags["MESSAGE"] .= $item['label'].", "; ! } ! $tags["MESSAGE"] = rtrim($tags["MESSAGE"], ", "); ! $tags["MESSAGE"] .= "?"; ! ! $content = PHPWS_Template::processTemplate($tags, "phpwsrssfeeds", "confirm.tpl"); ! ! } else { ! $content = RSS_common::_errorMessage("Sorry, there was a problem with that request."); ! } ! return $content; ! ! } //END function delete ! ! function _list(){ ! require_once(PHPWS_SOURCE_DIR.'mod/phpwsrssfeeds/class/RSSList.php'); ! $content = FALSE; ! $settings = array("_module" => "phpwsrssfeeds", ! "_table" => "mod_phpwsrssfeeds_backend", ! "_request" => "RSS_BACKEND_MAN_op"); ! $listObj = RSSList::getRSSList($settings); ! $listObj->init(); ! if ($_SESSION["OBJ_user"]->allow_access("phpwsrssfeeds")) ! $content = $listObj->getList("backend", $_SESSION["translate"]->it("Local RSS News Feeds")); + return $content; + }//End function _list() + function CreateRDF($id = NULL){ $_REQUEST["lay_quiet"] = 1; *************** *** 552,564 **** } }elseif($this->_type == "Calendar"){ ! ! for ($i = 0; $i <= count($result); $i++) ! for($n = 0;$n <= count($result[$i]['data']); $n++){ ! $id = $result[$i]['data'][$n]['id']; if($id){ ! $title = PHPWS_Text::parseOutput($result[$i]['data'][$n]['title']); $title = RSS_common::get_htmlentities($title, ENT_QUOTES); ! $title = $result[$i]['FullDate']." - ".$title; ! $description = PHPWS_Text::parseOutput($result[$i]['data'][$n]['description']); $description = RSS_common::get_htmlentities($description, ENT_QUOTES); $output .= "\n<item rdf:about=\"http://".$source_http."index.php?module=calendar&calendar[view]=event&id=$id\"> --- 552,564 ---- } }elseif($this->_type == "Calendar"){ ! ! foreach($result as $calFeed) { ! for($n = 0;$n <= count($calFeed['data']); $n++){ ! $id = $calFeed['data'][$n]['id']; if($id){ ! $title = PHPWS_Text::parseOutput($calFeed['data'][$n]['title']); $title = RSS_common::get_htmlentities($title, ENT_QUOTES); ! $title = $calFeed['FullDate']." - ".$title; ! $description = PHPWS_Text::parseOutput($calFeed['data'][$n]['description']); $description = RSS_common::get_htmlentities($description, ENT_QUOTES); $output .= "\n<item rdf:about=\"http://".$source_http."index.php?module=calendar&calendar[view]=event&id=$id\"> *************** *** 567,575 **** <description> $description"; ! $startDate = $result[$i]['data'][$n]['startDate']; ! $endDate = $result[$i]['data'][$n]['endDate']; ! $startTime = sprintf("%04d",$result[$i]['data'][$n]['startTime']); ! $endTime = sprintf("%04d",$result[$i]['data'][$n]['endTime']); ! $endRepeat = $result[$i]['data'][$n]['endRepeat']; $startYear = substr($startDate,0,4); $startMonth =substr($startDate,4,2); --- 567,575 ---- <description> $description"; ! $startDate = $calFeed['data'][$n]['startDate']; ! $endDate = $calFeed['data'][$n]['endDate']; ! $startTime = sprintf("%04d",$calFeed['data'][$n]['startTime']); ! $endTime = sprintf("%04d",$calFeed['data'][$n]['endTime']); ! $endRepeat = $calFeed['data'][$n]['endRepeat']; $startYear = substr($startDate,0,4); $startMonth =substr($startDate,4,2); *************** *** 586,591 **** $endHour = substr($endTime,0,2); ! if($result[$i]['data'][$n]["eventType"]=="allday"){ ! $output .= "<br /><br />".$result[$i]['FullDate']."<br />All Day Event"; $dcdate = $startYear."-".$startMonth."-".$startDay; }else{ --- 586,591 ---- $endHour = substr($endTime,0,2); ! if($calFeed['data'][$n]["eventType"]=="allday"){ ! $output .= "<br /><br />".$calFeed['FullDate']."<br />All Day Event"; $dcdate = $startYear."-".$startMonth."-".$startDay; }else{ *************** *** 603,611 **** $endHour = sprintf("%02d", $endHour==0 ? 12 : $endHour); $deadline = ltrim($endHour,"\0x00").":".$endMinute; ! if($result[$i]['data'][$n]["eventType"]=="deadline"){ $dcdate = $endYear."-".$endMonth."-".$endDay; ! $output .= "<br /><br />".$result[$i]['FullDate']."<br />Deadline: ".$deadline.$eampm; } ! if($result[$i]['data'][$n]["eventType"]=="interval" && ($endRepeat)){ $startHour = ($startHour + 1) > 12 ? $startHour - 12 : $startHour; $startHour = sprintf("%02d", $startHour==0 ? 12 : $startHour); --- 603,611 ---- $endHour = sprintf("%02d", $endHour==0 ? 12 : $endHour); $deadline = ltrim($endHour,"\0x00").":".$endMinute; ! if($calFeed['data'][$n]["eventType"]=="deadline"){ $dcdate = $endYear."-".$endMonth."-".$endDay; ! $output .= "<br /><br />".$calFeed['FullDate']."<br />Deadline: ".$deadline.$eampm; } ! if($calFeed['data'][$n]["eventType"]=="interval" && ($endRepeat)){ $startHour = ($startHour + 1) > 12 ? $startHour - 12 : $startHour; $startHour = sprintf("%02d", $startHour==0 ? 12 : $startHour); *************** *** 618,624 **** else $dcdate = $startYear."-".$startMonth."-".$startDay."/".$repeatYear."-".$repeatMonth."-".$repeatDay; ! $output .= "<br /><br />".$result[$i]['FullDate']."<br />".$starts.$sampm." - ".$ends.$eampm; } ! if($result[$i]['data'][$n]["eventType"]=="interval" && (!$endRepeat)){ $startHour = ($startHour + 1) > 12 ? $startHour - 12 : $startHour; $startHour = sprintf("%02d", $startHour==0 ? 12 : $startHour); --- 618,624 ---- else $dcdate = $startYear."-".$startMonth."-".$startDay."/".$repeatYear."-".$repeatMonth."-".$repeatDay; ! $output .= "<br /><br />".$calFeed['FullDate']."<br />".$starts.$sampm." - ".$ends.$eampm; } ! if($calFeed['data'][$n]["eventType"]=="interval" && (!$endRepeat)){ $startHour = ($startHour + 1) > 12 ? $startHour - 12 : $startHour; $startHour = sprintf("%02d", $startHour==0 ? 12 : $startHour); *************** *** 635,639 **** <b>To: </b>".$ends.$eampm.", ".$endYear."-".$endMonth."-".$endDay; } ! if($result[$i]['data'][$n]["eventType"]=="start"){ $startHour = ($startHour + 1) > 12 ? $startHour - 12 : $startHour; $startHour = sprintf("%02d", $startHour==0 ? 12 : $startHour); --- 635,639 ---- <b>To: </b>".$ends.$eampm.", ".$endYear."-".$endMonth."-".$endDay; } ! if($calFeed['data'][$n]["eventType"]=="start"){ $startHour = ($startHour + 1) > 12 ? $startHour - 12 : $startHour; $startHour = sprintf("%02d", $startHour==0 ? 12 : $startHour); *************** *** 652,655 **** --- 652,656 ---- } } + } } *************** *** 667,720 **** */ function daysAhead($year=NULL, $month=NULL, $day=NULL){ ! require_once (PHPWS_SOURCE_DIR . "/mod/calendar/class/Display.php"); ! require_once (PHPWS_SOURCE_DIR . "/mod/calendar/class/Calendar.php"); ! $GLOBALS["calendarSettings"] = PHPWS_Calendar::getSettings(); ! $settings = $GLOBALS["calendarSettings"]; ! if (!($viewAhead = $settings["daysAhead"])) ! return NULL; ! ! if (is_null($year)) ! $year = date("Y"); ! ! if (is_null($month)) ! $month = date("m"); ! ! if (is_null($day)) ! $day = date("d"); ! ! //stub for cache data return, will generate everything for now ! ! $date = new Date; ! $date->setMonth($month); ! $date->setYear($year); ! $date->setDay($day); ! $end = $date; ! $end->addSeconds(86400 * $viewAhead); ! $eventList = PHPWS_Calendar::loadEvents($date, $end); ! $eventCount = 0; ! $i = 0; ! $maxnum = 0; ! while($end->after($date)){ ! if ($events = PHPWS_Calendar::getEvents($date, $eventList)){ ! $thisdate = $date->format("%a. %e %b. %Y"); ! $num = 0; ! foreach ($events as $time=>$weekday){ ! foreach ($weekday as $itemid=>$event){ ! if($maxnum == $this->_numitems) ! return $eventdata; ! $eventdata[$i]['FullDate'] = $thisdate; ! $eventdata[$i]['data'][$num]= $event; ! $num++; ! $maxnum++; ! } ! } ! } ! $i++; ! $date = $date->getNextDay(); ! } ! return $eventdata; ! }//end function daysAhead() } --- 668,720 ---- */ function daysAhead($year=NULL, $month=NULL, $day=NULL){ ! require_once (PHPWS_SOURCE_DIR . "/mod/calendar/class/Display.php"); ! require_once (PHPWS_SOURCE_DIR . "/mod/calendar/class/Calendar.php"); ! $GLOBALS["calendarSettings"] = PHPWS_Calendar::getSettings(); ! $settings = $GLOBALS["calendarSettings"]; ! if (!($viewAhead = $settings["daysAhead"])) ! return NULL; ! ! if (is_null($year)) ! $year = date("Y"); ! if (is_null($month)) ! $month = date("m"); ! ! if (is_null($day)) ! $day = date("d"); ! //stub for cache data return, will generate everything for now ! $date = new Date; ! $date->setMonth($month); ! $date->setYear($year); ! $date->setDay($day); ! ! $end = $date; ! $end->addSeconds(86400 * $viewAhead); ! ! $eventList = PHPWS_Calendar::loadEvents($date, $end); ! $eventCount = 0; ! $i = 0; ! $maxnum = 0; ! while($end->after($date)){ ! if ($events = PHPWS_Calendar::getEvents($date, $eventList)){ ! $thisdate = $date->format("%a. %e %b. %Y"); ! $num = 0; ! foreach ($events as $time=>$weekday){ ! foreach ($weekday as $itemid=>$event){ ! if($maxnum == $this->_numitems) ! return $eventdata; ! $eventdata[$i]['FullDate'] = $thisdate; ! $eventdata[$i]['data'][$num]= $event; ! $num++; ! $maxnum++; ! } ! } ! } ! $i++; ! $date = $date->getNextDay(); ! } ! return $eventdata; ! }//end function daysAhead() } Index: RSSObjManager.php =================================================================== RCS file: /cvsroot/phpwebsite-comm/modules/phpwsrssfeeds/class/RSSObjManager.php,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** RSSObjManager.php 21 Jun 2004 21:15:19 -0000 1.2 --- RSSObjManager.php 17 Sep 2004 18:55:23 -0000 1.3 *************** *** 63,72 **** /** ! * Current class object ! * ! * @var object ! * @access private ! */ ! var $_classObj; /** --- 63,72 ---- /** ! * Current class object ! * ! * @var object ! * @access private ! */ ! var $_classObj; /** *************** *** 96,128 **** var $_titles; ! /** ! * Constructor for RSS list manager object ! * var array $settings User defined settings for this class. * NOTE: Don't pass objects to this class. * ! */ ! function RSS_ObjManager($settings = NULL) { ! $this->_class = NULL; ! $this->_module = NULL; ! $this->_table = NULL; ! $this->_request = NULL; ! $this->_listFunction = "_list"; ! $this->_viewFunction = "_view"; ! $this->_editFunction = "_edit"; ! $this->_deleteFunction = "_delete"; ! $this->_saveFunction = "_save"; ! $this->_showFunction = "_show"; ! $this->_hideFunction = "_hide"; ! $this->_approveFunction = "_approve"; ! $this->_classObj = NULL; ! $this->_itemRequest = 'PHPWS_MAN_ITEMS'; ! $this->_checkPerms = array(); ! $this->_titles = array(); ! //Settings constructor ! if(is_array($settings)){ ! foreach ($settings as $setting => $value) ! $this->$setting = $value; ! } ! } // END function RSS_ListManager() function getRSS_ObjManager($settings = NULL) { --- 96,128 ---- var $_titles; ! /** ! * Constructor for RSS list manager object ! * var array $settings User defined settings for this class. * NOTE: Don't pass objects to this class. * ! */ ! function RSS_ObjManager($settings = NULL) { ! $this->_class = NULL; ! $this->_module = NULL; ! $this->_table = NULL; ! $this->_request = NULL; ! $this->_listFunction = "_list"; ! $this->_viewFunction = "_view"; ! $this->_editFunction = "_edit"; ! $this->_deleteFunction = "_delete"; ! $this->_saveFunction = "_save"; ! $this->_showFunction = "_show"; ! $this->_hideFunction = "_hide"; ! $this->_approveFunction = "_approve"; ! $this->_classObj = NULL; ! $this->_itemRequest = 'PHPWS_MAN_ITEMS'; ! $this->_checkPerms = array(); ! $this->_titles = array(); ! //Settings constructor ! if(is_array($settings)){ ! foreach ($settings as $setting => $value) ! $this->$setting = $value; ! } ! } // END function RSS_ListManager() function getRSS_ObjManager($settings = NULL) { *************** *** 146,313 **** */ function managerAction($action) { ! $function = NULL; ! $content = NULL; ! $list = FALSE; ! $doMassUpdate = FALSE; ! $error = FALSE; ! $debug_message = NULL; ! //Mandatory security check on every manager function ! if ($error == FALSE && isset($this->_checkPerms[$action])) { ! if($this->_checkPerms[$action] == 1) ! $perms = NULL; ! else ! $perms = $this->_checkPerms[$action]; ! ! if(!$_SESSION["OBJ_user"]->allow_access($this->_module,$perms)) ! return $this->accessDenied(); ! } ! //set action function based on type ! switch($action) { ! case "list": ! $function = $this->_listFunction; ! break; ! case "edit": ! $function = $this->_editFunction; ! break; ! case "delete": ! if (isset($_POST["YES_BUTTON"]) && isset($_POST[$this->_itemRequest])) { ! if(isset($_POST[$this->_itemRequest][1])) ! $content = $_SESSION["translate"]->it("Selected items deleted:"); ! else ! $content = $_SESSION["translate"]->it("Selected item deleted:"); ! $list = TRUE; ! $function = $this->_deleteFunction; ! } elseif (isset($_POST["NO_BUTTON"])) { ! // tell user all is still okay ! if(isset($_POST[$this->_itemRequest][1])) ! return RSS_common::_continueContent($_SESSION["translate"]->it("Selected items NOT deleted."), "list", $this->_request); ! else ! return RSS_common::_continueContent($_SESSION["translate"]->it("Selected item NOT deleted."), "list", $this->_request); ! } elseif (isset($_POST[$this->_itemRequest]) ! && sizeof($_POST[$this->_itemRequest]) > 0 ! && is_array($_POST[$this->_itemRequest])) { ! return $this->confirmDelete(); ! } else { ! $error = TRUE; ! //Check to see if delete was a get request. If so, display error. ! if (isset($_GET['module'])) ! $debug_message = "Only POST data can be used to delete items"; ! else ! $debug_message = "No delete parameters set."; ! } ! break; ! case "view": ! $function = $this->_viewFunction; ! break; ! ! case "add": ! $function = $this->_editFunction; ! break; ! ! case "sView": ! $function = $this->_viewFunction; ! break; ! ! case "save": ! //Check to see if save was a get request. If so, display error. ! if (isset($_GET['module'])) { ! $error = TRUE; ! $debug_message = "Only POST data can be used to save items"; ! } ! $function = $this->_saveFunction; ! break; ! ! case "menu_link": ! return $this->linkItem('list', 'menu_link'); ! case "link": ! return $this->linkItem('view','menu_link',$_REQUEST[$this->_itemRequest][0]); ! case "hide": ! $doMassUpdate = TRUE; ! $list = TRUE; ! $function = $this->_hideFunction; ! break; ! case "show": ! $doMassUpdate = TRUE; ! $list = TRUE; ! $function = $this->_showFunction; ! break; ! ! case "approve": ! $doMassUpdate = TRUE; ! $list = TRUE; ! $function = $this->_approveFunction; ! break; ! } ! if ($error == FALSE && is_null($function)) { ! $debug_message = $this->_class." ".$action." not set!"; ! $error = TRUE; ! } ! if ($error == FALSE && !is_callable(array($this->_class, $function))) { ! $debug_message = $this->_class."::".$function."() doesn't exist!"; ! $error = TRUE; ! } ! if($error == FALSE && $action == 'save') ! if(!$_SESSION["OBJ_user"]->allow_access($this->_module)) ! return $this->accessDenied(); ! ! if ($error == FALSE && isset($_REQUEST[$this->_itemRequest]) && sizeof($_REQUEST[$this->_itemRequest]) > 0) { ! if (!is_array($_REQUEST[$this->_itemRequest])) { ! $this->_classObj = new $this->_class($_REQUEST[$this->_itemRequest]); ! $return_item = $this->_classObj->$function(); ! if ($return_item == FALSE) ! $error = TRUE; ! $content .= $return_item; ! } elseif(is_array($_REQUEST[$this->_itemRequest])) { ! $this->_classObj = new $this->_class(); ! if(!$doMassUpdate){ ! $return_items = ''; ! foreach($_REQUEST[$this->_itemRequest] as $item) { ! $return_item = $this->_classObj->$function($item); ! if ($return_item == FALSE) { ! $error = TRUE; ! break; ! } else ! $return_items .= $return_item; ! } ! $content .= $return_items; ! } else { ! $return = $this->_classObj->$function($_REQUEST[$this->_itemRequest]); ! if ($return == FALSE) ! $error = TRUE; ! else ! $content .= $return; ! } ! } ! } elseif ($error == FALSE) { ! $this->_classObj = new $this->_class(); ! $return_item = $this->_classObj->$function(); ! if ($return_item == FALSE) ! $error = TRUE; ! $content .= $return_item; ! } ! if ($error == TRUE) { ! if ($_SESSION['PHPWS_Debug']->isActive() && is_object($this->_classObj->_error)) { ! $debug_message = $this->_classObj->_error->getMessage(); ! $content .= RSS_common::_errorMessage($debug_message,"Error",1,$this->_module,"RSS_ObjManager::managerAction"); ! } elseif ($_SESSION['PHPWS_Debug']->isActive() && !is_null($debug_message)) { ! $content .= RSS_common::_errorMessage($debug_message,"Error",1,$this->_module,"RSS_ObjManager::managerAction"); } else ! $content .= RSS_common::_errorMessage("Sorry, there was a problem with that request."); ! } ! if ($list == TRUE) { ! if (!is_object($this->_classObj)) ! $this->_classObj = new $this->_class(); $function = $this->_listFunction; $content .= $this->_classObj->$function(); ! } ! ! return $content; ! }// END FUNC managerAction() --- 146,322 ---- */ function managerAction($action) { ! $function = NULL; ! $content = NULL; ! $list = FALSE; ! $doMassUpdate = FALSE; ! $error = FALSE; ! $debug_message = NULL; ! //Mandatory security check on every manager function ! if ($error == FALSE && isset($this->_checkPerms[$action])) { ! if($this->_checkPerms[$action] == 1) ! $perms = NULL; ! else ! $perms = $this->_checkPerms[$action]; ! ! if(!$_SESSION["OBJ_user"]->allow_access($this->_module,$perms)) ! return $this->accessDenied(); ! } ! //set action function based on type ! switch($action) { ! case "list": ! $function = $this->_listFunction; ! break; ! ! case "edit": ! $function = $this->_editFunction; ! break; ! ! case "delete": ! if (isset($_POST["YES_BUTTON"]) && isset($_POST[$this->_itemRequest])) { ! if(isset($_POST[$this->_itemRequest][1])) ! $content = $_SESSION["translate"]->it("Selected items deleted:"); ! else ! $content = $_SESSION["translate"]->it("Selected item deleted:"); ! $list = TRUE; ! $function = $this->_deleteFunction; ! } elseif (isset($_POST["NO_BUTTON"])) { ! // tell user all is still okay ! if(isset($_POST[$this->_itemRequest][1])) ! return RSS_common::_continueContent($_SESSION["translate"]->it("Selected items NOT deleted."), "list", $this->_request); ! else ! return RSS_common::_continueContent($_SESSION["translate"]->it("Selected item NOT deleted."), "list", $this->_request); ! } elseif (isset($_POST[$this->_itemRequest]) ! && sizeof($_POST[$this->_itemRequest]) > 0 ! && is_array($_POST[$this->_itemRequest])) { ! return $this->confirmDelete(); ! } else { ! $error = TRUE; ! //Check to see if delete was a get request. If so, display error. ! if (isset($_GET['module'])) ! $debug_message = "Only POST data can be used to delete items"; ! else ! $debug_message = "No delete parameters set."; ! } ! break; ! case "view": ! $function = $this->_viewFunction; ! break; ! case "add": ! $function = $this->_editFunction; ! break; ! ! case "sView": ! $function = $this->_viewFunction; ! break; ! case "customSort": ! // only for multiview ! $function = "customSort"; ! break; ! case "saveCustomSort": ! $function = "saveCustomSort"; ! break; ! ! case "save": ! //Check to see if save was a get request. If so, display error. ! if (isset($_GET['module'])) { ! $error = TRUE; ! $debug_message = "Only POST data can be used to save items"; ! } ! $function = $this->_saveFunction; ! break; ! ! case "menu_link": ! return $this->linkItem('list', 'menu_link'); ! ! case "link": ! return $this->linkItem('view','menu_link',$_REQUEST[$this->_itemRequest][0]); ! case "hide": ! $doMassUpdate = TRUE; ! $list = TRUE; ! $function = $this->_hideFunction; ! break; ! ! case "show": ! $doMassUpdate = TRUE; ! $list = TRUE; ! $function = $this->_showFunction; ! break; ! ! case "approve": ! $doMassUpdate = TRUE; ! $list = TRUE; ! $function = $this->_approveFunction; ! break; ! } ! if ($error == FALSE && is_null($function)) { ! $debug_message = $this->_class." ".$action." not set!"; ! $error = TRUE; ! } ! if ($error == FALSE && !is_callable(array($this->_class, $function))) { ! $debug_message = $this->_class."::".$function."() doesn't exist!"; ! $error = TRUE; ! } ! if($error == FALSE && $action == 'save') ! if(!$_SESSION["OBJ_user"]->allow_access($this->_module)) ! return $this->accessDenied(); ! if ($error == FALSE && isset($_REQUEST[$this->_itemRequest]) && sizeof($_REQUEST[$this->_itemRequest]) > 0) { ! if (!is_array($_REQUEST[$this->_itemRequest])) { ! $this->_classObj = new $this->_class($_REQUEST[$this->_itemRequest]); ! $return_item = $this->_classObj->$function(); ! if ($return_item == FALSE) ! $error = TRUE; ! $content .= $return_item; ! } elseif(is_array($_REQUEST[$this->_itemRequest])) { ! $this->_classObj = new $this->_class(); ! if(!$doMassUpdate){ ! $return_items = ''; ! foreach($_REQUEST[$this->_itemRequest] as $item) { ! $return_item = $this->_classObj->$function($item); ! if ($return_item == FALSE) { ! $error = TRUE; ! break; ! } else ! $return_items .= $return_item; ! } ! $content .= $return_items; ! } else { ! $return = $this->_classObj->$function($_REQUEST[$this->_itemRequest]); ! if ($return == FALSE) ! $error = TRUE; ! else ! $content .= $return; ! } ! } ! } elseif ($error == FALSE) { ! $this->_classObj = new $this->_class(); ! $return_item = $this->_classObj->$function(); ! if ($return_item == FALSE) ! $error = TRUE; ! $content .= $return_item; ! } ! if ($error == TRUE) { ! if ($_SESSION['PHPWS_Debug']->isActive() && is_object($this->_classObj->_error)) { ! $debug_message = $this->_classObj->_error->getMessage(); ! $content .= RSS_common::_errorMessage($debug_message,"Error",1,$this->_module,"RSS_ObjManager::managerAction"); ! } elseif ($_SESSION['PHPWS_Debug']->isActive() && !is_null($debug_message)) { ! $content .= RSS_common::_errorMessage($debug_message,"Error",1,$this->_module,"RSS_ObjManager::managerAction"); } else ! $content .= RSS_common::_errorMessage("Sorry, there was a problem with that request."); ! } ! if ($list == TRUE) { ! if (!is_object($this->_classObj)) ! $this->_classObj = new $this->_class(); $function = $this->_listFunction; $content .= $this->_classObj->$function(); ! } ! ! return $content; ! }// END FUNC managerAction() Index: Multi_RSS.php =================================================================== RCS file: /cvsroot/phpwebsite-comm/modules/phpwsrssfeeds/class/Multi_RSS.php,v retrieving revision 1.22 retrieving revision 1.23 diff -C2 -d -r1.22 -r1.23 *** Multi_RSS.php 2 Sep 2004 17:48:57 -0000 1.22 --- Multi_RSS.php 17 Sep 2004 18:55:23 -0000 1.23 *************** *** 67,70 **** --- 67,71 ---- var $_show_anchor_links; var $_show_cat_link; + var $_sort_order; var $_expandedFeed; var $_content; *************** *** 84,87 **** --- 85,89 ---- $this->_error = NULL; $this->_show_empty_feeds = 1; + $this->_sort_order = 0; } *************** *** 114,121 **** if($this->_hidden || !$this->_approved) return FALSE; ! $feed_list = implode(" OR id = ", $this->_show_in_multiview); ! $sql = "SELECT id FROM mod_phpwsrssfeeds_feeds WHERE id = ".$feed_list . " ORDER BY label"; $feeds = $GLOBALS["core"]->getAllAssoc($sql, TRUE); ! $this->_availFeeds = $feeds; } --- 116,142 ---- if($this->_hidden || !$this->_approved) return FALSE; ! ! $feed_list = implode(" OR id = ", $this->_show_in_multiview); ! $sql = "SELECT id FROM mod_phpwsrssfeeds_feeds WHERE id = ".$feed_list; ! ! if(!isset($this->_sort_order) || $this->_sort_order == FALSE) ! $sql .= " ORDER BY label"; ! $feeds = $GLOBALS["core"]->getAllAssoc($sql, TRUE); ! ! if(isset($this->_sort_order) && $this->_sort_order == TRUE) { ! $customSorted = array(); ! foreach($this->_show_in_multiview as $feed) { ! foreach($feeds as $availFeeds) { ! if($feed == $availFeeds["id"]) { ! $customSorted[] = array("id"=>$feed); ! } ! } ! } ! $this->_availFeeds = $customSorted; ! } else { ! ! $this->_availFeeds = $feeds; ! } } *************** *** 218,222 **** function _view($id = NULL) { if(!is_null($id)) ! $this->Multi_RSS($id); //error checking --- 239,243 ---- function _view($id = NULL) { if(!is_null($id)) ! $this->Multi_RSS($id); //error checking *************** *** 262,265 **** --- 283,408 ---- }//End function _view() + function _sortMoveUp($upFeed) { + $sorted = array(); + + for($i =0; $i < count($this->_show_in_multiview); $i++) { + if($this->_show_in_multiview[$i] == $upFeed && $i != 0) + continue; + + if($this->_show_in_multiview[$i+1] == $upFeed) { + $sorted[] = $upFeed; + } + + $sorted[] = $this->_show_in_multiview[$i]; + } + + $this->_show_in_multiview = $sorted; + $this->_sort_order = 1; + $this->commit(); + } + + function _sortMoveDown($downFeed) { + $sorted = array(); + + $skipped = false; + for($i=0; $i < count($this->_show_in_multiview); $i++) { + if($this->_show_in_multiview[$i] == $downFeed && $i != count($this->_show_in_multiview)-1) { + $skipped = true; + if(count($this->_show_in_multiview) > $i) + $sorted[] = $this->_show_in_multiview[$i + 1]; + else + $sorted[] = $downFeed; + continue; + } + + if($skipped) { + $sorted[] = $downFeed; + $skipped = false; + } else + $sorted[] = $this->_show_in_multiview[$i]; + } + + $this->_show_in_multiview = $sorted; + $this->_sort_order = 1; + $this->commit(); + } + + function saveCustomSort($id) { + if(!is_null($id)) { + $this->Multi_RSS($id); + + if(isset($_REQUEST["sort_options"])) { + if($_REQUEST["sort_options"] == "custom") { + $this->_sort_order = 1; + } else if($_REQUEST["sort_options"] == "alpha") { + $this->_sort_order = 0; + } + $this->commit(); + if(isset($_REQUEST["update_sort"])) + return $this->customSort($id); + else if(isset($_REQUEST["edit"])) + return $this->_edit(); + else + return $this->_list(); + } + } + } + + function customSort($id) { + if(!is_null($id)) { + $this->Multi_RSS($id); + $allFeeds = $this->get_available_feeds(); + + if(isset($_REQUEST["MOVE_UP"])) { + $this->_sortMoveUp($_REQUEST["MOVE_UP"]); + } else if(isset($_REQUEST["MOVE_DOWN"])) { + $this->_sortMoveDown($_REQUEST["MOVE_DOWN"]); + } + + $listFeedTags["FEED_LISTING"] = ""; + $feedCount = 0; + foreach($this->_show_in_multiview as $feed) { + $rowTags = array(); + $feedCount++; + $rowTags["FEED_NAME"] = $allFeeds[$feed]; + if($feedCount != 1) + $rowTags["MOVE_UP_LINK"] = "./index.php?module=phpwsrssfeeds&RSS_MULTI_MAN_op=customSort&PHPWS_MAN_ITEMS[]=$id&MOVE_UP=$feed"; + + if($feedCount !== count($this->_show_in_multiview)) { + $rowTags["MOVE_DOWN_LINK"] = "./index.php?module=phpwsrssfeeds&RSS_MULTI_MAN_op=customSort&PHPWS_MAN_ITEMS[]=$id&MOVE_DOWN=$feed"; + } + $listFeedTags["FEED_LISTING"] .= PHPWS_Template::processTemplate($rowTags, "phpwsrssfeeds", "multi_rss/sort_ind_feed.tpl"); + + } + + $listFeedTags["ORDER_HDR"] = $_SESSION["translate"]->it("Order"); + $listFeedTags["FEED_NAME_HDR"] = $_SESSION["translate"]->it("Feeds"); + + $form = new EZform("multiview_sort"); + $form->add("module", "hidden", "phpwsrssfeeds"); + $form->add("RSS_MULTI_MAN_op", "hidden", "saveCustomSort"); + $form->add("PHPWS_MAN_ITEMS[]", "hidden", $this->_id); + $form->add("sort_options", "radio", array("alpha", "custom")); + if(isset($_REQUEST["edit"])) + $form->add("edit", "hidden", true); + $form->add("finished", "submit", $_SESSION["translate"]->it("Finished")); + + if(isset($this->_sort_order) && $this->_sort_order == 1) + $form->setMatch("sort_options", "custom"); + else + $form->setMatch("sort_options", "alpha"); + + $form->add("update_sort", "submit", $_SESSION["translate"]->it("Update")); + $tags = $form->getTemplate(); + + $tags["TITLE"] = $_SESSION["translate"]->it("Multiview Ordering for: ") . $this->_label . "."; + $tags["SORT_OPTION_ALPHA"] = $_SESSION["translate"]->it("Sort alphabetically by feed titles."); + $tags["SORT_OPTION_CUSTOM"] = $_SESSION["translate"]->it("Specify a custom ordering of feeds."); + + $tags["FEED_LISTING"] = PHPWS_Template::processTemplate($listFeedTags, "phpwsrssfeeds", "multi_rss/sort_list.tpl"); + return PHPWS_Template::processTemplate($tags, "phpwsrssfeeds", "multi_rss/sort.tpl"); + } + } + /** * Edit a RSS object's data *************** *** 269,273 **** function _edit($id = NULL) { if(!is_null($id)) ! $this->Multi_RSS($id); //Standard error checking if (is_object($this->_error)) --- 412,417 ---- function _edit($id = NULL) { if(!is_null($id)) ! $this->Multi_RSS($id); ! //Standard error checking if (is_object($this->_error)) *************** *** 285,289 **** $tab = 1; ! $form->add("TITLE", "text", PHPWS_Text::parseOutput($this->getLabel())); $form->setSize("TITLE", 33); --- 429,433 ---- $tab = 1; ! $form->add("TITLE", "text", PHPWS_Text::parseOutput($this->getLabel())); $form->setSize("TITLE", 33); *************** *** 296,305 **** $form->setTab("MAX_MULTI_ITEMS", $tab++); ! $form->add("SHOW_MULTIVIEW", "multiple", $feeds); ! if(is_array($this->_show_in_multiview)) ! $form->setMatch("SHOW_MULTIVIEW", $this->_show_in_multiview,FALSE); ! $form->setSize("SHOW_MULTIVIEW",10); ! $form->setTab("SHOW_MULTIVIEW", $tab++); ! $form->add("HOME", "checkbox"); $form->setMatch("HOME", $this->_home); --- 440,460 ---- $form->setTab("MAX_MULTI_ITEMS", $tab++); ! if(!is_array($this->_show_in_multiview)) ! $this->_show_in_multiview = array(); ! else { ! $selFeeds = array(); ! foreach($this->_show_in_multiview as $feed) { ! $selFeeds[$feed] = $feeds[$feed]; ! } ! } ! ! $sort = 1; ! if($this->_sort_order == 1) ! $sort = 0; ! ! $tags["SHOW_MULTIVIEW"] = PHPWS_WizardBag::js_insert("swapper", "MULTI_EDIT", NULL, 0, array("SHOW_MULTIVIEW_OPTIONS"=>$feeds, ! "SHOW_MULTIVIEW_SEL"=>$selFeeds, ! "sorting"=>$sort)); ! $form->add("HOME", "checkbox"); $form->setMatch("HOME", $this->_home); *************** *** 328,332 **** } } ! $fatcat = FALSE; if($GLOBALS['core']->moduleExists("fatcat")) { --- 483,487 ---- } } ! $fatcat = FALSE; if($GLOBALS['core']->moduleExists("fatcat")) { *************** *** 375,378 **** --- 530,537 ---- : $_SESSION["translate"]->it("Save")); $form->setTab("SUBMIT_BUTTON", $tab++); + $form->setExtra("SUBMIT_BUTTON", + "onClick=\"selectAll(this.form.elements['SHOW_MULTIVIEW_SEL[]'])\""); + + $form->add("module", "hidden", "phpwsrssfeeds"); $form->add("PHPWS_MAN_ITEMS[]", "hidden", $this->getId()); *************** *** 380,384 **** $tags = $form->getTemplate(true, true, $tags); ! // include category selection menu, with help if fatcat exists if($fatcat) { --- 539,546 ---- $tags = $form->getTemplate(true, true, $tags); ! ! if($this->getId()) ! $tags["UPDATE_BUTTON"] = $tags["SUBMIT_BUTTON"]; ! // include category selection menu, with help if fatcat exists if($fatcat) { *************** *** 395,405 **** $tags["EDIT_TITLE"] = $_SESSION["translate"]->it("Add RSS Feed"); } /* include help links also, to display help for each field to be completed */ $tags["TITLE_LABEL"] = $_SESSION['translate']->it("Channel Title"); $tags["TITLE_HELP"] = RSS_common::show_link("phpwsrssfeeds", "rssTitle"); ! $tags["MAX_MULTI_ITEMS_LABEL"] = $_SESSION['translate']->it("Max Number Items Multi-View"); $tags["MAX_MULTI_ITEMS_HELP"] = RSS_common::show_link("phpwsrssfeeds", "rssMaxMultiItems"); $tags["SHOW_MULTIVIEW_HELP"] = RSS_common::show_link("phpwsrssfeeds", "showMultiView"); ! $tags["SHOW_MULTIVIEW_LABEL"] = $_SESSION['translate']->it("Show feed in Multi-View RSS"); $tags["HOME_LABEL"] = $_SESSION['translate']->it("Show on Home Page"); $tags["HOME_HELP"] = RSS_common::show_link("phpwsrssfeeds", "showHome"); --- 557,571 ---- $tags["EDIT_TITLE"] = $_SESSION["translate"]->it("Add RSS Feed"); } + + if(isset($this->_id)) + $tags["SORT_OPTION"] = PHPWS_Text::moduleLink($_SESSION["translate"]->it("Order Feeds"), "phpwsrssfeeds", array("RSS_MULTI_MAN_op"=>"customSort", "PHPWS_MAN_ITEMS[]"=>$this->_id,"edit"=>TRUE)); + /* include help links also, to display help for each field to be completed */ $tags["TITLE_LABEL"] = $_SESSION['translate']->it("Channel Title"); $tags["TITLE_HELP"] = RSS_common::show_link("phpwsrssfeeds", "rssTitle"); ! $tags["MAX_MULTI_ITEMS_LABEL"] = $_SESSION['translate']->it("Max Number of Items in Multi-View"); $tags["MAX_MULTI_ITEMS_HELP"] = RSS_common::show_link("phpwsrssfeeds", "rssMaxMultiItems"); $tags["SHOW_MULTIVIEW_HELP"] = RSS_common::show_link("phpwsrssfeeds", "showMultiView"); ! $tags["SHOW_MULTIVIEW_LABEL"] = $_SESSION['translate']->it("Select feeds for Multi-View"); $tags["HOME_LABEL"] = $_SESSION['translate']->it("Show on Home Page"); $tags["HOME_HELP"] = RSS_common::show_link("phpwsrssfeeds", "showHome"); *************** *** 457,461 **** } // $_show_in_multiview must be an array or there is nothing to display ! if (!isset($_POST["SHOW_MULTIVIEW"]) || !is_array($_POST["SHOW_MULTIVIEW"])) { $message["SHOW_MULTIVIEW"] = $_SESSION['translate']->it("Please select feeds for inclusion."); $error = TRUE; --- 623,628 ---- } // $_show_in_multiview must be an array or there is nothing to display ! ! if (!isset($_POST["SHOW_MULTIVIEW_SEL"]) || !is_array($_POST["SHOW_MULTIVIEW_SEL"])) { $message["SHOW_MULTIVIEW"] = $_SESSION['translate']->it("Please select feeds for inclusion."); $error = TRUE; *************** *** 475,480 **** // note that parseInput called this way allows the global set of HTML tags to be included $this->setLabel(RSS_common::get_htmlentities(PHPWS_Text::parseInput(@$_POST["TITLE"]))); ! $this->_show_in_multiview = @$_POST["SHOW_MULTIVIEW"]; ! $current_home = $this->_home; $this->_home = trim(@$_POST["HOME"]); --- 642,647 ---- // note that parseInput called this way allows the global set of HTML tags to be included $this->setLabel(RSS_common::get_htmlentities(PHPWS_Text::parseInput(@$_POST["TITLE"]))); ! $this->_show_in_multiview = @$_POST["SHOW_MULTIVIEW_SEL"]; ! $current_home = $this->_home; $this->_home = trim(@$_POST["HOME"]); *************** *** 560,711 **** } //END function _save ! /** ! * Asks for confirmation and, getting it, deletes the current position listing ! * ! * @author Wendall Cada <wen...@NO...> ! */ ! function _delete($id) { ! if ($id == NULL) ! return FALSE; ! ! $this->Multi_RSS($id); ! //Standard error checking ! if (is_object($this->_error)) ! return FALSE; ! ! $id = $this->getId(); ! // have confirmation; remove category listing while we know the id ! $_SESSION['OBJ_fatcat']->deleteModuleElements("phpwsrssfeeds",$this->getLabel(),$id+5000); ! ! //remove layout boxes set up for this item ! if($this->_block == 1) ! PHPWS_Layout::dropBox("CNT_phpwsrssfeeds_".$id); ! if($this->_home == 1) ! PHPWS_Layout::dropBox("CNT_phpwsrssfeeds_home_".$id); ! ! // delete the current item ! $this->_error = $this->kill(); ! if(is_object($this->_error)) ! return FALSE; ! ! return " ".$this->getLabel(); ! ! } //END function _delete() ! function _list(){ ! require_once(PHPWS_SOURCE_DIR.'mod/phpwsrssfeeds/class/RSSList.php'); ! $content = FALSE; ! $settings = array("_module" => "phpwsrssfeeds", ! "_table" => "mod_phpwsrssfeeds_multi", ! "_request" => "RSS_MULTI_MAN_op"); ! $listObj = RSSList::getRSSList($settings); ! $listObj->init(); ! if ($_SESSION["OBJ_user"]->allow_access("phpwsrssfeeds")) ! $content = $listObj->getList("multi_admin", $_SESSION["translate"]->it("Multi-View RSS News Feeds")); ! else ! $content = $listObj->getList("multi", $_SESSION["translate"]->it("Multi-View News Feeds")); ! ! return $content; ! }//End function _list() ! function _hide($id = NULL) { ! require_once(PHPWS_SOURCE_DIR.'mod/phpwsrssfeeds/class/RSSList.php'); ! if(is_null($id)) ! return FALSE; ! $settings = array("_module" => "phpwsrssfeeds", ! "_table" => "mod_phpwsrssfeeds_multi"); ! $listObj = RSSList::getRSSList($settings); ! $hide = $listObj->_doMassUpdate("hidden", 1); ! if ($hide == FALSE) ! return FALSE; ! return $_SESSION['translate']->it('Items updated.'); ! }//End fuction _hide() ! function _show($id = NULL) { ! require_once(PHPWS_SOURCE_DIR.'mod/phpwsrssfeeds/class/RSSList.php'); ! if(is_null($id)) ! return FALSE; ! $settings = array("_module" => "phpwsrssfeeds", ! "_table" => "mod_phpwsrssfeeds_multi"); ! $listObj = RSSList::getRSSList($settings); ! $show = $listObj->_doMassUpdate("hidden", 0); ! if ($show == FALSE) ! return FALSE; ! return $_SESSION['translate']->it('Items updated.'); ! }//End fuction _show() ! /** ! * returns array of current feeds ! * ! * @author Wendall Cada <wen...@NO...> ! */ ! function get_available_feeds() { ! $sql = "SELECT id,label FROM mod_phpwsrssfeeds_feeds WHERE hidden='0' && approved='1'"; ! foreach($GLOBALS["core"]->getAssoc($sql, TRUE) as $key => $value) ! $feeds[$key] = PHPWS_Text::parseOutput($value); ! if(isset($feeds)) ! return $feeds; ! else ! return FALSE; ! }//End function get_available_feeds() ! ! function showHomeItems(){ ! $content = $this->_view(); ! $content_var = "CNT_phpwsrssfeeds_multi_home_" . $this->getId(); ! $GLOBALS[$content_var]['title'] = $_SESSION['translate']->it($this->_label); ! $GLOBALS[$content_var]['content'] = $content; ! return true; } ! /** ! * Sets up content for view in block ! * ! * @author Wendall Cada <wen...@NO...> ! * @ref RSS:showUserBox() ! * ! */ ! function showUserBox() { ! $RSSobj = new RSS($this->_show_in_multiview[0]); ! $confirm = FALSE; ! //Check to see if module allowed is current ! if(is_array($this->allow_view)){ ! $modules_allowed = $RSSobj->get_modules_allowed(); ! foreach($this->allow_view as $num){ ! if(((isset($_REQUEST['module']) && ($_REQUEST['module'] == $modules_allowed[$num])) ! || (!isset($_REQUEST['module']) && ("home" == $modules_allowed[$num])))) $confirm = TRUE; } } ! ! //Check to see if pagemaster page allowed is current ! if(!$confirm){ ! if(is_array($this->pm_allow)){ ! if(isset($_REQUEST['module']) && !$_REQUEST['module'] == 'pagemaster') ! return; ! foreach($this->pm_allow as $num){ ! if(isset($_REQUEST['PAGE_id']) && $_REQUEST['PAGE_id'] == $num) ! $confirm = TRUE; ! ! if(isset($_SESSION["SES_PM_page"]) && is_object($_SESSION["SES_PM_page"]) && ! is_a($_SESSION["SES_PM_page"], "PHPWS_page") && $_SESSION["SES_PM_page"]->id == $num) ! $confirm = TRUE; ! ! } ! if(!$confirm) ! return; ! }else{ ! return; ! } ! } ! ! if($confirm) { ! $content_var = 'CNT_phpwsrssfeeds_multi_'.$this->getId(); ! $GLOBALS[$content_var]['content'] = $this->_view(); ! $GLOBALS[$content_var]['title'] = $_SESSION['translate']->it($this->_label); ! return true; ! } ! ! }//End function showUserBox() }//End class Multi_RSS ?> \ No newline at end of file --- 727,878 ---- } //END function _save ! /** ! * Asks for confirmation and, getting it, deletes the current position listing ! * ! * @author Wendall Cada <wen...@NO...> ! */ ! function _delete($id) { ! if ($id == NULL) ! return FALSE; ! $this->Multi_RSS($id); ! //Standard error checking ! if (is_object($this->_error)) ! return FALSE; ! $id = $this->getId(); ! // have confirmation; remove category listing while we know the id ! $_SESSION['OBJ_fatcat']->deleteModuleElements("phpwsrssfeeds",$this->getLabel(),$id+5000); ! //remove layout boxes set up for this item ! if($this->_block == 1) ! PHPWS_Layout::dropBox("CNT_phpwsrssfeeds_".$id); ! if($this->_home == 1) ! PHPWS_Layout::dropBox("CNT_phpwsrssfeeds_home_".$id); ! // delete the current item ! $this->_error = $this->kill(); ! if(is_object($this->_error)) ! return FALSE; ! ! return " ".$this->getLabel(); ! ! } //END function _delete() ! ! function _list(){ ! require_once(PHPWS_SOURCE_DIR.'mod/phpwsrssfeeds/class/RSSList.php'); ! $content = FALSE; ! $settings = array("_module" => "phpwsrssfeeds", ! "_table" => "mod_phpwsrssfeeds_multi", ! "_request" => "RSS_MULTI_MAN_op"); ! $listObj = RSSList::getRSSList($settings); ! $listObj->init(); ! if ($_SESSION["OBJ_user"]->allow_access("phpwsrssfeeds")) ! $content = $listObj->getList("multi_admin", $_SESSION["translate"]->it("Multi-View RSS News Feeds")); ! else ! $content = $listObj->getList("multi", $_SESSION["translate"]->it("Multi-View News Feeds")); ! ! return $content; ! }//End function _list() ! ! function _hide($id = NULL) { ! require_once(PHPWS_SOURCE_DIR.'mod/phpwsrssfeeds/class/RSSList.php'); ! if(is_null($id)) ! return FALSE; ! $settings = array("_module" => "phpwsrssfeeds", ! "_table" => "mod_phpwsrssfeeds_multi"); ! $listObj = RSSList::getRSSList($settings); ! $hide = $listObj->_doMassUpdate("hidden", 1); ! if ($hide == FALSE) ! return FALSE; ! return $_SESSION['translate']->it('Items updated.'); ! }//End fuction _hide() ! ! function _show($id = NULL) { ! require_once(PHPWS_SOURCE_DIR.'mod/phpwsrssfeeds/class/RSSList.php'); ! if(is_null($id)) ! return FALSE; ! $settings = array("_module" => "phpwsrssfeeds", ! "_table" => "mod_phpwsrssfeeds_multi"); ! $listObj = RSSList::getRSSList($settings); ! $show = $listObj->_doMassUpdate("hidden", 0); ! if ($show == FALSE) ! return FALSE; ! return $_SESSION['translate']->it('Items updated.'); ! }//End fuction _show() ! ! /** ! * returns array of current feeds ! * ! * @author Wendall Cada <wen...@NO...> ! */ ! function get_available_feeds() { ! $sql = "SELECT id,label FROM mod_phpwsrssfeeds_feeds WHERE hidden='0' && approved='1'"; ! foreach($GLOBALS["core"]->getAssoc($sql, TRUE) as $key => $value) ! $feeds[$key] = PHPWS_Text::parseOutput($value); ! if(isset($feeds)) ! return $feeds; ! else ! return FALSE; ! }//End function get_available_feeds() ! ! function showHomeItems(){ ! $content = $this->_view(); ! $content_var = "CNT_phpwsrssfeeds_multi_home_" . $this->getId(); ! $GLOBALS[$content_var]['title'] = $_SESSION['translate']->it($this->_label); ! $GLOBALS[$content_var]['content'] = $content; ! return true; ! } ! ! /** ! * Sets up content for view in block ! * ! * @author Wendall Cada <wen...@NO...> ! * @ref RSS:showUserBox() ! * ! */ ! function showUserBox() { ! $RSSobj = new RSS($this->_show_in_multiview[0]); ! $confirm = FALSE; ! //Check to see if module allowed is current ! if(is_array($this->allow_view)){ ! $modules_allowed = $RSSobj->get_modules_allowed(); ! foreach($this->allow_view as $num){ ! if(((isset($_REQUEST['module']) && ($_REQUEST['module'] == $modules_allowed[$num])) ! || (!isset($_REQUEST['module']) && ("home" == $modules_allowed[$num])))) ! $confirm = TRUE; ! } } ! //Check to see if pagemaster page allowed is current ! if(!$confirm){ ! if(is_array($this->pm_allow)){ ! if(isset($_REQUEST['module']) && !$_REQUEST['module'] == 'pagemaster') ! return; ! foreach($this->pm_allow as $num){ ! if(isset($_REQUEST['PAGE_id']) && $_REQUEST['PAGE_id'] == $num) ! $confirm = TRUE; ! ! if(isset($_SESSION["SES_PM_page"]) && is_object($_SESSION["SES_PM_page"]) && ! is_a($_SESSION["SES_PM_page"], "PHPWS_page") && $_SESSION["SES_PM_page"]->id == $num) $confirm = TRUE; + } + if(!$confirm) + return; + }else{ + return; } ! } + if($confirm) { + $content_var = 'CNT_phpwsrssfeeds_multi_'.$this->getId(); + $GLOBALS[$content_var]['content'] = $this->_view(); + $GLOBALS[$content_var]['title'] = $_SESSION['translate']->it($this->_label); + return true; + } + + }//End function showUserBox() + }//End class Multi_RSS ?> \ No newline at end of file Index: RSSManager.php =================================================================== RCS file: /cvsroot/phpwebsite-comm/modules/phpwsrssfeeds/class/RSSManager.php,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -d -r1.18 -r1.19 *** RSSManager.php 30 Jul 2004 19:40:35 -0000 1.18 --- RSSManager.php 17 Sep 2004 18:55:23 -0000 1.19 *************** *** 68,72 **** $this->_showMenu = array("edit"=>1, "add"=>1, "delete"=>1, "link"=>1, "menu_link"=>1, ! "show"=>1, "hide"=>1, "list"=>1, "save"=>1); $this->_menu = array(); $this->_manObj = NULL; --- 68,73 ---- $this->_showMenu = array("edit"=>1, "add"=>1, "delete"=>1, "link"=>1, "menu_link"=>1, ! "show"=>1, "hide"=>1, "list"=>1, "save"=>1, ! "customSort"=>1, "saveCustomSort"=>1); $this->_menu = array(); $this->_manObj = NULL; *************** *** 282,285 **** --- 283,287 ---- */ function action($request = NULL) { + $menuAction = NULL; $this->_request = $request; *************** *** 293,296 **** --- 295,299 ---- $action = $_REQUEST[$this->_request]; $content = NULL; + //Check for deprecated actions if(isset($action) && $action == 'Backend' && isset($_REQUEST["RSS_id"])) { *************** *** 308,311 **** --- 311,315 ---- if($action == 'delete' || $action == 'show' || $action == 'hide') $menuAction = 'list'; + if(isset($this->_showMenu[$action]) && $this->_showMenu[$action] == TRUE){ $this->initMenu(); |
From: Mike N. <mh...@us...> - 2004-09-17 16:31:50
|
Update of /cvsroot/phpwebsite-comm/scripts In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1031 Removed Files: slashdot.tar Log Message: removed binary tarball --- slashdot.tar DELETED --- |
From: Mike N. <mh...@us...> - 2004-09-17 16:29:49
|
Update of /cvsroot/phpwebsite-comm/scripts/benchmark In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv500 Added Files: slashdot.sh Log Message: added slashdot load simulation script --- NEW FILE: slashdot.sh --- #!/bin/bash cat /proc/loadavg | awk ' { print $1 }' >> ${1} for i in `seq 1 12`; do for j in `seq 1 10`; do /usr/bin/ab2 -n 5 -c 5 http://yoursitehere.com/${1}/ & sleep 1 done cat /proc/loadavg | awk ' { print $1 }' >> ${1} done |
From: Mike N. <mh...@us...> - 2004-09-17 16:27:56
|
Update of /cvsroot/phpwebsite-comm/scripts/benchmark In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv32550/benchmark Log Message: Directory /cvsroot/phpwebsite-comm/scripts/benchmark added to the repository |
From: David <neo...@us...> - 2004-09-17 16:19:51
|
Update of /cvsroot/phpwebsite-comm/scripts In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30375 Added Files: slashdot.tar Log Message: --- NEW FILE: slashdot.tar --- (This appears to be a binary file; contents omitted.) |
From: Mike N. <mh...@us...> - 2004-09-17 15:42:57
|
Update of /cvsroot/phpwebsite-comm/CVSROOT In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22576 Modified Files: avail Log Message: gave neoamphian write access to scripts/ Index: avail =================================================================== RCS file: /cvsroot/phpwebsite-comm/CVSROOT/avail,v retrieving revision 1.32 retrieving revision 1.33 diff -C2 -d -r1.32 -r1.33 *** avail 13 Sep 2004 19:56:10 -0000 1.32 --- avail 17 Sep 2004 15:42:32 -0000 1.33 *************** *** 25,29 **** avail|spiggy|thebixlight ! avail|rizzo|scripts/proj-admin # Global access for all project members --- 25,29 ---- avail|spiggy|thebixlight ! avail|neoamphian, rizzo|scripts # Global access for all project members |
From: Mike N. <mh...@us...> - 2004-09-13 19:56:37
|
Update of /cvsroot/phpwebsite-comm/CVSROOT In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6497 Modified Files: avail Log Message: gave phpwsrssfeeds team members write access Index: avail =================================================================== RCS file: /cvsroot/phpwebsite-comm/CVSROOT/avail,v retrieving revision 1.31 retrieving revision 1.32 diff -C2 -d -r1.31 -r1.32 *** avail 13 Sep 2004 17:17:07 -0000 1.31 --- avail 13 Sep 2004 19:56:10 -0000 1.32 *************** *** 10,14 **** avail|tluft|modules/joboffers avail|cl00bie|modules/mailto ! avail|wendall911|modules/phpwsrssfeeds avail|cl00bie|modules/quotes avail|ivan|modules/ras --- 10,14 ---- avail|tluft|modules/joboffers avail|cl00bie|modules/mailto ! avail|dg49379, rizzo, wendall911|modules/phpwsrssfeeds avail|cl00bie|modules/quotes avail|ivan|modules/ras |
From: Mike N. <mh...@us...> - 2004-09-13 17:17:26
|
Update of /cvsroot/phpwebsite-comm/CVSROOT In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2553 Modified Files: avail Log Message: gave Wendall Cada write access to modules/phpwsrssfeeds Index: avail =================================================================== RCS file: /cvsroot/phpwebsite-comm/CVSROOT/avail,v retrieving revision 1.30 retrieving revision 1.31 diff -C2 -d -r1.30 -r1.31 *** avail 13 Sep 2004 16:29:42 -0000 1.30 --- avail 13 Sep 2004 17:17:07 -0000 1.31 *************** *** 10,13 **** --- 10,14 ---- avail|tluft|modules/joboffers avail|cl00bie|modules/mailto + avail|wendall911|modules/phpwsrssfeeds avail|cl00bie|modules/quotes avail|ivan|modules/ras |
From: Mike N. <mh...@us...> - 2004-09-13 16:30:17
|
Update of /cvsroot/phpwebsite-comm/CVSROOT In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23829 Modified Files: avail Log Message: gave Bret Watson write access to modules/sdmsphpws Index: avail =================================================================== RCS file: /cvsroot/phpwebsite-comm/CVSROOT/avail,v retrieving revision 1.29 retrieving revision 1.30 diff -C2 -d -r1.29 -r1.30 *** avail 10 Sep 2004 21:06:14 -0000 1.29 --- avail 13 Sep 2004 16:29:42 -0000 1.30 *************** *** 13,16 **** --- 13,17 ---- avail|ivan|modules/ras avail|wendall911|modules/rssfeeds + avail|boyrock|modules/sdmsphpws avail|gbrackett|modules/staffman avail|adarkling|modules/wiki *************** *** 26,30 **** # Global access for all project members ! avail||documents # Complete repository access for project admins --- 27,32 ---- # Global access for all project members ! avail||documents/guide ! avail||documents/howto # Complete repository access for project admins |