Article class for handling all article-related functions
Retrieve articles from database
function accepts two styles of parameters due to backward compatibility
OLD STYLE (v1.70) is deprecated, use only new style with $settings array
"articlenumber"=>int number of articles to list
"offset"=>int offset to show articles from
"fromdate"=>string articles to be shown from date (date format in settings.php)
"todate"=>string articles to be shown up to date (date format as in settings.php)
"authorID"=>string articles written by author ID (comma delimited list for multiple values)
"sectionID"=>string articles in section ID (comma delimited list for multiple values)
"priority"=>boolean 0,1
"status"=>boolean 0,1
"articleID"=>int ID of article to be displayed
"order"=>string use MySQL format ("adate DESC, atime DESC, priority DESC" etc.)
EXCLUSION: !X = !4 - will exclude author/section with ID 4 if used in authorID or sectionID
This will list latest 10 articles with priority 1
$settings=array(
"articlenumber"=>10,
"priority"=>1
);
$aepublic->GetArchive($settings);
.
.
.
?>
This will list 10 articles starting from 5th result from January 1st 2004 to January 31st 2004 in section 5 and 14
Please note that date format matches date format in settings.php, for the example below it is "DD.MM.YYYY" - you always need to match date format as set in settings.php!
$settings=array(
"articlenumber"=>10,
"offset"=>5,
"fromdate"=>"01.01.2004",
"todate"=>"31.01.2004",
"sectionID"=>"5,14"
);
$aepublic->GetArchive($settings);
.
.
.
?>
This will list latest 50 articles written by authors with ID 2 and 10 and put under section ID 5 and 8, but NOT section ID 7
Result is sorted by from the oldest to the newest articles
$settings=array(
"articlenumber"=>50,
"authorID"=>"2,10",
"sectionID"=>"5,8,!7",
"order"=>"adate ASC, atime ASC"
);
$aepublic->GetArchive($settings);
.
.
.
?>
array $settings array of parameters, see below:
Retrieve article content
Retrieve information about author
int $authorID ID of author
DEPRECATED: from v1.71
Print beginning of article
Beginning will not be supported in future
SEE: GetArticleSummary()
GetArticleText()
Print date of publishing of article
Retrieve file set
int filesetID ID of file set
Return filename of article
DEPRECATED: from v1.71 DO NOT USE! This function is obsolete and will be deleted in next version
Retrieve file set / DEPRECATED
Function has been replaced by GetArticleFileSet()
SEE: GetArticleFileSet()
Return ID of article
Retrieve image set
int imagesetID ID of image set
DEPRECATED: from v1.71 DO NOT USE! This function is obsolete and will be deleted in next version
Retrieve image set / DEPRECATED
Function has been replaced by GetArticleImageSet()
SEE: GetArticleImageSet()
DEPRECATED: from v1.71 DO NOT USE! This function is obsolete and will be deleted in next version
Print section name
Function has been replaced by GetSectionName()
SEE: GetSectionName()
Retrieve sections for the article
int $articleID ID of article
Print article stats/number of views
Print summary for article (e.g. first few sentences of the text)
Use instead of GetArticleBeginning()
Function searches first 180 characters of text of the article for a dot.
If found it then creates summary text (few sentences) until that position
If not found, it takes first 300 characters of text as a summary
TO-DO:@todo: Allow for changing the length of summary as well as symbol that is being searched for
Print text of article
Print time of publishing of article
Print title of article
Print email of author
Return ID of author
Print extended information about author
Print name of author
Return filename
Return fileset description
Return image description
Return imagename
Return imageset description
Return thumbnail name for image
Retrieve parent section for the section
int $sectionID ID of section
Return parent sectionID of section
Retrieve related articles for article $articleID
DEPRECATED: from v1.71 DO NOT USE! This function is obsolete and will be deleted in next version
Get related article / DEPRECATED
Function has been replaced by GetArticle()
SEE: GetArticle()
Retrieves section
Return articleID describing section
Return filename of section
Return section ID
Print section name
Return priority of section
Loop through the sections and generate a section list
int $type type of section list to be displayed - 0 public list, 1 links using UL, 2 dropdown menu using  , 3 checkboxes below each other;
boolean $order - 0 order by priority, 1 order alphabetically
boolean $override - override current section filtering 0 do nothing, 1 override and show
string $attribute - ID or class attribute
DEPRECATED: from v1.71 DO NOT USE! This function is obsolete and will be deleted in next version
Replace file tags / DEPRECATED
Function does not have replacement for now - SORRY
TO-DO:Possibly some sophisticated image replacing in future
DEPRECATED: from v1.71 DO NOT USE! This function is obsolete and will be deleted in next version
Replace image tags / DEPRECATED
Function does not have replacement for now - SORRY
TO-DO:Possibly some sophisticated image replacing in future
Search articles in database
function accepts two styles of parameters due to backward compatibility
OLD STYLE (v1.70) is deprecated, use only new style with $settings array
"query"=>string text to find
"searchin"=>string where the search should be made: title,beginning,text (comma delimited list for multiple values)
"style"=>string should the search be fulltext (fulltext) or just free match (anypart)
"articlenumber"=>int number of articles to list
"offset"=>int offset to show articles from
"fromdate"=>string articles to be shown from date (date format in settings.php)
"todate"=>string articles to be shown up to date (date format as in settings.php)
"authorID"=>string articles written by author ID (comma delimited list for multiple values)
"sectionID"=>string articles in section ID (comma delimited list for multiple values)
"priority"=>boolean 0,1
"status"=>boolean 0,1
"articleID"=>int ID of article to be displayed
"order"=>string use MySQL format ("adate DESC, atime DESC, priority DESC" etc.)
EXCLUSION: !X = !4 - will exclude author/section with ID 4 if used in authorID or sectionID
array $settings array of parameters, see below:
If syndication module is active, test whether article is syndicated on the current
website, if yes continue with displaying in related articles, otherwise skip
Update number of views for article
int $articleID