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

Login with username, password and session length
  Home    Forum    Help    Search    Login    Register  
*
News : December 03, 2008, 10:30:58 pm
+  RSGallery2 Support Forums
|-+  RSgallery2 support forums
| |-+  Display and Templates (Moderators: Jonah, Tomislav Ribicic, Daniel Tulp, Ronald Smit)
| | |-+  [SOLVED]function showRSPath
Advanced search
  « previous next »
Pages 1
Author
Topic: [SOLVED]function showRSPath  (Read 3361 times)
« on: December 28, 2007, 04:29:52 am »
leahcim_dahc Offline
Newbie
*
Posts: 10



I am doing a little tweaking to the RSGallery2 component for my site. Everything is moving fairly well, minus one issue I have not been able to work out. The issue I am having is the display of the pathway. The pathway works, however it appends the first image title in the particular sub-gallery to the pathway when viewing that sub-gallery. For example:

Home  >  Main Gallery Page  >  Gallery  >  Sub-Gallery  >  Image Title

I think I have looked just about everywhere I can think of to change this, but haven't quite put my finger on it at the moment. The files I have investigated have been config.rsgallery2.php, display.class.php (semantic template), and a few others that didn't contain any 'showRSPath' code. I am going to assume the code I need to be looking at is within config.rsgallery2.php (function showRSPath), but can't quite figure out what the code needs to be replaced with to change this. It's not affecting the site, but just a minor annoyance. Any information to kick me in the right direction would be greatly appreciated. System information below. Thanks!

Joomla! version: 1.0.13
Php version: 4.4.7
MySQL version: 4.1.22
RSGallery2 version: 1.14.0 (SVN 378)


Chad
« Last Edit: December 28, 2007, 06:43:52 pm by leahcim_dahc » Logged
 
Reply #1
« on: December 28, 2007, 11:25:51 am »
leahcim_dahc Offline
Newbie
*
Posts: 10



Ok...maybe I might be somewhat confused. I went through just about every file that has anything to do with RSGallery2 and the pathway...or at least I believe I have. Anyrate, the only files that have any code in them that deal with the pathway (at least with the current template) is the semantic template index.php and config.rsgallery2.php.

I have been trying different ways to get my goal worked out...but keep hitting brick walls. I can completely remove $rsgDisplay->showRSPathWay(); from the index.php and the pathway completely disappears. Which...is obvious. However I do not want to completely remove the pathway from the gallery.

I have also toyed with config.rsgallery2.php. Meaning, making small changes to the code with no results other than when I removed or tweaked the wrong lines the site completely bombed out. There is a line at the end of the pathway section, which I believe is adding the image title to the pathway.

 
Code:
if (!empty($imgid)) {
            $database->setQuery('SELECT title FROM #__rsgallery2_files WHERE id = "'. $imgid . '"');
            $imgTitle = $database->loadResult();
            $mainframe->appendPathWay($imgTitle);
        }    // if

If I remove this bit of code, or comment it out...nothing changes. I have even tried completely commenting out the entire section, and even removing it. Still no change. The only change is if I toy with the before mentioned line in the index.php . There's nothing substantial there...just to show the pathway.

Are there any other files involved with appending the image title to the pathway, other than those I have mentioned? Seems strange to me I can completely remove the section regarding the pathway...and it still appears. It is obviously being called from somewhere else...but damned if I can find it. As a side note...I did download a nightly build and made comparisons between the files mentioned above...but didn't notice any differences.

Hopefully I am not missing anything completely obvious. Any input greatly appreciated. Thanks!


Chad
Logged
 
Reply #2
« on: December 28, 2007, 12:51:58 pm »
john Offline
Dev Team
Sr. Member
*
Posts: 482



Hello ...

the original pathway is defined in the meta template and can be overridden in any other template.

so removing it in semantic makes the one in template meta do the job.

i guess if you want to change something in the semantic template do it in the semantic/display.class.php

john
Logged
 
Reply #3
« on: December 28, 2007, 06:43:21 pm »
leahcim_dahc Offline
Newbie
*
Posts: 10



john-

Thanks for that...not sure how I overlooked it. I guessed I must have missed it while poking around at the files. I commented out the code regarding $item_title in the showRSPathway section of the Meta tempates display.class.php . It did the job I was after. Thanks!

If the code can be overridden in the semantic template, I may do some experimentation with combining the code to eliminate having to look so many places. Don't know if it will cause issues...but only one way to find out.  Cool

Code:
if (!empty($item)) {
$mainframe->appendPathWay( $item->title );
}

Thanks again!


Chad
Logged
 
Reply #4
« on: December 30, 2007, 12:03:06 am »
leahcim_dahc Offline
Newbie
*
Posts: 10



A quick update...

After modifying the code to produce the pathway I was after, I noticed any lower most sub-gallery was being displayed as a link. For example:

Home > Photos > Gallery > Sub-Gallery   <-- all were links

I obviously didn't need the current location to be linked. In particular if the pathway is going to be used for navigational purposes. I ended up modifying a bit more code to eliminate the last position in the pathway...or the current location from being turned into a link.

line 839 of display.class.php in the meta template:

link
Code:
if ( $gallery->id == $currentGallery && empty($item) ) {

no link
Code:
if ( $gallery->id == $currentGallery ) {


Chad
Logged
 
Reply #5
« on: April 07, 2008, 09:34:24 pm »
Max Offline
Newbie
*
Posts: 2



thanks a lot for your tip, looks much nicer this way!

i was wondering if you could have an answer to my issue.. the pathway works great except the root of the gallery "photos" is not a link, ie. in Home > Photos > Gallery, the "Photos" bit is not clickable. you can see an example at http://www.agitateatlanta.com/component/option,com_rsgallery2/Itemid,32/gid,12/

any idea as to why this may be?

thanks in advance,
max
Logged
 
Print  Pages 1
« previous next »
Jump to: