4
I think if you use a media gallery like
WebPhoto, which includes a media RSS, then you don't have to do anything.
Beware of the increased traffic, if a lot of users start to load hundreds of thumbnails at a time. Also Protector may not like it.
If you have a module with no RSS, then you can try to adapt the crude framework above. But it will be always module specific.
Things to do:
require("../lib/config.php");
require("../lib/functions.php");
require("../lib/tag_functions.php");
require("../user/database.php");
require("../user/user.php");
require("../lib/forms.php");
to be replaced by XOOPS includes eg (not complete)
include "../../mainfile.php";
include_once XOOPS_ROOT_PATH.'/include/functions.php';
global $xoopsConfig;
Replace all links with
http://www.mywebsite.com/... with the correct links to your site.
In
<lastBuildDate>' . date("D, d M Y h:i:s") . ' ESTlastBuildDate>
set the time zone.
In function getRssItems you have to adapt the database query to the XOOPS database sytem and to the tables for your module to obtain a list of IDs of photos that may be viewed by anonymous users (permissions!).
Function getRssItems should assemble an array with all the titles, texts and links to the tumbnails, photos and webpages from a given start to end index.
I think this could be more efficient combined in the first database query and the start and end index applied as a limit.
There seems also no check for the end of the gallery (last photo).