diff --git a/e107_plugins/content/content.php b/e107_plugins/content/content.php index c0958f0ee..25e64773e 100644 --- a/e107_plugins/content/content.php +++ b/e107_plugins/content/content.php @@ -12,8 +12,8 @@ | GNU General Public License (http://gnu.org). | | $Source: /cvs_backup/e107_0.8/e107_plugins/content/content.php,v $ -| $Revision: 1.9 $ -| $Date: 2007-04-12 12:19:40 $ +| $Revision: 1.10 $ +| $Date: 2007-04-12 16:02:06 $ | $Author: lisa_ $ +---------------------------------------------------------------+ */ @@ -468,7 +468,7 @@ function show_content_archive(){ //this function renders the preview of a content_item //used in recent list, view author list, category items list -function displayPreview($qry, $np=false){ +function displayPreview($qry, $np=false, $array=false){ global $qs, $array, $row, $gen, $rater, $aa, $sql2, $tp, $plugintable, $plugindir, $content_shortcodes, $content_pref, $mainparent, $CM_AUTHOR, $CONTENT_RECENT_TABLE_START, $CONTENT_RECENT_TABLE_END, $CONTENT_RECENT_TABLE, $CONTENT_RECENT_TABLE_INFOPRE, $CONTENT_RECENT_TABLE_INFOPOST, $CONTENT_NEXTPREV; if(!isset($CONTENT_RECENT_TABLE)){ @@ -509,7 +509,7 @@ function displayPreview($qry, $np=false){ // ##### RECENT LIST ------------------------------------ function show_content_recent(){ - global $qs, $sql2, $plugindir, $ns, $plugintable, $sql, $aa, $e107cache, $tp, $pref, $content_pref, $cobj, $nextprevquery, $from, $number, $mainparent, $datequery, $content_icon_path, $CONTENT_RECENT_TABLE; + global $qs, $sql2, $plugindir, $ns, $plugintable, $sql, $aa, $e107cache, $tp, $pref, $content_pref, $cobj, $nextprevquery, $from, $number, $mainparent, $datequery, $content_icon_path, $CONTENT_RECENT_TABLE, $array; $mainparent = $aa -> getMainParent(intval($qs[1])); $content_pref = $aa -> getContentPref($mainparent); @@ -537,7 +537,7 @@ function show_content_recent(){ $recentqry = "content_refer !='sa' AND ".$qry." ".$datequery." AND content_class REGEXP '".e_CLASS_REGEXP."' ".$order." ".$nextprevquery; $np = $aa->ShowNextPrev("", $from, $number, $contenttotal,true); $text = $aa->getCrumbPage("recent", $array, $mainparent); - $text .= displayPreview($recentqry, $np); + $text .= displayPreview($recentqry, $np, $array); $caption = $content_pref['content_list_caption']; if( varsettrue($content_pref['content_list_caption_append_name'],'') ){ @@ -622,7 +622,7 @@ function show_content_cat_all(){ } function show_content_cat($mode=""){ - global $qs, $plugindir, $content_shortcodes, $ns, $plugintable, $sql, $aa, $e107cache, $tp, $pref, $content_pref, $cobj, $datequery, $from, $CONTENT_RECENT_TABLE, $CONTENT_CAT_LIST_TABLE, $CONTENT_CAT_LISTSUB_TABLE_START, $CONTENT_CAT_LISTSUB_TABLE, $CONTENT_CAT_LISTSUB_TABLE_END, $CM_AUTHOR, $CONTENT_CAT_LIST_TABLE_INFO_PRE, $CONTENT_CAT_LIST_TABLE_INFO_POST, $content_cat_icon_path_small, $content_cat_icon_path_large, $content_icon_path, $mainparent, $totalparent, $totalsubcat, $row, $datestamp, $comment_total, $gen, $authordetails, $rater, $crumb, $amount; + global $qs, $plugindir, $content_shortcodes, $ns, $plugintable, $sql, $aa, $e107cache, $tp, $pref, $content_pref, $cobj, $datequery, $from, $CONTENT_RECENT_TABLE, $CONTENT_CAT_LIST_TABLE, $CONTENT_CAT_LISTSUB_TABLE_START, $CONTENT_CAT_LISTSUB_TABLE, $CONTENT_CAT_LISTSUB_TABLE_END, $CM_AUTHOR, $CONTENT_CAT_LIST_TABLE_INFO_PRE, $CONTENT_CAT_LIST_TABLE_INFO_POST, $content_cat_icon_path_small, $content_cat_icon_path_large, $content_icon_path, $mainparent, $totalparent, $totalsubcat, $row, $datestamp, $comment_total, $gen, $authordetails, $rater, $crumb, $amount, $array; $mainparent = $aa -> getMainParent(intval($qs[1])); $content_pref = $aa -> getContentPref($mainparent); @@ -747,7 +747,7 @@ function show_content_cat($mode=""){ if(isset($content_pref["content_nextprev"]) && $content_pref["content_nextprev"]){ $np = $aa->ShowNextPrev(FALSE, $from, $number, $contenttotal, true); } - $textchild = displayPreview($childqry, $np); + $textchild = displayPreview($childqry, $np, $array); $captionchild = $content_pref['content_cat_item_caption']; $crumbpage = $aa->getCrumbPage("cat", $array, $qs[1]); @@ -948,7 +948,7 @@ function show_content_author_all(){ function show_content_author(){ - global $qs, $plugindir, $content_shortcodes, $ns, $plugintable, $sql, $aa, $e107cache, $tp, $pref, $content_pref, $cobj, $nextprevquery, $from, $number, $content_icon_path, $CONTENT_RECENT_TABLE, $datequery, $crumb, $mainparent; + global $qs, $plugindir, $content_shortcodes, $ns, $plugintable, $sql, $aa, $e107cache, $tp, $pref, $content_pref, $cobj, $nextprevquery, $from, $number, $content_icon_path, $CONTENT_RECENT_TABLE, $datequery, $crumb, $mainparent, $array; $mainparent = $aa -> getMainParent(intval($qs[1])); $content_pref = $aa -> getContentPref($mainparent); @@ -989,7 +989,7 @@ function show_content_author(){ $text = $aa->getCrumbPage("author", $array, $mainparent); $np = $aa->ShowNextPrev("", $from, $number, $contenttotal, true); - $text .= displayPreview($authorqry, $np); + $text .= displayPreview($authorqry, $np, $array); $caption = $content_pref['content_author_caption']; if( varsettrue($content_pref['content_author_caption_append_name'],'') ){ diff --git a/e107_plugins/content/handlers/content_class.php b/e107_plugins/content/handlers/content_class.php index cc978ae95..b92c26ba8 100644 --- a/e107_plugins/content/handlers/content_class.php +++ b/e107_plugins/content/handlers/content_class.php @@ -12,8 +12,8 @@ | GNU General Public License (http://gnu.org). | | $Source: /cvs_backup/e107_0.8/e107_plugins/content/handlers/content_class.php,v $ -| $Revision: 1.12 $ -| $Date: 2007-04-12 12:19:40 $ +| $Revision: 1.13 $ +| $Date: 2007-04-12 16:02:06 $ | $Author: lisa_ $ +---------------------------------------------------------------+ */ @@ -672,15 +672,18 @@ class content{ $crumb .= "".CONTENT_LAN_59." ".$sep." "; } for($i=0;$i".$arr[$parent][$i+1]." ".$sep." "; - $i++; + if($i == count($arr[$parent])-2){ + $crumb .= "".$arr[$parent][$i+1].""; + }else{ + $crumb .= "".$arr[$parent][$i+1]." ".$sep." "; + } } } if($qs[0] == "recent"){ - $crumb .= "".CONTENT_LAN_60.""; + $crumb .= " ".$sep." ".CONTENT_LAN_60.""; } if($qs[0] == "author"){ - $crumb .= "".CONTENT_LAN_85.""; + $crumb .= " ".$sep." ".CONTENT_LAN_85.""; if(is_numeric($qs[1])){ global $sql; $sql->db_Select($plugintable, "content_author","content_id='".intval($qs[1])."'"); @@ -690,25 +693,20 @@ class content{ } } if($qs[0] == "list"){ - $crumb .= "".CONTENT_LAN_13.""; + $crumb .= " ".$sep." ".CONTENT_LAN_13.""; } if($qs[0] == "top"){ - $crumb .= "".CONTENT_LAN_8.""; + $crumb .= " ".$sep." ".CONTENT_LAN_8.""; } if($qs[0] == "score"){ - $crumb .= "".CONTENT_LAN_12.""; + $crumb .= " ".$sep." ".CONTENT_LAN_12.""; } if($qs[0] == "content"){ global $row; - $crumb .= $row['content_heading']; + $crumb .= " ".$sep." ".$row['content_heading']; } - $crumb = trim($crumb); - if(substr($crumb,-strlen(trim($sep))) == trim($sep) && trim($sep)!='>'){ - $crumb = substr($crumb,0,-strlen(trim($sep))); - } - - $crumb = ""; + $crumb = ""; if(isset($content_pref["content_breadcrumb_rendertype"]) && $content_pref["content_breadcrumb_rendertype"] == "1"){ echo $crumb; return "";