Hi!
First at all, thank you for your work with cpmfech (and cpg, of course). Sorry to answer here but I can find a "new topic" button.
I'm trying to change a little the rss for our gallery. There is for a travellers comunity so we usually upload a lot of images togheter in a single album. The actual rss_lastadded.php reflects all photos in the feed.
I'd like to have in the feed just one entry for each album updated with the image of the last photo added to album. We have a syndicated system with wordpress where the main page is feeded with the entries of our individual travel pages. Now, it will be fine if we can feed also that main page with the updates in the CPG gallery.
I've take a look to docs and try some hacks, but It does not work.
I'd like to use the function showAlbumsUpdatedOverLastDays() instead of addLastAddedMedia()in the rss, but I believe the first one is not designed for it.
I've try to put in rss_image_albums.php (my version of rss_lastadded.php)
<?php
//
// cfrssget example file that returns the last added images
// RELEASE VERSION: 1.6.2
//
$ENABLED =true;
if ($ENABLED) {
include "cfrssget.php";
$partialurltocpm = "/"; //Part of the URL to CPG without the host and domain
//
// THESE SPECIFY THE INFORMATION USED IN YOUR FEED
$rssFeedTitle = "La Descripción del Mundo";
$rssFeedDescription = "Últimos albumes actualizados en http://www.mapamundi.org";
$rssFeedSiteUrl = "http://www.mapamundi.org";
$rssFeedProviderUrl = "http://www.mapamundi.org/rss_imagenes_albums.php";
$rssFeedImageTitle = "Logo";
$rssFeedImageURL = 'http://mapamundi.info/wp-content/themes/parishuddha-mmi/mapaboton.jpg';
$rssFeedImageLink = "http://www.mapamundi.org";
$rssFeedImageAlt = "logo";
$rssItemTitle = "Nuevas fotos en %a por %o";
$rssItemAlternateTitle = "Nuevas fotos en %a por %o";
$rssItemDescription = "%c<br/>%C<br/>Última foto %f<br/>Tamaño %S kb";
$rssItemAlternateDescription = "%c<br/>%C<br/>Última foto %f<br/>Tamaño %S kb";
$totalToShow = 1;
///// END OF USER SETTINGS /////////
$cfrss = new cfrss($partialurltocpm);
$cfrss->startFeed($rssFeedTitle, $rssFeedDescription, $rssFeedSiteUrl, $rssFeedProviderUrl);
$cfrss->setFeedImage($rssFeedImageTitle,$rssFeedImageURL,$rssFeedImageLink,$rssFeedImageAlt);
$cfrss->setItemTitle($rssItemTitle,$rssItemAlternateTitle);
$cfrss->setItemDescription($rssItemDescription,$rssItemAlternateDescription);
[b] $cfrss->showAlbumsUpdatedOverLastDays($totalToShow);[/b]
$cfrss->endFeed();
}
?>
And also in cfrssget.php
switch ($cmd_parameter) {
case ('mostviewed'):
$cfrss->addMostViewedMedia($totalToShow);
break;
case ('toprated'):
$cfrss->addTopRatedMedia($totalToShow);
break;
case ('last'):
$cfrss->addLastAddedMedia($totalToShow);
break;
case ('random'):
$cfrss->addRandomMedia($totalToShow);
break;
default:
$cfrss->showAlbumsUpdatedOverLastDays($totalToShow);
break;
}
BTW I'm not kind in rss, but why is needed to duplicate code between rss_last_added.php and cfrssget.php? I've changed titles and descriptions in the first one but feed always shows the ones in cfrssget.php
Thank you a lot for all.
Best regards,
Colegota