The print_posts() function

+++++++++++++++++

The print_posts function will publish posts based on parameters. These parameters are saved inside monofiles/filesinfo/print_content.xml
Posts will be included in the results, if these parameters are found in them, while also limiting or modifying the results. We can call the function multiple times, to combine different results.

For example you can write "print_posts('example')" inside the pagep.php file, in order to load posts that match the parameters saved under the name 'example', in print_content.xml

+++++++++++++++++
Usage 

<?php

	print_posts('string'); 

?>


A string given as a parameter, is the name of an entry inside an xml file.
(see example at the end)


+++++++++++++++++

XML info/parameters:

status: optional deactivation for an entry. default:on
name: A name for an entry. This is the one parameter given to print_posts() which "identifies" the call. The function searches for it in the xml file and loads the related parameters
Categories, Tags : Posts which match at least one category (separated by comma) and all the tags given, will be included in the results. If no tags are given, there's no requirement for tags.
inc , paginc: Select in which types of pages to print results, with inc. Paginc is the same but for paginated content. default:on
inc : 5 on off values, separated with comma, following this order: home page, category index, tag index, post, page
paginc : 3 on off values separated with comma: home page, category index, tag index
sort : Sorting, chronological or alphabetical(based on the post's title). default:time
sortcat : Another sorting option. In case of multiple entries in <categories>, print results following the order they are written. default:off
reverse : Reverse sort. Note: Does not reverse sortcat. default:off
limit : Limit the number of results. default:0(show all)
title: Show or hide the post title. default:on
date: Apply a php date format or turn off. default:off
exc : Contains two values, comma separated. First is post's excerpt limit, given as an integer, where 0 means ignore any limit and show full post and off means don't show any excerpt. Second value can be 'off', meaning force no link to the post. default:panel settings->tags
unidates : Repeat or not similar dates of posts. default:off
stag,scat,sign : Show or hide post tags, category or author sign. default:off
tlinks : show tags as links or turn off to show as plain text. Unlike panel settings, setting tlinks off does NOT unpublish tag indexes. If left empty, panel value is used. default:panel settings->tags as links
label: Text to appear as label for category, tags and author sign and read more, in case they are 'on'. default: empty string
force: Publish content even when the categories are hidden default: off

+++++++++++++++++

XML values:
(note: empty values are accepted)

content status = on off
name= 'an entry name' (utf characters);
categories= 'category names'
tags= 'tag names'
inc= '','','','','' on off
paginc= '','',''  on off
sort= time  alpha
reverse= on  off
sortcat= on off
limit= int >= 0 (0 = no limit)
stag= on off
tlinks= on off
scat= on off
sign= on off
date= date() off
title= on off
exc= '',''  off 0 int>=0 , off
unidates= on off
label->cat= text
label->tag= text
label->sign= text
label->read= text
force= on off

+++++++++++++++++

Example
    
   <content status="on">
      <name>news</name>
      <categories>development</categories>
      <tags>latest,fixes</tags>
      <sort></sort>
      <reverse></reverse>
      <sortcat></sortcat>
      <limit></limit>
      <inc>on,off,off,off,off</inc>
      <paginc>off,off,off</paginc>
      <stag></stag>
      <tlinks></tlinks>
      <scat></scat>
      <sign></sign>
      <date></date>
      <title></title>
      <exc></exc>
      <unidates></unidates>
      <label>
          <cat></cat>
          <tag></tag>
          <sign></sign>
          <read></read>
      </label>
      <force>on</force>
  </content>



In this example, content will load when

        print_posts('news');
         
 is called.

Posts which belong to the category 'development' and contain the tags 'latest' and 'fixes', will be included in the results.
In <inc> first value is on and all of the rest is off, which means that content will appear on the website's home page only.
<paginc> values are all off, so this content will not appear on subpages of paginated content either.
Finally, force is on and this means content will be published, even if the category 'development' is set as hidden.

+++++++++++++++++
