* API of plugin *

The method of collectint the latest reports from modules is as XOOPS search.

In XOOPS search, 
a file name and a function name are specified in xoops_version.php, 
like as follows.

$modversion['hasSearch'] = 1;
$modversion['search']['file'] = "include/search.inc.php";
$modversion['search']['func'] = "newbb_search";

In this module,
the file name and the function name are are fixed. 
A file name is "dada.inc.php".
A function name is directory name (module name) + "_new" like as "newbb_new". 

* Explanation of an item 

Item   Meaning  What's New Block RSS ATOM
title title   O O O 
link URL O O O 
time time   O O 
modified   - - O (Notes 1) 
issued Issue Time - O:Indispensable, -O (Notes 1) 
created Creation Time   - 
description (Notes 2) 
image Picture (Notes 3)
id Report Number   - - O (Notes 4) 
uid User ID   - - O (Notes 5)

indispensable, option, -:needlessness 

Notes 1: 
There are four items of time. 
"time" is indispensable. 
"modified" and "issued" are indispensable in ATOM.
When they are not set up, 
This program substitute "time".
"created" is option in ATOM.

Notes 2: 
In "description" HTML tag can be used. 
A whole sentence after rendering is set up. 

In What's New Block.
When the number of characters of "description" are less than "the number of characters of a summary",
A whole sentence is displayed.
When it is more than "the number of characters of a summary",
a summary is displayed.
A summary is striped HTML tag and shorten sentence.

In RSS, 
a summary is displayed.

In ATOM.
A whole sentence is displayed in content tag.
a summary is displayed in summary tag.

Notes 3: 
In "image" the thumbnail is set up.

For exsample,
it is used in xoopsgallery module and myalbum-p module.

Notes 4: 
In ATOM, the unique number in id tag is indispensable.
This program generate the unique number from a module number and "id". 
When "id" is not set up,
This program substitute a temporary number.

Notes 5: 
In ATOM, the author name in name tag is indispensable. 
This program get login name from user id, 
and use as an author name. 

In ATOM, the author's URL in url tag and the author's email in email tag are option. 
This program does not use them as a privacy policy. 

For exsample,
it is used in xfsection module.
Becuase the author name is displyed in in xfsection module.


* Implementation *

1. Configuration File 
You can set up in admin/index.php. 
You can select module which is displayed in What's New block. 
It sets up which module is displayed on a new-arrival report list block. 
This configuration is saved in cache/conf.php not mysql DB.

2. Plugin
You can place a data.inc.php plugin under this whtasnew module or also under each modules.
In first, this program check to exist modules/MODULUE_NAME/include/data.inc.php.
If yes, this include it. 
If not, this check to exist modules/whatsnew/plugins/MODULUE_NAME/data.inc.php. 
If yes, this include it. 
If not, this judge that there is no plugin. 

3. What's New block 
blocks/block.new.php call each data.inc.php.

4. RSS 
4.1 Creation of RSS 
It has followed from backend.php of XOOPS core. 
The template file has followed from system_rss.html of XOOPS core. 

The display form of a date differs. 
If it is "Wed and 25 Aug 2004 23:18:49 JST" as backend.php, 
an error will be occured by FEED Validator. 
http://feedvalidator.org/

This program changed into the form of "Wed and 25 Aug 2004 23:18:49+0900." 
as following RSS 2.0 Specification.
http://blogs.law.harvard.edu/tech/rss

4.2  Display of RSS 
I created newly the function of RSS Auto Recovery.
This program use xmlrss2parser.php of XOOPS core for RSS parser.

5.ATOM 
5.1 Creation of ATOM 
It is created newly this function.
The format of XML has followed from MovableType blog. 

5.2 Display of ATOM 
It is created newly the function of ATOM Auto Recovery and ATOM parser.

6.weblog updte ping 

6.1 Sendind of Ping 
This function is created newly.

6.2 Recieving of Ping 
This function is created newly.


