Beispiel #1
0
    function __construct()
    {
        parent::__construct();

        $this->register_function('print_price', array($this,'smarty_print_price'));
		$this->register_function('printdate',array($this,'smarty_printdate'));
		$this->register_function('set_css',array($this,'smarty_set_css'));
		$this->register_function('jroute',array($this,'smarty_jroute'));
        $cfg=BidsHelperTools::getConfig();
		if($cfg->theme) {
            $this->template_dir = JPATH_COMPONENT_SITE . DS . 'templates' . DS . $cfg->theme . DS;
        }

        $this->assign_by_ref('bidCfg',$cfg);
        $this->assign('AUCTION_PICTURES',AUCTION_PICTURES);
        $this->assign('AUCTION_TYPES',array(
            'AUCTION_TYPE_PUBLIC'=> AUCTION_TYPE_PUBLIC,
            'AUCTION_TYPE_PRIVATE'=>AUCTION_TYPE_PRIVATE,
            'AUCTION_TYPE_BIN_ONLY'=> AUCTION_TYPE_BIN_ONLY
        ));
        $this->assign('TEMPLATE_IMAGES',JURI::root().'components/'.APP_EXTENSION.'/templates/'.$cfg->theme.'/images/');
        $this->assign('links',new BidsHelperRoute() );

        $this->config_dir =JPATH_COMPONENT_SITE.DS.'templates'.DS.'configs'.DS;

        $userProfile = BidsHelperTools::getUserProfileObject();
        $has_profile = $userProfile->checkProfile();
        $this->assign('has_profile', $has_profile);

        $jdoc = JFactory::getDocument();
        $this->assign('document_type', $jdoc->getType()); // from 1.7.0

        $arr_dateformat = array(
            'Y-m-d' => '%Y-%m-%d',
            'Y-d-m' => '%Y-%d-%m',
            'm/d/Y' => '%m/%d/%Y',
            'd/m/Y' => '%d/%m/%Y',
            'd.m.Y' => '%d.%m.%Y',
            'D, F d Y' => '%Y-%m-%d');
        $this->assign('opt_date_format', $arr_dateformat[$cfg->bid_opt_date_format]);


    }