/** * Constructor * * @access public * @param object Registry reference * @return void */ public function __construct(ipsRegistry $registry) { //----------------------------------------- // Make shortcuts //----------------------------------------- $this->registry = $registry; $this->DB = $registry->DB(); $this->settings = $registry->fetchSettings(); $this->member = $registry->member(); $this->cache = $registry->cache(); $this->caches =& $registry->cache()->fetchCaches(); $this->request = $registry->fetchRequest(); $this->lang = $registry->class_localization; if (IN_ACP) { //----------------------------------------- // Load HTML //----------------------------------------- $this->html = $this->registry->output->loadTemplate('cp_skin_blocks_feed'); //----------------------------------------- // Set up stuff //----------------------------------------- $this->form_code = $this->html->form_code = 'module=blocks&section=wizard'; $this->form_code_js = $this->html->form_code_js = 'module=blocks§ion=wizard'; } //----------------------------------------- // Get interface //----------------------------------------- require_once IPSLib::getAppDir('ccs') . '/sources/blocks/feed/feedInterface.php'; }
/** * Constructor * * @access public * @param object Registry reference * @return void */ public function __construct(ipsRegistry $registry) { //----------------------------------------- // Make shortcuts //----------------------------------------- $this->registry = $registry; $this->DB = $registry->DB(); $this->settings = $registry->fetchSettings(); $this->member = $registry->member(); $this->cache = $registry->cache(); $this->caches =& $registry->cache()->fetchCaches(); $this->request = $registry->fetchRequest(); $this->lang = $registry->class_localization; if (IN_ACP) { //----------------------------------------- // Load HTML //----------------------------------------- $this->html = $this->registry->output->loadTemplate('cp_skin_blocks_custom'); //----------------------------------------- // Set up stuff //----------------------------------------- $this->form_code = $this->html->form_code = 'module=blocks&section=wizard'; $this->form_code_js = $this->html->form_code_js = 'module=blocks§ion=wizard'; } }
public function __construct() { $this->registry = ipsRegistry::instance(); $this->settings = ipsRegistry::fetchSettings(); $this->lang = $this->registry->getClass('class_localization'); ipsRegistry::getClass('class_localization')->loadLanguageFile(array('public_lang'), 'syncApp'); }
public function __construct() { $this->settings = ipsRegistry::fetchSettings(); $this->lang = ipsRegistry::getClass('class_localization'); $this->caches =& ipsRegistry::cache()->fetchCaches(); $this->cache = ipsRegistry::cache(); $this->DB = ipsRegistry::DB(); }
/** * Constructor * * @return @e void */ public function __construct(ipsRegistry $registry) { $this->registry = $registry; $this->DB = $registry->DB(); $this->settings =& $registry->fetchSettings(); $this->cache = $this->registry->cache(); $this->caches =& $this->registry->cache()->fetchCaches(); }
/** * Constructor * * @param object $registry Registry object * @param object $class Task manager class object * @param array $task Array with the task data * @return @e void */ public function __construct(ipsRegistry $registry, $class, $task) { /* Make registry objects */ $this->registry = $registry; $this->settings = $registry->fetchSettings(); $this->lang = $this->registry->getClass('class_localization'); $this->class = $class; $this->task = $task; }
/** * Constructor * * @param object $registry Registry object * @param object $class Task manager class object * @param array $task Array with the task data * @return @e void */ public function __construct(ipsRegistry $registry, $class, $task) { /* Make registry objects */ $this->registry = $registry; $this->DB = $registry->DB(); $this->settings = ipsRegistry::fetchSettings(); $this->lang = $this->registry->getClass('class_localization'); $this->class = $class; $this->task = $task; $this->registry->dbFunctions()->setDB('mysql', 'Auth_DB', array('sql_database' => $this->settings['syncapp_realm_database'], 'sql_user' => $this->settings['syncapp_mysql_user'], 'sql_pass' => $this->settings['syncapp_mysql_password'], 'sql_host' => $this->settings['syncapp_mysql_ip'])); }
/** * Constructor * * @access public * @param object Registry reference * @return void */ public function __construct(ipsRegistry $registry) { //----------------------------------------- // Make shortcuts //----------------------------------------- $this->registry = $registry; $this->DB = $registry->DB(); $this->settings = $registry->fetchSettings(); $this->member = $registry->member(); $this->cache = $registry->cache(); $this->caches =& $registry->cache()->fetchCaches(); $this->request = $registry->fetchRequest(); $this->lang = $registry->class_localization; }
/** * Constructor * */ function __construct(ipsRegistry $registry) { $this->registry = $registry; $this->DB = $registry->DB(); $this->settings =& $registry->fetchSettings(); }
/** * Constructor * * @access public * @param string [$lang] Language file to load, english by default * @return void */ public function __construct(ipsRegistry $registry) { /* Make objects */ $this->DB = $registry->DB(); $this->settings = $registry->fetchSettings(); $this->member = $registry->member(); $this->cache = $registry->cache(); $this->caches =& $registry->cache()->fetchCaches(); $this->request = $registry->fetchRequest(); $this->memberData =& $registry->member()->fetchMemberData(); /* Rebuild the cache if needed */ if (!$this->caches['lang_data']) { $this->rebuildLanguagesCache(); } /* Find the lang we need */ if ($this->caches['lang_data']) { foreach ($this->caches['lang_data'] as $_lang) { $this->languages[] = $_lang; if ($_lang['lang_default']) { $this->local = $_lang['lang_short']; $this->lang_id = $_lang['lang_id']; $this->language_dir = $_lang['lang_id']; /* Guests get the default */ if (!$this->memberData['member_id']) { $this->member->language_id = $this->lang_id; } } } } /* Got a guest cookie? */ if (!$this->memberData['member_id']) { $langCookie = IPSCookie::get('language'); if ($langCookie) { $this->member->language_id = trim(IPSText::parseCleanValue($langCookie)); } } /* Forcing Engrish? */ if ($forceCookie = IPSCookie::get('forceEnglish')) { if ($forceCookie) { $this->_forceEnglish = true; } } //----------------------------------------- // Time options //----------------------------------------- /* %b is month abbr %B is full month %d is date 01-31 %Y is 4 digit year %g is 2 digit year %I is hour 01-12 %H - hour as a decimal number using a 24-hour clock (range 00 to 23) %M is min 01-59 %p is am/pm */ $this->time_options = array('JOINED' => $this->settings['clock_joined'] ? $this->settings['clock_joined'] : '%d-%B %y', 'SHORT' => $this->settings['clock_short'] ? $this->settings['clock_short'] : '%b %d %Y %I:%M %p', 'LONG' => $this->settings['clock_long'] ? $this->settings['clock_long'] : '%d %B %Y - %I:%M %p', 'TINY' => $this->settings['clock_tiny'] ? $this->settings['clock_tiny'] : '%d %b %Y - %H:%M', 'DATE' => $this->settings['clock_date'] ? $this->settings['clock_date'] : '%d %b %Y', 'TIME' => 'h:i A', 'ACP' => '%d %B %Y, %H:%M', 'ACP2' => '%d %B %Y, %H:%M'); //-------------------------------- // Did we choose a language? //-------------------------------- if (isset($this->request['setlanguage']) and $this->request['setlanguage'] and $this->request['langid']) { /* Forcing english? */ if ($this->request['langid'] == '__english__') { IPSDebug::addMessage("forceEnglish cookie written"); IPSCookie::set('forceEnglish', 1, 0); $this->_forceEnglish = true; } else { if ($this->request['k'] == $this->member->form_hash and is_array(ipsRegistry::cache()->getCache('lang_data')) and count(ipsRegistry::cache()->getCache('lang_data'))) { foreach (ipsRegistry::cache()->getCache('lang_data') as $data) { if ($data['lang_id'] == $this->request['langid']) { if ($this->memberData['member_id']) { IPSMember::save($this->memberData['member_id'], array('core' => array('language' => $data['lang_id']))); } else { IPSCookie::set('language', $data['lang_id']); } $this->member->language_id = $data['lang_id']; $this->member->setProperty('language', $data['lang_id']); break; } } } } } //-------------------------------- // Now set it //-------------------------------- if ($this->member->language_id) { foreach ($this->caches['lang_data'] as $_lang) { if ($_lang['lang_id'] == $this->member->language_id) { $this->local = $_lang['lang_short']; $this->lang_id = $_lang['lang_id']; $this->language_dir = $_lang['lang_id']; break; } } } //----------------------------------------- // Set locale //----------------------------------------- setlocale(LC_ALL, $this->local); $this->local_data = localeconv(); //----------------------------------------- // Using in_dev override //----------------------------------------- if (IN_DEV and !$this->_forceEnglish) { if (is_dir(IPS_CACHE_PATH . 'cache/lang_cache/master_lang')) { $this->lang_id = 'master_lang'; } } }