1
0
mirror of https://github.com/e107inc/e107.git synced 2025-08-02 20:57:26 +02:00

content: fix to crumbpage/crumbitem, fixed parent breadcrumb in recent list

This commit is contained in:
lia
2007-04-12 16:02:06 +00:00
parent 0327a68c34
commit 16020732b4
2 changed files with 23 additions and 25 deletions

View File

@@ -12,8 +12,8 @@
| GNU General Public License (http://gnu.org). | GNU General Public License (http://gnu.org).
| |
| $Source: /cvs_backup/e107_0.8/e107_plugins/content/content.php,v $ | $Source: /cvs_backup/e107_0.8/e107_plugins/content/content.php,v $
| $Revision: 1.9 $ | $Revision: 1.10 $
| $Date: 2007-04-12 12:19:40 $ | $Date: 2007-04-12 16:02:06 $
| $Author: lisa_ $ | $Author: lisa_ $
+---------------------------------------------------------------+ +---------------------------------------------------------------+
*/ */
@@ -468,7 +468,7 @@ function show_content_archive(){
//this function renders the preview of a content_item //this function renders the preview of a content_item
//used in recent list, view author list, category items list //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; 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)){ if(!isset($CONTENT_RECENT_TABLE)){
@@ -509,7 +509,7 @@ function displayPreview($qry, $np=false){
// ##### RECENT LIST ------------------------------------ // ##### RECENT LIST ------------------------------------
function show_content_recent(){ 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])); $mainparent = $aa -> getMainParent(intval($qs[1]));
$content_pref = $aa -> getContentPref($mainparent); $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; $recentqry = "content_refer !='sa' AND ".$qry." ".$datequery." AND content_class REGEXP '".e_CLASS_REGEXP."' ".$order." ".$nextprevquery;
$np = $aa->ShowNextPrev("", $from, $number, $contenttotal,true); $np = $aa->ShowNextPrev("", $from, $number, $contenttotal,true);
$text = $aa->getCrumbPage("recent", $array, $mainparent); $text = $aa->getCrumbPage("recent", $array, $mainparent);
$text .= displayPreview($recentqry, $np); $text .= displayPreview($recentqry, $np, $array);
$caption = $content_pref['content_list_caption']; $caption = $content_pref['content_list_caption'];
if( varsettrue($content_pref['content_list_caption_append_name'],'') ){ if( varsettrue($content_pref['content_list_caption_append_name'],'') ){
@@ -622,7 +622,7 @@ function show_content_cat_all(){
} }
function show_content_cat($mode=""){ 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])); $mainparent = $aa -> getMainParent(intval($qs[1]));
$content_pref = $aa -> getContentPref($mainparent); $content_pref = $aa -> getContentPref($mainparent);
@@ -747,7 +747,7 @@ function show_content_cat($mode=""){
if(isset($content_pref["content_nextprev"]) && $content_pref["content_nextprev"]){ if(isset($content_pref["content_nextprev"]) && $content_pref["content_nextprev"]){
$np = $aa->ShowNextPrev(FALSE, $from, $number, $contenttotal, true); $np = $aa->ShowNextPrev(FALSE, $from, $number, $contenttotal, true);
} }
$textchild = displayPreview($childqry, $np); $textchild = displayPreview($childqry, $np, $array);
$captionchild = $content_pref['content_cat_item_caption']; $captionchild = $content_pref['content_cat_item_caption'];
$crumbpage = $aa->getCrumbPage("cat", $array, $qs[1]); $crumbpage = $aa->getCrumbPage("cat", $array, $qs[1]);
@@ -948,7 +948,7 @@ function show_content_author_all(){
function show_content_author(){ 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])); $mainparent = $aa -> getMainParent(intval($qs[1]));
$content_pref = $aa -> getContentPref($mainparent); $content_pref = $aa -> getContentPref($mainparent);
@@ -989,7 +989,7 @@ function show_content_author(){
$text = $aa->getCrumbPage("author", $array, $mainparent); $text = $aa->getCrumbPage("author", $array, $mainparent);
$np = $aa->ShowNextPrev("", $from, $number, $contenttotal, true); $np = $aa->ShowNextPrev("", $from, $number, $contenttotal, true);
$text .= displayPreview($authorqry, $np); $text .= displayPreview($authorqry, $np, $array);
$caption = $content_pref['content_author_caption']; $caption = $content_pref['content_author_caption'];
if( varsettrue($content_pref['content_author_caption_append_name'],'') ){ if( varsettrue($content_pref['content_author_caption_append_name'],'') ){

View File

@@ -12,8 +12,8 @@
| GNU General Public License (http://gnu.org). | GNU General Public License (http://gnu.org).
| |
| $Source: /cvs_backup/e107_0.8/e107_plugins/content/handlers/content_class.php,v $ | $Source: /cvs_backup/e107_0.8/e107_plugins/content/handlers/content_class.php,v $
| $Revision: 1.12 $ | $Revision: 1.13 $
| $Date: 2007-04-12 12:19:40 $ | $Date: 2007-04-12 16:02:06 $
| $Author: lisa_ $ | $Author: lisa_ $
+---------------------------------------------------------------+ +---------------------------------------------------------------+
*/ */
@@ -672,15 +672,18 @@ class content{
$crumb .= "<a href='".e_SELF."'>".CONTENT_LAN_59."</a> ".$sep." "; $crumb .= "<a href='".e_SELF."'>".CONTENT_LAN_59."</a> ".$sep." ";
} }
for($i=0;$i<count($arr[$parent]);$i++){ for($i=0;$i<count($arr[$parent]);$i++){
$crumb .= "<a href='".e_SELF."?cat.".$arr[$parent][$i]."'>".$arr[$parent][$i+1]."</a> ".$sep." "; if($i == count($arr[$parent])-2){
$i++; $crumb .= "<a href='".e_SELF."?cat.".$arr[$parent][$i]."'>".$arr[$parent][$i+1]."</a>";
}else{
$crumb .= "<a href='".e_SELF."?cat.".$arr[$parent][$i]."'>".$arr[$parent][$i+1]."</a> ".$sep." ";
}
} }
} }
if($qs[0] == "recent"){ if($qs[0] == "recent"){
$crumb .= "<a href='".e_SELF."?recent.".$arr[$parent][0]."'>".CONTENT_LAN_60."</a>"; $crumb .= " ".$sep." <a href='".e_SELF."?recent.".$arr[$parent][0]."'>".CONTENT_LAN_60."</a>";
} }
if($qs[0] == "author"){ if($qs[0] == "author"){
$crumb .= "<a href='".e_SELF."?author.list.".$arr[$parent][0]."'>".CONTENT_LAN_85."</a>"; $crumb .= " ".$sep." <a href='".e_SELF."?author.list.".$arr[$parent][0]."'>".CONTENT_LAN_85."</a>";
if(is_numeric($qs[1])){ if(is_numeric($qs[1])){
global $sql; global $sql;
$sql->db_Select($plugintable, "content_author","content_id='".intval($qs[1])."'"); $sql->db_Select($plugintable, "content_author","content_id='".intval($qs[1])."'");
@@ -690,25 +693,20 @@ class content{
} }
} }
if($qs[0] == "list"){ if($qs[0] == "list"){
$crumb .= "<a href='".e_SELF."?list.".$arr[$parent][0]."'>".CONTENT_LAN_13."</a>"; $crumb .= " ".$sep." <a href='".e_SELF."?list.".$arr[$parent][0]."'>".CONTENT_LAN_13."</a>";
} }
if($qs[0] == "top"){ if($qs[0] == "top"){
$crumb .= "<a href='".e_SELF."?top.".$arr[$parent][0]."'>".CONTENT_LAN_8."</a>"; $crumb .= " ".$sep." <a href='".e_SELF."?top.".$arr[$parent][0]."'>".CONTENT_LAN_8."</a>";
} }
if($qs[0] == "score"){ if($qs[0] == "score"){
$crumb .= "<a href='".e_SELF."?score.".$arr[$parent][0]."'>".CONTENT_LAN_12."</a>"; $crumb .= " ".$sep." <a href='".e_SELF."?score.".$arr[$parent][0]."'>".CONTENT_LAN_12."</a>";
} }
if($qs[0] == "content"){ if($qs[0] == "content"){
global $row; global $row;
$crumb .= $row['content_heading']; $crumb .= " ".$sep." ".$row['content_heading'];
} }
$crumb = trim($crumb); $crumb = "<div class='breadcrumb'>".trim($crumb)."</div>";
if(substr($crumb,-strlen(trim($sep))) == trim($sep) && trim($sep)!='>'){
$crumb = substr($crumb,0,-strlen(trim($sep)));
}
$crumb = "<div class='breadcrumb'>".$crumb."</div>";
if(isset($content_pref["content_breadcrumb_rendertype"]) && $content_pref["content_breadcrumb_rendertype"] == "1"){ if(isset($content_pref["content_breadcrumb_rendertype"]) && $content_pref["content_breadcrumb_rendertype"] == "1"){
echo $crumb; echo $crumb;
return ""; return "";