diff --git a/e107_plugins/content/content.php b/e107_plugins/content/content.php index d97a2d62b..226fce500 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.7 $ -| $Date: 2007-03-13 16:51:05 $ +| $Revision: 1.8 $ +| $Date: 2007-04-10 14:34:39 $ | $Author: lisa_ $ +---------------------------------------------------------------+ */ @@ -155,9 +155,7 @@ if(!e_QUERY){ // ##### CONTENT SEARCH MENU ---------------------------- function show_content_search_menu($mode, $mainparent){ - global $qs, $plugindir, $content_shortcodes, $tp, $ns, $rs, $aa; - global $plugintable, $gen, $content_pref; - global $CONTENT_SEARCH_TABLE_SELECT, $CONTENT_SEARCH_TABLE_ORDER, $CONTENT_SEARCH_TABLE_KEYWORD; + global $qs, $plugindir, $content_shortcodes, $tp, $ns, $rs, $aa, $plugintable, $gen, $content_pref, $CONTENT_SEARCH_TABLE_SELECT, $CONTENT_SEARCH_TABLE_ORDER, $CONTENT_SEARCH_TABLE_KEYWORD; if( (isset($content_pref["content_navigator_{$mode}"]) && $content_pref["content_navigator_{$mode}"]) || (isset($content_pref["content_search_{$mode}"]) && $content_pref["content_search_{$mode}"]) || (isset($content_pref["content_ordering_{$mode}"]) && $content_pref["content_ordering_{$mode}"]) ){ @@ -172,13 +170,13 @@ function show_content_search_menu($mode, $mainparent){ } } } - if(isset($content_pref["content_navigator_{$mode}"]) && $content_pref["content_navigator_{$mode}"]){ + if( varsettrue($content_pref["content_navigator_{$mode}"]) ){ $CONTENT_SEARCH_TABLE_SELECT = $aa -> showOptionsSelect("page", $mainparent); } - if(isset($content_pref["content_search_{$mode}"]) && $content_pref["content_search_{$mode}"]){ + if( varsettrue($content_pref["content_search_{$mode}"]) ){ $CONTENT_SEARCH_TABLE_KEYWORD = $aa -> showOptionsSearch("page", $mainparent); } - if(isset($content_pref["content_ordering_{$mode}"]) && $content_pref["content_ordering_{$mode}"]){ + if( varsettrue($content_pref["content_ordering_{$mode}"]) ){ $CONTENT_SEARCH_TABLE_ORDER = $aa -> showOptionsOrder("page", $mainparent); } @@ -196,7 +194,7 @@ function show_content_search_menu($mode, $mainparent){ } function show_content_search_result($searchkeyword){ - global $row, $qs, $content_shortcodes, $ns, $rs, $tp, $plugindir, $plugintable, $gen, $aa, $content_pref, $datequery, $gen, $mainparent, $content_icon_path; + global $row, $qs, $content_shortcodes, $ns, $rs, $tp, $plugindir, $plugintable, $gen, $aa, $content_pref, $datequery, $mainparent, $content_icon_path; $mainparent = $aa -> getMainParent( (is_numeric($qs[1]) ? $qs[1] : intval($qs[2])) ); $content_pref = $aa -> getContentPref($mainparent); @@ -306,8 +304,8 @@ function show_content(){ if(!is_object($sql2)){ $sql2 = new db; } $content_pref = $eArrayStorage->ReadArray($row['content_pref']); - $content_pref["content_cat_icon_path_large"] = ($content_pref["content_cat_icon_path_large"] ? $content_pref["content_cat_icon_path_large"] : "{e_PLUGIN}content/images/cat/48/" ); - $content_pref["content_cat_icon_path_small"] = ($content_pref["content_cat_icon_path_small"] ? $content_pref["content_cat_icon_path_small"] : "{e_PLUGIN}content/images/cat/16/" ); + $content_pref["content_cat_icon_path_large"] = varset($content_pref["content_cat_icon_path_large"], "{e_PLUGIN}content/images/cat/48/"); + $content_pref["content_cat_icon_path_small"] = varset($content_pref["content_cat_icon_path_small"], "{e_PLUGIN}content/images/cat/16/"); $content_cat_icon_path_large = $tp->replaceConstants($content_pref["content_cat_icon_path_large"]); $content_cat_icon_path_small = $tp->replaceConstants($content_pref["content_cat_icon_path_small"]); $content_icon_path = $tp->replaceConstants($content_pref["content_icon_path"]); @@ -360,10 +358,7 @@ function show_content(){ } // ##### CONTENT ARCHIVE ------------------------------------------ function show_content_archive(){ - global $row, $ns, $plugindir, $plugintable, $sql, $aa, $rs, $e107cache, $tp, $pref, $content_pref, $cobj; - global $qs, $searchkeyword, $nextprevquery, $from, $number, $mainparent, $content_shortcodes; - global $CONTENT_ARCHIVE_TABLE, $CONTENT_ARCHIVE_TABLE_START, $datequery, $CONTENT_ARCHIVE_TABLE_LETTERS; - global $CONTENT_SEARCH_TABLE_SELECT, $CONTENT_SEARCH_TABLE_ORDER, $CONTENT_SEARCH_TABLE_KEYWORD, $CONTENT_ARCHIVE_TABLE_AUTHOR; + global $row, $ns, $plugindir, $plugintable, $sql, $aa, $rs, $e107cache, $tp, $pref, $content_pref, $cobj, $qs, $searchkeyword, $nextprevquery, $from, $number, $mainparent, $content_shortcodes, $datequery, $CONTENT_ARCHIVE_TABLE, $CONTENT_ARCHIVE_TABLE_START, $CONTENT_ARCHIVE_TABLE_LETTERS, $CONTENT_SEARCH_TABLE_SELECT, $CONTENT_SEARCH_TABLE_ORDER, $CONTENT_SEARCH_TABLE_KEYWORD; $mainparent = $aa -> getMainParent(intval($qs[1])); $content_pref = $aa -> getContentPref($mainparent); @@ -392,7 +387,7 @@ function show_content_archive(){ $array = $aa -> getCategoryTree("", $mainparent, TRUE); $validparent = implode(",", array_keys($array)); $qry = " content_parent REGEXP '".$aa -> CONTENTREGEXP($validparent)."' "; - $number = (isset($content_pref["content_archive_nextprev_number"]) && $content_pref["content_archive_nextprev_number"] ? $content_pref["content_archive_nextprev_number"] : "30"); + $number = varsettrue($content_pref["content_archive_nextprev_number"], '30'); $order = $aa -> getOrder(); $nextprevquery = (isset($content_pref["content_archive_nextprev"]) && $content_pref["content_archive_nextprev"] ? "LIMIT ".intval($from).",".intval($number) : ""); $sql1 = new db; @@ -464,23 +459,21 @@ function show_content_archive(){ if($item = $sql1 -> db_Select($plugintable, "*", "content_refer !='sa' AND ".$qry." ".$datequery." AND content_class REGEXP '".e_CLASS_REGEXP."' ".$order." ".$nextprevquery )){ $content_archive_table_string = ""; while($row = $sql1 -> db_Fetch()){ - $CONTENT_ARCHIVE_TABLE_AUTHOR = $aa -> prepareAuthor("archive", $row['content_author'], $row['content_id']); $content_archive_table_string .= $tp -> parseTemplate($CONTENT_ARCHIVE_TABLE, FALSE, $content_shortcodes); } $text .= $CONTENT_ARCHIVE_TABLE_START.$content_archive_table_string.$CONTENT_ARCHIVE_TABLE_END; } - $text = $aa -> getCrumbPage("archive", $array, $mainparent).$text; - $caption = $content_pref['content_archive_caption']; + $text = $aa->getCrumbPage("archive", $array, $mainparent).$text; + $caption = $content_pref['content_archive_caption']; $ns->tablerender($caption, $text); - $aa -> ShowNextPrev("archive", $from, $number, $contenttotal); + $aa->ShowNextPrev("archive", $from, $number, $contenttotal); $cachecheck = CachePost($cachestr); } //this function renders the preview of a content_item //used in recent list, view author list, category items list function displayPreview($qry){ - global $qs, $array, $row, $gen, $rater, $aa, $sql2, $tp, $plugintable, $plugindir, $content_shortcodes, $content_pref, $mainparent, $CONTENT_RECENT_TABLE_AUTHORDETAILS; - global $CONTENT_RECENT_TABLE_START, $CONTENT_RECENT_TABLE_END, $CONTENT_RECENT_TABLE, $CONTENT_RECENT_TABLE_INFOPRE, $CONTENT_RECENT_TABLE_INFOPOST; + 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; if(!isset($CONTENT_RECENT_TABLE)){ if(!$content_pref["content_theme"]){ @@ -496,12 +489,12 @@ function displayPreview($qry){ if($resultitem = $sql2 -> db_Select($plugintable, "*", $qry )){ $content_recent_table_string = ""; while($row = $sql2 -> db_Fetch()){ - $CONTENT_RECENT_TABLE_AUTHORDETAILS = $aa -> prepareAuthor("list", $row['content_author'], $row['content_id']); - $rdate = $tp -> parseTemplate('{CONTENT_RECENT_TABLE_DATE}', FALSE, $content_shortcodes); - $rauth = $tp -> parseTemplate('{CONTENT_RECENT_TABLE_AUTHORDETAILS}', FALSE, $content_shortcodes); - $rep = $tp -> parseTemplate('{CONTENT_RECENT_TABLE_EPICONS}', FALSE, $content_shortcodes); - $rpar = $tp -> parseTemplate('{CONTENT_RECENT_TABLE_PARENT}', FALSE, $content_shortcodes); - $redi = $tp -> parseTemplate('{CONTENT_RECENT_TABLE_EDITICON}', FALSE, $content_shortcodes); + $CM_AUTHOR = $aa -> prepareAuthor("list", $row['content_author'], $row['content_id']); + $rdate = $tp -> parseTemplate('{CM_DATE|recent}', FALSE, $content_shortcodes); + $rauth = $tp -> parseTemplate('{CM_AUTHOR|recent}', FALSE, $content_shortcodes); + $rep = $tp -> parseTemplate('{CM_EPICONS|recent}', FALSE, $content_shortcodes); + $rpar = $tp -> parseTemplate('{CM_PARENT|recent}', FALSE, $content_shortcodes); + $redi = $tp -> parseTemplate('{CM_EDITICON|recent}', FALSE, $content_shortcodes); $CONTENT_RECENT_TABLE_INFOPRE = FALSE; $CONTENT_RECENT_TABLE_INFOPOST = FALSE; if ($rdate!="" || $rauth!="" || $rep!="" || $rpar!="" || $redi!="" ) { @@ -519,8 +512,7 @@ function displayPreview($qry){ // ##### RECENT LIST ------------------------------------ function show_content_recent(){ - global $qs, $sql2, $plugindir, $ns, $plugintable, $sql, $aa, $e107cache, $tp, $pref, $content_pref, $cobj; - global $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; $mainparent = $aa -> getMainParent(intval($qs[1])); $content_pref = $aa -> getContentPref($mainparent); @@ -537,7 +529,7 @@ function show_content_recent(){ $array = $aa -> getCategoryTree("", intval($qs[1]), TRUE); $validparent = implode(",", array_keys($array)); $order = $aa -> getOrder(); - $number = ($content_pref["content_nextprev_number"] ? $content_pref["content_nextprev_number"] : "5"); + $number = varsettrue($content_pref["content_nextprev_number"], '5'); $nextprevquery = ($content_pref["content_nextprev"] ? "LIMIT ".intval($from).",".intval($number) : ""); $qry = " content_parent REGEXP '".$aa -> CONTENTREGEXP($validparent)."' "; @@ -547,22 +539,19 @@ function show_content_recent(){ $recentqry = "content_refer !='sa' AND ".$qry." ".$datequery." AND content_class REGEXP '".e_CLASS_REGEXP."' ".$order." ".$nextprevquery; $text = displayPreview($recentqry); - $text = $aa -> getCrumbPage("recent", $array, $mainparent).$text; + $text = $aa->getCrumbPage("recent", $array, $mainparent).$text; $caption = $content_pref['content_list_caption']; if(isset($content_pref['content_list_caption_append_name']) && $content_pref['content_list_caption_append_name']){ $caption .= " ".$array[intval($qs[1])][1]; } $ns -> tablerender($caption, $text); - $aa -> ShowNextPrev("", $from, $number, $contenttotal); + $aa->ShowNextPrev("", $from, $number, $contenttotal); $cachecheck = CachePost($cachestr); } // ##### CATEGORY LIST ------------------------------------ function show_content_cat_all(){ - global $qs, $plugindir, $content_shortcodes, $ns, $plugintable, $aa, $e107cache, $tp, $pref, $content_pref, $totalitems; - global $sql, $datequery, $amount, $from, $content_cat_icon_path_large, $content_icon_path, $n, $mainparent, $CONTENT_CAT_TABLE, $CONTENT_CAT_TABLE_AUTHORDETAILS; - global $row, $datestamp, $comment_total, $gen, $authordetails, $rater, $crumb; - global $CONTENT_CAT_TABLE_INFO_PRE, $CONTENT_CAT_TABLE_INFO_POST, $CONTENT_CAT_LIST_TABLE_INFO_PRE, $CONTENT_CAT_LIST_TABLE_INFO_POST; + global $qs, $plugindir, $content_shortcodes, $ns, $plugintable, $aa, $e107cache, $tp, $pref, $content_pref, $totalitems, $row, $datestamp, $comment_total, $gen, $authordetails, $rater, $crumb, $sql, $datequery, $amount, $from, $content_cat_icon_path_large, $content_icon_path, $n, $mainparent, $CONTENT_CAT_TABLE, $CM_AUTHOR, $CONTENT_CAT_TABLE_INFO_PRE, $CONTENT_CAT_TABLE_INFO_POST, $CONTENT_CAT_LIST_TABLE_INFO_PRE, $CONTENT_CAT_LIST_TABLE_INFO_POST; unset($text); @@ -594,7 +583,7 @@ function show_content_cat_all(){ $array = $aa -> getCategoryTree("", $mainparent, TRUE); $validparent = implode(",", array_keys($array)); $order = $aa -> getOrder(); - $number = (isset($content_pref["content_nextprev_number"]) && $content_pref["content_nextprev_number"] ? $content_pref["content_nextprev_number"] : "5"); + $number = varsettrue($content_pref["content_nextprev_number"], '5'); $nextprevquery = (isset($content_pref["content_nextprev"]) && $content_pref["content_nextprev"] ? "LIMIT ".intval($from).",".intval($number) : ""); $qry = " content_parent REGEXP '".$aa -> CONTENTREGEXP($validparent)."' "; @@ -611,9 +600,9 @@ function show_content_cat_all(){ $sql -> db_Select($plugintable, "*", "content_id = '".$key."' "); $row = $sql -> db_Fetch(); - $date = $tp -> parseTemplate('{CONTENT_CAT_TABLE_DATE}', FALSE, $content_shortcodes); - $auth = $tp -> parseTemplate('{CONTENT_CAT_TABLE_AUTHORDETAILS}', FALSE, $content_shortcodes); - $ep = $tp -> parseTemplate('{CONTENT_CAT_TABLE_EPICONS}', FALSE, $content_shortcodes); + $date = $tp -> parseTemplate('{CM_DATE|cat}', FALSE, $content_shortcodes); + $auth = $tp -> parseTemplate('{CM_AUTHOR|cat}', FALSE, $content_shortcodes); + $ep = $tp -> parseTemplate('{CM_EPICONS|cat}', FALSE, $content_shortcodes); $com = $tp -> parseTemplate('{CONTENT_CAT_TABLE_COMMENT}', FALSE, $content_shortcodes); $CONTENT_CAT_TABLE_INFO_PRE = FALSE; $CONTENT_CAT_TABLE_INFO_POST = FALSE; @@ -621,22 +610,19 @@ function show_content_cat_all(){ $CONTENT_CAT_TABLE_INFO_PRE = TRUE; $CONTENT_CAT_TABLE_INFO_POST = TRUE; } - $CONTENT_CAT_TABLE_AUTHORDETAILS = $aa -> prepareAuthor("catall", $row['content_author'], $row['content_id']); + $CM_AUTHOR = $aa -> prepareAuthor("catall", $row['content_author'], $row['content_id']); $content_cat_table_string .= $tp -> parseTemplate($CONTENT_CAT_TABLE, FALSE, $content_shortcodes); } $text = $CONTENT_CAT_TABLE_START.$content_cat_table_string.$CONTENT_CAT_TABLE_END; - $text = $aa -> getCrumbPage("catall", $array, $mainparent).$text; + $text = $aa->getCrumbPage("catall", $array, $mainparent).$text; $caption = $content_pref['content_catall_caption']; $ns -> tablerender($caption, $text); $cachecheck = CachePost($cachestr); } function show_content_cat($mode=""){ - global $qs, $plugindir, $content_shortcodes, $ns, $plugintable, $sql, $aa, $e107cache, $tp, $pref, $content_pref, $cobj, $datequery, $from; - global $CONTENT_RECENT_TABLE, $CONTENT_CAT_LIST_TABLE, $CONTENT_CAT_LISTSUB_TABLE_START, $CONTENT_CAT_LISTSUB_TABLE, $CONTENT_CAT_LISTSUB_TABLE_END, $CONTENT_CAT_LIST_TABLE_AUTHORDETAILS, $CONTENT_CAT_LIST_TABLE_INFO_PRE, $CONTENT_CAT_LIST_TABLE_INFO_POST; - global $content_cat_icon_path_small, $content_cat_icon_path_large, $content_icon_path, $mainparent, $totalparent, $totalsubcat; - global $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; $mainparent = $aa -> getMainParent(intval($qs[1])); $content_pref = $aa -> getContentPref($mainparent); @@ -663,7 +649,7 @@ function show_content_cat($mode=""){ $content_cat_icon_path_small = $tp -> replaceConstants($content_pref["content_cat_icon_path_small"]); $content_icon_path = $tp -> replaceConstants($content_pref["content_icon_path"]); $order = $aa -> getOrder(); - $number = (isset($content_pref["content_nextprev_number"]) && $content_pref["content_nextprev_number"] ? $content_pref["content_nextprev_number"] : "5"); + $number = varsettrue($content_pref["content_nextprev_number"], '5'); $nextprevquery = (isset($content_pref["content_nextprev"]) && $content_pref["content_nextprev"] ? "LIMIT ".intval($from).",".intval($number) : ""); $capqs = array_reverse($array[intval($qs[1])]); $caption = $content_pref['content_cat_caption']; @@ -681,17 +667,17 @@ function show_content_cat($mode=""){ $content_pref['content_cat_text_char'] = 'all'; } $row = $sql -> db_Fetch(); - $date = $tp -> parseTemplate('{CONTENT_CAT_LIST_TABLE_DATE}', FALSE, $content_shortcodes); - $auth = $tp -> parseTemplate('{CONTENT_CAT_LIST_TABLE_AUTHORDETAILS}', FALSE, $content_shortcodes); - $ep = $tp -> parseTemplate('{CONTENT_CAT_LIST_TABLE_EPICONS}', FALSE, $content_shortcodes); + $date = $tp -> parseTemplate('{CM_DATE|catlist}', FALSE, $content_shortcodes); + $auth = $tp -> parseTemplate('{CM_AUTHOR|catlist}', FALSE, $content_shortcodes); + $ep = $tp -> parseTemplate('{CM_EPICONS|catlist}', FALSE, $content_shortcodes); $com = $tp -> parseTemplate('{CONTENT_CAT_LIST_TABLE_COMMENT}', FALSE, $content_shortcodes); if ($date!="" || $auth!="" || $ep!="" || $com!="" ) { $CONTENT_CAT_LIST_TABLE_INFO_PRE = TRUE; $CONTENT_CAT_LIST_TABLE_INFO_POST = TRUE; } $totalparent = $aa -> countCatItems($row['content_id']); - $CONTENT_CAT_LIST_TABLE_AUTHORDETAILS = $aa -> prepareAuthor("cat", $row['content_author'], $row['content_id']); - $textparent = $tp -> parseTemplate($CONTENT_CAT_LIST_TABLE, FALSE, $content_shortcodes); + $CM_AUTHOR = $aa -> prepareAuthor("cat", $row['content_author'], $row['content_id']); + $textparent = $tp -> parseTemplate($CONTENT_CAT_LIST_TABLE, FALSE, $content_shortcodes); } } @@ -760,7 +746,7 @@ function show_content_cat($mode=""){ $textchild = displayPreview($childqry); $captionchild = $content_pref['content_cat_item_caption']; - $crumbpage = $aa -> getCrumbPage("cat", $array, $qs[1]); + $crumbpage = $aa->getCrumbPage("cat", $array, $qs[1]); if(isset($textparent) && $textparent){ $textparent = $crumbpage.$textparent; }else{ @@ -797,7 +783,7 @@ function show_content_cat($mode=""){ $cachecheck = CachePost($cachestr); if($mode == "comment"){ - $textparent = $aa -> getCrumbPage("cat", $array, $mainparent).$textparent; + $textparent = $aa->getCrumbPage("cat", $array, $mainparent).$textparent; if(isset($textparent) && $textparent){ $ns -> tablerender($caption, $textparent); } if($resultitem = $sql -> db_Select($plugintable, "*", $qry )){ @@ -823,7 +809,7 @@ function show_content_cat($mode=""){ // ##### AUTHOR LIST -------------------------------------- function show_content_author_all(){ - global $qs, $plugindir, $content_shortcodes, $ns, $plugintable, $from, $sql, $aa, $e107cache, $tp, $pref, $mainparent, $content_pref, $cobj, $datequery, $authordetails, $i, $gen, $totalcontent, $row, $CONTENT_AUTHOR_TABLE, $CONTENT_AUTHOR_TABLE_START, $CONTENT_AUTHOR_TABLE_END, $CONTENT_AUTHOR_TABLE_DATE, $CONTENT_AUTHOR_TABLE_HEADING; + global $qs, $plugindir, $content_shortcodes, $ns, $plugintable, $from, $sql, $aa, $e107cache, $tp, $pref, $mainparent, $content_pref, $cobj, $datequery, $authordetails, $i, $gen, $totalcontent, $row, $CONTENT_AUTHOR_TABLE, $CONTENT_AUTHOR_TABLE_START, $CONTENT_AUTHOR_TABLE_END; $mainparent = $aa -> getMainParent(intval($qs[2])); $content_pref = $aa -> getContentPref($mainparent); @@ -850,7 +836,7 @@ function show_content_author_all(){ } $array = $aa -> getCategoryTree("", $mainparent, TRUE); $validparent = implode(",", array_keys($array)); - $number = (isset($content_pref["content_author_nextprev_number"]) && $content_pref["content_author_nextprev_number"] ? $content_pref["content_author_nextprev_number"] : "5"); + $number = varsettrue($content_pref["content_author_nextprev_number"],'5'); $nextprevquery = (isset($content_pref["content_author_nextprev"]) && $content_pref["content_author_nextprev"] ? "LIMIT ".intval($from).",".intval($number) : ""); $qry = " p.content_parent REGEXP '".$aa -> CONTENTREGEXP($validparent)."' "; $dateqry = "AND p.content_datestamp < ".time()." AND (p.content_enddate=0 || p.content_enddate>".time().")"; @@ -935,10 +921,17 @@ function show_content_author_all(){ //do an alpha ordering on the author (if 'firstname lastname', lastname is the comparison factor) usort($arr3, "cmp"); + //define amount of records to show + if(isset($content_pref["content_author_nextprev"]) && $content_pref["content_author_nextprev"]){ + $a = $from; + $b = $from+$number; + }else{ + $a = 0; + $b = count($arr3); + } + $string = ""; - //only display number of records for nextprev - $max = $from+$number; - for($i=$from;$i<$max;$i++){ + for($i=$a;$i<$b;$i++){ if(is_array($arr3[$i])){ $authordetails[$i][1] = $arr3[$i][0]; $row['content_id'] = $arr3[$i][1]; @@ -949,19 +942,17 @@ function show_content_author_all(){ } } $text = $CONTENT_AUTHOR_TABLE_START.$string.$CONTENT_AUTHOR_TABLE_END; - $text = $aa -> getCrumbPage("authorall", $array, $mainparent).$text; + $text = $aa->getCrumbPage("authorall", $array, $mainparent).$text; } $caption = $content_pref['content_author_index_caption']; $ns -> tablerender($caption, $text); - $aa -> ShowNextPrev("author", $from, $number, $contenttotal); + $aa->ShowNextPrev("author", $from, $number, $contenttotal); $cachecheck = CachePost($cachestr); } function show_content_author(){ - global $qs, $plugindir, $content_shortcodes, $ns, $plugintable, $sql, $aa, $e107cache, $tp, $pref, $content_pref, $cobj; - global $nextprevquery, $from, $number, $content_icon_path; - global $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; $mainparent = $aa -> getMainParent(intval($qs[1])); $content_pref = $aa -> getContentPref($mainparent); @@ -982,7 +973,7 @@ function show_content_author(){ $validparent = implode(",", array_keys($array)); } $order = $aa -> getOrder(); - $number = (isset($content_pref["content_nextprev_number"]) && $content_pref["content_nextprev_number"] ? $content_pref["content_nextprev_number"] : "5"); + $number = varsettrue($content_pref["content_nextprev_number"],'10'); $nextprevquery = (isset($content_pref["content_nextprev"]) && $content_pref["content_nextprev"] ? "LIMIT ".intval($from).",".intval($number) : ""); $qry = " content_parent REGEXP '".$aa -> CONTENTREGEXP($validparent)."' "; $sqla = ""; @@ -990,31 +981,29 @@ function show_content_author(){ if(!$author = $sqla -> db_Select($plugintable, "content_author", "content_refer !='sa' AND ".$qry." ".$datequery." AND content_id = '".intval($qs[1])."' AND content_class REGEXP '".e_CLASS_REGEXP."' ")){ header("location:".e_SELF."?author.list.".$mainparent); exit; }else{ - list($content_author) = $sqla -> db_Fetch(); + list($content_author) = $sqla -> db_Fetch(); $sqlb = new db; $authordetails = $aa -> getAuthor($content_author); - $query = " content_author = '".$authordetails[3]."' || content_author REGEXP '^".$authordetails[1]."^' ".(is_numeric($content_author) ? " || content_author = '".$authordetails[0]."' " : "")." "; + $query = " content_author = '".$authordetails[3]."' || content_author REGEXP '\\\^".$authordetails[1]."' ".(is_numeric($content_author) && $authordetails[3]!=$authordetails[0] ? " || content_author = '".$authordetails[0]."' " : "")." "; $validparent = implode(",", array_keys($array)); $qry = " content_refer !='sa' AND content_parent REGEXP '".$aa -> CONTENTREGEXP($validparent)."' ".$datequery." AND content_class REGEXP '".e_CLASS_REGEXP."' AND (".$query.") "; $contenttotal = $sqlb -> db_Count($plugintable, "(*)", "WHERE ".$qry." "); $authorqry = $qry." ".$order." ".$nextprevquery; $text = displayPreview($authorqry); - $text = $aa -> getCrumbPage("author", $array, $mainparent).$text; + $text = $aa->getCrumbPage("author", $array, $mainparent).$text; $caption = $content_pref['content_author_caption']; if(isset($content_pref['content_author_caption_append_name']) && $content_pref['content_author_caption_append_name']){ $caption .= " ".$authordetails[1]; } $ns -> tablerender($caption, $text); - $aa -> ShowNextPrev("", $from, $number, $contenttotal); + $aa->ShowNextPrev("", $from, $number, $contenttotal); } $cachecheck = CachePost($cachestr); } // ##### TOP RATED LIST ----------------------------------- function show_content_top(){ - global $qs, $plugindir, $content_shortcodes, $ns, $plugintable, $sql, $aa, $e107cache, $tp, $pref, $cobj, $content_icon_path; - global $from, $datequery, $content_pref, $mainparent; - global $CONTENT_TOP_TABLE_AUTHOR, $authordetails, $row; + global $qs, $plugindir, $content_shortcodes, $ns, $plugintable, $sql, $aa, $e107cache, $tp, $pref, $cobj, $content_icon_path, $from, $datequery, $content_pref, $mainparent, $CM_AUTHOR, $authordetails, $row; $mainparent = $aa -> getMainParent(intval($qs[1])); $content_pref = $aa -> getContentPref($mainparent); @@ -1043,7 +1032,7 @@ function show_content_top(){ $validparent = implode(",", array_keys($array)); $datequery1 = " AND p.content_datestamp < ".time()." AND (p.content_enddate=0 || p.content_enddate>".time().") "; $qry = " p.content_parent REGEXP '".$aa -> CONTENTREGEXP($validparent)."' "; - $number = (isset($content_pref["content_nextprev_number"]) && $content_pref["content_nextprev_number"] ? $content_pref["content_nextprev_number"] : ""); + $number = varsettrue($content_pref["content_nextprev_number"]); $np = ($number ? " LIMIT ".intval($from).", ".intval($number) : ""); $qry1 = " @@ -1060,18 +1049,18 @@ function show_content_top(){ $text = CONTENT_LAN_37; }else{ while($row = $sql -> db_Fetch()){ - $CONTENT_TOP_TABLE_AUTHOR = $aa -> prepareAuthor("top", $row['content_author'], $row['content_id']); - $content_top_table_string .= $tp -> parseTemplate($CONTENT_TOP_TABLE, FALSE, $content_shortcodes); + $CM_AUTHOR = $aa -> prepareAuthor("top", $row['content_author'], $row['content_id']); + $content_top_table_string .= $tp -> parseTemplate($CONTENT_TOP_TABLE, FALSE, $content_shortcodes); } - $content_top_table_string = $aa -> getCrumbPage("top", $array, $mainparent).$content_top_table_string; - $text = $CONTENT_TOP_TABLE_START.$content_top_table_string.$CONTENT_TOP_TABLE_END; + $content_top_table_string = $aa->getCrumbPage("top", $array, $mainparent).$content_top_table_string; + $text = $CONTENT_TOP_TABLE_START.$content_top_table_string.$CONTENT_TOP_TABLE_END; } - $caption = $content_pref['content_top_caption']; + $caption = $content_pref['content_top_caption']; if(isset($content_pref['content_top_caption_append_name']) && $content_pref['content_top_caption_append_name']){ $caption .= " ".$array[intval($qs[1])][1]; } $ns -> tablerender($caption, $text); - $aa -> ShowNextPrev("", $from, $number, $total); + $aa->ShowNextPrev("", $from, $number, $total); $cachecheck = CachePost($cachestr); unset($qry, $qry1, $qry2, $array, $validparent, $datequery); } @@ -1079,8 +1068,7 @@ function show_content_top(){ // ##### TOP SCORE LIST ----------------------------------- function show_content_score(){ - global $qs, $plugindir, $content_shortcodes, $ns, $plugintable, $sql, $aa, $e107cache, $tp, $pref, $cobj, $content_icon_path; - global $from, $datequery, $content_pref, $mainparent, $eArrayStorage, $CONTENT_SCORE_TABLE_SCORE, $CONTENT_SCORE_TABLE_AUTHOR, $authordetails, $row, $thisratearray; + global $qs, $plugindir, $content_shortcodes, $ns, $plugintable, $sql, $aa, $e107cache, $tp, $pref, $cobj, $content_icon_path, $from, $datequery, $content_pref, $mainparent, $eArrayStorage, $CONTENT_SCORE_TABLE_SCORE, $CM_AUTHOR, $authordetails, $row, $thisratearray; $mainparent = $aa -> getMainParent(intval($qs[1])); $content_pref = $aa -> getContentPref($mainparent); @@ -1108,7 +1096,7 @@ function show_content_score(){ $array = $aa -> getCategoryTree("", intval($qs[1]), TRUE); $validparent = implode(",", array_keys($array)); $qry = " content_score != '0' AND content_score != '' AND content_parent REGEXP '".$aa -> CONTENTREGEXP($validparent)."' ".$datequery." AND content_class REGEXP '".e_CLASS_REGEXP."' "; - $number = (isset($content_pref["content_nextprev_number"]) && $content_pref["content_nextprev_number"] ? $content_pref["content_nextprev_number"] : "5"); + $number = varsettrue($content_pref["content_nextprev_number"],'5'); if(!is_object($sql)){ $sql = new db; } $contenttotal = $sql -> db_Count($plugintable, "(*)", "WHERE ".$qry." "); @@ -1116,25 +1104,25 @@ function show_content_score(){ $content_score_table_string = CONTENT_LAN_88; }else{ while($row = $sql -> db_Fetch()){ - $CONTENT_SCORE_TABLE_AUTHOR = $aa -> prepareAuthor("score", $row['content_author'], $row['content_id']); + $CM_AUTHOR = $aa -> prepareAuthor("score", $row['content_author'], $row['content_id']); $content_score_table_string .= $tp -> parseTemplate($CONTENT_SCORE_TABLE, FALSE, $content_shortcodes); } } - $content_score_table_string = $aa -> getCrumbPage("score", $array, $mainparent).$content_score_table_string; + $content_score_table_string = $aa->getCrumbPage("score", $array, $mainparent).$content_score_table_string; $text = $CONTENT_SCORE_TABLE_START.$content_score_table_string.$CONTENT_SCORE_TABLE_END; $caption = $content_pref['content_score_caption']; if(isset($content_pref['content_score_caption_append_name']) && $content_pref['content_score_caption_append_name']){ $caption .= " ".$array[intval($qs[1])][1]; } $ns -> tablerender($caption, $text); - $aa -> ShowNextPrev("", $from, $number, $contenttotal); + $aa->ShowNextPrev("", $from, $number, $contenttotal); $cachecheck = CachePost($cachestr); } // ##### CONTENT ITEM ------------------------------------------ function show_content_item(){ global $pref, $content_pref, $content_icon_path, $content_image_path, $content_file_path, $custom, $plugindir, $plugintable, $array, $content_shortcodes, $datequery, $order, $nextprevquery, $from, $number, $row, $qs, $gen, $sql, $aa, $tp, $rs, $cobj, $e107, $e107cache, $eArrayStorage, $ns, $rater, $ep, $row, $authordetails, $mainparent; - global $CONTENT_CONTENT_TABLE_TEXT, $CONTENT_CONTENT_TABLE_PAGENAMES, $CONTENT_CONTENT_TABLE_SUMMARY, $CONTENT_CONTENT_TABLE_CUSTOM_TAGS, $CONTENT_CONTENT_TABLE_PARENT, $CONTENT_CONTENT_TABLE_INFO_PRE, $CONTENT_CONTENT_TABLE_INFO_POST, $CONTENT_CONTENT_TABLE_AUTHORDETAILS, $CONTENT_CONTENT_TABLE_INFO_PRE_HEADDATA, $CONTENT_CONTENT_TABLE_INFO_POST_HEADDATA; + global $CONTENT_CONTENT_TABLE_TEXT, $CONTENT_CONTENT_TABLE_PAGENAMES, $CONTENT_CONTENT_TABLE_SUMMARY, $CONTENT_CONTENT_TABLE_CUSTOM_TAGS, $CONTENT_CONTENT_TABLE_PARENT, $CONTENT_CONTENT_TABLE_INFO_PRE, $CONTENT_CONTENT_TABLE_INFO_POST, $CM_AUTHOR, $CONTENT_CONTENT_TABLE_INFO_PRE_HEADDATA, $CONTENT_CONTENT_TABLE_INFO_POST_HEADDATA; global $CONTENT_CONTENT_TABLE_PREV_PAGE, $CONTENT_CONTENT_TABLE_NEXT_PAGE; $mainparent = $aa -> getMainParent(intval($qs[1])); @@ -1181,20 +1169,20 @@ function show_content_item(){ echo $cachecheck; return; } - $content_pref["content_cat_icon_path_large"] = ($content_pref["content_cat_icon_path_large"] ? $content_pref["content_cat_icon_path_large"] : "{e_PLUGIN}content/images/cat/48/" ); - $content_pref["content_cat_icon_path_small"] = ($content_pref["content_cat_icon_path_small"] ? $content_pref["content_cat_icon_path_small"] : "{e_PLUGIN}content/images/cat/16/" ); - $content_pref["content_icon_path"] = ($content_pref["content_icon_path"] ? $content_pref["content_icon_path"] : "{e_PLUGIN}content/images/icon/" ); - $content_pref["content_image_path"] = ($content_pref["content_image_path"] ? $content_pref["content_image_path"] : "{e_PLUGIN}content/images/image/" ); - $content_pref["content_file_path"] = ($content_pref["content_file_path"] ? $content_pref["content_file_path"] : "{e_PLUGIN}content/images/file/" ); - $content_cat_icon_path_large = $tp -> replaceConstants($content_pref["content_cat_icon_path_large"]); - $content_cat_icon_path_small = $tp -> replaceConstants($content_pref["content_cat_icon_path_small"]); - $content_icon_path = $tp -> replaceConstants($content_pref["content_icon_path"]); - $content_image_path = $tp -> replaceConstants($content_pref["content_image_path"]); - $content_file_path = $tp -> replaceConstants($content_pref["content_file_path"]); - $number = (isset($content_pref["content_nextprev_number"]) && $content_pref["content_nextprev_number"] ? $content_pref["content_nextprev_number"] : "5"); - $nextprevquery = (isset($content_pref["content_nextprev"]) && $content_pref["content_nextprev"] ? "LIMIT ".intval($from).",".intval($number) : ""); + $content_pref["content_cat_icon_path_large"] = varset($content_pref["content_cat_icon_path_large"], "{e_PLUGIN}content/images/cat/48/"); + $content_pref["content_cat_icon_path_small"] = varset($content_pref["content_cat_icon_path_small"], "{e_PLUGIN}content/images/cat/16/"); + $content_pref["content_icon_path"] = varset($content_pref["content_icon_path"], "{e_PLUGIN}content/images/icon/"); + $content_pref["content_image_path"] = varset($content_pref["content_image_path"], "{e_PLUGIN}content/images/image/"); + $content_pref["content_file_path"] = varset($content_pref["content_file_path"], "{e_PLUGIN}content/images/file/"); + $content_cat_icon_path_large = $tp -> replaceConstants($content_pref["content_cat_icon_path_large"]); + $content_cat_icon_path_small = $tp -> replaceConstants($content_pref["content_cat_icon_path_small"]); + $content_icon_path = $tp -> replaceConstants($content_pref["content_icon_path"]); + $content_image_path = $tp -> replaceConstants($content_pref["content_image_path"]); + $content_file_path = $tp -> replaceConstants($content_pref["content_file_path"]); + $number = varsettrue($content_pref["content_nextprev_number"],'5'); + $nextprevquery = (isset($content_pref["content_nextprev"]) && $content_pref["content_nextprev"] ? "LIMIT ".intval($from).",".intval($number) : ""); - $CONTENT_CONTENT_TABLE_AUTHORDETAILS = $aa -> prepareAuthor("content", $row['content_author'], $row['content_id']); + $CM_AUTHOR = $aa -> prepareAuthor("content", $row['content_author'], $row['content_id']); $CONTENT_CONTENT_TABLE_TEXT = $row['content_text']; $CONTENT_CONTENT_TABLE_PREV_PAGE = FALSE; @@ -1284,7 +1272,7 @@ function show_content_item(){ } } if($content_pref["content_content_pagenames_rendertype"] == "1"){ - $selectjs = "onchange=\"if(this.options[this.selectedIndex].value != 'none'){ return document.location=this.options[this.selectedIndex].value; }\""; + $selectjs = "onchange=\"if(this.options[this.selectedIndex].value != 'none'){ return document.location=this.options[this.selectedIndex].value; }\""; $CONTENT_CONTENT_TABLE_PAGENAMES = $rs -> form_select_open("pagenames", $selectjs).$rs -> form_option(CONTENT_LAN_89, "1", "none" , "").$options.$rs -> form_select_close(); }else{ $CONTENT_CONTENT_TABLE_PAGENAMES = $options; @@ -1292,14 +1280,14 @@ function show_content_item(){ }else{ $CONTENT_CONTENT_TABLE_SUMMARY = (isset($content_pref["content_content_summary"]) && $content_pref["content_content_summary"] && $row['content_summary'] ? $tp -> toHTML($row['content_summary'], TRUE, "SUMMARY") : ""); - $CONTENT_CONTENT_TABLE_SUMMARY = $tp -> replaceConstants($CONTENT_CONTENT_TABLE_SUMMARY); + $CONTENT_CONTENT_TABLE_SUMMARY = $tp -> replaceConstants($CONTENT_CONTENT_TABLE_SUMMARY); $lastpage = TRUE; } - $CONTENT_CONTENT_TABLE_TEXT = $tp -> replaceConstants($CONTENT_CONTENT_TABLE_TEXT); - $CONTENT_CONTENT_TABLE_TEXT = $tp -> toHTML($CONTENT_CONTENT_TABLE_TEXT, TRUE, "BODY"); + $CONTENT_CONTENT_TABLE_TEXT = $tp -> replaceConstants($CONTENT_CONTENT_TABLE_TEXT); + $CONTENT_CONTENT_TABLE_TEXT = $tp -> toHTML($CONTENT_CONTENT_TABLE_TEXT, TRUE, "BODY"); - $custom = $eArrayStorage->ReadArray($row['content_pref']); + $custom = $eArrayStorage->ReadArray($row['content_pref']); $date = $tp -> parseTemplate('{CONTENT_CONTENT_TABLE_DATE}', FALSE, $content_shortcodes); $auth = $tp -> parseTemplate('{CONTENT_CONTENT_TABLE_AUTHORDETAILS}', FALSE, $content_shortcodes); @@ -1414,7 +1402,7 @@ function show_content_item(){ } } $text = $tp -> parseTemplate($CONTENT_CONTENT_TABLE, FALSE, $content_shortcodes); - $text = $aa -> getCrumbPage("item", $array, $row['content_parent']).$text; + $text = $aa->getCrumbPage("item", $array, $row['content_parent']).$text; $caption = $row['content_heading']; $ns -> tablerender($caption, $text); $cachecheck = CachePost($cachestr); @@ -1430,12 +1418,14 @@ function show_content_item(){ $lastpage = TRUE; } } + if($lastpage && ($row['content_comment'] || (isset($content_pref["content_content_comment_all"]) && $content_pref["content_content_comment_all"]))){ $cachecheck = CachePre($cachestr); if($cachecheck){ echo $cachecheck; return; } + if((isset($content_pref["content_content_rating"]) && $content_pref["content_content_rating"] && $row['content_rate']) || (isset($content_pref["content_content_rating_all"]) && $content_pref["content_content_rating_all"]) ){ $showrate = TRUE; }else{ diff --git a/e107_plugins/content/content_shortcodes.php b/e107_plugins/content/content_shortcodes.php index e4366f15d..d753a7905 100644 --- a/e107_plugins/content/content_shortcodes.php +++ b/e107_plugins/content/content_shortcodes.php @@ -4,22 +4,734 @@ include_once(e_HANDLER.'shortcode_handler.php'); $content_shortcodes = $tp -> e_sc -> parse_scbatch(__FILE__); /* +SC_BEGIN CM_AMOUNT +global $row, $tp; +if($sc_mode){ + + if($sc_mode=='author'){ + global $totalcontent, $content_pref; + if($content_pref["content_author_amount"]){ + return $totalcontent." ".($totalcontent==1 ? CONTENT_LAN_53 : CONTENT_LAN_54); + } + }elseif($sc_mode=='cat'){ + global $row, $totalitems, $content_pref; + if(isset($content_pref["content_catall_amount"]) && $content_pref["content_catall_amount"]){ + return $totalitems." ".($totalitems == "1" ? CONTENT_LAN_53 : CONTENT_LAN_54); + } + }elseif($sc_mode=='catlist'){ + global $row, $content_pref, $totalparent; + if(isset($content_pref["content_cat_amount"]) && $content_pref["content_cat_amount"]){ + return $totalparent." ".($totalparent == "1" ? CONTENT_LAN_53 : CONTENT_LAN_54); + } + }elseif($sc_mode=='catlistsub'){ + global $row, $content_pref, $totalsubcat; + if(isset($content_pref["content_catsub_amount"]) && $content_pref["content_catsub_amount"]){ + return $totalsubcat." ".($totalsubcat == "1" ? CONTENT_LAN_53 : CONTENT_LAN_54); + } + }elseif($sc_mode=='type'){ + global $contenttotal; + return $contenttotal." ".($contenttotal == 1 ? CONTENT_LAN_53 : CONTENT_LAN_54); + } +} +SC_END + +SC_BEGIN CM_AUTHOR +global $row, $aa, $tp; +if($sc_mode){ + if($sc_mode=='top'){ + global $CM_AUTHOR; + return $CM_AUTHOR; + }elseif($sc_mode=='score'){ + global $CM_AUTHOR; + return $CM_AUTHOR; + }elseif($sc_mode=='archive'){ + global $CM_AUTHOR; + return $aa -> prepareAuthor("archive", $row['content_author'], $row['content_id']); + }elseif($sc_mode=='recent'){ + global $CM_AUTHOR; + return $CM_AUTHOR; + }elseif($sc_mode=='author'){ + global $authordetails, $i, $row; + $name = ($authordetails[$i][1] == "" ? "... ".CONTENT_LAN_29." ..." : $authordetails[$i][1]); + return "".$name.""; + }elseif($sc_mode=='content'){ + global $CM_AUTHOR; + return $CM_AUTHOR; + }elseif($sc_mode=='cat'){ + global $CM_AUTHOR; + return $CM_AUTHOR; + }elseif($sc_mode=='catlist'){ + global $CM_AUTHOR; + return $CM_AUTHOR; + }elseif($sc_mode=='searchresult'){ + $authordetails = $aa -> getAuthor($row['content_author']); + $ret = $authordetails[1]; + if(USER){ + if(is_numeric($authordetails[3])){ + $ret .= " ".CONTENT_ICON_USER.""; + }else{ + $ret .= " ".CONTENT_ICON_USER; + } + }else{ + $ret .= " ".CONTENT_ICON_USER; + } + $ret .= " ".CONTENT_ICON_AUTHORLIST.""; + return $ret; + } +} +SC_END + +SC_BEGIN CM_COMMENT +global $row, $tp; +if($sc_mode){ + if($sc_mode=='cat'){ + global $row, $comment_total, $content_pref, $plugintable; + if($row['content_comment'] && isset($content_pref["content_catall_comment"]) && $content_pref["content_catall_comment"]){ + $sqlc = new db; + $comment_total = $sqlc -> db_Select("comments", "*", "comment_item_id='".$row['content_id']."' AND comment_type='".$plugintable."' AND comment_pid='0' "); + return "".CONTENT_LAN_57." ".$comment_total.""; + } + }elseif($sc_mode=='catlist'){ + global $qs, $row, $comment_total, $content_pref, $sql, $plugintable; + if($row['content_comment'] && isset($content_pref["content_cat_comment"]) && $content_pref["content_cat_comment"]){ + $comment_total = $sql -> db_Count("comments", "(*)", "WHERE comment_item_id='".intval($qs[1])."' AND comment_type='".$plugintable."' AND comment_pid='0' "); + return "".CONTENT_LAN_57." ".$comment_total.""; + } + }elseif($sc_mode=='content'){ + global $cobj, $qs, $content_pref, $row, $plugintable; + if((isset($content_pref["content_content_comment"]) && $content_pref["content_content_comment"] && $row['content_comment']) || $content_pref["content_content_comment_all"] ){ + return $cobj -> count_comments($plugintable, $qs[1]); + } + } +} +SC_END + +SC_BEGIN CM_DATE +global $row, $tp, $content_pref, $gen; +if($sc_mode){ + if($sc_mode=='archive'){ + if(isset($content_pref["content_archive_date"]) && $content_pref["content_archive_date"]){ + $datestyle = ($content_pref["content_archive_datestyle"] ? $content_pref["content_archive_datestyle"] : "%d %b %Y"); + return strftime($datestyle, $row['content_datestamp']); + } + }elseif($sc_mode=='recent'){ + if(isset($content_pref["content_list_date"]) && $content_pref["content_list_date"]){ + $datestyle = ($content_pref["content_list_datestyle"] ? $content_pref["content_list_datestyle"] : "%d %b %Y"); + return strftime($datestyle, $row['content_datestamp']); + } + }elseif($sc_mode=='content'){ + global $gen, $row, $content_pref; + if(isset($content_pref["content_content_date"]) && $content_pref["content_content_date"]){ + $gen = new convert; + $datestamp = preg_replace("# -.*#", "", $gen -> convert_date($row['content_datestamp'], "long")); + return ($datestamp != "" ? $datestamp : ""); + } + }elseif($sc_mode=='cat'){ + if(isset($content_pref["content_catall_date"]) && $content_pref["content_catall_date"]){ + if(!is_object($gen)){ $gen = new convert; } + $datestamp = preg_replace("# -.*#", "", $gen -> convert_date($row['content_datestamp'], "long")); + return ($datestamp != "" ? $datestamp : ""); + } + }elseif($sc_mode=='catlist'){ + if(isset($content_pref["content_cat_date"]) && $content_pref["content_cat_date"]){ + if(!is_object($gen)){ $gen = new convert; } + $datestamp = preg_replace("# -.*#", "", $gen -> convert_date($row['content_datestamp'], "long")); + return ($datestamp != "" ? $datestamp : ""); + } + }elseif($sc_mode=='searchresult'){ + return preg_replace("# -.*#", "", $gen -> convert_date($row['content_datestamp'], "short")); + + } +} +SC_END + +SC_BEGIN CM_EDITICON +global $content_pref, $row, $plugindir, $tp; +if($sc_mode){ + if($sc_mode=='content'){ + if(ADMIN && getperms("P") && isset($content_pref["content_content_editicon"])){ + return "".CONTENT_ICON_EDIT.""; + } + }elseif($sc_mode=='recent'){ + if(ADMIN && getperms("P") && isset($content_pref["content_list_editicon"]) && $content_pref["content_list_editicon"]){ + return $CONTENT_RECENT_TABLE_EDITICON = "".CONTENT_ICON_EDIT.""; + } + } +} +SC_END + +SC_BEGIN CM_EPICONS +global $content_pref, $row, $tp; +if($sc_mode){ + if($sc_mode=='content'){ + $epicons = ""; + if(($content_pref["content_content_peicon"] && $row['content_pe']) || $content_pref["content_content_peicon_all"]){ + $epicons = $tp -> parseTemplate("{EMAIL_ITEM=".CONTENT_LAN_69." ".CONTENT_LAN_71."^plugin:content.".$row['content_id']."}"); + $epicons .= " ".$tp -> parseTemplate("{PRINT_ITEM=".CONTENT_LAN_70." ".CONTENT_LAN_71."^plugin:content.".$row['content_id']."}"); + $epicons .= " ".$tp -> parseTemplate("{PDF=".CONTENT_LAN_76." ".CONTENT_LAN_71."^plugin:content.".$row['content_id']."}"); + return $epicons; + } + }elseif($sc_mode=='recent'){ + $epicons = ""; + if(isset($content_pref["content_list_peicon"]) && $content_pref["content_list_peicon"]){ + if($row['content_pe'] || isset($content_pref["content_list_peicon_all"]) && $content_pref["content_list_peicon_all"]){ + $epicons = $tp -> parseTemplate("{EMAIL_ITEM=".CONTENT_LAN_69." ".CONTENT_LAN_71."^plugin:content.".$row['content_id']."}"); + $epicons .= " ".$tp -> parseTemplate("{PRINT_ITEM=".CONTENT_LAN_70." ".CONTENT_LAN_71."^plugin:content.".$row['content_id']."}"); + $epicons .= " ".$tp -> parseTemplate("{PDF=".CONTENT_LAN_76." ".CONTENT_LAN_71."^plugin:content.".$row['content_id']."}"); + return $epicons; + } + } + }elseif($sc_mode=='cat'){ + $epicons = ""; + if($row['content_pe'] && isset($content_pref["content_catall_peicon"]) && $content_pref["content_catall_peicon"]){ + $epicons = $tp -> parseTemplate("{EMAIL_ITEM=".CONTENT_LAN_69." ".CONTENT_LAN_72."^plugin:content.".$row['content_id']."}"); + $epicons .= " ".$tp -> parseTemplate("{PRINT_ITEM=".CONTENT_LAN_70." ".CONTENT_LAN_72."^plugin:content.".$row['content_id']."}"); + $epicons .= " ".$tp -> parseTemplate("{PDF=".CONTENT_LAN_76." ".CONTENT_LAN_71."^plugin:content.".$row['content_id']."}"); + return $epicons; + } + }elseif($sc_mode=='catlist'){ + $epicons = ""; + if( (isset($content_pref["content_cat_peicon"]) && $content_pref["content_cat_peicon"] && $row['content_pe']) || (isset($content_pref["content_cat_peicon_all"]) && $content_pref["content_cat_peicon_all"])){ + $epicons = $tp -> parseTemplate("{EMAIL_ITEM=".CONTENT_LAN_69." ".CONTENT_LAN_72."^plugin:content.$qs[1]}"); + $epicons .= " ".$tp -> parseTemplate("{PRINT_ITEM=".CONTENT_LAN_70." ".CONTENT_LAN_72."^plugin:content.$qs[1]}"); + $epicons .= " ".$tp -> parseTemplate("{PDF=".CONTENT_LAN_76." ".CONTENT_LAN_71."^plugin:content.$qs[1]}"); + return $epicons; + } + + } +} +SC_END + +SC_BEGIN CM_HEADING +global $row, $tp; +$row['content_heading'] = $tp -> toHTML($row['content_heading'], TRUE, ""); +if($sc_mode){ + if($sc_mode=='type'){ + $row['content_heading'] = $tp -> toHTML($row['content_heading'], TRUE, "emotes_off, no_make_clickable"); + return "".$row['content_heading'].""; + }elseif($sc_mode=='top'){ + return "".$row['content_heading'].""; + }elseif($sc_mode=='score'){ + return "".$row['content_heading'].""; + }elseif($sc_mode=='archive'){ + return "".$row['content_heading'].""; + }elseif($sc_mode=='cat'){ + return "".$row['content_heading'].""; + }elseif($sc_mode=='catlist'){ + return "".$row['content_heading'].""; + }elseif($sc_mode=='catlistsub'){ + return "".$row['content_heading'].""; + }elseif($sc_mode=='recent'){ + return "".$row['content_heading'].""; + }elseif($sc_mode=='content'){ + return $row['content_heading']; + }elseif($sc_mode=='searchresult'){ + return "".$row['content_heading'].""; + }elseif($sc_mode=='manager'){ + return "".$row['content_heading'].""; + }elseif($sc_mode=='manager_link'){ + return "".CONTENT_LAN_67.""; + }else{ + return "".$row['content_heading'].""; + } +}else{ + return "".$row['content_heading'].""; +} +SC_END + +SC_BEGIN CM_ICON +global $aa, $row, $content_pref, $content_icon_path, $content_cat_icon_path_small, $content_cat_icon_path_large; +if($sc_mode){ + if($sc_mode=='top'){ + if($content_pref["content_top_icon"]){ + $width = varsettrue($content_pref["content_upload_icon_size"], '100'); + $width = varsettrue($content_pref["content_top_icon_width"], $width); + return $aa -> getIcon("item", $row['content_icon'], $content_icon_path, "content.".$row['content_id'], $width, $content_pref["content_blank_icon"]); + } + }elseif($sc_mode=='score'){ + if(isset($content_pref["content_score_icon"]) && $content_pref["content_score_icon"]){ + $width = varsettrue($content_pref["content_upload_icon_size"], '100'); + $width = varsettrue($content_pref["content_score_icon_width"], $width); + return $aa -> getIcon("item", $row['content_icon'], $content_icon_path, "content.".$row['content_id'], $width, $content_pref["content_blank_icon"]); + } + }elseif($sc_mode=='cat'){ + if(isset($content_pref["content_catall_icon"]) && $content_pref["content_catall_icon"]){ + $qry = "cat.".$row['content_id']; + return $aa -> getIcon("catlarge", $row['content_icon'], $content_cat_icon_path_large, $qry, "", $content_pref["content_blank_caticon"]); + } + }elseif($sc_mode=='catlist'){ + if(isset($content_pref["content_cat_icon"]) && $content_pref["content_cat_icon"]){ + return $aa -> getIcon("catlarge", $row['content_icon'], $content_cat_icon_path_large, "", "", $content_pref["content_blank_caticon"]); + } + }elseif($sc_mode=='catlistsub'){ + if(isset($content_pref["content_catsub_icon"]) && $content_pref["content_catsub_icon"]){ + return $aa -> getIcon("catsmall", $row['content_icon'], $content_cat_icon_path_small, "cat.".$row['content_id'], "", $content_pref["content_blank_caticon"]); + } + }elseif($sc_mode=='recent'){ + if(isset($content_pref["content_list_icon"]) && $content_pref["content_list_icon"]){ + $width = varsettrue($content_pref["content_upload_icon_size"], '100'); + return $aa -> getIcon("item", $row['content_icon'], $content_icon_path, "content.".$row['content_id'], $width, $content_pref["content_blank_icon"]); + } + }elseif($sc_mode=='author'){ + return "".CONTENT_ICON_AUTHORLIST.""; + }elseif($sc_mode=='content'){ + if(isset($content_pref["content_content_icon"]) && $content_pref["content_content_icon"]){ + $width = varsettrue($content_pref["content_upload_icon_size"], '100'); + return $aa -> getIcon("item", $row['content_icon'], $content_icon_path, "", $width, $content_pref["content_blank_icon"]); + } + }elseif($sc_mode=='type'){ + $qry = "cat.".$row['content_id']; + return $aa -> getIcon("catlarge", $row['content_icon'], $content_cat_icon_path_large, $qry, "", $content_pref["content_blank_caticon"]); + }elseif($sc_mode=='searchresult'){ + $width = varsettrue($content_pref["content_upload_icon_size"], '100'); + return $aa -> getIcon("item", $row['content_icon'], $content_icon_path, "content.".$row['content_id'], $width, $content_pref["content_blank_icon"]); + }elseif($sc_mode=='manager_link'){ + return "".CONTENT_ICON_CONTENTMANAGER.""; + }elseif($sc_mode=='manager_new'){ + if( (isset($content_pref["content_manager_personal"]) && check_class($content_pref["content_manager_personal"])) || (isset($content_pref["content_manager_category"]) && check_class($content_pref["content_manager_category"])) || (isset($content_pref["content_manager_submit"]) && check_class($content_pref["content_manager_submit"])) ){ + + //if(getperms('0')){ + // return "".CONTENT_MANAGER_LAN_1." | ".CONTENT_MANAGER_LAN_4.""; + //} + + if( (isset($content_pref["content_manager_personal"]) && check_class($content_pref["content_manager_personal"])) || (isset($content_pref["content_manager_category"]) && check_class($content_pref["content_manager_category"])) ){ + return "".CONTENT_MANAGER_LAN_1.""; + }elseif( isset($content_pref["content_manager_submit"]) && check_class($content_pref["content_manager_submit"]) ){ + return "".CONTENT_MANAGER_LAN_4.""; + } + } + }elseif($sc_mode=='manager_edit'){ + if( (isset($content_pref["content_manager_personal"]) && check_class($content_pref["content_manager_personal"])) || (isset($content_pref["content_manager_category"]) && check_class($content_pref["content_manager_category"])) ){ + return "".CONTENT_MANAGER_LAN_2.""; + } + }elseif($sc_mode=='manager_submit'){ + global $plugintable; + if(isset($content_pref["content_manager_approve"]) && check_class($content_pref["content_manager_approve"])){ + if(!is_object($sqls)){ $sqls = new db; } + $num = $sqls -> db_Count($plugintable, "(*)", "WHERE content_refer = 'sa' AND content_parent='".intval($row['content_id'])."' "); + return "".CONTENT_MANAGER_LAN_3." (".$num.")"; + } + } +} +SC_END + +SC_BEGIN CM_PARENT +global $aa, $array, $row, $content_pref, $tp; +if($sc_mode){ + if($sc_mode=='content'){ + if(isset($content_pref["content_content_parent"]) && $content_pref["content_content_parent"]){ + return $aa -> getCrumbItem($row['content_parent'], $array); + } + }elseif($sc_mode=='recent'){ + if(isset($content_pref["content_list_parent"]) && $content_pref["content_list_parent"]){ + return $aa -> getCrumbItem($row['content_parent'], $array); + } + } +} +SC_END + +SC_BEGIN CM_RATING +global $row, $imode, $tp, $rater, $content_pref, $plugintable; +if($sc_mode){ + if($sc_mode=='content'){ + if(($content_pref["content_content_rating"] && $row['content_rate']) || $content_pref["content_content_rating_all"] ){ + return $rater->composerating($plugintable, $row['content_id'], $enter=TRUE, $userid=FALSE); + } + }elseif($sc_mode=='recent'){ + if($content_pref["content_list_rating"]){ + if($content_pref["content_list_rating_all"] || $row['content_rate']){ + return $rater->composerating($plugintable, $row['content_id'], $enter=FALSE, $userid=FALSE); + } + } + }elseif($sc_mode=='top'){ + $row['rate_avg'] = round($row['rate_avg'], 1); + $row['rate_avg'] = (strlen($row['rate_avg'])>1 ? $row['rate_avg'] : $row['rate_avg'].".0"); + $tmp = explode(".", $row['rate_avg']); + $rating = ""; + $rating .= $row['rate_avg']." "; + for($c=1; $c<=$tmp[0]; $c++){ + $rating .= ""; + } + if($tmp[0] < 10){ + for($c=9; $c>=$tmp[0]; $c--){ + $rating .= ""; + } + } + $rating .= ""; + return $rating; + + }elseif($sc_mode=='cat'){ + if($row['content_rate'] && isset($content_pref["content_catall_rating"]) && $content_pref["content_catall_rating"]){ + return $rater->composerating($plugintable, $row['content_id'], $enter=TRUE, $userid=FALSE); + } + }elseif($sc_mode=='catlist'){ + if( (isset($content_pref["content_cat_rating_all"]) && $content_pref["content_cat_rating_all"]) || (isset($content_pref["content_cat_rating"]) && $content_pref["content_cat_rating"] && $row['content_rate'])){ + return $rater->composerating($plugintable, $row['content_id'], $enter=TRUE, $userid=FALSE); + } + + + } +} +SC_END + +SC_BEGIN CM_REFER +global $sql, $row, $tp, $qs, $content_pref, $plugintable; +if($sc_mode){ + if($sc_mode=='content'){ + if(isset($content_pref["content_content_refer"]) && $content_pref["content_content_refer"]){ + $sql -> db_Select($plugintable, "content_refer", "content_id='".intval($qs[1])."' "); + list($content_refer) = $sql -> db_Fetch(); + $refercounttmp = explode("^", $content_refer); + return ($refercounttmp[0] ? $refercounttmp[0] : ""); + } + }elseif($sc_mode=='recent'){ + if($content_pref["content_log"] && $content_pref["content_list_refer"]){ + $refercounttmp = explode("^", $row['content_refer']); + $refer = ($refercounttmp[0] ? $refercounttmp[0] : "0"); + if($refer > 0){ + return $refer; + } + } + } +} +SC_END + +SC_BEGIN CM_SCORE +global $row, $tp; +if($sc_mode){ + if($sc_mode=='content'){ + $score = $row['content_score']; + if($score>0){ + $height = "height:8px;"; + $img = ""; + $img .= ""; + $img .= ""; + $img .= ""; + if($score < 100){ + $empty = 100-$score; + $img .= ""; + } + $img .= ""; + return $img." ".$score; + } + }elseif($sc_mode=='score'){ + $score = $row['content_score']; + $height = "height:8px;"; + $img = ""; + $img .= ""; + $img .= ""; + $img .= ""; + if($score < 100){ + $empty = 100-$score; + $img .= ""; + } + $img .= ""; + return $score."/100 ".$img; + } +} +SC_END + +SC_BEGIN CM_SUBHEADING +global $tp, $content_pref, $qs, $row; +if($sc_mode){ + if($sc_mode=='content'){ + return ($content_pref["content_content_subheading"] && $row['content_subheading'] ? $tp -> toHTML($row['content_subheading'], TRUE, "") : ""); + }elseif($sc_mode=='recent'){ + if (isset($content_pref["content_list_subheading"]) && $content_pref["content_list_subheading"] && $row['content_subheading'] && $content_pref["content_list_subheading_char"] && $content_pref["content_list_subheading_char"] != "" && $content_pref["content_list_subheading_char"] != "0"){ + if(strlen($row['content_subheading']) > $content_pref["content_list_subheading_char"]) { + $row['content_subheading'] = substr($row['content_subheading'], 0, $content_pref["content_list_subheading_char"]).$content_pref["content_list_subheading_post"]; + } + $ret = ($row['content_subheading'] != "" && $row['content_subheading'] != " " ? $row['content_subheading'] : ""); + }else{ + $ret = ($row['content_subheading'] ? $row['content_subheading'] : ""); + } + return $tp->toHTML($ret, TRUE, ""); + }elseif($sc_mode=='type'){ + return $tp -> toHTML($row['content_subheading'], TRUE, "emotes_off, no_make_clickable"); + }elseif($sc_mode=='cat'){ + if(isset($content_pref["content_catall_subheading"]) && $content_pref["content_catall_subheading"]){ + return $tp -> toHTML($row['content_subheading'], TRUE, ""); + } + }elseif($sc_mode=='catlist'){ + if(isset($content_pref["content_cat_subheading"]) && $content_pref["content_cat_subheading"]){ + return $tp -> toHTML($row['content_subheading'], TRUE, ""); + } + + }elseif($sc_mode=='catlistsub'){ + if(isset($content_pref["content_catsub_subheading"]) && $content_pref["content_catsub_subheading"]){ + return $tp -> toHTML($row['content_subheading'], TRUE, ""); + } + }elseif($sc_mode=='searchresult'){ + return $tp -> toHTML($row['content_subheading'], TRUE, ""); + }elseif($sc_mode=='manager'){ + return $tp->toHTML($row['content_subheading'], TRUE); + } +} +SC_END + +SC_BEGIN CM_SUMMARY +global $content_pref, $tp, $row, $CONTENT_CONTENT_TABLE_SUMMARY; +if($sc_mode){ + if($sc_mode=='content'){ + return $CONTENT_CONTENT_TABLE_SUMMARY; + }elseif($sc_mode=='recent'){ + if (isset($content_pref["content_list_summary"]) && $content_pref["content_list_summary"]){ + if($row['content_summary'] && $content_pref["content_list_summary_char"] && $content_pref["content_list_summary_char"] != "" && $content_pref["content_list_summary_char"] != "0"){ + if(strlen($row['content_summary']) > $content_pref["content_list_summary_char"]) { + $row['content_summary'] = substr($row['content_summary'], 0, $content_pref["content_list_summary_char"]).$content_pref["content_list_summary_post"]; + } + $ret = ($row['content_summary'] != "" && $row['content_summary'] != " " ? $row['content_summary'] : ""); + }else{ + $ret = ($row['content_summary'] ? $row['content_summary'] : ""); + } + return $tp->toHTML($ret, TRUE, ""); + } + }elseif($sc_mode=='catlist'){ + return ($row['content_summary'] ? $tp -> toHTML($row['content_summary'], TRUE, "") : ""); + } +} +SC_END + +SC_BEGIN CM_TEXT +global $content_pref, $row, $tp, $CONTENT_CONTENT_TABLE_TEXT; +if($sc_mode){ + if($sc_mode=='content'){ + return $CONTENT_CONTENT_TABLE_TEXT; + }elseif($sc_mode=='recent'){ + if(isset($content_pref["content_list_text"]) && $content_pref["content_list_text"] && $content_pref["content_list_text_char"] > 0){ + $rowtext = preg_replace("/\[newpage.*?]/si", " ", $row['content_text']); + $rowtext = $tp->toHTML($rowtext, TRUE, "nobreak"); + $rowtext = strip_tags($rowtext); + $words = explode(" ", $rowtext); + $ret = implode(" ", array_slice($words, 0, $content_pref["content_list_text_char"])); + if($ret){ + if($content_pref["content_list_text_link"]){ + $ret .= " ".$content_pref["content_list_text_post"].""; + }else{ + $ret .= " ".$content_pref["content_list_text_post"]; + } + } + } + return $ret; + }elseif($sc_mode=='cat'){ + if($row['content_text'] && isset($content_pref["content_catall_text"]) && $content_pref["content_catall_text"] && ($content_pref["content_catall_text_char"] > 0 || $content_pref["content_catall_text_char"] == 'all')){ + if($content_pref["content_catall_text_char"] == 'all'){ + $ret = $row['content_text']; + }else{ + $rowtext = preg_replace("/\[newpage.*?]/si", " ", $row['content_text']); + $rowtext = $tp->toHTML($rowtext, TRUE, "nobreak"); + $rowtext = strip_tags($rowtext); + $words = explode(" ", $rowtext); + $ret = implode(" ", array_slice($words, 0, $content_pref["content_catall_text_char"])); + if($content_pref["content_catall_text_link"]){ + $ret .= " ".$content_pref["content_catall_text_post"].""; + }else{ + $ret .= " ".$content_pref["content_catall_text_post"]; + } + } + return $ret; + } + }elseif($sc_mode=='catlist'){ + if($row['content_text'] && isset($content_pref["content_cat_text"]) && $content_pref["content_cat_text"] && ($content_pref["content_cat_text_char"] > 0 || $content_pref["content_cat_text_char"] == 'all')){ + if($content_pref["content_cat_text_char"] == 'all'){ + $CONTENT_CAT_LIST_TABLE_TEXT = $tp->toHTML($row['content_text'], TRUE, "constants"); + }else{ + $rowtext = preg_replace("/\[newpage.*?]/si", " ", $row['content_text']); + $rowtext = $tp->toHTML($rowtext, TRUE, "nobreak, constants"); + $rowtext = strip_tags($rowtext); + $words = explode(" ", $rowtext); + $CONTENT_CAT_LIST_TABLE_TEXT = implode(" ", array_slice($words, 0, $content_pref["content_cat_text_char"])); + if($content_pref["content_cat_text_link"]){ + $CONTENT_CAT_LIST_TABLE_TEXT .= " ".$content_pref["content_cat_text_post"].""; + }else{ + $CONTENT_CAT_LIST_TABLE_TEXT .= " ".$content_pref["content_cat_text_post"]; + } + } + return $CONTENT_CAT_LIST_TABLE_TEXT; + } + }elseif($sc_mode=='searchresult'){ + return $tp -> toHTML($row['content_text'], TRUE, ""); + + } + + +} +SC_END + +SC_BEGIN CM_FILE +global $row, $tp; +if($sc_mode){ + if($sc_mode=='content'){ + global $row, $content_file_path, $content_pref; + if($content_pref["content_content_attach"]){ + $filestmp = explode("[file]", $row['content_file']); + foreach($filestmp as $key => $value) { + if($value == "") { + unset($filestmp[$key]); + } + } + $files = array_values($filestmp); + $content_files_popup_name = str_replace("'", "", $row['content_heading']); + $file = ""; + $filesexisting = "0"; + for($i=0;$i".CONTENT_ICON_FILE." "; + }else{ + $file .= " "; + } + } + return ($filesexisting == "0" ? "" : CONTENT_LAN_41." ".($filesexisting == 1 ? CONTENT_LAN_42 : CONTENT_LAN_43)." ".$file." "); + } + + + }elseif($sc_mode=='print'){ + }elseif($sc_mode=='pdf'){ + } +} +SC_END + +SC_BEGIN CM_IMAGES +global $row, $tp; +if($sc_mode){ + if($sc_mode=='content'){ + global $row, $content_image_path, $aa, $tp, $authordetails, $content_pref; + if($content_pref["content_content_images"]){ + $authordetails = $aa -> getAuthor($row['content_author']); + $imagestmp = explode("[img]", $row['content_image']); + foreach($imagestmp as $key => $value) { + if($value == "") { + unset($imagestmp[$key]); + } + } + $images = array_values($imagestmp); + $content_image_popup_name = $row['content_heading']; + $ret = ""; + require_once(e_HANDLER."popup_handler.php"); + $pp = new popup; + $gen = new convert; + $datestamp = preg_replace("# -.*#", "", $gen -> convert_date($row['content_datestamp'], "long")); + for($i=0;$i toHTML($row['content_subheading'], TRUE); + $popupname = $tp -> toHTML($content_image_popup_name, TRUE); + $author = $tp -> toHTML($authordetails[1], TRUE); + $oTitle = $popupname." ".($i+1); + $oText = $popupname." ".($i+1)."
".$subheading."
".$author." (".$datestamp.")"; + $ret .= $pp -> popup($oSrc, $oSrcThumb, $oIconWidth, $oMaxWidth, $oTitle, $oText); + } + return $ret; + } + + }elseif($sc_mode=='print'){ + global $row, $content_image_path, $tp, $content_pref; + if($content_pref["content_content_images"]){ + $imagestmp = explode("[img]", $row['content_image']); + foreach($imagestmp as $key => $value) { + if($value == "") { + unset($imagestmp[$key]); + } + } + $images = array_values($imagestmp); + $ret = ""; + for($i=0;$i

"; + } + } + return $ret; + } + + }elseif($sc_mode=='pdf'){ + global $row, $content_image_path, $tp, $content_pref; + if($content_pref["content_content_images"]){ + $imagestmp = explode("[img]", $row['content_image']); + foreach($imagestmp as $key => $value) { + if($value == "") { + unset($imagestmp[$key]); + } + } + $images = array_values($imagestmp); + $ret = ""; + for($i=0;$i"; + } + } + return $ret; + } + } +} +SC_END + +//SC_BEGIN CM_AUTHOR +//global $row, $tp; +//if($sc_mode){ +// if($sc_mode=='archive'){ +// }elseif($sc_mode=='author'){ +// }elseif($sc_mode=='cat'){ +// }elseif($sc_mode=='catlist'){ +// }elseif($sc_mode=='content'){ +// }elseif($sc_mode=='recent'){ +// }elseif($sc_mode=='score'){ +// }elseif($sc_mode=='top'){ +// }elseif($sc_mode=='type'){ +// }else{ +// } +//}else{ +//} +//SC_END + + + + + +// ############################################################################ +// ##### SHORTCODES THAT STILL NEED TO BE CONVERTED TO THE NEW STANDARD! ------ +// ############################################################################ + SC_BEGIN CONTENT_NEXTPREV global $CONTENT_NEXTPREV; return $CONTENT_NEXTPREV; SC_END // CONTENT_TYPE_TABLE ------------------------------------------------ -SC_BEGIN CONTENT_TYPE_TABLE_TOTAL -global $contenttotal; -return $contenttotal." ".($contenttotal == 1 ? CONTENT_LAN_53 : CONTENT_LAN_54); -SC_END - -SC_BEGIN CONTENT_TYPE_TABLE_HEADING -global $contenttotal, $row, $tp; -$row['content_heading'] = $tp -> toHTML($row['content_heading'], TRUE, "emotes_off, no_make_clickable"); -return ($contenttotal != "0" ? "".$row['content_heading']."" : $row['content_heading'] ); -SC_END SC_BEGIN CONTENT_TYPE_TABLE_LINK global $row, $tp; @@ -33,175 +745,40 @@ $text = " return $text; SC_END - -SC_BEGIN CONTENT_TYPE_TABLE_SUBHEADING -global $row, $tp; -$row['content_subheading'] = $tp -> toHTML($row['content_subheading'], TRUE, "emotes_off, no_make_clickable"); -return ($row['content_subheading'] ? $row['content_subheading'] : ""); -SC_END - -SC_BEGIN CONTENT_TYPE_TABLE_ICON -global $row, $aa, $content_cat_icon_path_large, $content_pref; -$qry = "cat.".$row['content_id']; -return $aa -> getIcon("catlarge", $row['content_icon'], $content_cat_icon_path_large, $qry, "", $content_pref["content_blank_caticon"]); -SC_END - -// CONTENT_TYPE_TABLE_MANAGER ------------------------------------------------ -SC_BEGIN CONTENT_TYPE_TABLE_MANAGER_ICON -global $plugindir; -return "".CONTENT_ICON_CONTENTMANAGER.""; -SC_END - -SC_BEGIN CONTENT_TYPE_TABLE_MANAGER_HEADING -global $plugindir; -return "".CONTENT_LAN_67.""; -SC_END - -// CONTENT_TOP_TABLE ------------------------------------------------ -SC_BEGIN CONTENT_TOP_TABLE_HEADING -global $row; -return "".$row['content_heading'].""; -SC_END - -SC_BEGIN CONTENT_TOP_TABLE_ICON -global $aa, $row, $content_pref, $content_icon_path; -if($content_pref["content_top_icon"]){ - $width = (isset($content_pref["content_upload_icon_size"]) && $content_pref["content_upload_icon_size"] ? $content_pref["content_upload_icon_size"] : "100"); - $width = (isset($content_pref["content_top_icon_width"]) && $content_pref["content_top_icon_width"] ? $content_pref["content_top_icon_width"] : $width); - return $aa -> getIcon("item", $row['content_icon'], $content_icon_path, "content.".$row['content_id'], $width, $content_pref["content_blank_icon"]); -} -SC_END - -SC_BEGIN CONTENT_TOP_TABLE_AUTHOR -global $CONTENT_TOP_TABLE_AUTHOR; -return $CONTENT_TOP_TABLE_AUTHOR; -SC_END - -SC_BEGIN CONTENT_TOP_TABLE_RATING -global $row, $imode; -$row['rate_avg'] = round($row['rate_avg'], 1); -$row['rate_avg'] = (strlen($row['rate_avg'])>1 ? $row['rate_avg'] : $row['rate_avg'].".0"); -$tmp = explode(".", $row['rate_avg']); -$rating = ""; -$rating .= $row['rate_avg']." "; -for($c=1; $c<= $tmp[0]; $c++){ - $rating .= ""; -} -if($tmp[0] < 10){ - for($c=9; $c>=$tmp[0]; $c--){ - $rating .= ""; - } -} -$rating .= ""; -return $rating; -SC_END - -// CONTENT_SCORE_TABLE ------------------------------------------------ -SC_BEGIN CONTENT_SCORE_TABLE_HEADING -global $row; -return "".$row['content_heading'].""; -SC_END - -SC_BEGIN CONTENT_SCORE_TABLE_ICON -global $aa, $row, $content_pref, $content_icon_path; -if(isset($content_pref["content_score_icon"]) && $content_pref["content_score_icon"]){ - $width = (isset($content_pref["content_upload_icon_size"]) && $content_pref["content_upload_icon_size"] ? $content_pref["content_upload_icon_size"] : "100"); - $width = (isset($content_pref["content_score_icon_width"]) && $content_pref["content_score_icon_width"] ? $content_pref["content_score_icon_width"] : $width); - return $aa -> getIcon("item", $row['content_icon'], $content_icon_path, "content.".$row['content_id'], $width, $content_pref["content_blank_icon"]); -} -SC_END - -SC_BEGIN CONTENT_SCORE_TABLE_AUTHOR -global $CONTENT_SCORE_TABLE_AUTHOR; -return $CONTENT_SCORE_TABLE_AUTHOR; -SC_END - -SC_BEGIN CONTENT_SCORE_TABLE_SCORE -global $row; -$score = $row['content_score']; -$height = "height:8px;"; -$img = ""; -$img .= ""; -$img .= ""; -$img .= ""; -if($score < 100){ - $empty = 100-$score; - $img .= ""; -} -$img .= ""; -return $score."/100 ".$img; -SC_END - -// CONTENT_CONTENT_TABLEMANAGER ------------------------------------------------ -SC_BEGIN CONTENT_CONTENTMANAGER_CATEGORY -global $row, $content_pref; -return "".$row['content_heading'].""; -SC_END - -SC_BEGIN CONTENT_CONTENTMANAGER_CATEGORY_SUBHEADING -global $row, $tp; -return $tp->toHTML($row['content_subheading'], TRUE); -SC_END - -SC_BEGIN CONTENT_CONTENTMANAGER_ICONNEW -global $row, $content_pref; -if( (isset($content_pref["content_manager_personal"]) && check_class($content_pref["content_manager_personal"])) || (isset($content_pref["content_manager_category"]) && check_class($content_pref["content_manager_category"])) || (isset($content_pref["content_manager_submit"]) && check_class($content_pref["content_manager_submit"])) ){ - - //if(getperms('0')){ - // return "".CONTENT_MANAGER_LAN_1." | ".CONTENT_MANAGER_LAN_4.""; - //} - - if( (isset($content_pref["content_manager_personal"]) && check_class($content_pref["content_manager_personal"])) || (isset($content_pref["content_manager_category"]) && check_class($content_pref["content_manager_category"])) ){ - return "".CONTENT_MANAGER_LAN_1.""; - }elseif( isset($content_pref["content_manager_submit"]) && check_class($content_pref["content_manager_submit"]) ){ - return "".CONTENT_MANAGER_LAN_4.""; - } -} -SC_END - -SC_BEGIN CONTENT_CONTENTMANAGER_ICONEDIT -global $row, $content_pref; -if( (isset($content_pref["content_manager_personal"]) && check_class($content_pref["content_manager_personal"])) || (isset($content_pref["content_manager_category"]) && check_class($content_pref["content_manager_category"])) ){ - return "".CONTENT_MANAGER_LAN_2.""; -} -SC_END - -SC_BEGIN CONTENT_CONTENTMANAGER_ICONSUBM -global $row, $content_pref, $plugintable; -if(isset($content_pref["content_manager_approve"]) && check_class($content_pref["content_manager_approve"])){ - if(!is_object($sqls)){ $sqls = new db; } - $num = $sqls -> db_Count($plugintable, "(*)", "WHERE content_refer = 'sa' AND content_parent='".intval($row['content_id'])."' "); - return "".CONTENT_MANAGER_LAN_3." (".$num.")"; -} -SC_END - - // CONTENT_AUTHOR_TABLE ------------------------------------------------ -SC_BEGIN CONTENT_AUTHOR_TABLE_NAME -global $authordetails, $i, $row; -$name = ($authordetails[$i][1] == "" ? "... ".CONTENT_LAN_29." ..." : $authordetails[$i][1]); -return "".$name.""; -SC_END - -SC_BEGIN CONTENT_AUTHOR_TABLE_ICON -global $row; -return "".CONTENT_ICON_AUTHORLIST.""; -SC_END - -SC_BEGIN CONTENT_AUTHOR_TABLE_TOTAL -global $totalcontent, $content_pref; -if($content_pref["content_author_amount"]){ - return $totalcontent." ".($totalcontent==1 ? CONTENT_LAN_53 : CONTENT_LAN_54); -} -SC_END SC_BEGIN CONTENT_AUTHOR_TABLE_LASTITEM global $gen, $row, $content_pref; if($content_pref["content_author_lastitem"]){ -if(!is_object($gen)){ $gen = new convert; } - $CONTENT_AUTHOR_TABLE_LASTITEM = preg_replace("# -.*#", "", $gen -> convert_date($row['content_datestamp'], "short")); - $CONTENT_AUTHOR_TABLE_LASTITEM .= " : ".$row['content_heading'].""; - return $CONTENT_AUTHOR_TABLE_LASTITEM; + if(!is_object($gen)){ $gen = new convert; } + $date = $gen -> convert_date($row['content_datestamp'], "short"); + return $date." : ".$row['content_heading'].""; +} +SC_END + +// CONTENT_ARCHIVE_TABLE ------------------------------------------------ + +SC_BEGIN CONTENT_ARCHIVE_TABLE_LETTERS +global $content_pref, $CONTENT_ARCHIVE_TABLE_LETTERS; +if($content_pref["content_archive_letterindex"]){ + return $CONTENT_ARCHIVE_TABLE_LETTERS; +} +SC_END + + +// CONTENT_RECENT_TABLE ------------------------------------------------ +SC_BEGIN CONTENT_RECENT_TABLE_INFOPRE +global $CONTENT_RECENT_TABLE_INFOPRE; +if($CONTENT_RECENT_TABLE_INFOPRE === TRUE){ + $CONTENT_RECENT_TABLE_INFOPRE = " "; + return $CONTENT_RECENT_TABLE_INFOPRE; +} +SC_END +SC_BEGIN CONTENT_RECENT_TABLE_INFOPOST +global $CONTENT_RECENT_TABLE_INFOPOST; +if($CONTENT_RECENT_TABLE_INFOPOST === TRUE){ + $CONTENT_RECENT_TABLE_INFOPOST = " "; + return $CONTENT_RECENT_TABLE_INFOPOST; } SC_END @@ -221,95 +798,6 @@ if($CONTENT_CAT_TABLE_INFO_POST === TRUE){ } SC_END -SC_BEGIN CONTENT_CAT_TABLE_ICON -global $aa, $row, $content_pref, $content_cat_icon_path_large; -if(isset($content_pref["content_catall_icon"]) && $content_pref["content_catall_icon"]){ - $qry = "cat.".$row['content_id']; - return $aa -> getIcon("catlarge", $row['content_icon'], $content_cat_icon_path_large, $qry, "", $content_pref["content_blank_caticon"]); -} -SC_END - -SC_BEGIN CONTENT_CAT_TABLE_HEADING -global $row, $tp; -return "".$tp -> toHTML($row['content_heading'], TRUE, "").""; -SC_END - -SC_BEGIN CONTENT_CAT_TABLE_AMOUNT -global $row, $totalitems, $content_pref; -if(isset($content_pref["content_catall_amount"]) && $content_pref["content_catall_amount"]){ - return $totalitems." ".($totalitems == "1" ? CONTENT_LAN_53 : CONTENT_LAN_54); -} -SC_END - -SC_BEGIN CONTENT_CAT_TABLE_SUBHEADING -global $row, $tp, $content_pref; -if(isset($content_pref["content_catall_subheading"]) && $content_pref["content_catall_subheading"]){ - return ($row['content_subheading'] ? $tp -> toHTML($row['content_subheading'], TRUE, "") : ""); -} -SC_END - -SC_BEGIN CONTENT_CAT_TABLE_DATE -global $gen, $row, $content_pref; -if(isset($content_pref["content_catall_date"]) && $content_pref["content_catall_date"]){ - if(!is_object($gen)){ $gen = new convert; } - $datestamp = preg_replace("# -.*#", "", $gen -> convert_date($row['content_datestamp'], "long")); - return ($datestamp != "" ? $datestamp : ""); -} -SC_END - -SC_BEGIN CONTENT_CAT_TABLE_AUTHORDETAILS -global $CONTENT_CAT_TABLE_AUTHORDETAILS; -return $CONTENT_CAT_TABLE_AUTHORDETAILS; -SC_END - -SC_BEGIN CONTENT_CAT_TABLE_EPICONS -global $row, $tp, $content_pref; -$EPICONS = ""; -if($row['content_pe'] && isset($content_pref["content_catall_peicon"]) && $content_pref["content_catall_peicon"]){ - $EPICONS = $tp -> parseTemplate("{EMAIL_ITEM=".CONTENT_LAN_69." ".CONTENT_LAN_72."^plugin:content.".$row['content_id']."}"); - $EPICONS .= " ".$tp -> parseTemplate("{PRINT_ITEM=".CONTENT_LAN_70." ".CONTENT_LAN_72."^plugin:content.".$row['content_id']."}"); - $EPICONS .= " ".$tp -> parseTemplate("{PDF=".CONTENT_LAN_76." ".CONTENT_LAN_71."^plugin:content.".$row['content_id']."}"); - return $EPICONS; -} -SC_END - -SC_BEGIN CONTENT_CAT_TABLE_COMMENT -global $row, $comment_total, $content_pref, $plugintable; -if($row['content_comment'] && isset($content_pref["content_catall_comment"]) && $content_pref["content_catall_comment"]){ - $sqlc = new db; - $comment_total = $sqlc -> db_Select("comments", "*", "comment_item_id='".$row['content_id']."' AND comment_type='".$plugintable."' AND comment_pid='0' "); - return "".CONTENT_LAN_57." ".$comment_total.""; -} -SC_END - -SC_BEGIN CONTENT_CAT_TABLE_TEXT -global $row, $tp, $content_pref; -if($row['content_text'] && isset($content_pref["content_catall_text"]) && $content_pref["content_catall_text"] && ($content_pref["content_catall_text_char"] > 0 || $content_pref["content_catall_text_char"] == 'all')){ - if($content_pref["content_catall_text_char"] == 'all'){ - $CONTENT_CAT_TABLE_TEXT = $row['content_text']; - }else{ - $rowtext = preg_replace("/\[newpage.*?]/si", " ", $row['content_text']); - $rowtext = $tp->toHTML($rowtext, TRUE, "nobreak"); - $rowtext = strip_tags($rowtext); - $words = explode(" ", $rowtext); - $CONTENT_CAT_TABLE_TEXT = implode(" ", array_slice($words, 0, $content_pref["content_catall_text_char"])); - if($content_pref["content_catall_text_link"]){ - $CONTENT_CAT_TABLE_TEXT .= " ".$content_pref["content_catall_text_post"].""; - }else{ - $CONTENT_CAT_TABLE_TEXT .= " ".$content_pref["content_catall_text_post"]; - } - } - return $CONTENT_CAT_TABLE_TEXT; -} -SC_END - -SC_BEGIN CONTENT_CAT_TABLE_RATING -global $row, $rater, $content_pref, $plugintable; -if($row['content_rate'] && isset($content_pref["content_catall_rating"]) && $content_pref["content_catall_rating"]){ - return $rater->composerating($plugintable, $row['content_id'], $enter=TRUE, $userid=FALSE); -} -SC_END - // CONTENT_CAT_LIST_TABLE ------------------------------------------------ SC_BEGIN CONTENT_CAT_LIST_TABLE_INFO_PRE global $CONTENT_CAT_LIST_TABLE_INFO_PRE; @@ -326,348 +814,6 @@ if($CONTENT_CAT_LIST_TABLE_INFO_POST === TRUE){ } SC_END -SC_BEGIN CONTENT_CAT_LIST_TABLE_ICON -global $aa, $row, $content_pref, $content_cat_icon_path_large; -if(isset($content_pref["content_cat_icon"]) && $content_pref["content_cat_icon"]){ - return $aa -> getIcon("catlarge", $row['content_icon'], $content_cat_icon_path_large, "", "", $content_pref["content_blank_caticon"]); -} -SC_END - -SC_BEGIN CONTENT_CAT_LIST_TABLE_HEADING -global $tp, $row; -return "".$tp -> toHTML($row['content_heading'], TRUE, "").""; -SC_END - -SC_BEGIN CONTENT_CAT_LIST_TABLE_SUMMARY -global $tp, $row; -return ($row['content_summary'] ? $tp -> toHTML($row['content_summary'], TRUE, "") : ""); -SC_END - -SC_BEGIN CONTENT_CAT_LIST_TABLE_TEXT -global $tp, $row, $content_pref; -if($row['content_text'] && isset($content_pref["content_cat_text"]) && $content_pref["content_cat_text"] && ($content_pref["content_cat_text_char"] > 0 || $content_pref["content_cat_text_char"] == 'all')){ - if($content_pref["content_cat_text_char"] == 'all'){ - $CONTENT_CAT_LIST_TABLE_TEXT = $tp->toHTML($row['content_text'], TRUE, "constants"); - }else{ - $rowtext = preg_replace("/\[newpage.*?]/si", " ", $row['content_text']); - $rowtext = $tp->toHTML($rowtext, TRUE, "nobreak, constants"); - $rowtext = strip_tags($rowtext); - $words = explode(" ", $rowtext); - $CONTENT_CAT_LIST_TABLE_TEXT = implode(" ", array_slice($words, 0, $content_pref["content_cat_text_char"])); - if($content_pref["content_cat_text_link"]){ - $CONTENT_CAT_LIST_TABLE_TEXT .= " ".$content_pref["content_cat_text_post"].""; - }else{ - $CONTENT_CAT_LIST_TABLE_TEXT .= " ".$content_pref["content_cat_text_post"]; - } - } - return $CONTENT_CAT_LIST_TABLE_TEXT; -} -SC_END - -SC_BEGIN CONTENT_CAT_LIST_TABLE_AMOUNT -global $row, $content_pref, $totalparent; -if(isset($content_pref["content_cat_amount"]) && $content_pref["content_cat_amount"]){ - return $totalparent." ".($totalparent == "1" ? CONTENT_LAN_53 : CONTENT_LAN_54); -} -SC_END - -SC_BEGIN CONTENT_CAT_LIST_TABLE_SUBHEADING -global $tp, $row, $content_pref; -if(isset($content_pref["content_cat_subheading"]) && $content_pref["content_cat_subheading"]){ - return ($row['content_subheading'] ? $tp -> toHTML($row['content_subheading'], TRUE, "") : ""); -} -SC_END - -SC_BEGIN CONTENT_CAT_LIST_TABLE_DATE -global $row, $gen, $content_pref; -if(isset($content_pref["content_cat_date"]) && $content_pref["content_cat_date"]){ - if(!is_object($gen)){ $gen = new convert; } - $datestamp = preg_replace("# -.*#", "", $gen -> convert_date($row['content_datestamp'], "long")); - return ($datestamp != "" ? $datestamp : ""); -} -SC_END - -SC_BEGIN CONTENT_CAT_LIST_TABLE_AUTHORDETAILS -global $CONTENT_CAT_LIST_TABLE_AUTHORDETAILS; -return $CONTENT_CAT_LIST_TABLE_AUTHORDETAILS; -SC_END - -SC_BEGIN CONTENT_CAT_LIST_TABLE_EPICONS -global $row, $tp, $qs, $content_pref; -$EPICONS = ""; -if( (isset($content_pref["content_cat_peicon"]) && $content_pref["content_cat_peicon"] && $row['content_pe']) || (isset($content_pref["content_cat_peicon_all"]) && $content_pref["content_cat_peicon_all"])){ - $EPICONS = $tp -> parseTemplate("{EMAIL_ITEM=".CONTENT_LAN_69." ".CONTENT_LAN_72."^plugin:content.$qs[1]}"); - $EPICONS .= " ".$tp -> parseTemplate("{PRINT_ITEM=".CONTENT_LAN_70." ".CONTENT_LAN_72."^plugin:content.$qs[1]}"); - $EPICONS .= " ".$tp -> parseTemplate("{PDF=".CONTENT_LAN_76." ".CONTENT_LAN_71."^plugin:content.$qs[1]}"); - return $EPICONS; -} -SC_END - -SC_BEGIN CONTENT_CAT_LIST_TABLE_COMMENT -global $qs, $row, $comment_total, $content_pref, $sql, $plugintable; -if($row['content_comment'] && isset($content_pref["content_cat_comment"]) && $content_pref["content_cat_comment"]){ - $comment_total = $sql -> db_Count("comments", "(*)", "WHERE comment_item_id='".intval($qs[1])."' AND comment_type='".$plugintable."' AND comment_pid='0' "); - return "".CONTENT_LAN_57." ".$comment_total.""; -} -SC_END - -SC_BEGIN CONTENT_CAT_LIST_TABLE_RATING -global $row, $rater, $content_pref, $plugintable; -if( (isset($content_pref["content_cat_rating_all"]) && $content_pref["content_cat_rating_all"]) || (isset($content_pref["content_cat_rating"]) && $content_pref["content_cat_rating"] && $row['content_rate'])){ - return $rater->composerating($plugintable, $row['content_id'], $enter=TRUE, $userid=FALSE); -} -SC_END - -// CONTENT_CAT_LISTSUB ------------------------------------------------ -SC_BEGIN CONTENT_CAT_LISTSUB_TABLE_ICON -global $aa, $row, $content_pref, $content_cat_icon_path_small; -if(isset($content_pref["content_catsub_icon"]) && $content_pref["content_catsub_icon"]){ - return $aa -> getIcon("catsmall", $row['content_icon'], $content_cat_icon_path_small, "cat.".$row['content_id'], "", $content_pref["content_blank_caticon"]); -} -SC_END - -SC_BEGIN CONTENT_CAT_LISTSUB_TABLE_HEADING -global $tp, $row; -return "".$tp -> toHTML($row['content_heading'], TRUE, "").""; -SC_END - -SC_BEGIN CONTENT_CAT_LISTSUB_TABLE_AMOUNT -global $row, $content_pref, $totalsubcat; -if(isset($content_pref["content_catsub_amount"]) && $content_pref["content_catsub_amount"]){ - return $totalsubcat." ".($totalsubcat == "1" ? CONTENT_LAN_53 : CONTENT_LAN_54); -} -SC_END - -SC_BEGIN CONTENT_CAT_LISTSUB_TABLE_SUBHEADING -global $row, $tp, $content_pref; -if(isset($content_pref["content_catsub_subheading"]) && $content_pref["content_catsub_subheading"]){ - return ($row['content_subheading'] ? $tp -> toHTML($row['content_subheading'], TRUE, "") : ""); -} -SC_END - -// CONTENT_SEARCH_TABLE ------------------------------------------------ -SC_BEGIN CONTENT_SEARCH_TABLE_SELECT -global $CONTENT_SEARCH_TABLE_SELECT; -return $CONTENT_SEARCH_TABLE_SELECT; -SC_END - -SC_BEGIN CONTENT_SEARCH_TABLE_ORDER -global $CONTENT_SEARCH_TABLE_ORDER; -return $CONTENT_SEARCH_TABLE_ORDER; -SC_END - -SC_BEGIN CONTENT_SEARCH_TABLE_KEYWORD -global $CONTENT_SEARCH_TABLE_KEYWORD; -return $CONTENT_SEARCH_TABLE_KEYWORD; -SC_END - -// CONTENT_SEARCHRESULT_TABLE ------------------------------------------------ -SC_BEGIN CONTENT_SEARCHRESULT_TABLE_ICON -global $aa, $row, $content_icon_path, $content_pref; -$width = (isset($content_pref["content_upload_icon_size"]) && $content_pref["content_upload_icon_size"] ? $content_pref["content_upload_icon_size"] : "100"); -return $aa -> getIcon("item", $row['content_icon'], $content_icon_path, "content.".$row['content_id'], $width, $content_pref["content_blank_icon"]); -SC_END - -SC_BEGIN CONTENT_SEARCHRESULT_TABLE_HEADING -global $row, $tp; -return ($row['content_heading'] ? "".$tp -> toHTML($row['content_heading'], TRUE, "")."" : ""); -SC_END - -SC_BEGIN CONTENT_SEARCHRESULT_TABLE_SUBHEADING -global $row, $tp; -return ($row['content_subheading'] ? $tp -> toHTML($row['content_subheading'], TRUE, "") : ""); -SC_END - -SC_BEGIN CONTENT_SEARCHRESULT_TABLE_AUTHORDETAILS -global $aa, $row; -$authordetails = $aa -> getAuthor($row['content_author']); -$CONTENT_SEARCHRESULT_TABLE_AUTHORDETAILS = $authordetails[1]; -if(USER){ - if(is_numeric($authordetails[3])){ - $CONTENT_SEARCHRESULT_TABLE_AUTHORDETAILS .= " ".CONTENT_ICON_USER.""; - }else{ - $CONTENT_SEARCHRESULT_TABLE_AUTHORDETAILS .= " ".CONTENT_ICON_USER; - } -}else{ - $CONTENT_SEARCHRESULT_TABLE_AUTHORDETAILS .= " ".CONTENT_ICON_USER; -} -$CONTENT_SEARCHRESULT_TABLE_AUTHORDETAILS .= " ".CONTENT_ICON_AUTHORLIST.""; -return $CONTENT_SEARCHRESULT_TABLE_AUTHORDETAILS; -SC_END - -SC_BEGIN CONTENT_SEARCHRESULT_TABLE_DATE -global $gen, $row; -$datestamp = preg_replace("# -.*#", "", $gen -> convert_date($row['content_datestamp'], "short")); -return $datestamp; -SC_END - -SC_BEGIN CONTENT_SEARCHRESULT_TABLE_TEXT -global $row, $tp; -return ($row['content_text'] ? $tp -> toHTML($row['content_text'], TRUE, "") : ""); -SC_END - -// CONTENT_RECENT_TABLE ------------------------------------------------ -SC_BEGIN CONTENT_RECENT_TABLE_INFOPRE -global $CONTENT_RECENT_TABLE_INFOPRE; -if($CONTENT_RECENT_TABLE_INFOPRE === TRUE){ - $CONTENT_RECENT_TABLE_INFOPRE = " "; - return $CONTENT_RECENT_TABLE_INFOPRE; -} -SC_END -SC_BEGIN CONTENT_RECENT_TABLE_INFOPOST -global $CONTENT_RECENT_TABLE_INFOPOST; -if($CONTENT_RECENT_TABLE_INFOPOST === TRUE){ - $CONTENT_RECENT_TABLE_INFOPOST = " "; - return $CONTENT_RECENT_TABLE_INFOPOST; -} -SC_END - -SC_BEGIN CONTENT_RECENT_TABLE_ICON -global $aa, $row, $content_icon_path, $content_pref; -if(isset($content_pref["content_list_icon"]) && $content_pref["content_list_icon"]){ - $width = (isset($content_pref["content_upload_icon_size"]) && $content_pref["content_upload_icon_size"] ? $content_pref["content_upload_icon_size"] : "100"); - return $aa -> getIcon("item", $row['content_icon'], $content_icon_path, "content.".$row['content_id'], $width, $content_pref["content_blank_icon"]); -} -SC_END - -SC_BEGIN CONTENT_RECENT_TABLE_HEADING -global $row, $tp; -return ($row['content_heading'] ? "".$tp->toHTML($row['content_heading'], TRUE, "")."" : ""); -SC_END - -SC_BEGIN CONTENT_RECENT_TABLE_SUBHEADING -global $tp, $content_pref, $qs, $row; -if (isset($content_pref["content_list_subheading"]) && $content_pref["content_list_subheading"] && $row['content_subheading'] && $content_pref["content_list_subheading_char"] && $content_pref["content_list_subheading_char"] != "" && $content_pref["content_list_subheading_char"] != "0"){ - if(strlen($row['content_subheading']) > $content_pref["content_list_subheading_char"]) { - $row['content_subheading'] = substr($row['content_subheading'], 0, $content_pref["content_list_subheading_char"]).$content_pref["content_list_subheading_post"]; - } - $CONTENT_RECENT_TABLE_SUBHEADING = ($row['content_subheading'] != "" && $row['content_subheading'] != " " ? $row['content_subheading'] : ""); -}else{ - $CONTENT_RECENT_TABLE_SUBHEADING = ($row['content_subheading'] ? $row['content_subheading'] : ""); -} -return $tp->toHTML($CONTENT_RECENT_TABLE_SUBHEADING, TRUE, ""); -SC_END - -SC_BEGIN CONTENT_RECENT_TABLE_SUMMARY -global $content_pref, $tp, $row; -if (isset($content_pref["content_list_summary"]) && $content_pref["content_list_summary"]){ - if($row['content_summary'] && $content_pref["content_list_summary_char"] && $content_pref["content_list_summary_char"] != "" && $content_pref["content_list_summary_char"] != "0"){ - if(strlen($row['content_summary']) > $content_pref["content_list_summary_char"]) { - $row['content_summary'] = substr($row['content_summary'], 0, $content_pref["content_list_summary_char"]).$content_pref["content_list_summary_post"]; - } - $CONTENT_RECENT_TABLE_SUMMARY = ($row['content_summary'] != "" && $row['content_summary'] != " " ? $row['content_summary'] : ""); - }else{ - $CONTENT_RECENT_TABLE_SUMMARY = ($row['content_summary'] ? $row['content_summary'] : ""); - } - return $tp->toHTML($CONTENT_RECENT_TABLE_SUMMARY, TRUE, ""); -} -SC_END - -SC_BEGIN CONTENT_RECENT_TABLE_TEXT -global $content_pref, $row, $tp; -if(isset($content_pref["content_list_text"]) && $content_pref["content_list_text"] && $content_pref["content_list_text_char"] > 0){ - $rowtext = preg_replace("/\[newpage.*?]/si", " ", $row['content_text']); - $rowtext = $tp->toHTML($rowtext, TRUE, "nobreak"); - $rowtext = strip_tags($rowtext); - $words = explode(" ", $rowtext); - $CONTENT_RECENT_TABLE_TEXT = implode(" ", array_slice($words, 0, $content_pref["content_list_text_char"])); - if($CONTENT_RECENT_TABLE_TEXT){ - if($content_pref["content_list_text_link"]){ - $CONTENT_RECENT_TABLE_TEXT .= " ".$content_pref["content_list_text_post"].""; - }else{ - $CONTENT_RECENT_TABLE_TEXT .= " ".$content_pref["content_list_text_post"]; - } - } -} -return $CONTENT_RECENT_TABLE_TEXT; -SC_END - -SC_BEGIN CONTENT_RECENT_TABLE_DATE -global $content_pref, $row; -if(isset($content_pref["content_list_date"]) && $content_pref["content_list_date"]){ - $datestyle = ($content_pref["content_list_datestyle"] ? $content_pref["content_list_datestyle"] : "%d %b %Y"); - return strftime($datestyle, $row['content_datestamp']); -} -SC_END - -SC_BEGIN CONTENT_RECENT_TABLE_EPICONS -global $tp, $content_pref, $row; -$CONTENT_RECENT_TABLE_EPICONS = ""; -if(isset($content_pref["content_list_peicon"]) && $content_pref["content_list_peicon"]){ - if($row['content_pe'] || isset($content_pref["content_list_peicon_all"]) && $content_pref["content_list_peicon_all"]){ - $CONTENT_RECENT_TABLE_EPICONS = $tp -> parseTemplate("{EMAIL_ITEM=".CONTENT_LAN_69." ".CONTENT_LAN_71."^plugin:content.".$row['content_id']."}"); - $CONTENT_RECENT_TABLE_EPICONS .= " ".$tp -> parseTemplate("{PRINT_ITEM=".CONTENT_LAN_70." ".CONTENT_LAN_71."^plugin:content.".$row['content_id']."}"); - $CONTENT_RECENT_TABLE_EPICONS .= " ".$tp -> parseTemplate("{PDF=".CONTENT_LAN_76." ".CONTENT_LAN_71."^plugin:content.".$row['content_id']."}"); - } -} -return $CONTENT_RECENT_TABLE_EPICONS; -SC_END - -SC_BEGIN CONTENT_RECENT_TABLE_AUTHORDETAILS -global $CONTENT_RECENT_TABLE_AUTHORDETAILS; -return $CONTENT_RECENT_TABLE_AUTHORDETAILS; -SC_END - -SC_BEGIN CONTENT_RECENT_TABLE_EDITICON -global $content_pref, $row, $plugindir; -if(ADMIN && getperms("P") && isset($content_pref["content_list_editicon"]) && $content_pref["content_list_editicon"]){ - return $CONTENT_RECENT_TABLE_EDITICON = "".CONTENT_ICON_EDIT.""; -} -SC_END - -SC_BEGIN CONTENT_RECENT_TABLE_REFER -global $content_pref, $row; -if($content_pref["content_log"] && $content_pref["content_list_refer"]){ - $refercounttmp = explode("^", $row['content_refer']); - $CONTENT_RECENT_TABLE_REFER = ($refercounttmp[0] ? $refercounttmp[0] : "0"); - if($CONTENT_RECENT_TABLE_REFER > 0){ - return $CONTENT_RECENT_TABLE_REFER; - } -} -SC_END - -SC_BEGIN CONTENT_RECENT_TABLE_RATING -global $rater, $row, $content_pref, $plugintable; -if($content_pref["content_list_rating"]){ - if($content_pref["content_list_rating_all"] || $row['content_rate']){ - return $rater->composerating($plugintable, $row['content_id'], $enter=FALSE, $userid=FALSE); - } -} -SC_END - -SC_BEGIN CONTENT_RECENT_TABLE_PARENT -global $content_pref, $row, $array, $aa; -if(isset($content_pref["content_list_parent"]) && $content_pref["content_list_parent"]){ - return $aa -> getCrumbItem($row['content_parent'], $array); -} -SC_END - -// CONTENT_ARCHIVE_TABLE ------------------------------------------------ -SC_BEGIN CONTENT_ARCHIVE_TABLE_LETTERS -global $content_pref; -if($content_pref["content_archive_letterindex"]){ - return $CONTENT_ARCHIVE_TABLE_LETTERS; -} -SC_END - -SC_BEGIN CONTENT_ARCHIVE_TABLE_HEADING -global $row; -return "".$row['content_heading'].""; -SC_END - -SC_BEGIN CONTENT_ARCHIVE_TABLE_DATE -global $row, $content_pref; -if(isset($content_pref["content_archive_date"]) && $content_pref["content_archive_date"]){ - $datestyle = ($content_pref["content_archive_datestyle"] ? $content_pref["content_archive_datestyle"] : "%d %b %Y"); - return strftime($datestyle, $row['content_datestamp']); -} -SC_END - -SC_BEGIN CONTENT_ARCHIVE_TABLE_AUTHOR -global $CONTENT_ARCHIVE_TABLE_AUTHOR; -return $CONTENT_ARCHIVE_TABLE_AUTHOR; -SC_END - // CONTENT_CONTENT_TABLE ------------------------------------------------ SC_BEGIN CONTENT_CONTENT_TABLE_INFO_PRE global $CONTENT_CONTENT_TABLE_INFO_PRE; @@ -699,177 +845,6 @@ if($CONTENT_CONTENT_TABLE_INFO_POST_HEADDATA === TRUE){ } SC_END -SC_BEGIN CONTENT_CONTENT_TABLE_PARENT -global $aa, $array, $row, $content_pref; -if(isset($content_pref["content_content_parent"]) && $content_pref["content_content_parent"]){ - return $aa -> getCrumbItem($row['content_parent'], $array); -} -SC_END - -SC_BEGIN CONTENT_CONTENT_TABLE_ICON -global $row, $aa, $content_pref, $content_icon_path; -if(isset($content_pref["content_content_icon"]) && $content_pref["content_content_icon"]){ - $width = (isset($content_pref["content_upload_icon_size"]) && $content_pref["content_upload_icon_size"] ? $content_pref["content_upload_icon_size"] : "100"); - return $aa -> getIcon("item", $row['content_icon'], $content_icon_path, "", $width, $content_pref["content_blank_icon"]); -} -SC_END - -SC_BEGIN CONTENT_CONTENT_TABLE_HEADING -global $row, $tp; -return ($row['content_heading'] ? $tp -> toHTML($row['content_heading'], TRUE, "") : ""); -SC_END - -SC_BEGIN CONTENT_CONTENT_TABLE_REFER -global $sql, $qs, $content_pref, $plugintable; -if(isset($content_pref["content_content_refer"]) && $content_pref["content_content_refer"]){ - $sql -> db_Select($plugintable, "content_refer", "content_id='".intval($qs[1])."' "); - list($content_refer) = $sql -> db_Fetch(); - $refercounttmp = explode("^", $content_refer); - return ($refercounttmp[0] ? $refercounttmp[0] : ""); -} -SC_END - -SC_BEGIN CONTENT_CONTENT_TABLE_SUBHEADING -global $row, $tp, $content_pref; -return ($content_pref["content_content_subheading"] && $row['content_subheading'] ? $tp -> toHTML($row['content_subheading'], TRUE, "") : ""); -SC_END - -SC_BEGIN CONTENT_CONTENT_TABLE_COMMENT -global $cobj, $qs, $content_pref, $row, $plugintable; -if((isset($content_pref["content_content_comment"]) && $content_pref["content_content_comment"] && $row['content_comment']) || $content_pref["content_content_comment_all"] ){ - return $cobj -> count_comments($plugintable, $qs[1]); -} -SC_END - -SC_BEGIN CONTENT_CONTENT_TABLE_DATE -global $gen, $row, $content_pref; -if(isset($content_pref["content_content_date"]) && $content_pref["content_content_date"]){ - $gen = new convert; - $datestamp = preg_replace("# -.*#", "", $gen -> convert_date($row['content_datestamp'], "long")); - $CONTENT_CONTENT_TABLE_DATE = ($datestamp != "" ? $datestamp : ""); - return $CONTENT_CONTENT_TABLE_DATE; -} -SC_END - -SC_BEGIN CONTENT_CONTENT_TABLE_AUTHORDETAILS -global $CONTENT_CONTENT_TABLE_AUTHORDETAILS; -return $CONTENT_CONTENT_TABLE_AUTHORDETAILS; -SC_END - -SC_BEGIN CONTENT_CONTENT_TABLE_EPICONS -global $content_pref, $row, $tp; -$CONTENT_CONTENT_TABLE_EPICONS = ""; -if(($content_pref["content_content_peicon"] && $row['content_pe']) || $content_pref["content_content_peicon_all"]){ - $CONTENT_CONTENT_TABLE_EPICONS = $tp -> parseTemplate("{EMAIL_ITEM=".CONTENT_LAN_69." ".CONTENT_LAN_71."^plugin:content.".$row['content_id']."}"); - $CONTENT_CONTENT_TABLE_EPICONS .= " ".$tp -> parseTemplate("{PRINT_ITEM=".CONTENT_LAN_70." ".CONTENT_LAN_71."^plugin:content.".$row['content_id']."}"); - $CONTENT_CONTENT_TABLE_EPICONS .= " ".$tp -> parseTemplate("{PDF=".CONTENT_LAN_76." ".CONTENT_LAN_71."^plugin:content.".$row['content_id']."}"); - return $CONTENT_CONTENT_TABLE_EPICONS; -} -SC_END - -SC_BEGIN CONTENT_CONTENT_TABLE_EDITICON -global $content_pref, $row, $plugindir; -if(ADMIN && getperms("P") && isset($content_pref["content_content_editicon"])){ - return "".CONTENT_ICON_EDIT.""; -} -SC_END - -SC_BEGIN CONTENT_CONTENT_TABLE_RATING -global $content_pref, $row, $rater, $plugintable; -if(($content_pref["content_content_rating"] && $row['content_rate']) || $content_pref["content_content_rating_all"] ){ - return $rater->composerating($plugintable, $row['content_id'], $enter=TRUE, $userid=FALSE); -} -SC_END - -SC_BEGIN CONTENT_CONTENT_TABLE_FILE -global $row, $content_file_path, $content_pref; -if($content_pref["content_content_attach"]){ - $filestmp = explode("[file]", $row['content_file']); - foreach($filestmp as $key => $value) { - if($value == "") { - unset($filestmp[$key]); - } - } - $files = array_values($filestmp); - $content_files_popup_name = str_replace("'", "", $row['content_heading']); - $file = ""; - $filesexisting = "0"; - for($i=0;$i".CONTENT_ICON_FILE." "; - }else{ - $file .= " "; - } - } - return ($filesexisting == "0" ? "" : CONTENT_LAN_41." ".($filesexisting == 1 ? CONTENT_LAN_42 : CONTENT_LAN_43)." ".$file." "); -} -SC_END - -SC_BEGIN CONTENT_CONTENT_TABLE_SCORE -global $row; -$score = $row['content_score']; -if($score){ - $height = "height:8px;"; - $img = ""; - $img .= ""; - $img .= ""; - $img .= ""; - if($score < 100){ - $empty = 100-$score; - $img .= ""; - } - $img .= ""; - return $img." ".$score; -} -SC_END - -SC_BEGIN CONTENT_CONTENT_TABLE_SUMMARY -global $CONTENT_CONTENT_TABLE_SUMMARY; -return $CONTENT_CONTENT_TABLE_SUMMARY; -SC_END - -SC_BEGIN CONTENT_CONTENT_TABLE_TEXT -global $CONTENT_CONTENT_TABLE_TEXT; -return $CONTENT_CONTENT_TABLE_TEXT; -SC_END - -SC_BEGIN CONTENT_CONTENT_TABLE_IMAGES -global $row, $content_image_path, $aa, $tp, $authordetails, $content_pref; -if($content_pref["content_content_images"]){ - $authordetails = $aa -> getAuthor($row['content_author']); - $imagestmp = explode("[img]", $row['content_image']); - foreach($imagestmp as $key => $value) { - if($value == "") { - unset($imagestmp[$key]); - } - } - $images = array_values($imagestmp); - $content_image_popup_name = $row['content_heading']; - $CONTENT_CONTENT_TABLE_IMAGES = ""; - require_once(e_HANDLER."popup_handler.php"); - $pp = new popup; - $gen = new convert; - $datestamp = preg_replace("# -.*#", "", $gen -> convert_date($row['content_datestamp'], "long")); - for($i=0;$i toHTML($row['content_subheading'], TRUE); - $popupname = $tp -> toHTML($content_image_popup_name, TRUE); - $author = $tp -> toHTML($authordetails[1], TRUE); - $oTitle = $popupname." ".($i+1); - $oText = $popupname." ".($i+1)."
".$subheading."
".$author." (".$datestamp.")"; - $CONTENT_CONTENT_TABLE_IMAGES .= $pp -> popup($oSrc, $oSrcThumb, $oIconWidth, $oMaxWidth, $oTitle, $oText); - } - return $CONTENT_CONTENT_TABLE_IMAGES; -} -SC_END - SC_BEGIN CONTENT_CONTENT_TABLE_CUSTOM_TAGS global $CONTENT_CONTENT_TABLE_CUSTOM_TAGS; return $CONTENT_CONTENT_TABLE_CUSTOM_TAGS; @@ -890,87 +865,251 @@ global $CONTENT_CONTENT_TABLE_PREV_PAGE; return $CONTENT_CONTENT_TABLE_PREV_PAGE; SC_END +// CONTENT_SEARCH_TABLE ------------------------------------------------ +SC_BEGIN CONTENT_SEARCH_TABLE_SELECT +global $CONTENT_SEARCH_TABLE_SELECT; +return $CONTENT_SEARCH_TABLE_SELECT; +SC_END +SC_BEGIN CONTENT_SEARCH_TABLE_ORDER +global $CONTENT_SEARCH_TABLE_ORDER; +return $CONTENT_SEARCH_TABLE_ORDER; +SC_END - -// PRINT PAGE ------------------------------------------------ - -//content images (from uploaded area) used in the print page -SC_BEGIN CONTENT_PRINT_IMAGES -global $row, $content_image_path, $tp, $content_pref; -if($content_pref["content_content_images"]){ - $imagestmp = explode("[img]", $row['content_image']); - foreach($imagestmp as $key => $value) { - if($value == "") { - unset($imagestmp[$key]); - } - } - $images = array_values($imagestmp); - $CONTENT_PRINT_IMAGES = ""; - for($i=0;$i

