RSS Feed for Specific Tags showing 20 newest photos

CWhitmer
CWhitmer's picture

Joined: 2010-01-21
Posts: 34
Posted: Sun, 2013-05-19 17:08

I use the mini slideshow for the main page on my website www.WhitmerDecks.com.
It works well and I use an RSS feed to supply the photos to it.
The code to call the script is:

<script>
$('#mini-g3').minislideshow({
url: '/gallery3/index.php/rss/feed/tag/tag/4',
width: 436,
height: 277,
delay: 3,
link: true,
target: '_blank',
fullsize: true,
resize: true,
radius: '10px',
shuffle: true
});
</script>

This works well and except that it shows the oldest photos that have the tag id of 4 associated with them. As I add more photos and tag them to be part of the slideshow on the main page they never show because the RSS feed starts showing from the oldest to the newest.

What I would like is an RSS feed that will get the latest 20 photos that are tagged with a tag id of 4 instead of the oldest.
Do you know if there is a way to do this?

Thanks for any help.

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Sun, 2013-05-19 18:51

I have never used the http://codex.galleryproject.org/Gallery3:Modules:rss_extra it might help.

Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team

 
CWhitmer
CWhitmer's picture

Joined: 2010-01-21
Posts: 34
Posted: Mon, 2013-05-20 02:05

I looked into rss_extra, but it does not seem to have what I want either.
Actually, I could not get it to work at all.

Thanks for the response though.

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Mon, 2013-05-20 16:21

I not good a DB queries. I think you would have to edit the tag_rss.php file.
$tag = ORM::factory("tag", $id); to add a sort to that, but looking at the table it only has 3 columns and none are date or anything else sort-able.
So I suspect a table join with the items_tags table would help but that is over my head.

Dave
_____________________________________________
Blog & G2 || floridave - Gallery Team

 
CWhitmer
CWhitmer's picture

Joined: 2010-01-21
Posts: 34
Posted: Tue, 2013-05-21 02:28

The one thing I am good with is the database.
I can modify the DB query if I know where it is, but I don't know where the tag_rss.php file is.
It is not in any of the module folders on my server.
Does it actually reside on a remote server?

I can write the query to get he information I want.

Would look something like this.

SELECT
items.name,
items.created
FROM
items,
items_tags,
tags
WHERE
items.id = items_tags.item_id
AND items_tags.tag_id = tags.id
AND items.type = "photo"
AND tags.name = "WDHomeSS"
ORDER BY
items.created DESC
LIMIT 50

 
floridave
floridave's picture

Joined: 2003-12-22
Posts: 27300
Posted: Tue, 2013-05-21 02:46