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

Login with username, password and session length
  Home    Forum    Help    Search    Login    Register  
*
News : November 22, 2008, 05:17:30 pm
+  RSGallery2 Support Forums
|-+  Developers corner
| |-+  Nightly Builds for RSGallery2 Legacy, J1.5 or J1.0 - Now Reopened! (Moderators: Daniel Tulp, Chef Groovy)
| | |-+  [FIXED][SVN 255] navegation in gallery does not work
Advanced search
  « previous next »
Pages 1
Author
Topic: [FIXED][SVN 255] navegation in gallery does not work  (Read 5152 times)
« on: September 27, 2007, 04:36:37 pm »
john Offline
Dev Team
Sr. Member
*
Posts: 460

View Profile

Navegation through the gallery's pictures allways showd the first picture.
i've tracked down the error to the class rsgInstance.
unluckily i'm not very familiar with RSGallery and PHP, so please forgive me any mistakes :-)

   function getGallery(){
      $gid = rsgInstance::getInt( 'catid' );
      $gid = rsgInstance::getInt( 'gid', $gid );
      
                // get gallery id from picture id if none of the above is supplied
      $itemId = rsgInstance::getInt( 'id' );
      if(!$gid && $itemId)
         return rsgGalleryManager::getGalleryByItemID( $itemId );

      return rsgGalleryManager::get( $gid );
   }


   function getItem(){
      $id = rsgInstance::getInt( 'id' );
      $start = rsgInstance::getInt( 'start' );
      
      // use value from navegation link, if it is supplied
      if( $start ){
         $items = rsgInstance::getItems();
         return $items[ $start ];
      }

      if( !$id ){
         // there is no item set, return the first value from getItems()
         $items = rsgInstance::getItems();
         if( ! $items )
            return null;

         return array_shift( $items );
      }

      return rsgGalleryManager::getItem( $id );
   }

john

Joomla 1.5RC2
latest PHP/MySQL
IIS6
« Last Edit: November 11, 2007, 05:50:18 am by Ronald Smit » Logged
 
Reply #1
« on: September 28, 2007, 04:26:39 pm »
Andy Gipe Offline
Newbie
*
Posts: 17

View Profile Email

What file have you modified this code within? I'm not sure which .php file to look in to make this modification.  Huh
Logged
 
Reply #2
« on: October 01, 2007, 10:45:00 am »
Matthew G. Hauge Offline
Newbie
*
Posts: 26

View Profile Email

If this is a solution that works, why not add it to the code, as part of a upgrade.
Logged
 
Reply #3
« on: October 02, 2007, 04:55:46 am »
john Offline
Dev Team
Sr. Member
*
Posts: 460

View Profile

Hi ..

i'm not familiar with SVN and the patch does not really work properly (it's just a suggestion).
I've noticed there are certain differences between the way Joomla 1.5 and 1.0.x build the navigation bars.

But i repeat, i'm very new to all this .. just thought i share my ideas :-)

john
Logged
 
Reply #4
« on: October 02, 2007, 10:27:49 pm »
Jonah Offline
Administrator
Hero Member
*****
Posts: 1412

View Profile

John, you are completely correct.  Pagination was initially started to take place in rsgInstance, but it actually doesn't belong there.  I've just finished cleaning up everything and it's all working in r266.  It's now handled very similar to the J1.5 preferred method.  The only thing left is moving from id to gid, limit and limitstart.  I will be taking care of that tomorrow and will update here again when it's finished and ready for testing!
Logged

Due to time constraints, I have taken a step back from RSGallery2.  In the event of an emergency, you will need to PM me.
 
Reply #5
« on: October 03, 2007, 09:37:29 pm »
Jonah Offline
Administrator
Hero Member
*****
Posts: 1412

View Profile

fixed in 276
Logged

Due to time constraints, I have taken a step back from RSGallery2.  In the event of an emergency, you will need to PM me.
 
Print  Pages 1
« previous next »
Jump to: