RSGallery2 Support Forums

Developers corner => Nightly Builds for RSGallery2 Legacy, J1.5 or J1.0 - Now Reopened! => Topic started by: mirjam on January 11, 2008, 08:29:53 am



Title: [FIXED][SVN-573] - catid in URL instead of gid?
Post by: mirjam on January 11, 2008, 08:29:53 am
It seems to me that from v1.13.1 to v1.14.1 the variables used in the URL have changed. At least, what used to be catid is now gid with one exception which is in the file \templates\semantic\display.class.php on line 473. It says
Code:
<a href="<?php echo JRoute::_("index.php?option=com_rsgallery2&Itemid=$Itemid&catid=".$kid->id); ?>">
I think "catid" should be "gid" for consistency, and it works nicely on my localhost.


If you wonder "Why? would she mind..." Well, I've been playing with sh404SEF and a sef extension file for RSGallery 1.13.1 and I wondered why it would not work with 1.14.1.
I have multiple galleries of which the first has two sub galleries and one of those has another subgallery. In terms of gallery-ids it is
0 -- 1
0 -- 5 -- 4 -- 3
0 -- 5 -- 2
The main page was showing galleries with id 1 and 5 (with &gid=1 and $gid=5 for their URLs) and a link (after the text "Subgalleries:") to the galleries with id 4 and 2. These last two have $catid=4 and $catid=2 for their URLs.

I think you've made the URL variables more consistent (e.g. when you have gid and limitstart you don't need id) although I'm still wondering what the purpose of Itemid is.


Title: Re: [SVN-573] - catid in URL instead of gid?
Post by: Jonah on January 18, 2008, 04:57:58 pm
Itemid is how Joomla! keeps track of what menu item a component belongs to.

you are correct in that catid has been deprecated in favor of gid.  they both still work but catid is on it's way out.  i have fixed the line you mentioned in r586.  thanks!


Title: Re: [SVN-573] - catid in URL instead of gid?
Post by: mirjam on January 19, 2008, 02:49:07 pm
Quote
i have fixed the line you mentioned in r586
Thanks!

Quote
Itemid is how Joomla! keeps track of what menu item a component belongs to.
Then I have another question: Why don't all the RSGallery2 URLs (to images) have Itemid in them? E.g. the images in a gallery have links like http://mysite.com/index.php?option=com_rsgallery2&page=inline&id=360 (http://mysite.com/index.php?option=com_rsgallery2&page=inline&id=360) without Itemid.


Title: Re: [FIXED][SVN-573] - catid in URL instead of gid?
Post by: Jonah on January 22, 2008, 10:15:41 pm
Every link should have an Itemid, so that would be a bug.  Joomla! will guess the Itemid if there is not one specified, so that's probably why it hasn't been noticed before, if you only have one link to RSG2 then it would not be an issue.

Fortunately in J1.5 we don't need to manually add the Itemid, Joomla does that for us.  :)

Fixed in r613


Title: Re: [FIXED][SVN-573] - catid in URL instead of gid?
Post by: mirjam on February 03, 2008, 10:17:22 am
Hi Jonah,

I saw that in r632 you added the missing Itemid to the random (and then of caurse also the latest) image links. Works fine  :)

The second question in my (now missing) post was about a possibly missing limitstart.
When I click the RSGallery2 Main Menu link and go to a gallery (with multiple images) and click on an image but not the first I get the following navigation: start prev 1 2 3 ... next end. The links to "start" and "1" don't have limitstart=0. It is not really necessary though, I just wondered if this was on purpose.


Title: Re: [FIXED][SVN-573] - catid in URL instead of gid?
Post by: Jonah on February 03, 2008, 11:19:15 am
Ah yes, and now for my now missing response.  :/

Ya, saw your post and fixed the Itemid.

limitstart defaults to 0 so no worries there.  Oh, and your third question, ya, post in a new post for new topics so others can more easily find it if needed.   :)

Cheers,