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

Login with username, password and session length
  Home    Forum    Help    Search    Login    Register  
*
News : August 21, 2008, 10:49:15 PM
+  RSGallery2 Support Forums
|-+  RSgallery2 support forums
| |-+  Display and Templates (Moderators: Jonah, Tomislav Ribicic, Daniel Tulp, Ronald Smit)
| | |-+  A Few Issues - Page Title, Navigation, Pathway
Advanced search
  « previous next »
Pages 1
Author
Topic: A Few Issues - Page Title, Navigation, Pathway  (Read 2013 times)
« on: March 14, 2008, 09:22:58 PM »
Tom Offline
Newbie
*
Posts: 4

View Profile

Hello, I have been working on a RSGallery for a little while now, reading your forum and learning how to edit things. I have a few issues that I have been unable to solve and it would be very helpful if someone could advise me  Smiley

(I have a gallery to host with 6 main galleries, each with 3-6 subgalleries containing up to 60 images each.)

1. Page Title (Meta Data)
I am trying to create this page title: Gallery Name - Subgallery Name - Image Name. At the moment it will only show: Subgallery Name - Image Name without the parent gallery.

Also when browsing a subgallery on the view thumbnails screen, the title of the 1st thumbnail is appended onto the page title.

2. Gallery Navigation
On the image view screen, the navigation is not suitable - ideally I would like to replace this with - 5 thumbnails, of the image and the 2 either side in the gallery, plus a 1st and last link. Is there a command to identify the position of the current image in the gallery? Or to go to the 1st / last?

3. Pathway
On the image view screen the subgallery in the pathway is not linked - I guess this is something to do with the editing I did to remove the url from the Subgallery on the thumbnail browsing screen.

I hope I have explained myself clearly, please let me know if I need to supply more info.

Any help or basic pointers would be greatly appreciated!

I hope I can stick with RSGallery, I like it very much so far.....

Thanks!
Logged
 
Reply #1
« on: April 02, 2008, 09:56:06 AM »
bertm Offline
Newbie
*
Posts: 8

View Profile Email

1 Page Title Meta Data

I found the command to comment out in order to prevent the inclusion of the image title from the meta data.  For my own needs I was happy to remove it entirely, though I understand you would prefer to make it conditional to show only when a single image is displayed.

In the file templates\meta\display.class.php, find function metadata() around line 225 or so.  about 10 lines in to that function find the following command:
$title .= ' - ' . $item->title; 
and comment it out.

About including the gallery+subgallery names, I think that is a great idea too.  I think the secret to doing that is in the showRSPathWay() function in the meta\display.class.php file, located just above the one I mentioned. 

2. Gallery Navigation - I was thinking about this too. I think it could be an easy mod to add a mouseover of the thumbnail when pointing to the image number index.

3. Pathway
Yeah, I guess you broke your code on this one.  Restore the original routine.


4. Pathway WITHOUT  "Home >> Gallery"

So here is my question. I think the "Home >> Gallery" links that precede the gallery name in the path are useless and sorta clutter up my screen.  I wish to remove it and show only the gallery name, or at least remove Home.  How can this be done?  In the file semantic/index.php on line 33 I see

// append to Joomla's pathway
$rsgDisplay->showRSPathWay();

as if to suggest that this command could be altered to not pass the current joomla pathway data.  I am lost.  How can I do this? I am using Joomla 1.0.15 and svn679
Logged
 
Reply #2
« on: April 19, 2008, 01:27:59 PM »
Tom Offline
Newbie
*
Posts: 4

View Profile

Thanks for the response  Smiley

I have now upgraded to Joomla 1.5, installed RSGallery2 and I have the same main problems with the Page Title, Pathway / Breadcrumbs.

I think I can resolve this problem using a conditional statement to asses whether the page is a gallery or viewing an image.

So it would be very helpful if anyone could suggest how I'd do this?

It is really frustrating as I am very close to achieving what I need but my coding is not so hot.....I would pay for someone to develop a solution for me!!

Please help Smiley
Logged
 
Reply #3
« on: April 20, 2008, 12:55:31 PM »
Tom Offline
Newbie
*
Posts: 4

View Profile

This is what I am trying to achieve re Page Titles


Hi Daniel,

Thanks for the quick reply.

RS Gallery needs, IMHO, a mechanism that allows users to have the title and meta data modified based upon the title of the picture or the category name.  If you look at my site I hacked the rsgallary2 html php file.  Here are examples:
http://www.celebritysensuo.us/index.php?option=com_rsgallery2&Itemid=88888894Main Gallery Page - Uses Gallery Title in site title and meta data
http://www.celebritysensuo.us/index.php?option=com_rsgallery2&Itemid=88888894&catid=7Category Name uses in site title and meta data
http://www.celebritysensuo.us/index.php?option=com_rsgallery2&Itemid=88888894&page=inline&id=6&catid=7&limitstart=1 Cat Name and Pic Title uses in site title and meta data

