This is what I am trying to achieve re Page Titles
And here (I think) is the code that achieved the above (from their rsgallery2.html.php) -
$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 );
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&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