Thanks! I have found that NewsListing is the guilty... but I can’t understand what is wrong, can you see it? (it’s crazy but yesterday it worked well!)
/**
* Snippet Name: NewsListing
* Short Desc: Displays News Articles and Blog Posts
* Created By: The MODx Project
* Version: 6.3.3
*
* Displays posts with full support for pagination (paging of content in increments) and Template Variables
*
* Important Notes
* When in pagination mode (&paginate = 1) always call the snippet uncached in the [!NewsListing!] format
* Also, in pagination mode, make sure to use the placeholders for navigation!
* To display tv's make sure you use the tv prefix!
* For example, if you have the template variable author you would put [+tvauthor+] in your template.
*
* Snippet placeholders:
* [+next+] - next button
* [+previous+] - previous button
* [+prevnextsplitter+] - splitter if always show is 0
* [+pages+] - page list
* [+totalpages+] - total number of pages
* [+start+] - the # of the first item shown
* [+stop+] - the # of the last item shown
* [+total+] - the total # of items
*
* Example of placeholder use:
* Showing <strong>[+start+]</strong> - <strong>[+stop+]</strong> of <strong>[+total+]</strong> Articles<br /><div id="nl_pages">[+previous+] [+pages+] [+next+]</div>
*
* Example CSS:
* <style type="text/css">
* #nl_pages {margin-top: 10px;}
* #nl_pages #nl_currentpage {border: 1px solid blue;padding: 2px; margin: 2px; background-color: rgb(90, 132, 158); color: white;}
* #nl_pages .nl_off {border: 1px solid #CCCCCC; padding: 2px; margin: 2px}
* #nl_pages a {border: 1px solid rgb(203, 227, 241);; padding: 2px; margin: 2px; text-decoration: none; color: black;}
* #nl_pages a:hover {border: 1px solid #000066; background-color: white; }
* #nl_archivelist ul{list-style-type: none; margin-left: 15px; padding-left: 0px;}
* #nl_archivelist ul ul{list-style-type: square;margin-left: 35px;}
* #nl_archivelist .nl_month {font-weight: bold;}
* </style>
*
* Snippet parameters [default] :
* &startID - the folder containing the posts [the document called from]
* &format - tells the snippet whether to output html or rss ["html"]
* &paginate - paginate [0]
* &prv - chunk to be used inside the previous link ["< Previous"]
* &nxt - chunk to be used inside the next link ["Next >"]
* &alwaysshow - always show previous or next links (if enabled, hyperlink will be removed when prev/next page is not available, | delimiter will not be inserted) [0]
* &prevnextsplitter - character delimiter to use to separate previous next links if alwaysshow is 0 ["|"]
* &summarize - number of posts to list partially/fully [3]
* &total - max number of posts to retrieve [all posts]
* &increment - # of items to advance by each time the previous or next links are clicked [10]
* &trunc - truncate to summary posts? if set to false, shows entire post [true]
* &truncSplit - use the special "splitter" format to truncate for summary posts [true]
* &truncAt - the split-point splitter itself [<!-- splitter -->]
* &truncText - text for the summary "show more" link
* &truncLen - number of characters to show in the doc summary [300]
* &truncOffset - negative offset to use to fall back when splitting mid-open tag [30]
*
* &comments - whether or not the posts have comments [false]
* &commText - comments link text ["Read Comments"]
*
* &tpl - name of the chunk to use for the summary view template
* &dateformat - the format for the summary date (see http://php.net/strftime ) [%d-%b-%y %H:%M]
* &datetype - the date type to display (values can be createdon, pub_date, editedon) [&sortby | "createdon"]
* &pubOnly - only show Published posts [true]
* &emptytext - text to use when no news items are found
* &showarch - show archive listing? [true]
* &archplaceholder -output archive (older posts section) as a placeholder called archive [0]
* &archivetext - text to use for the Post Archives listing ["Older Items"]
* &commentschunk - if you're using comments, the name of the chunk used to format them
* &sortby - field to sort by (reccomended values include createdon, pub_date, editedon; reverts to createdon if value is invalid) ["createdon"]
* &sortdir - direction to sort by ["desc"]
* &debug - enables debug output [0]
* &filter - only show items meeting a criteria. comma delimited in this format: documentobjectortvwithtvprefix,criteria, filtertype [false]
* - filtertype can be either mode 1 or 2. mode 1 shows only the items that meet your criteria and mode 2 shows all items except those that meet your criteria. [1]
* &filtertype -
* &hidefolders - don't show folders in the returned results [false]
* &multilevel - automatically detect and show children to the descendentDepth level [0]
* &levelLimit - number of levels deep to go, 0 indicates infinite [0]
* &seeThruUnpub - allows the snippet to see unpublished folders children [false]
*
* Modified by Mark Kaplan, Susan Ottwell, Raymond Irving, Greg Matthews and Ryan Thrash:
* 18-Feb-2006 FS#272
* 19-Jan-2006 &menuOnly now works [false], MAJOR bugfix (Mark)
* 15-Jan-2006 fixed show more link, added summarize all (set summarize to 0), multiple filters via the pipe delimiter, minor bugfixs (Mark)
* 09-Jan-2006 sortby tv, code cleanup (Mark)
* 08-Jan-2006 bugfix (Mark)
* 06-Jan-2006 converted alot of the code into an API function (Mark)
* 05-Jan-2006 added multilevel code, NewsFeed functions, filtering, parser improved, bugfix's, etc (Mark)
* 10-Dec-2005 restored ability to split after N charcacters without splitting inside an open tag (such as img, a href, etc.) (Ryan)
* 06-Dec-2005 added xhtml strict month based archives, added nl_ prefix to all styles, minor fixes and documentation cleanup (Mark)
* 05-Dec-2005 added support for pages and TVs! (Mark)
* 03-Dec-2005 added pagination from NewsArchive (Mark)
* 01-Dec-2005 cleaned up code and parameters for 0.9.1 release and improved debug code (Mark)
* 25-Nov-2005 added multisort capabilities (Jason/Mark)
* 25-Nov-2005 added ability to call useful parts of the document object in a template via [+documentobject+] (Mark)
* 24-Nov-2005 added origional [+longtitle+] (Paul)
* 11-Nov-2005 showarch added (Susan/Mark)
* 04-Nov-2005 various improvements and bugfixes
* 21-Oct-2005 footer/header removed from summaries
* 12-Oct-2005 malformed tag-closing mojo and more cleanups
* 11-Oct-2005 many updates inc. showPublishedOnly, summary splitter, configs and default template format
* 22-Sept-2005 add &linktext support
* 22-Sept-2005 add template support. Fields - [+title+],[+summary+],[+author+],[+date+],[+link+]
* 19-April-2005 add introtext field support
*
*
* To Do:
* evaluate date formats/server offsets
* query optimizations
*
* Credits:
* Now "goes to eleven" thanks to Mark Kaplan
* Month archives based on code from the "event-list" snippet by kastor
* Enhancements by Raymond Irving, Ryan Thrash and tag-closing mojo by Greg Matthews
* Original code by Alex with improvements by LePrince, mrruben5, lloyd_barrett
*/
// ---------------------------------------------------
// Functions include file
// ---------------------------------------------------
$functions = "assets/snippets/newslisting/functions.php";
if (file_exists($functions)) {
include_once ($functions);
} else {
return "$functions does not exist. Please check the file.";
}
// ---------------------------------------------------
// Parameters
// ---------------------------------------------------
$paginate = isset($paginate)? $paginate : 0;
// paginatation enabled or disabled
$furls = $modx->config['friendly_urls'];
// are furls enabled
$resourceparent = isset($startID) ? $startID : $modx->documentIdentifier;
// the folder that contains post entries. separate multiple folders by comma when multilevel is equal to 1.
$nrposts = isset($summarize) ? $summarize : 3;
// number of posts of which to show a summary
// remainder (to nrtotal) go as an arhived/other posts list
$trunc = isset($trunc) ? $trunc : true;
// should there be summary/short version of the posts?
$truncsplit = isset($truncSplit) ? $truncSplit : true;
// should the post be summarized at the "splitter"?
$splitter = isset($truncAt) ? $truncAt : "<!-- splitter -->";
// where to split the text
$lentoshow = isset($truncLen) ? $truncLen : 300;
// how many characters to show of blogs
$lenoffset = isset($truncOffest) ? $truncOffset : 30;
// how many characters to show of blogs
$tpl = isset($tpl) ? $modx->getChunk($tpl):'
<div class="nl_summaryPost">
<h3><a href="[~[+id+]~]">[+title+]</a></h3>
<div>[+summary+]</div>
<p>[+link+]</p>
<div style="text-align:right;">di <strong>[+author+]</strong> il [+date+]</div>
</div>
';
// optional user defined chunk name to format the summary posts
// Check template has placeholders
preg_match_all('~\[\+(.*?)\+\]~', $tpl, $tplmatches);
$tplmatchcount = count($tplmatches[1]);
if ($tpl == "") { return 'Your NewsListing template is blank or you have a typo in the chunk name, please check it.';}
else if ($tplmatchcount <= 0) { return 'Your NewsListing template is missing placeholders, please check your template below: <br /><br /> -------------------------------------------------------------------------------------------------------- <br /><br />'.$tpl.'<br /><br />-------------------------------------------------------------------------------------------------------- <br />';}
$showPublishedOnly = isset($pubOnly) ? $pubOnly : true;
// allows you to show unpublished docs if needed for some reason...
$showInMenuOnly = isset($menuOnly) ? $menuOnly : false;
// allows you to show docs marked not to show in the menus
$linktext = isset($truncText)? $truncText : "Leggi tutto...";
// text to be displayed in news link
$emptytext = isset($emptytext)? $emptytext : '<p>Nessuna news trovata.</p>';
// text to be displayed when there are no results
$comments = isset($comments)? $comments : true;
// can the posts have comments?
$commText = isset($commText)? $commText : 'Leggi i Commenti';
// text to be used for the comments link
$date = isset($dateformat)? $dateformat :"%d-%b-%y %H:%M";
// format for the summary post date format
$showarch = isset($showarch)? $showarch : true;
// whether or not to show the Post Archives listing
$archtxt = isset($archivetext)? $archivetext :"Older Items";
// text to use for the Post Archives listing
$commentschunk = isset($commentschunk)? '{{'.$commentschunk.'}}' : '';
// if you're using comments, the name of the chunk used to format them
$sortdir = isset($sortdir) ? strtoupper($sortdir) : 'DESC';
// get sort dir
if (isset($sortby) && ($sortby == "createdon" || $sortby == "editedon" || $sortby == "pub_date" || $sortby == "unpub_date" || $sortby =="deletedon")) {
$dt = $sortby;
} else if (isset($datetype)) {
$dt = $datetype;
} else {
$dt = "createdon";
}
$datetype = $dt;
// date type to display (values can be createdon, pub_date, editedon)
$start= isset($_GET['start'])? $_GET['start']: 0;
// get post # to start at
$debug = isset($debug)? $debug : 0;
// for testing only
$output = '';
// initialize the output variable
$isfolder = '';
// initialize the isfolder variable
$debugtext = '';
// initialize the debugtext variable
$prv = isset($prv)? $modx->getChunk($prv) : "< Previous";
// get the chunk code to be used inside the previous <a> tag.
$nxt = isset($nxt)? $modx->getChunk($nxt) : "Next >";
// get the chunk code to be used inside the next <a> tag.
$alwaysshow = isset($alwaysshow)? $alwaysshow : 0;
// determine whether or not to always show previous next links
$archplaceholder = isset($archplaceholder)? $archplaceholder : 0;
// output archive (older posts section) as a placeholder called [+archive+]
$prevnextsplitter = isset($prevnextsplitter)? $prevnextsplitter : "|";
// splitter to use of always show is disabled
// Check for valid field to sort by
$advancedsort = false;
$columns = $modx->db->query("show columns from ".$modx->getFullTableName('site_content'));
while($dbfield = $modx->db->getRow($columns))
$dbfields[] = $dbfield['Field'];
if(isset($sortby) && in_array($sortby,$dbfields)) {
$sortby = $sortby;
} else if (substr($sortby,0,2) == "tv"){
$advancedsort = $sortby; $sortby = "id";
} else {$sortby = "createdon";}
$filter = isset($filter)? $filter : false;
// only show items meeting a criteria. comma delimited in this format
// documentobjectortvwithtvprefix,criteria
$hidefolders = isset($hidefolders)? $hidefolders : false;
// don't show folders in the returned results
$multilevel = isset($multilevel)? $multilevel : 0;
// automatically detect and show children to the descendentDepth level
$descendentDepth = (isset($levelLimit))? $levelLimit : 0;
// number of levels deep to go, 0 indicates infinite
$seeThruUnpub = (isset($seeThruUnpub))? $seeThruUnpub : false ;
// allows the snippet to see unpublished folders children
$hiddentv = (isset($hiddentv))? $hiddentv : "" ;
// allows the snippet to filter by tv's not in the template. separate by comma.
$format = (isset($format))? $format : "html" ;
// tells the snippet whether to output html or rss
// ---------------------------------------------------
// RSS Parameters
// ---------------------------------------------------
if ($format == "rss") $resourceparent= (isset($_REQUEST['id'])? $_REQUEST['id']: $resourceparent);
$language = (isset($language))? $language : "it" ;
// rss language
$copyright = isset($copyright) ? $copyright:'[(site_name)] 2006';
// set copyright info
$link = $modx->config['site_url']."[~".$modx->documentObject['id']."~]";
// url to current page
$ttl = isset($ttl) ? intval($ttl):120;
// set ttl value
$xmlheader = '<?xml version="1.0" encoding="ISO-8859-1"?>'."\n".
'<rss version="2.0">'."\n".
' <channel>'."\n".
' <title>'.$modx->documentObject['pagetitle'].'</title>'."\n".
' <link>'.$link.'</link>'."\n".
' <description>'.$modx->documentObject['introtext'].'</description>'."\n".
' <language>'.$language.'</language>'."\n".
' <copyright>'.$copyright.'</copyright>'."\n".
' <ttl>'.$ttl.'</ttl>'."\n";
$xmlfooter = ' </channel>'."\n".
'</rss>';
if($format == "rss") {
$tpl = ' <item>'."\n".
' <title>[+rsspagetitle+]</title>'."\n".
' <link>[(site_url)][~[+id+]~]</link>'."\n".
' <description><![CDATA[ [+summary+] ]]></description>'."\n".
' <pubDate>[+rssdate+]</pubDate>'."\n".
' <guid>[(site_url)][~[+id+]~]</guid>'."\n".
' <author>[+rssusername+]</author>'."\n".
' </item>'."\n";
}
if($format == "rss") {$output .= $xmlheader;}
// ---------------------------------------------------
// Find tv names
// ---------------------------------------------------
preg_match_all('~\[\+tv(.*?)\+\]~', $tpl, $matches);
$cnt = count($matches[1]);
$tvnames = array();
for($i=0; $i<$cnt; $i++) {
$tvnames[] = $matches[1][$i];
}
// check if there are any hidden tv's we need to add to array
if($hiddentv != "") {
$hiddentvarray = explode(',',$hiddentv);
$tvnames = array_merge($hiddentvarray, $tvnames);
}
$tvnames = array_unique($tvnames);
if ($sortby != "pub_date" && $sortby != "unpub_date" && $sortby != "editedon" && $sortby != "deletedon" && $multilevel != 1) {
$debugtext = "Using the API Method (allows for everything except pub_date, unpub_date, editedon, deletedon, and multilevel) <br />";
$callby = ($showPublishedOnly)? 'getActiveChildren' : 'getAllChildren';
$resource = $modx->$callby($resourceparent, $sortby, $sortdir, $fields='*');
AppendTvs($resource, $tvnames);
}else {
$debugtext = "Using the GetAllSubDocs Method (alows for all possibilites but is a little slower) <br />";
$resource = GetAllSubDocs($resourceparent, $tvnames, $sortby, $sortdir, $descendentDepth, $showPublishedOnly, $seeThruUnpub, $hidefolders);
}
if(count($resource) < 1 && $format == "rss") {return $xmlheader."".$xmlfooter;}
$output .= (count($resource) < 1)? $emptytext."\n" : '';
if ($showInMenuOnly == true) {
$filter= ($filter!==false? $filter.'|hidemenu, 0': 'hidemenu, 0');
}
// ---------------------------------------------------
// Filter array for filter
// ---------------------------------------------------
if ($filter != false) {
$filters= explode('|',$filter);
foreach ($filters AS $processfilter) {
$filterArray= explode(',',$processfilter);
$filterKey= $filterArray[0];
$filterName= $filterArray[1];
$filtertype = (isset($filterArray[2]))? $filterArray[2] : 1;
// choose either mode 1 or mode 2. mode 1 shows only the items that meet your criteria and mode 2 shows all items except those that meet your criteria.
$resources= $resource;
foreach ($resources as $k=> $r) {
if( $filtertype == 1 && (!isset ($r[$filterKey]) || $r[$filterKey]!=$filterName) ) {
unset($resource[$k]);
} else if ( $filtertype == 2 && $r[$filterKey]==$filterName ) {
unset($resource[$k]);
}
}
}
}
// ---------------------------------------------------
// Sort array
// ---------------------------------------------------
if ($advancedsort != false){
customSort($resource, $advancedsort, $sortdir);
}
// ---------------------------------------------------
// Count items
// ---------------------------------------------------
$recordcount = count($resource);
if($recordcount < 1 && $format == "rss") {return $xmlheader."".$xmlfooter;}
$output .= ($recordcount < 1)? $emptytext."\n" : '';
$resource = array_values($resource);
$nrtotal = isset($total) ? $total : $recordcount;
// total number of posts to retrieve
$limit = min( $recordcount, $nrtotal );
if ($nrposts == 0) {$nrposts = $recordcount + 1;}
if ($recordcount < $nrposts)
{
$stop = $recordcount;
} else {
$stop = $nrposts;
}
if ($nrtotal > $recordcount) {$nrtotal = $recordcount;}
if ($debug == 1) {
// rudimentary debugging output
$output .= "Number supposed to be summarized (nrposts/count): $nrposts<br />Total supposed to be returned: $stop<br />Count of total in db (count): $recordcount<br />Sort by (sortby): $sortby <br />Sort direction (sortdir): $sortdir <br/ >$debugtext";
}
if ($nrposts > 0) {
// ---------------------------------------------------
// Pagination
// ---------------------------------------------------
if ($paginate == 1 && $format != "rss") {
if ($furls == 0) {
$char = "&";
} else if($furls == 1) {
$char = "?";
}
$currentpageid = $modx->documentObject['id'];
$next = $start + $nrposts;
$nextlink = "<a href='[~$currentpageid~]".$char."start=$next'>".$nxt."</a>";
$previous = $start - $nrposts;
$previouslink = "<a href='[~$currentpageid~]".$char."start=$previous'>".$prv."</a>";
$limten = $nrposts + $start;
if ($alwaysshow == 1) {
$previousplaceholder = "<span class='nl_off'>".$prv."</span>";
$nextplaceholder = "<span class='nl_off'>".$nxt."</span>";
} else {
$previousplaceholder = "";
$nextplaceholder = "";
}
$split = "";
if ($previous > -1 && $next < $nrtotal) $split = $prevnextsplitter;
if ($previous > -1) $previousplaceholder = $previouslink;
if ($next < $nrtotal) $nextplaceholder = $nextlink;
if ($start < $nrtotal) $stop = $limten;
if ($limten > $nrtotal){$limiter = $nrtotal;} else {$limiter = $limten;}
$totalpages=ceil($nrtotal/$nrposts);
for ($x=0; $x<=$totalpages-1; $x++) {
$inc = $x * $nrposts;
$display = $x+1;
if($inc != $start) {
$pages .= "<a class=\"nl_page\" href='[~$currentpageid~]".$char."start=$inc'>$display</a>";
} else {
$pages .= "<span id=\"nl_currentpage\">$display</span>";
}
}
$modx->setPlaceholder('next',$nextplaceholder);
$modx->setPlaceholder('previous',$previousplaceholder);
$modx->setPlaceholder('prevnextsplitter',$split);
$modx->setPlaceholder('start',$start+1);
$modx->setPlaceholder('stop',$limiter);
$modx->setPlaceholder('total',$nrtotal);
$modx->setPlaceholder('pages',$pages);
$modx->setPlaceholder('totalpages',$totalpages);
if ($start < $nrtotal) $stop = $limten;
}
// End Pagination
// ---------------------------------------------------
// Process information for display
// ---------------------------------------------------
if ($debug == 1) $output .= "Start at $start and stop at $stop (stop)/$nrtotal (total)";
for ($x = $start; $x < $stop; $x++) {
if ($x <= $nrtotal && $x <= $nrtotal-1) {
$link = '';
$author = getcreatedby($resource[$x]['createdby'], $format);
// determine and show summary
// summary is turned off
if (!$trunc) {
$summary = $resource[$x]['content'];
// contains the splitter and use splitter is on
} else if ((strstr($resource[$x]['content'], $splitter)) && $truncsplit) {
$summary = array();
// HTMLarea/XINHA encloses it in paragraph's
$summary = explode('<p>'.$splitter.'</p>',$resource[$x]['content']);
// For TinyMCE or if it isn't wrapped inside paragraph tags
$summary = explode($splitter,$summary['0']);
$summary = $summary['0'];
$link = '<a href="[~'.$resource[$x]['id'].'~]">'.$linktext.'</a>';
// fall back to the summary text
} else if (strlen($resource[$x]['introtext'])>0) {
$summary = $resource[$x]['introtext'];
$link = '<a href="[~'.$resource[$x]['id'].'~]">'.$linktext.'</a>';
// fall back to the summary text count of characters
} else if(strlen($resource[$x]['content']) > $lentoshow) {
$summary = html_substr($resource[$x]['content'],$lentoshow,$lenoffset);
$link = '<a href="[~'.$resource[$x]['id'].'~]">'.$linktext.'</a>';
// and back to where we started if all else fails (short post)
} else {
$summary = $resource[$x]['content'];
$link = ' ';
}
// Post-processing to clean up summaries
$summary = closeTags($summary);
$summary = str_replace($commentschunk,'',$summary);
// Output debug info
if ($debug == 1) $output .= '<p><strong>Document Data for "'.$resource[$x]['pagetitle'].'"</strong></p><textarea name="Document Data" rows="5" readonly>';
// ---------------------------------------------------
// Set Placeholders
// ---------------------------------------------------
$placeholders = array();
// set blank placeholders array
// Set placeholders for document object
foreach ($resource[$x] as $docVar => $docVarValue) {
$placeholders["[+$docVar+]"] = "$docVarValue";
if ($debug == 1 && $docVar != "content"){
$output .= $docVar." = ".htmlspecialchars($docVarValue)." \n";
}
}
if ($debug == 1) $output .= '</textarea>';
// Set placeholders that can be used in the Chunk
// Set placeholders for backwards compadibility and custom fields
$placeholders['[+title+]'] = $resource[$x]['pagetitle'];
$placeholders['[+summary+]'] = $summary;
$placeholders['[+link+]'] = $link;
$placeholders['[+author+]'] = $author;
$placeholders['[+date+]'] = strftime($date, $resource[$x][$datetype]);
//set rss placeholders
if($format == "rss") {
$placeholders['[+rsspagetitle+]'] = htmlentities($resource[$x]['pagetitle']);
$placeholders['[+rssdate+]'] = date("r", $resource[$x][$datetype]);
$placeholders['[+rssusername+]'] = htmlentities($author);
}
// Expand the chunk code, and replace Placeholders
if ($debug != 1) {
$output .= str_replace(array_keys($placeholders), array_values($placeholders), $tpl);
}
}
}}
// ---------------------------------------------------
// Archives
// ---------------------------------------------------
$archivehtml = "";
if ($debug == 1) $output .= "<br />Generate arcive (if true): $stop<$nrtotal and $showarch == true and $format == html<br />";
if($stop<$nrtotal && $showarch == true && $format == "html") {
$displayeds = 0;
$lastMonth = -1;
$archivehtml .= "<h3>$archtxt</h3><div id=\"nl_archivelist\"><ul>";
for ($i = $stop; $i < $nrtotal; $i++) {
$unixdate = $resource[$i][$datetype];
$dateArray = getdate($unixdate);
$curMonth = $dateArray['mon'];
$month = strftime("%B %Y", $resource[$i][$datetype]);
if ($curMonth != $lastMonth) {
if ($lastMonth != -1) {
$archivehtml .= '</ul></li>';
}
$archivehtml .= '<li><span class="nl_month">'.$month.'</span><ul>';
}
$archivehtml .= "<li class=\"nl_archpost\"><a href='[~".$resource[$i]['id']."~]'>".$resource[$i]['pagetitle']."</a> (<span class=\"nl_date\">".strftime($date, $resource[$i][$datetype])."</span>)</li>";
++$displayeds;
$lastMonth = $curMonth;
}
$archivehtml .= "</ul></li></ul></div>";
if ($archplaceholder == 1)
{
$modx->setPlaceholder('archive', $archivehtml);
}
else if($showarch == true && $paginate != 1)
{
$output .= $archivehtml;
}
else
{
$output .= "";
}
}
if($format == "rss") {$output .= $xmlfooter;}
// ---------------------------------------------------
// Output results
// ---------------------------------------------------
return $output;