Beispiel #1
0
    function display($tpl_name, $cache_id = null, $compile_id = null){
//    var image_link_dir='/components/com_rbids/images/';
        $doc = JFactory::getDocument();
        $doc->addScriptDeclaration("var image_link_dir='".
            JURI::root().'components/'.APP_EXTENSION.'/images/'
        ."';");
                
        parent::display($tpl_name, $cache_id = null, $compile_id = null);
    }
Beispiel #2
0
 function PurgeCache()
 {
     jimport('joomla.filesystem.folder');
     $dir = AUCTION_TEMPLATE_CACHE;
     if (!JFolder::exists($dir)) {
         JFolder::create($dir);
     }
     $requested_by = $_SERVER['HTTP_REFERER'];
     if (JFolder::exists($dir)) {
         if (is_writable($dir)) {
             $smarty = new JTheFactorySmarty();
             $smarty->clear_compiled_tpl();
             $this->setRedirect($requested_by, JText::_("COM_BIDS_CACHED_CLEARED"));
         } else {
             $this->setRedirect($requested_by, JText::_("COM_BIDS_PERMISSION_UNAVAILABLE_FOR_THIS"));
         }
     } else {
         $this->setRedirect($requested_by, JText::_("COM_BIDS_CACHE_FOLDER_DOESNT_EXIST"));
     }
 }