"; - } - } - return $CONTENT_PRINT_IMAGES; -} +SC_BEGIN CONTENT_SEARCH_TABLE_KEYWORD +global $CONTENT_SEARCH_TABLE_KEYWORD; +return $CONTENT_SEARCH_TABLE_KEYWORD; SC_END -// PDF PAGE ------------------------------------------------ +// ############################################################################ +// ##### SHORTCODES USED IN THE MENU ------------------------------------------ +// ############################################################################ -//content images (from uploaded area) used in the pdf creation -SC_BEGIN CONTENT_PDF_IMAGES -global $row, $content_image_path, $tp, $content_pref; -if($content_pref["content_content_images"]){ - $imagestmp = explode("[img]", $row['content_image']); - foreach($imagestmp as $key => $value) { - if($value == "") { - unset($imagestmp[$key]); - } - } - $images = array_values($imagestmp); - $CONTENT_PDF_IMAGES = ""; - for($i=0;$i"; - } - } - return $CONTENT_PDF_IMAGES; +SC_BEGIN CM_MENU_SEARCH +global $content_pref, $aa, $menutypeid; +if($content_pref["content_menu_search"]){ + return $aa -> showOptionsSearch("menu", $menutypeid); } SC_END +SC_BEGIN CM_MENU_SELECT +global $content_pref, $aa, $menutypeid; +if( ($content_pref["content_menu_links"] && $content_pref["content_menu_links_dropdown"]) || ($content_pref["content_menu_cat"] && $content_pref["content_menu_cat_dropdown"]) ){ + return $aa -> showOptionsSelect("menu", $menutypeid); +} +SC_END -//##### ADMIN PAGE -------------------------------------------------- +SC_BEGIN CM_MENU_ORDER +global $content_pref, $aa, $menutypeid; +if($content_pref["content_menu_sort"]){ + return $aa -> showOptionsOrder("menu", $menutypeid); +} +SC_END + +//##### LINKS -------------------------------------------------- + +SC_BEGIN CM_MENU_LINKCAPTION +global $content_pref; +if($content_pref["content_menu_links"] && !$content_pref["content_menu_links_dropdown"]){ + return ($content_pref["content_menu_links_caption"] != "" ? $content_pref["content_menu_links_caption"] : CONTENT_MENU_LAN_4)."
"; +} +SC_END + +SC_BEGIN CM_MENU_LINKS_ICON +global $content_pref, $bullet; + //define icon + if($content_pref["content_menu_links_icon"] == "0"){ $ret = ""; + }elseif($content_pref["content_menu_links_icon"] == "1"){ $ret = $bullet; + }elseif($content_pref["content_menu_links_icon"] == "2"){ $ret = "·"; + }elseif($content_pref["content_menu_links_icon"] == "3"){ $ret = "º"; + }elseif($content_pref["content_menu_links_icon"] == "4"){ $ret = "»"; + } + return $ret; +SC_END + +SC_BEGIN CM_MENU_LINKS_VIEWALLCAT +global $content_pref, $plugindir, $menutypeid, $icon; +if($content_pref["content_menu_links"] && !$content_pref["content_menu_links_dropdown"]){ + if($content_pref["content_menu_viewallcat"]){ + return $icon." ".CONTENT_LAN_6.""; + } +} +SC_END + +SC_BEGIN CM_MENU_LINKS_VIEWALLAUTHOR +global $content_pref, $plugindir, $menutypeid, $icon; +if($content_pref["content_menu_links"] && !$content_pref["content_menu_links_dropdown"]){ + if($content_pref["content_menu_viewallauthor"]){ + return $icon." ".CONTENT_LAN_7.""; + } +} +SC_END + +SC_BEGIN CM_MENU_LINKS_VIEWALLITEM +global $content_pref, $plugindir, $menutypeid, $icon; +if($content_pref["content_menu_links"] && !$content_pref["content_menu_links_dropdown"]){ + if($content_pref["content_menu_viewallitems"]){ + return $icon." ".CONTENT_LAN_83.""; + } +} +SC_END + +SC_BEGIN CM_MENU_LINKS_VIEWTOPRATED +global $content_pref, $plugindir, $menutypeid, $icon; +if($content_pref["content_menu_links"] && !$content_pref["content_menu_links_dropdown"]){ + if($content_pref["content_menu_viewtoprated"]){ + return $icon." ".CONTENT_LAN_8.""; + } +} +SC_END + +SC_BEGIN CM_MENU_LINKS_VIEWTOPSCORE +global $content_pref, $plugindir, $menutypeid, $icon; +if($content_pref["content_menu_links"] && !$content_pref["content_menu_links_dropdown"]){ + if($content_pref["content_menu_viewtopscore"]){ + return $icon." ".CONTENT_LAN_12.""; + } +} +SC_END + +SC_BEGIN CM_MENU_LINKS_VIEWRECENT +global $content_pref, $plugindir, $menutypeid, $icon; +if($content_pref["content_menu_links"] && !$content_pref["content_menu_links_dropdown"]){ + if($content_pref["content_menu_viewrecent"]){ + return $icon." ".CONTENT_LAN_61.""; + } +} +SC_END + +SC_BEGIN CM_MENU_LINKS_VIEWSUBMIT +global $content_pref, $plugindir, $menutypeid, $icon; +if($content_pref["content_menu_links"] && !$content_pref["content_menu_links_dropdown"]){ + if( $content_pref["content_menu_viewsubmit"] && $content_pref["content_submit"] && check_class($content_pref["content_submit_class"]) ){ + return $icon." ".CONTENT_LAN_75.""; + } +} +SC_END + +//##### CATEGORY LIST -------------------------------------------------- + +SC_BEGIN CM_MENU_CATEGORY_CAPTION +global $content_pref; +return ($content_pref["content_menu_cat_caption"] != "" ? $content_pref["content_menu_cat_caption"] : CONTENT_MENU_LAN_3); +SC_END + +SC_BEGIN CM_MENU_CATEGORY_ICON +global $content_pref, $row, $content_cat_icon_path_small, $bullet; + $ret = ""; + if($content_pref["content_menu_cat_icon"] == "0"){ $ret = ""; + }elseif($content_pref["content_menu_cat_icon"] == "1"){ $ret = $bullet; + }elseif($content_pref["content_menu_cat_icon"] == "2"){ $ret = "·"; + }elseif($content_pref["content_menu_cat_icon"] == "3"){ $ret = "º"; + }elseif($content_pref["content_menu_cat_icon"] == "4"){ $ret = "»"; + }elseif($content_pref["content_menu_cat_icon"] == "5"){ + if($row['content_icon'] != "" && is_readable($content_cat_icon_path_small.$row['content_icon']) ){ + $ret = ""; + }else{ + //default category icon + if($content_pref["content_menu_cat_icon_default"] == "0"){ $ret = ""; + }elseif($content_pref["content_menu_cat_icon_default"] == "1"){ $ret = $bullet; + }elseif($content_pref["content_menu_cat_icon_default"] == "2"){ $ret = "·"; + }elseif($content_pref["content_menu_cat_icon_default"] == "3"){ $ret = "º"; + }elseif($content_pref["content_menu_cat_icon_default"] == "4"){ $ret = "»"; + } + } + } + return $ret; +SC_END + +SC_BEGIN CM_MENU_CATEGORY_HEADING +global $row; +return "".$row['content_heading'].""; +SC_END + +SC_BEGIN CM_MENU_CATEGORY_COUNT +global $row, $aa; +return $aa -> countCatItems($row['content_id']); +SC_END + +//##### RECENT -------------------------------------------------- + +SC_BEGIN CM_MENU_RECENT_CAPTION +global $content_pref; +return ($content_pref["content_menu_recent_caption"] != "" ? $content_pref["content_menu_recent_caption"] : CONTENT_MENU_LAN_2); +SC_END + +SC_BEGIN CM_MENU_RECENT_ICON +global $content_pref, $row, $content_icon_path; + if($content_pref["content_menu_recent_icon"] == "0"){ $ret = ""; + }elseif($content_pref["content_menu_recent_icon"] == "1"){ $ret = $bullet; + }elseif($content_pref["content_menu_recent_icon"] == "2"){ $ret = "·"; + }elseif($content_pref["content_menu_recent_icon"] == "3"){ $ret = "º"; + }elseif($content_pref["content_menu_recent_icon"] == "4"){ $ret = "»"; + }elseif($content_pref["content_menu_recent_icon"] == "5"){ + + if($content_pref["content_menu_recent_icon_width"]){ + $recenticonwidth = " width:".$content_pref["content_menu_recent_icon_width"]."px; "; + }else{ + $recenticonwidth = " width:50px; "; + } + if($row['content_icon'] != "" && is_readable($content_icon_path.$row['content_icon'])){ + $ret = ""; + } + } + return "".$ret.""; +SC_END + +SC_BEGIN CM_MENU_RECENT_DATE +global $content_pref, $row; + if($content_pref["content_menu_recent_date"]){ + $datestyle = ($content_pref["content_archive_datestyle"] ? $content_pref["content_archive_datestyle"] : "%d %b %Y"); + return strftime($datestyle, $row['content_datestamp']); + } +SC_END + +SC_BEGIN CM_MENU_RECENT_AUTHOR +global $content_pref, $row, $aa; + if($content_pref["content_menu_recent_author"]){ + $authordetails = $aa -> getAuthor($row['content_author']); + return $authordetails[1]; + } +SC_END + +SC_BEGIN CM_MENU_RECENT_SUBHEADING +global $content_pref, $row; + if($content_pref["content_menu_recent_subheading"] && $row['content_subheading']){ + if($content_pref["content_menu_recent_subheading_char"] && $content_pref["content_menu_recent_subheading_char"] != "" && $content_pref["content_menu_recent_subheading_char"] != "0"){ + if(strlen($row['content_subheading']) > $content_pref["content_menu_recent_subheading_char"]) { + $row['content_subheading'] = substr($row['content_subheading'], 0, $content_pref["content_menu_recent_subheading_char"]).$content_pref["content_menu_recent_subheading_post"]; + } + } + return $row['content_subheading']; + } +SC_END + +SC_BEGIN CM_MENU_RECENT_HEADING +global $row; +return "".$row['content_heading'].""; +SC_END + +SC_BEGIN CMT_CATEGORY +global $CMT_CATEGORY; +return $CMT_CATEGORY; +SC_END + +SC_BEGIN CMT_RECENT +global $CMT_RECENT; +return $CMT_RECENT; +SC_END + + + +// ############################################################################ +// ##### SHORTCODES USED IN THE ADMIN PAGES ----------------------------------- +// ############################################################################ SC_BEGIN CONTENT_ID global $row; @@ -1641,5 +1780,441 @@ global $CONTENTFORM_PRESET_VALUE; return $CONTENTFORM_PRESET_VALUE; SC_END + + +// ############################################################################ +// ##### DEPRECATED SHORTCODES ! WILL BE REMOVED AFTER THE NEXT RELEASE ------- +// ############################################################################ + +SC_BEGIN CONTENT_CONTENTMANAGER_ICONNEW +global $tp; +return $tp -> parseTemplate("{CM_ICON|manager_new}"); +SC_END + +SC_BEGIN CONTENT_CONTENTMANAGER_ICONEDIT +global $tp; +return $tp -> parseTemplate("{CM_ICON|manager_edit}"); +SC_END + +SC_BEGIN CONTENT_CONTENTMANAGER_ICONSUBM +global $tp; +return $tp -> parseTemplate("{CM_ICON|manager_submit}"); +SC_END + +SC_BEGIN CONTENT_TYPE_TABLE_MANAGER_ICON +global $tp; +return $tp -> parseTemplate("{CM_ICON|manager_link}"); +SC_END + +SC_BEGIN CONTENT_TYPE_TABLE_MANAGER_HEADING +global $tp; +return $tp -> parseTemplate("{CM_HEADING|manager_link}"); +SC_END + +SC_BEGIN CONTENT_TYPE_TABLE_TOTAL +global $tp; +return $tp -> parseTemplate("{CM_AMOUNT|type}"); +SC_END + +SC_BEGIN CONTENT_TYPE_TABLE_HEADING +global $tp; +return $tp -> parseTemplate("{CM_HEADING|type}"); +SC_END + +SC_BEGIN CONTENT_TYPE_TABLE_SUBHEADING +global $tp; +return $tp -> parseTemplate("{CM_SUBHEADING|type}"); +SC_END + +SC_BEGIN CONTENT_TYPE_TABLE_ICON +global $tp; +return $tp -> parseTemplate("{CM_ICON|type}"); +SC_END + +SC_BEGIN CONTENT_TOP_TABLE_HEADING +global $tp; +return $tp -> parseTemplate("{CM_HEADING|top}"); +SC_END + +SC_BEGIN CONTENT_TOP_TABLE_ICON +global $tp; +return $tp -> parseTemplate("{CM_ICON|top}"); +SC_END + +SC_BEGIN CONTENT_TOP_TABLE_AUTHOR +global $tp; +return $tp -> parseTemplate("{CM_AUTHOR|top}"); +SC_END + +SC_BEGIN CONTENT_TOP_TABLE_RATING +global $tp; +return $tp -> parseTemplate("{CM_RATING|top}"); +SC_END + +SC_BEGIN CONTENT_SCORE_TABLE_HEADING +global $tp; +return $tp -> parseTemplate("{CM_HEADING|score}"); +SC_END + +SC_BEGIN CONTENT_SCORE_TABLE_ICON +global $tp; +return $tp -> parseTemplate("{CM_ICON|score}"); +SC_END + +SC_BEGIN CONTENT_SCORE_TABLE_AUTHOR +global $tp; +return $tp -> parseTemplate("{CM_AUTHOR|score}"); +SC_END + +SC_BEGIN CONTENT_SCORE_TABLE_SCORE +global $tp; +return $tp -> parseTemplate("{CM_SCORE|score}"); +SC_END + +SC_BEGIN CONTENT_AUTHOR_TABLE_TOTAL +global $tp; +return $tp -> parseTemplate("{CM_AMOUNT|author}"); +SC_END + +SC_BEGIN CONTENT_AUTHOR_TABLE_NAME +global $tp; +return $tp -> parseTemplate("{CM_AUTHOR|author}"); +SC_END + +SC_BEGIN CONTENT_AUTHOR_TABLE_ICON +global $tp; +return $tp -> parseTemplate("{CM_ICON|author}"); +SC_END + +SC_BEGIN CONTENT_RECENT_TABLE_ICON +global $tp; +return $tp -> parseTemplate("{CM_ICON|recent}"); +SC_END + +SC_BEGIN CONTENT_RECENT_TABLE_HEADING +global $tp; +return $tp -> parseTemplate("{CM_HEADING|recent}"); +SC_END + +SC_BEGIN CONTENT_RECENT_TABLE_SUBHEADING +global $tp; +return $tp -> parseTemplate("{CM_SUBHEADING|recent}"); +SC_END + +SC_BEGIN CONTENT_RECENT_TABLE_SUMMARY +global $tp; +return $tp -> parseTemplate("{CM_SUMMARY|recent}"); +SC_END + +SC_BEGIN CONTENT_RECENT_TABLE_TEXT +global $tp; +return $tp -> parseTemplate("{CM_TEXT|recent}"); +SC_END + +SC_BEGIN CONTENT_RECENT_TABLE_DATE +global $tp; +return $tp -> parseTemplate("{CM_DATE|recent}"); +SC_END + +SC_BEGIN CONTENT_RECENT_TABLE_EPICONS +global $tp; +return $tp -> parseTemplate("{CM_EPICONS|recent}"); +SC_END + +SC_BEGIN CONTENT_RECENT_TABLE_AUTHORDETAILS +global $tp; +return $tp -> parseTemplate("{CM_AUTHOR|recent}"); +SC_END + +SC_BEGIN CONTENT_RECENT_TABLE_EDITICON +global $tp; +return $tp -> parseTemplate("{CM_EDITICON|recent}"); +SC_END + +SC_BEGIN CONTENT_RECENT_TABLE_REFER +global $tp; +return $tp -> parseTemplate("{CM_REFER|recent}"); +SC_END + +SC_BEGIN CONTENT_RECENT_TABLE_RATING +global $tp; +return $tp -> parseTemplate("{CM_RATING|recent}"); +SC_END + +SC_BEGIN CONTENT_RECENT_TABLE_PARENT +global $tp; +return $tp -> parseTemplate("{CM_PARENT|recent}"); +SC_END + +SC_BEGIN CONTENT_ARCHIVE_TABLE_HEADING +global $tp; +return $tp -> parseTemplate("{CM_HEADING|archive}"); +SC_END + +SC_BEGIN CONTENT_ARCHIVE_TABLE_DATE +global $tp; +return $tp -> parseTemplate("{CM_DATE|archive}"); +SC_END + +SC_BEGIN CONTENT_ARCHIVE_TABLE_AUTHOR +global $tp; +return $tp -> parseTemplate("{CM_AUTHOR|archive}"); +SC_END + +SC_BEGIN CONTENT_CONTENT_TABLE_FILE +global $tp; +return $tp -> parseTemplate("{CM_FILE|content}"); +SC_END + +SC_BEGIN CONTENT_PRINT_IMAGES +global $tp; +return $tp -> parseTemplate("{CM_IMAGES|print}"); +SC_END + +SC_BEGIN CONTENT_PDF_IMAGES +global $tp; +return $tp -> parseTemplate("{CM_IMAGES|pdf}"); +SC_END + +SC_BEGIN CONTENT_CONTENT_TABLE_IMAGES +global $tp; +return $tp -> parseTemplate("{CM_IMAGES|content}"); +SC_END + +SC_BEGIN CONTENT_CONTENT_TABLE_COMMENT +global $tp; +return $tp -> parseTemplate("{CM_COMMENT|content}"); +SC_END + +SC_BEGIN CONTENT_CONTENT_TABLE_PARENT +global $tp; +return $tp -> parseTemplate("{CM_PARENT|content}"); +SC_END + +SC_BEGIN CONTENT_CONTENT_TABLE_ICON +global $tp; +return $tp -> parseTemplate("{CM_ICON|content}"); +SC_END + +SC_BEGIN CONTENT_CONTENT_TABLE_HEADING +global $tp; +return $tp -> parseTemplate("{CM_HEADING|content}"); +SC_END + +SC_BEGIN CONTENT_CONTENT_TABLE_REFER +global $tp; +return $tp -> parseTemplate("{CM_REFER|content}"); +SC_END + +SC_BEGIN CONTENT_CONTENT_TABLE_SUBHEADING +global $tp; +return $tp -> parseTemplate("{CM_SUBHEADING|content}"); +SC_END + +SC_BEGIN CONTENT_CONTENT_TABLE_DATE +global $tp; +return $tp -> parseTemplate("{CM_DATE|content}"); +SC_END + +SC_BEGIN CONTENT_CONTENT_TABLE_AUTHORDETAILS +global $tp; +return $tp -> parseTemplate("{CM_AUTHOR|content}"); +SC_END + +SC_BEGIN CONTENT_CONTENT_TABLE_EPICONS +global $tp; +return $tp -> parseTemplate("{CM_EPICONS|content}"); +SC_END + +SC_BEGIN CONTENT_CONTENT_TABLE_EDITICON +global $tp; +return $tp -> parseTemplate("{CM_EDITICON|content}"); +SC_END + +SC_BEGIN CONTENT_CONTENT_TABLE_RATING +global $tp; +return $tp -> parseTemplate("{CM_RATING|content}"); +SC_END + +SC_BEGIN CONTENT_CONTENT_TABLE_SCORE +global $tp; +return $tp -> parseTemplate("{CM_SCORE|content}"); +SC_END + +SC_BEGIN CONTENT_CONTENT_TABLE_SUMMARY +global $tp; +return $tp -> parseTemplate("{CM_SUMMARY|content}"); +SC_END + +SC_BEGIN CONTENT_CONTENT_TABLE_TEXT +global $tp; +return $tp -> parseTemplate("{CM_TEXT|content}"); +SC_END + +SC_BEGIN CONTENT_CAT_TABLE_ICON +global $tp; +return $tp -> parseTemplate("{CM_ICON|cat}"); +SC_END + +SC_BEGIN CONTENT_CAT_TABLE_HEADING +global $tp; +return $tp -> parseTemplate("{CM_HEADING|cat}"); +SC_END + +SC_BEGIN CONTENT_CAT_TABLE_SUBHEADING +global $tp; +return $tp -> parseTemplate("{CM_SUBHEADING|cat}"); +SC_END + +SC_BEGIN CONTENT_CAT_TABLE_DATE +global $tp; +return $tp -> parseTemplate("{CM_DATE|cat}"); +SC_END + +SC_BEGIN CONTENT_CAT_TABLE_EPICONS +global $tp; +return $tp -> parseTemplate("{CM_EPICONS|cat}"); +SC_END + +SC_BEGIN CONTENT_CAT_TABLE_TEXT +global $tp; +return $tp -> parseTemplate("{CM_TEXT|cat}"); +SC_END + +SC_BEGIN CONTENT_CAT_TABLE_RATING +global $tp; +return $tp -> parseTemplate("{CM_RATING|cat}"); +SC_END + +SC_BEGIN CONTENT_CAT_LISTSUB_TABLE_ICON +global $tp; +return $tp -> parseTemplate("{CM_ICON|catlistsub}"); +SC_END + +SC_BEGIN CONTENT_CAT_LISTSUB_TABLE_HEADING +global $tp; +return $tp -> parseTemplate("{CM_HEADING|catlistsub}"); +SC_END + +SC_BEGIN CONTENT_CAT_LISTSUB_TABLE_SUBHEADING +global $tp; +return $tp -> parseTemplate("{CM_SUBHEADING|catlistsub}"); +SC_END + +SC_BEGIN CONTENT_CAT_LIST_TABLE_ICON +global $tp; +return $tp -> parseTemplate("{CM_ICON|catlist}"); +SC_END + +SC_BEGIN CONTENT_CAT_LIST_TABLE_HEADING +global $tp; +return $tp -> parseTemplate("{CM_HEADING|catlist}"); +SC_END + +SC_BEGIN CONTENT_CAT_LIST_TABLE_SUMMARY +global $tp; +return $tp -> parseTemplate("{CM_SUMMARY|catlist}"); +SC_END + +SC_BEGIN CONTENT_CAT_LIST_TABLE_TEXT +global $tp; +return $tp -> parseTemplate("{CM_TEXT|catlist}"); +SC_END + +SC_BEGIN CONTENT_CAT_LIST_TABLE_SUBHEADING +global $tp; +return $tp -> parseTemplate("{CM_SUBHEADING|catlist}"); +SC_END + +SC_BEGIN CONTENT_CAT_LIST_TABLE_DATE +global $tp; +return $tp -> parseTemplate("{CM_DATE|catlist}"); +SC_END + +SC_BEGIN CONTENT_CAT_LIST_TABLE_EPICONS +global $tp; +return $tp -> parseTemplate("{CM_EPICONS|catlist}"); +SC_END + +SC_BEGIN CONTENT_CAT_LIST_TABLE_RATING +global $tp; +return $tp -> parseTemplate("{CM_RATING|catlist}"); +SC_END + +SC_BEGIN CONTENT_CAT_LIST_TABLE_AUTHORDETAILS +global $tp; +return $tp -> parseTemplate("{CM_AUTHOR|catlist}"); +SC_END + +SC_BEGIN CONTENT_CAT_TABLE_AUTHORDETAILS +global $tp; +return $tp -> parseTemplate("{CM_AUTHOR|cat}"); +SC_END + +SC_BEGIN CONTENT_CAT_TABLE_AMOUNT +global $tp; +return $tp -> parseTemplate("{CM_AMOUNT|cat}"); +SC_END + +SC_BEGIN CONTENT_CAT_LISTSUB_TABLE_AMOUNT +global $tp; +return $tp -> parseTemplate("{CM_AMOUNT|catlistsub}"); +SC_END + +SC_BEGIN CONTENT_CAT_LIST_TABLE_AMOUNT +global $tp; +return $tp -> parseTemplate("{CM_AMOUNT|catlist}"); +SC_END + +SC_BEGIN CONTENT_CAT_TABLE_COMMENT +global $tp; +return $tp -> parseTemplate("{CM_COMMENT|cat}"); +SC_END + +SC_BEGIN CONTENT_CAT_LIST_TABLE_COMMENT +global $tp; +return $tp -> parseTemplate("{CM_COMMENT|catlist}"); +SC_END + +SC_BEGIN CONTENT_SEARCHRESULT_TABLE_ICON +global $tp; +return $tp -> parseTemplate("{CM_ICON|searchresult}"); +SC_END + +SC_BEGIN CONTENT_SEARCHRESULT_TABLE_HEADING +global $tp; +return $tp -> parseTemplate("{CM_HEADING|searchresult}"); +SC_END + +SC_BEGIN CONTENT_SEARCHRESULT_TABLE_SUBHEADING +global $tp; +return $tp -> parseTemplate("{CM_SUBHEADING|searchresult}"); +SC_END + +SC_BEGIN CONTENT_SEARCHRESULT_TABLE_DATE +global $tp; +return $tp -> parseTemplate("{CM_DATE|searchresult}"); +SC_END + +SC_BEGIN CONTENT_SEARCHRESULT_TABLE_TEXT +global $tp; +return $tp -> parseTemplate("{CM_TEXT|searchresult}"); +SC_END + +SC_BEGIN CONTENT_SEARCHRESULT_TABLE_AUTHORDETAILS +global $tp; +return $tp -> parseTemplate("{CM_AUTHOR|searchresult}"); +SC_END + +SC_BEGIN CONTENT_CONTENTMANAGER_CATEGORY +global $tp; +return $tp -> parseTemplate("{CM_HEADING|manager}"); +SC_END + +SC_BEGIN CONTENT_CONTENTMANAGER_CATEGORY_SUBHEADING +global $tp; +return $tp -> parseTemplate("{CM_SUBHEADING|manager}"); +SC_END + */ ?> \ No newline at end of file diff --git a/e107_plugins/content/e_comment.php b/e107_plugins/content/e_comment.php index ac48ffa92..9fa321559 100644 --- a/e107_plugins/content/e_comment.php +++ b/e107_plugins/content/e_comment.php @@ -2,15 +2,6 @@ if (!defined('e107_INIT')) { exit; } -/* -$e_plug_table = "pcontent"; //This is set to the table name you have decided to use. -$reply_location = e_PLUGIN."content/content.php?content.$nid"; //This is set to the location you'd like the user to return to after replying to a comment. -$db_table = "pcontent"; //This is the name of your plugins database table. -$link_name = "content_heading"; //This is the name of the field in your plugin's db table that corresponds to it's name or title. -$db_id = "content_id"; // This is the name of the field in your plugin's db table that correspond to it's unique id number. -$plugin_name = "Content"; // A name for your plugin. It will be used in links to comments, in list_new/new.php. -*/ - $e_comment['eplug_comment_ids'] = "pcontent"; //This is set to the table name you have decided to use. $e_comment['plugin_path'] = "content"; //The path of your plugin. $e_comment['plugin_name'] = "content"; //A name for your plugin. It will be used in links to comments, in list_new/new.php. diff --git a/e107_plugins/content/e_emailprint.php b/e107_plugins/content/e_emailprint.php index 6159cf6c9..3a949f43b 100644 --- a/e107_plugins/content/e_emailprint.php +++ b/e107_plugins/content/e_emailprint.php @@ -32,7 +32,7 @@ function print_item($id) $content_pref = $aa -> getContentPref($mainparent); $content_icon_path = $tp -> replaceConstants($content_pref["content_icon_path"]); $content_image_path = $tp -> replaceConstants($content_pref["content_image_path"]); - $img = $tp -> parseTemplate('{CONTENT_PRINT_IMAGES}', FALSE, $content_shortcodes); + $img = $tp -> parseTemplate('{CM_IMAGES|print}', FALSE, $content_shortcodes); $text = " ".$row['content_heading']." @@ -94,13 +94,12 @@ function print_item_pdf($id){ } $authordetails = $aa -> getAuthor($row['content_author']); $row['content_datestamp'] = $con -> convert_date($row['content_datestamp'], "long"); - $img = $tp -> parseTemplate('{CONTENT_PRINT_IMAGES}', FALSE, $content_shortcodes); $mainparent = $aa -> getMainParent(intval($id)); $content_pref = $aa -> getContentPref($mainparent); $content_icon_path = $tp -> replaceConstants($content_pref["content_icon_path"]); $content_image_path = $tp -> replaceConstants($content_pref["content_image_path"]); - $img = $tp -> parseTemplate('{CONTENT_PDF_IMAGES}', FALSE, $content_shortcodes); + $img = $tp -> parseTemplate('{CM_IMAGES|pdf}', FALSE, $content_shortcodes); //add custom and preset tags if present $custom = $eArrayStorage->ReadArray($row['content_pref']); diff --git a/e107_plugins/content/e_latest.php b/e107_plugins/content/e_latest.php index c17a4fc04..d3133d061 100644 --- a/e107_plugins/content/e_latest.php +++ b/e107_plugins/content/e_latest.php @@ -5,10 +5,7 @@ include_lan(e_PLUGIN."content/languages/".e_LANGUAGE."/lan_content_admin.php"); $plugintable = "pcontent"; $reported_content = $sql -> db_Count($plugintable, '(*)', "WHERE content_refer='sa' "); -$text .= " -
- -"; +$text .= "
"; if($reported_content) { $text .= " ".CONTENT_LATEST_LAN_1." $reported_content"; } else { diff --git a/e107_plugins/content/e_list.php b/e107_plugins/content/e_list.php index b35457a67..3fe70f254 100644 --- a/e107_plugins/content/e_list.php +++ b/e107_plugins/content/e_list.php @@ -31,7 +31,7 @@ if (!defined('e107_INIT')) { exit; } $CATEGORY = ""; $DATE = ""; $INFO = ""; - $LIST_CAPTION = $rowm['content_heading']; + $LIST_CAPTION = $rowm['content_heading']; //global var for this main parent $mainparent = $rowm['content_id']; @@ -107,5 +107,4 @@ if (!defined('e107_INIT')) { exit; } } } - ?> \ No newline at end of file diff --git a/e107_plugins/content/e_meta.php b/e107_plugins/content/e_meta.php index 9cd5959de..0cf888262 100644 --- a/e107_plugins/content/e_meta.php +++ b/e107_plugins/content/e_meta.php @@ -11,9 +11,9 @@ | GNU General Public License (http://gnu.org). | | $Source: /cvs_backup/e107_0.8/e107_plugins/content/e_meta.php,v $ -| $Revision: 1.1.1.1 $ -| $Date: 2006-12-02 04:34:56 $ -| $Author: mcfly_e107 $ +| $Revision: 1.2 $ +| $Date: 2007-04-10 14:34:39 $ +| $Author: lisa_ $ +----------------------------------------------------------------------------+ */ if (!defined('e107_INIT')) { exit; } @@ -48,5 +48,4 @@ if(isset($qs[0]) && $qs[0] == "content" && isset($qs[1]) && is_numeric($qs[1]) ) } } - ?> \ No newline at end of file diff --git a/e107_plugins/content/handlers/content_class.php b/e107_plugins/content/handlers/content_class.php index d85fdd092..6837f578a 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.10 $ -| $Date: 2007-03-13 16:51:05 $ +| $Revision: 1.11 $ +| $Date: 2007-04-10 14:34:39 $ | $Author: lisa_ $ +---------------------------------------------------------------+ */ @@ -1192,7 +1192,8 @@ class content{