RSGallery2 Support Forums
Welcome, Guest. Please login or register.

Login with username, password and session length
  Home    Forum    Help    Search    Login    Register  
*
News : October 04 05:16:23 AM
+  RSGallery2 Support Forums
|-+  Developers corner
| |-+  Nightly Builds for RSGallery2 in Joomla 1.5 (Moderators: Jonah, Daniel Tulp, Ronald Smit)
| | |-+  [SVN 817] RSGallery2 2.00 with sh404SEF -> pagination fails
Advanced search
  « previous next »
Pages 1
Author
Topic: [SVN 817] RSGallery2 2.00 with sh404SEF -> pagination fails  (Read 1948 times)
« on: July 23 08:11:37 PM »
mirjam Offline
Dev Team
Newbie

Posts: 33

View Profile

Problem
When I look at an image in a gallery with multiple images (e.g. index.php?option=com_rsgallery2&page=inline&gid=1&limit=1&Itemid=53&limitstart=1) I cannot switch between the images.

This only happens with sh404SEF enabled. Somehow I cannot get the 'limit' value and it's also strange that at some point sh404SEF uses an 'id' variable in the URL where without sh404SEF 'gid' is used as a variable. (More specific sh404SEF info at http://extensions.siliana.com/forums/index.php?topic=9697.msg12663#msg12663)

Goal
Have a working sh404SEF plugin for RSGallery2 2.00 (as I made for RSGallery 1.13 and 1.14).

Installation:
- Joomla 1.5.4 (en-GB)
- RSGallery2 2.00 beta SVN 817
- sh404SEF 1.0.11 beta build 147 (J! 1.5 native)

Why post here?
- I found in \admin\includes\gallery.class.php line 175:
Code:
// limit handling was borked but I had this fixed.  we can use it again....
I'm curious what was wrong, has it to do with my problem?
- I found in \site\templates\semantic\display.class.php lines 341/342:
Code:
// second, the limit parameter is not being written.  this is must be a bug or something.  weird.
$pageLinks = str_replace( ";id={$item->id}", ";gid={$gallery->id}&limit=1", $pageLinks );
Do I encounter the same bug? Can it be fixed?
- I wonder if you guys know an explanation for sh404SEF not working well maybe along the line of RSGallery 1.14 not using sefRelToAbs but its own Jroute that was a bit unusual for Joomla 1.0.x components if I understood correctly.
Logged
 
Reply #1
« on: July 28 07:38:48 PM »
mirjam Offline
Dev Team
Newbie

Posts: 33

View Profile

Problem pinpointed...

The problematic code (from /components/com_rsgallery2/templates/semantic/display.class.php) is as follows:
Code:
if( rsgInstance::getInt( 'id', 0 )){
// i'm not fond of this style of hackery
// first we need to replace the item id with the gallery id
// second, the limit parameter is not being written.  this is must be a bug or something.  weird.
$pageLinks = str_replace( ";id={$item->id}", ";gid={$gallery->id}&limit=1", $pageLinks );
$pageLinks = str_replace( "/item/{$item->id}", "/category/{$gallery->id}", $pageLinks );
}

When I comment
Code:
$pageLinks = str_replace( ";id={$item->id}", ";gid={$gallery->id}&limit=1", $pageLinks );
and disable sh404SEF the behaviour is exactly as if sh404SEF is enabled: the pagination fails.

sh404SEF does not know that it should not use id and that it should use gid and limit. Is there any way to thell it what the "new" variables to use are?
Logged
 
Reply #2
« on: August 04 05:22:14 PM »
schlogo Offline
Jr. Member
**
Posts: 54

View Profile Email

hello

any news about those problems?
Logged
 
Print  Pages 1
« previous next »
Jump to: