Subject:*
<
Name/Email:*
<
Message Icon:*
<
Select*
<
Message:*
<



Click the Preview to see the content in action.
Options:*
<
Confirmation Code*
<
0 + 8 = ?  
Input the result from the expression
Maximum attempts you can try: 10
*
<
   

Re: Create a XOOPS site with Cooliris
by ghia on 2009/1/3 11:28:52

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:
le="color: #000000"><?php 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)
le="color: #000000"><?php 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
le="color: #000000"><?php <lastBuildDate>' . date("D, d M Y h:i:s") . ' EST</lastBuildDate>
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).
Re: Create a site xoops whith cooloris
by sailjapan on 2009/1/3 5:59:06

bump
Re: Create a site xoops whith cooloris
by sailjapan on 2008/10/18 17:03:13

Looks like the easiest way would be to create an RSS feed from your MySQL db using the code they give here

<? header('Content-type: text/xml'); ?> <?php 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"); ?>  <?php $pbpathrev = strrev($PATH_INFO); $pbslashpos = strpos($pbpathrev, '-'); $pbpathcut = substr($pbpathrev, 0, $pbslashpos); $pbdotpos = strpos($pbpathcut, '.'); $pbrevimgid = substr($pbpathcut, ($pbdotpos +1)); $currentset = strrev($pbrevimgid); $rssWriter = new PhotoRSSWriter; $rssWriter->display($currentset); class PhotoRSSWriter{ function display($currentset){ echo $this->getRss($currentset); } function getRss($currentset){ $rss = $this->getRssHeader($currentset); $rss .= $this->getRssItems($currentset); $rss .= $this->getRssFooter(); return $rss; } function getRssHeader($currentset){ $rssHeader = '<rss version="2.0" xmlns:media="http://search.yahoo.com/mrss/" xmlns:atom="http://www.w3.org/2005/Atom"> <channel> <title>My Website '.$currentset.'</title> <link>http://www.mywebsite.com/</link> <description>My Website is a great collection of my things.</description> <language>en-us</language> <lastBuildDate>' . date("D, d M Y h:i:s") . ' EST</lastBuildDate> <atom:link href="http://mywebsite.com/photos.rss" rel="self" type="application/rss+xml" /> '; if($currentset > 0) { $rssHeader .='<atom:link rel="previous" href="http://www.mywebsite.com/rss/photos-'.($currentset-1).'.rss" /> '; } $rssHeader .='<atom:link rel="next" href="http://www.mywebsite.com/rss/photos-'.($currentset+1).'.rss" /> '; return $rssHeader; } function getRssFooter(){ $rssFooter .= ' </channel> </rss>'; return $rssFooter; } function getRssItems($currentset){ //Set up Database connection mysql_connect ('localhost:3306','weblog','weblog'); mysql_select_db ('weblog_new'); $query = "select c.id from content c inner join content_images ci on c.id = ci.content_id"; $exec = mysql_query($query); $browsekey = mysql_num_rows($exec); $startindex =0; $endindex=99; if($currentset > 0) { $startindex = ($currentset*100)+$startindex; $endindex = ($currentset*100)+$endindex; } $rssItems = ""; // Get the Array of rss items $rssItemArray = getRssItems($startindex, $endindex); foreach ($rssItems as $result) { $id = $result['item_id']; $title = $this->getBareText($result["text"], 50); $text = $this->getBareText($result["text"]); $name = $result["author"]; $img_id = $result["img_id"]; $timestamp = $result["blog_created"]; $rssItems .= " <item> <title>" .$title . "</title> <link>http://www.mywebsite.com/browse/show-" .$id. ".html</link> <media:thumbnail url="http://www.mywebsite.com/img/image/".$img_id.".jpg"/> <media:content url="http://www.mywebsite.com/img/orig/" .$img_id . ".jpg"/> <guid isPermaLink="false">".$img_id."</guid> </item>rn"; } return $rssItems; } function getRssItems($startindex, $endindex) { // goes out and gets an array of data, one row per rss item. } function getBareText($text, $crop = false){ $text = $crop? crop_string(remove_ubb($text), $crop) : $text; $text = htmlspecialchars($text, ENT_QUOTES); $text = trim($text); return $text; } } ?>


Anyone think this is doable? Would be very cool if so...
Create a site xoops whith cooloris
by tatane on 2008/10/18 16:34:11

Hello


I would like to create an image and video using this style effects

Is this possible?

merci

Who's Online

234 user(s) are online (195 user(s) are browsing Support Forums)


Members: 0


Guests: 234


more...

Donat-O-Meter

Stats
Goal: $15.00
Due Date: Jul 31
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $15.00
Make donations with PayPal!

Latest GitHub Commits