public function __construct($type, $items, $cache = true) { parent::__construct(); $this->type = $type; $this->items = $items; $this->cache = $cache; }
public function __construct() { parent::__construct(); // Test if the user is already associated with Flickr $this->oauth = EB::table('OAuth'); $this->oauth->loadByUser($this->my->id, EBLOG_OAUTH_FLICKR); }
public function __construct($json = null) { parent::__construct(); // New document if (isset($json)) { $this->load($json); } }
public function __construct($current = '', $timezone = null) { parent::__construct(); $this->date = JFactory::getDate($current); if ($timezone) { $this->setTimezone(); } }
public function __construct() { // Load language file EB::loadLanguages(); $this->app = JFactory::getApplication(); $this->exists = $this->exists(); parent::__construct(); }
public function __construct(EasyBlogPost $post, $options = array()) { parent::__construct(); $this->post = $post; $this->frontpage = isset($options['frontpage']) ? $options['frontpage'] : false; $this->position = isset($options['position']) ? $options['position'] : null; $this->bottom = isset($options['bottom']) ? $options['bottom'] : false; }
public function __construct() { parent::__construct(); $this->key = $this->config->get('subscription_mailchimp_key'); if ($this->key) { $datacenter = explode('-', $this->key); $this->url = 'http://' . $datacenter[1] . '.' . $this->url; } }
public function __construct($overrideTheme = null, $options = array()) { parent::__construct(); // Determine if this is an admin location if (isset($options['admin']) && $options['admin']) { $this->admin = true; } // Determine the configured theme $theme = $this->config->get('layout_theme', $overrideTheme); // If a view is provided into the theme, the theme files could call methods from a view if (isset($options['view']) && is_object($options['view'])) { $this->view = $options['view']; } $this->theme = $theme; $obj = new stdClass(); $obj->config = EB::config(); $obj->my = JFactory::getUser(); $obj->admin = EB::isSiteAdmin(); $obj->profile = EB::user(); // If it's development mode, allow user to invoke in the url to change theme. $environment = $obj->config->get('easyblog_environment'); if ($environment == 'development') { $invokeTheme = $this->input->get('theme', '', 'word'); if ($invokeTheme) { $this->theme = $invokeTheme; } } // If this is entry view, or category view, we need to respect the theme's category $this->menu = $this->app->getMenu()->getActive(); $this->params = new JRegistry(); // If there is an active menu, try to get the menu parameters. if ($this->menu) { // Get the params prefix $prefix = isset($options['paramsPrefix']) ? $options['paramsPrefix'] : ''; // Set the current parameters. if ($prefix) { $model = EB::model('Menu'); $this->params = $model->getCustomMenuParams($this->menu->id, $this->menu->params, $prefix); } else { $this->params = $this->menu->params; } // We will just set it here from the menu when this class first get instantiate. // The corresponding view will have to do their own assignment if the view's templates need to access this entryParams $this->entryParams = $this->params; } //is blogger mode flag $obj->isBloggerMode = EBR::isBloggerMode(); $this->my = $obj->my; // Assign the acl $this->acl = EB::acl(); }
public function __construct($path, $url) { parent::__construct(); // Get the file name $fileName = basename($path); // Set the path to the original image $this->original = $path; // Set the current image item $this->image = trim($fileName, '/'); // Set the storage path $this->storage = rtrim(dirname($path), '/'); // Set the storage uri $this->absoluteUri = rtrim($url, '/'); $this->uri = rtrim(dirname($url), '/'); // Initialize the original width / height based on the configurations $this->initDimensions(); }
public function __construct($options = array()) { parent::__construct(); $this->options['public'] = $this->config->get('comment_recaptcha_public'); $this->options['secret'] = $this->config->get('comment_recaptcha_private'); }
public function __construct($uid = null, $userId = null) { // Load site's language file EB::loadLanguages(); // This will call EasyBlog class to construct $config, $doc, $app, $input, $my. parent::__construct(); // Globals $this->uid = $uid; // The author of this item $this->user = EB::user($userId); // The acl of the author $this->acl = EB::acl($this->user->id); // If this is a new post, we want to create a new workbench if (!$uid) { $this->createNewWorkbench(); } else { $this->load($uid); } // Set the post object to the router so that they can easily retrieve it. EBR::setPost($this); }
public function __construct($options = array()) { parent::__construct(); $this->profile = $options[0]; }
private function prepareContent(&$content) { // See if there's any audio files to process. $audios = EB::audio()->getItems($content); // Get videos attached in the content $videos = $this->getVideos($content); $video = false; if (isset($videos[0])) { $video = $videos[0]; } // Remove videos from the source $content = EB::videos()->strip($content); // Remove audios from the content $content = EB::audio()->strip($content); $this->set('video', $video); $this->set('audios', $audios); $this->set('date', $date); $this->set('permalink', $url); $this->set('blog', $blog); $this->set('actor', $item->actor); $this->set('content', $content); $catUrl = EBR::_('index.php?option=com_easyblog&view=categories&layout=listings&id=' . $blog->category_id, true, null, false, true); $this->set('categorypermalink', $catUrl); $item->title = parent::display('streams/' . $item->verb . '.title'); $item->content = parent::display('streams/' . $item->verb . '.content'); }
public function __construct(EasyBlogTableProfile $profile) { parent::__construct(); $this->profile = $profile; }