Пример #1
0
 function set($array, $hash = 'default', $overwrite = true)
 {
     foreach ($array as $key => $value) {
         rsgInstance::setVar($key, $value, $hash, $overwrite);
     }
 }
Пример #2
0
    /**
     * Show page navigation for Display image
     */
    function showDisplayPageNav()
    {
        //MK this is where the images are shown with limit=1
        $gallery = rsgGalleryManager::get();
        $itemId = rsgInstance::getInt('id', 0);
        if ($itemId != 0) {
            // if the item id is set then we need to set the gid instead
            // having the id variable set in the querystring breaks the page navigation
            // i have not found any other way to remove a query variable from the router
            // JPagination uses the router to build the current route, so removing it from the
            // request variables only does not work.
            $app =& JFactory::getApplication();
            $router =& $app->getRouter();
            $router->_vars['gid'] = $gallery->id;
            unset($router->_vars['id']);
            // set the limitstart so the pagination knows what page to start from
            $itemIndex = $gallery->indexOfItem($itemId);
            $router->setVar("limitstart", $itemIndex);
            rsgInstance::setVar('limitstart', $itemIndex);
        }
        $pageNav = $gallery->getPagination();
        $pageLinks = $pageNav->getPagesLinks();
        ?>
		<div align="center">
			<?php 
        echo $pageLinks;
        ?>
		</div>
		<?php 
    }