mirror of
https://github.com/e107inc/e107.git
synced 2025-07-29 19:00:26 +02:00
content: fix to crumbpage/crumbitem, fixed parent breadcrumb in recent list
This commit is contained in:
@@ -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'],'') ){
|
||||
|
@@ -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 .= "<a href='".e_SELF."'>".CONTENT_LAN_59."</a> ".$sep." ";
|
||||
}
|
||||
for($i=0;$i<count($arr[$parent]);$i++){
|
||||
$crumb .= "<a href='".e_SELF."?cat.".$arr[$parent][$i]."'>".$arr[$parent][$i+1]."</a> ".$sep." ";
|
||||
$i++;
|
||||
if($i == count($arr[$parent])-2){
|
||||
$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"){
|
||||
$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"){
|
||||
$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])){
|
||||
global $sql;
|
||||
$sql->db_Select($plugintable, "content_author","content_id='".intval($qs[1])."'");
|
||||
@@ -690,25 +693,20 @@ class content{
|
||||
}
|
||||
}
|
||||
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"){
|
||||
$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"){
|
||||
$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"){
|
||||
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 = "<div class='breadcrumb'>".$crumb."</div>";
|
||||
$crumb = "<div class='breadcrumb'>".trim($crumb)."</div>";
|
||||
if(isset($content_pref["content_breadcrumb_rendertype"]) && $content_pref["content_breadcrumb_rendertype"] == "1"){
|
||||
echo $crumb;
|
||||
return "";
|
||||
|
Reference in New Issue
Block a user