Now if you look at the stock RSGallery2 each page has same title and meta data - what happens in Google, Yahoo, and MSN (especially Google though) is they look at this as duplicate content and will supplmental the page (which is bad).  I do quite a bit of SEO work for clients and my own sites and I can assure you the gallery component is poorly optimized for search engines.


And here (I think) is the code that achieved the above (from their rsgallery2.html.php) -

Code:
        $database->setQuery("SELECT COUNT(*) FROM #__rsgallery2_files WHERE gallery_id = '$catid'");
        $numPics = $database->loadResult();

    if(!isset($limitstart))
        $limitstart = 0;

    //instantiate page navigation
    $pagenav = new mosPageNav($numPics, $limitstart, $PageSize);
        $thisPage = floor($limitstart/$PageSize)+1;
        $maxPage = ceil($numPics / $PageSize);

    if (!$numPics)
        {
        echo "1" . _RSGALLERY_NOIMG;
        }
        $database->setQuery("SELECT * FROM #__rsgallery2_files".
           " WHERE gallery_id = $catid".
           " ORDER BY ordering ASC".
           " LIMIT $limitstart, $PageSize");
        $rows = $database->loadObjectlist();

    if (!$rows) echo _RSGALLERY_NOIMG;

    $j = $limitstart;
    $i =0;
        foreach($rows as $row)
            {
            galleryUtils::addHit($row->id);
            $size = getimagesize(imgUtils::getImgDisplay($row->name, true));
            $ext = substr(strchr($row->name, '.'),1);

global $mainframe;
            $mainframe->setPageTitle( ' '. htmlspecialchars(stripslashes(galleryUtils::getCatNameFromId($catid)), ENT_QUOTES) .' - '. htmlspecialchars(stripslashes($row->title), ENT_QUOTES) );
     if ($row->descr) {
     $strtmp = htmlspecialchars(stripslashes($row->descr), ENT_QUOTES);
     $mainframe->appendMetaTag( 'description', $strtmp);
     } else
     $mainframe->appendMetaTag( 'description', _RSGALLERY_NODESCR );

Code:
  function RSGalleryTitleblock($catid, $intro_text)   {
        global $my, $mosConfig_live_site, $rsgConfig, $Itemid;
       
        if ( isset($_REQUEST['page']) )
            $page = mosGetParam ( $_REQUEST, 'page'  , '');
else
$page = NULL;

        //$user_cats  = $rsgConfig->get('uu_enabled');
        //$my_galleries = $rsgConfig->get('show_mygalleries');
        ?>
        <div style="float:right; text-align:right;">
        <ul id='rsg2-navigation'>
            <li>
                <a href="<?php echo sefRelToAbs("index.php?option=com_rsgallery2&amp;Itemid=".$Itemid); ?>">
                <?php echo _RSGALLERY_MAIN_GALLERY_PAGE?>
                </a>
            </li>
            <?php 
            
if ( !$my->id == "" && $page != "my_galleries" && $rsgConfig->get('show_mygalleries') == 1):
            
?>

            <li>
                <a href="<?php echo sefRelToAbs("index.php?option=com_rsgallery2&Itemid=".$Itemid."&page=my_galleries");?>">
                <?php echo _RSGALLERY_MY_GALLERIES?>
                </a>
            </li>
            <?php
            
elseif( $page == "slideshow" ): 
            
?>

            <li>
                <a href="<?php echo sefRelToAbs("index.php?option=com_rsgallery2&Itemid=".$Itemid."&page=inline&catid=".$catid."&id=".$_GET['id']);?>">
                <?php echo _RSGALLERY_SLIDESHOW_EXIT?>
                </a>
            </li>
        <?php endif; ?>
        </ul>
        </div>
<div style="float:left;">
        <?php if( isset( $catid )): ?>
            <h2 id='rsg2-galleryTitle'><?php htmlspecialchars(stripslashes(galleryUtils::getCatNameFromId($catid)), ENT_QUOTES?></h2>
<?php global $mainframe$mainframe->setPageTitle$row->title .' 'htmlspecialchars(stripslashes(galleryUtils::getCatNameFromId($catid)), ENT_QUOTES) ); ?>
        <?php elseif( $page != "my_galleries" ): ?>
            <h2 id='rsg2-galleryTitle'><?php echo _RSGALLERY_COMPONENT_TITLE ?></h2>
        <?php endif; ?>
        <div id='rsg2-galleryIntroText'>
        <?php global $mainframe$mainframe->setPageTitle$row->title .' 'htmlspecialchars(stripslashes($intro_text), ENT_QUOTES) ); ?>
  <?php //echo htmlspecialchars(stripslashes($intro_text), ENT_QUOTES); ?>
        <?php echo stripslashes($intro_text); ?>
        </div>
        <?php
        ?>

       
        </div>
        <?php
    
}

It seems rsgallery2.html.php is not in later releases and has been replaced by display.class.php? But I have not got this code to work in display.class.php yet.

Any ideas? .....please
« Last Edit: April 20, 2008, 01:06:07 PM by Tom » Logged
 
Print  Pages 1
« previous next »
Jump to: