예제 #1
0
 public function __construct()
 {
     $this->config = EB::config();
     $this->doc = JFactory::getDocument();
     // If environment is set to production, change to static.
     $environment = $this->config->get('easyblog_environment');
     if ($environment == 'production') {
         $environment = 'static';
     }
     $this->namespace = 'EASYBLOG';
     $this->shortName = 'eb';
     $this->environment = $environment;
     $this->mode = $this->config->get('easyblog_mode');
     $this->version = (string) EB::getLocalVersion();
     $this->baseUrl = EB::getBaseUrl();
     $this->token = EB::getToken();
     $this->inline = $this->config->get('inline_configuration');
     $this->enableCdn = $this->config->get('enable_cdn');
     $this->ajaxUrl = JURI::base() . '?option=com_easyblog';
     // If we should use http://site.com/index.php for the ajax calls, we need to append it here
     if ($this->config->get('ajax_use_index')) {
         $this->ajaxUrl = JURI::base() . 'index.php?option=com_easyblog';
     }
     parent::__construct();
 }
예제 #2
0
 public function __construct()
 {
     $this->config = EB::config();
     $this->doc = JFactory::getDocument();
     // If environment is set to production, change to static.
     $environment = $this->config->get('easyblog_environment');
     if ($environment == 'production') {
         $environment = 'static';
     }
     $this->namespace = 'EASYBLOG';
     $this->shortName = 'eb';
     $this->environment = $environment;
     $this->mode = $this->config->get('easyblog_mode');
     $this->version = (string) EB::getLocalVersion();
     $this->baseUrl = EB::getBaseUrl();
     $this->token = EB::getToken();
     $this->inline = $this->config->get('inline_configuration');
     $this->enableCdn = $this->config->get('enable_cdn');
     parent::__construct();
 }
예제 #3
0
 /**
  * Renders a folder contents in Media manager
  *
  * @since	5.0
  * @access	public
  * @param	string
  * @return
  */
 public static function renderFolder($uri)
 {
     $my = JFactory::getUser();
     $user = EB::user();
     // Get the place data
     $place = self::getPlace($uri);
     // Determines if this is a local type or other remote sources
     $type = self::getSourceType($place->id);
     $currentEditor = $user->getEditor();
     $mm = new self($type);
     $folder = $mm->getItems($uri);
     $config = EB::config();
     $useIndex = $config->get('ajax_use_index');
     // Set the upload url
     $session = JFactory::getSession();
     $uploadUrl = JURI::base();
     if ($useIndex) {
         $uploadUrl .= 'index.php';
     }
     $uploadUrl .= '?option=com_easyblog&task=media.upload&tmpl=component&lang=en&key=' . $folder->key . '&sessionid=' . $session->getId() . '&' . EB::getToken() . '=1';
     // Set the id's for dropzones and browse button
     $browseButtonId = 'eb-mm-folder-browse-' . $folder->key;
     $dropElementId = 'eb-mm-folder-drop-' . $folder->key;
     $template = EB::template();
     $template->set('currentEditor', $currentEditor);
     $template->set('uploadUrl', $uploadUrl);
     $template->set('browseButtonId', $browseButtonId);
     $template->set('dropElementId', $dropElementId);
     $template->set('place', $place);
     $template->set('folder', $folder);
     $html = $template->output('site/mediamanager/folder');
     return $html;
 }
예제 #4
0
 /**
  * Saves the google auto posting settings
  *
  * @since	4.0
  * @access	public
  * @param	string
  * @return
  */
 public function save()
 {
     // Check for request forgeries
     EB::checkToken();
     // Get the client id
     $post = $this->input->getArray('post');
     unset($post['task']);
     unset($post['option']);
     unset($post[EB::getToken()]);
     // Get the model so that we can store the settings
     $model = EB::model('Settings');
     $model->save($post);
     // Redirect the user
     EB::info()->set(JText::_('COM_EASYBLOG_AUTOPOSTING_TWITTER_SAVE_SUCCESS'), 'success');
     $this->app->redirect('index.php?option=com_easyblog&view=autoposting&layout=twitter');
 }
예제 #5
0
 /**
  * Saves the google auto posting settings
  *
  * @since	4.0
  * @access	public
  * @param	string
  * @return
  */
 public function save()
 {
     // Check for request forgeries
     EB::checkToken();
     // Get the client id
     $post = $this->input->getArray('post');
     unset($post['task']);
     unset($post['option']);
     unset($post[EB::getToken()]);
     if (isset($post['integrations_facebook_page_id'])) {
         $pages = $post['integrations_facebook_page_id'];
         // We need to merge them to be comma separated values
         $post['integrations_facebook_page_id'] = implode(',', $pages);
     }
     if (isset($post['integrations_facebook_group_id'])) {
         $groups = $post['integrations_facebook_group_id'];
         // Merge the array into string values
         $post['integrations_facebook_group_id'] = implode(',', $groups);
     }
     // Get the model so that we can store the settings
     $model = EB::model('Settings');
     $model->save($post);
     // Redirect the user
     EB::info()->set(JText::_('COM_EASYBLOG_AUTOPOSTING_FACEBOOK_SAVE_SUCCESS'), 'success');
     $this->app->redirect('index.php?option=com_easyblog&view=autoposting&layout=facebook');
 }
예제 #6
0
				<li data-quickpost-photo-tab-webcam data-quickpost-photo-tab data-type="webcam">
					<a href="#profile" role="tab" data-bp-toggle="tab"><?php 
echo JText::_('COM_EASYBLOG_QUICKPOST_PHOTO_TAKE_PHOTO');
?>
</a>
				</li>
		    </ul>
			<div class="eb-quick-photo-tab-content tab-content">

				<div class="tab-pane fade in active" id="home">

					<div id="dropzone" class="eb-quick-photo-uploader input-drop"
						data-photo-upload-container
						data-plupload
						data-plupload-url="<?php 
echo JRoute::_('index.php?option=com_easyblog&task=quickpost.uploadPhoto&tmpl=component&' . EB::getToken() . '=1');
?>
"
						data-plupload-max-file-size="<?php 
echo '10mb';
// TODO: Get from config
?>
"
						data-plupload-file-data-name="image">

						<span class="eb-plupload-btn">
							<div id="input-drop-container" data-plupload-browse-button data-plupload-drop-element>
								<i class="fa fa-photo"></i>
								<div><?php 
echo JText::_('COM_EASYBLOG_QUICKPOST_PHOTO_CLICK_TO_UPLOAD');
?>