示例#1
0
    function cbTabHandler() {

        if(!file_exists(JPATH_SITE.DS.'components'.DS.'com_bids'.DS.'bids.php')) {
            return "<div>You must First install <a href='http://www.thefactory.ro/shop/joomla-components/auction-factory.html'> Auction Factory </a></div>";
        }

        //need the whole framework loaded so we can access the price_item classes, in order to get the correct price for current user (verified, powerseller,...)
        require_once(JPATH_ADMINISTRATOR.DS.'components'.DS.'com_bids'.DS.'thefactory'.DS.'application'.DS.'application.class.php');

        $cnfigfile = JPATH_ROOT.DS.'administrator'.DS.'components'.DS.'com_bids'.DS.'application.ini';
        $MyApp = JTheFactoryApplication::getInstance($cnfigfile, true);

        JTable::addIncludePath(JPATH_ADMINISTRATOR.DS.'components'.DS.'com_bids'.DS.'tables');
        JHTML::addIncludePath(JPATH_SITE.DS.'components'.DS.'com_bids'.DS.'helpers'.DS.'html');

        require_once(JPATH_ROOT.DS.'components'.DS.'com_bids'.DS.'options.php');
        require_once(JPATH_ROOT.DS.'components'.DS.'com_bids'.DS.'defines.php');

        require_once(JPATH_SITE.DS.'components'.DS.'com_bids'.DS.'helpers'.DS.'bids.php');
        BidsHelper::LoadHelperClasses();

        JFactory::getLanguage()->load('com_bids');

        parent::cbTabHandler();
    }
示例#2
0
 /**
  * Constructor
  * Includes files needed for displaying tabs and sets cookie options
  *
  * @param  int      $useCookies           If set to 1 cookie will hold last used tab between page refreshes
  * @param  int      $ui                   User interface: 1: frontend, 2: backend
  * @param  int      $mode                 Reserved for future use, short-term workaround for to early script output (was cbCalendar object reference)
  * @param  boolean  $outputTabpaneScript  TRUE (DEFAULT): output scripts for tabpanes, FALSE: silent, no echo output
  */
 public function __construct($useCookies, $ui, $mode = null, $outputTabpaneScript = true)
 {
     parent::__construct();
     $this->ui = $ui;
     if ($outputTabpaneScript) {
         $this->outputTabJS($useCookies);
     }
 }
示例#3
0
 /**
  * Constructor
  * Includes files needed for displaying tabs and sets cookie options
  *
  * @param  int      $useCookies           If set to 1 cookie will hold last used tab between page refreshes
  * @param  int      $ui                   User interface: 1: frontend, 2: backend
  * @param  int      $mode                 Reserved for future use, short-term workaround for to early script output (was cbCalendar object reference)
  * @param  boolean  $outputTabpaneScript  TRUE (DEFAULT): output scripts for tabpanes, FALSE: silent, no echo output
  */
 public function __construct($useCookies, $ui, $mode = null, $outputTabpaneScript = true)
 {
     global $_CB_framework;
     static $scriptOut = false;
     parent::__construct();
     $this->ui = $ui;
     if ($outputTabpaneScript && !$scriptOut) {
         $tab = null;
         if (isset($_GET['tab'])) {
             $tab = urldecode(stripslashes(cbGetParam($_GET, 'tab', null)));
         } elseif (isset($_POST['tab'])) {
             $tab = stripslashes(cbGetParam($_POST, 'tab', null));
         }
         $js = "\$( '.cbTabs' ).cbtabs({" . "useCookies: " . (int) $useCookies . "," . "tabSelected: '" . addslashes($tab) . "'" . "});";
         $_CB_framework->outputCbJQuery($js, 'cbtabs');
         $scriptOut = true;
     }
 }
示例#4
0
 public function __construct()
 {
     parent::__construct();
 }
示例#5
0
	/**
	 * Labeller for title:
	 * Returns a profile view tab title
	 *
	 * @param  TabTable   $tab       the tab database entry
	 * @param  UserTable  $user      the user being displayed
	 * @param  int        $ui        1 for front-end, 2 for back-end
	 * @param  array      $postdata  _POST data for saving edited tab content as generated with getEditTab
	 * @return string|boolean        Either string HTML for tab content, or false if ErrorMSG generated
	 */
	public function getTabTitle( $tab, $user, $ui, $postdata )
	{
		global $_LANG;

                $plugin		=	cbhangoutClass::getPlugin();
		$viewer		=	CBuser::getMyUserDataInstance();
		$total		=	cbhangoutModel::getHangoutTotal( null, $viewer, $user, $plugin );
                $tab->title = $_LANG[$tab->title] ? $_LANG[$tab->title] : $tab->title;
		return parent::getTabTitle( $tab, $user, $ui, $postdata ) . ' <span class="badge badge-default">' . (int) $total . '</span>';
	}
示例#6
0
	/**
	 * Labeller for title:
	 * Returns a profile view tab title
	 *
	 * @param  TabTable   $tab       the tab database entry
	 * @param  UserTable  $user      the user being displayed
	 * @param  int        $ui        1 for front-end, 2 for back-end
	 * @param  array      $postdata  _POST data for saving edited tab content as generated with getEditTab
	 * @return string|boolean        Either string HTML for tab content, or false if ErrorMSG generated
	 */
	public function getTabTitle( $tab, $user, $ui, $postdata )
	{
		$plugin		=	cbdocmanClass::getPlugin();
		$viewer		=	CBuser::getMyUserDataInstance();
		$total		=	cbdocmanModel::getDocmanTotal( null, $viewer, $user, $plugin );

		return parent::getTabTitle( $tab, $user, $ui, $postdata ) . ' <span class="badge badge-default">' . (int) $total . '</span>';
	}
示例#7
0
 /**
  * Old-fashioned constructor (for UddeIM temporary compatibility:
  * @deprecated 2.0 Use parent::__construct();
  */
 public function cbPMSHandler()
 {
     parent::__construct();
 }
示例#8
0
  /**
   * Returns a profile view tab title
   *
   * @param  TabTable   $tab       the tab database entry
   * @param  UserTable  $user      the user being displayed
   * @param  int        $ui        1 for front-end, 2 for back-end
   * @param  array      $postdata  _POST data for saving edited tab content as generated with getEditTab
   * @return string|boolean        Either string HTML for tab content, or false if ErrorMSG generated
   */
  
  public function getTabTitle( $tab, $user, $ui, $postdata )
  {

    return parent::getTabTitle( $tab, $user, $ui, $postdata );
  }