コード例 #1
0
ファイル: moderate.php プロジェクト: knigherrant/decopatio
 public function reject()
 {
     // Check for request forgeries
     EB::checkToken();
     // Ensure that user is logged in
     EB::requireLogin();
     // Get any return url
     $return = EB::_('index.php?option=com_easyblog&view=dashboard&layout=moderate');
     if ($this->getReturnURL()) {
         $return = $this->getReturnURL();
     }
     // Check if the user is privileged enough
     if (!$this->acl->get('add_entry') && !$this->acl->get('manage_pending')) {
         return JError::raiseError(500, JText::_('COM_EASYBLOG_NO_PERMISSION_TO_MODERATE_BLOG'));
     }
     // Get a list of ids
     $ids = $this->input->get('ids', array(), 'array');
     $message = $this->input->get('message', '', 'default');
     foreach ($ids as $id) {
         $id = (int) $id;
         $post = EB::post($id);
         $post->reject($message);
     }
     $message = JText::_('COM_EASYBLOG_BLOGS_BLOG_SAVE_REJECTED');
     $this->info->set($message, 'success');
     return $this->app->redirect($return);
 }
コード例 #2
0
ファイル: search.php プロジェクト: knigherrant/decopatio
 /**
  * Search blogger
  *
  * @since	4.0
  * @access	public
  */
 public function blogger()
 {
     // Check for request forgeries
     EB::checkToken();
     // Get the query
     $search = $this->input->get('search', '', 'string');
     $url = EB::_('index.php?option=com_easyblog&view=blogger&search=' . $search, false);
     return $this->app->redirect($url);
 }
コード例 #3
0
ファイル: view.html.php プロジェクト: knigherrant/decopatio
 /**
  * Default display method for my blog listings
  *
  * @since	4.0
  * @access	public
  * @param	string
  * @return
  */
 public function display($tmpl = null)
 {
     // Require user to be logged in to access this page
     EB::requireLogin();
     // Get the default sorting behavior
     $sort = $this->input->get('sort', $this->config->get('layout_postorder'), 'cmd');
     // Load up the author profile
     $author = EB::user($this->my->id);
     // Set meta tags for blogger
     EB::setMeta($this->my->id, META_ID_BLOGGERS);
     // Set the breadcrumbs
     $this->setPathway(JText::_('COM_EASYBLOG_BLOGGERS_BREADCRUMB'), EB::_('index.php?option=com_easyblog&view=blogger'));
     $this->setPathway($author->getName());
     $menu = JFactory::getApplication()->getMenu();
     $categoryInclusion = array();
     if ($menu) {
         $active = $menu->getActive();
         $categoryInclusion = $active->params->get('inclusion');
     }
     $model = EB::model('Blog');
     $posts = $model->getBlogsBy('blogger', $author->id, $sort, 0, EBLOG_FILTER_PUBLISHED, false, false, array(), false, false, true, array(), $categoryInclusion);
     // Get the pagination
     $pagination = $model->getPagination();
     // Set the page title
     $title = $author->getName() . ' - ' . EB::getPageTitle(JText::_('COM_EASYBLOG_MY_BLOG_PAGE_TITLE'));
     $this->setPageTitle($title, $pagination, $this->config->get('main_pagetitle_autoappend'));
     // Format the posts
     $posts = EB::formatter('list', $posts);
     // Add the RSS headers on the page
     EB::feeds()->addHeaders('index.php?option=com_easyblog&view=myblog');
     // Determines if the viewer already subscribed to the author
     $subscribed = false;
     $bloggerModel = EB::model('Blogger');
     if ($bloggerModel->isBloggerSubscribedUser($author->id, $this->my->id, $this->my->email)) {
         $subscribed = true;
     }
     // Get the current url
     $return = EBR::_('index.php?option=com_easyblog', false);
     $this->set('return', $return);
     $this->set('subscribed', $subscribed);
     $this->set('author', $author);
     $this->set('posts', $posts);
     $this->set('sort', $sort);
     $this->set('pagination', $pagination);
     parent::display('blogs/myblog/default');
 }
コード例 #4
0
ファイル: view.feed.php プロジェクト: knigherrant/decopatio
 public function display($tpl = null)
 {
     // Ensure that rss is enabled
     if (!$this->config->get('main_rss')) {
         return;
     }
     // Get the default sorting behavior
     $sort = $this->input->get('sort', $this->config->get('layout_postorder'), 'cmd');
     // Load up the author profile
     $author = EB::user($this->my->id);
     // Get the blogs model
     $model = EB::model('Blog');
     $posts = $model->getBlogsBy('blogger', $author->id, $sort);
     $this->doc->link = EB::_('index.php?option=com_easyblog&view=myblog');
     $this->doc->setTitle(JText::_('COM_EASYBLOG_FEEDS_MYBLOG_TITLE'));
     $this->doc->setDescription(JText::sprintf('COM_EASYBLOG_FEEDS_MYBLOG_DESC', $author->user->name));
     // If there's no data, skip this altogether
     if (!$posts) {
         return;
     }
     $uri = JURI::getInstance();
     $scheme = $uri->toString(array('scheme'));
     $scheme = str_replace('://', ':', $scheme);
     $posts = EB::formatter('list', $posts);
     foreach ($posts as $post) {
         $image = '';
         if ($post->hasImage()) {
             $image = '<img src="' . $post->getImage('medium', true, true) . '" width="250" align="left" />';
         }
         $item = new JFeedItem();
         $item->title = $this->escape($post->title);
         $item->link = $post->getPermalink();
         $item->description = $image . $post->getIntro();
         // replace the image source to proper format so that feed reader can view the image correctly.
         $item->description = str_replace('src="//', 'src="' . $scheme . '//', $item->description);
         $item->description = str_replace('href="//', 'href="' . $scheme . '//', $item->description);
         $item->date = $post->getCreationDate()->toSql();
         $item->category = $post->getPrimaryCategory()->getTitle();
         $item->author = $post->author->getName();
         $item->authorEmail = $this->getRssEmail($post->author);
         $this->doc->addItem($item);
     }
     return;
 }
コード例 #5
0
ファイル: templates.php プロジェクト: knigherrant/decopatio
 /**
  * save post templates
  *
  * @since	4.0
  * @access	public
  * @param	string
  * @return
  */
 public function save()
 {
     // Check for request forgeries
     EB::checkToken();
     $id = $this->input->get('id', '', 'int');
     $template = EB::table('PostTemplate');
     $template->load($id);
     $title = $this->input->get('title', '', 'default');
     $content = $this->input->get('template_content', '', 'raw');
     $data['content'] = $content;
     $template->title = $title;
     $template->data = json_encode($data);
     $template->user_id = $this->my->id;
     $template->created = EB::date()->toSql();
     $template->store();
     $this->info->set('COM_EASYBLOG_DASHBOARD_TEMPLATES_SAVED_SUCCESS', 'success');
     $redirect = EB::_('index.php?option=com_easyblog&view=dashboard&layout=templates', false);
     return $this->app->redirect($redirect);
 }
コード例 #6
0
ファイル: reports.php プロジェクト: knigherrant/decopatio
 /**
  * Allows caller to submit a report
  *
  * @since	4.0
  * @access	public
  * @param	string
  * @return	
  */
 public function submit()
 {
     // Check for request forgeries
     EB::checkToken();
     // Get the composite keys
     $id = $this->input->get('id', 0, 'int');
     $type = $this->input->get('type', '', 'cmd');
     // Initialize redirection link
     $redirect = EB::_('index.php?option=com_easyblog&view=entry&id=' . $id, false);
     // Check if guest is allowed to report or not.
     if ($this->my->guest && !$this->config->get('main_reporting_guests')) {
         $this->info->set('COM_EASYBLOG_CATEGORIES_FOR_REGISTERED_USERS_ONLY', 'error');
         return $this->app->redirect($redirect);
     }
     // Ensure that the report reason is not empty.
     $reason = $this->input->get('reason', '', 'default');
     if (!$reason) {
         EB::info()->set(JText::_('COM_EASYBLOG_REPORT_PLEASE_SPECIFY_REASON'), 'error');
         return $this->app->redirect($redirect);
     }
     $report = EB::table('Report');
     $report->obj_id = $id;
     $report->obj_type = $type;
     $report->reason = $reason;
     $report->created = EB::date()->toSql();
     $report->created_by = $this->my->id;
     $report->ip = @$_SERVER['REMOTE_ADDR'];
     $state = $report->store();
     if (!$state) {
         $this->info->set($report->getError());
         return $this->app->redirect($redirect);
     }
     // Notify the site admin when there's a new report made
     $post = EB::post($id);
     $report->notify($post);
     $message = JText::_('COM_EASYBLOG_THANKS_FOR_REPORTING');
     $this->info->set($message, 'success');
     return $this->app->redirect($redirect);
 }
コード例 #7
0
ファイル: view.json.php プロジェクト: knigherrant/decopatio
 public function display($tmpl = null)
 {
     // Get the blog post
     $id = $this->input->get('id', 0, 'int');
     // Load the blog post now
     $blog = EB::table('Blog');
     $blog->load($id);
     // If blog id is not provided correctly, throw a 404 error page
     if (!$id || !$blog->id) {
         return JError::raiseError(404, JText::_('COM_EASYBLOG_ENTRY_BLOG_NOT_FOUND'));
     }
     // If the settings requires the user to be logged in, do not allow guests here.
     if ($this->my->id <= 0 && $this->config->get('main_login_read')) {
         $url = EB::_('index.php?option=com_easyblog&view=entry&id=' . $id . '&layout=login', false);
         return $this->app->redirect($url);
     }
     // Check if blog is password protected.
     if ($this->config->get('main_password_protect') && !empty($blog->blogpassword) && !$blog->verifyPassword()) {
         return JError::raiseError(404, JText::_('COM_EASYBLOG_ENTRY_BLOG_NOT_FOUND'));
     }
     // If the blog post is already deleted, we shouldn't let it to be accessible at all.
     if ($blog->isTrashed()) {
         return JError::raiseError(404, JText::_('COM_EASYBLOG_ENTRY_BLOG_NOT_FOUND'));
     }
     // Check if the blog post is trashed
     if (!$blog->isPublished() && $my->id != $blog->created_by && !EB::isSiteAdmin()) {
         return JError::raiseError(404, JText::_('COM_EASYBLOG_ENTRY_BLOG_NOT_FOUND'));
     }
     // If the viewer is the owner of the blog post, display a proper message
     if ($this->my->id == $blog->created_by && !$blog->isPublished()) {
         $notice = JText::_('COM_EASYBLOG_ENTRY_BLOG_UNPUBLISHED_VISIBLE_TO_OWNER');
     }
     if (EB::isSiteAdmin() && !$blog->isPublished()) {
         $notice = JText::_('COM_EASYBLOG_ENTRY_BLOG_UNPUBLISHED_VISIBLE_TO_ADMIN');
     }
     $blog = EB::formatter('post', $blog);
     $this->set('post', $blog);
     return parent::display();
 }
コード例 #8
0
 public function display($tpl = null)
 {
     // Ensure that rss is enabled
     if (!$this->config->get('main_rss')) {
         return;
     }
     // Get sorting options
     $sort = $this->input->get('sort', $this->config->get('layout_postorder'), 'cmd');
     // Get the blogs model
     $model = EB::model('Blog');
     $posts = $model->getBlogsBy('', '', $sort, 0, EBLOG_FILTER_PUBLISHED, null, true);
     $this->doc->link = EB::_('index.php?option=com_easyblog&view=latest');
     $this->doc->setTitle(JText::_('COM_EASYBLOG_FEEDS_LATEST_TITLE'));
     $this->doc->setDescription(JText::sprintf('COM_EASYBLOG_FEEDS_LATEST_DESC', JURI::root()));
     // If there's no data, skip this altogether
     if (!$posts) {
         return;
     }
     $posts = EB::formatter('list', $posts);
     foreach ($posts as $post) {
         $image = '';
         if ($post->getImage('medium', true, true)) {
             $image = '<img src="' . $post->getImage('medium', true, true) . '" width="250" align="left" />';
         }
         $item = new JFeedItem();
         $item->title = $this->escape($post->title);
         $item->link = $post->getPermalink();
         $item->description = $image . $post->getIntro();
         $item->date = $post->getCreationDate()->toSql();
         $item->category = $post->getPrimaryCategory()->getTitle();
         $item->author = $post->author->getName();
         $item->authorEmail = $this->getRssEmail($post->author);
         $this->doc->addItem($item);
     }
     return;
 }
コード例 #9
0
ファイル: default.php プロジェクト: BetterBetterBetter/B3App
        if ($this->acl->get('delete_entry') || EB::isSiteAdmin()) {
            ?>
								<li>
									<a href="javascript:void(0);" data-post-delete>
										<?php 
            echo JText::_('COM_EASYBLOG_DASHBOARD_DRAFTS_DISCARD');
            ?>
									</a>
								</li>
								<?php 
        }
        ?>

								<li>
									<a target="_blank" href="<?php 
        echo EB::_('index.php?option=com_easyblog&view=entry&layout=preview&draftid=' . $post->id);
        ?>
">
										<?php 
        echo JText::_('COM_EASYBLOG_PREVIEW');
        ?>
									</a>
								</li>
							</ul>
						</div>
					</div>
				</div>
				<?php 
    }
    ?>
			</div>
コード例 #10
0
ファイル: teamblogs.php プロジェクト: knigherrant/decopatio
 /**
  * Allows caller to leave a team
  *
  * @since	4.0
  * @access	public
  * @param	string
  * @return
  */
 public function leave()
 {
     // Check for request forgeries
     EB::checkToken();
     // Ensure that the user is logged in first
     EB::requireLogin();
     $return = $this->input->get('return', '', 'default');
     if ($return) {
         $return = base64_decode($return);
     }
     // Default return url
     if (!$return) {
         $return = EB::_('index.php?option=com_easyblog&view=teamblog', false);
     }
     // Get the team object
     $id = $this->input->get('id', 0, 'int');
     $team = EB::table('TeamBlog');
     $team->load($id);
     if (!$id || !$team->id) {
         $this->info->set('COM_EASYBLOG_TEAMBLOG_INVALID_ID_PROVIDED', 'error');
         return $this->app->redirect($return);
     }
     // Ensure that the current user requesting to leave the team is really a member of the team
     $model = EB::model('TeamBlogs');
     $isMember = $model->isMember($team->id, $this->my->id);
     if (!$isMember) {
         $this->info->set('COM_EASYBLOG_TEAMBLOG_NOT_MEMBER_OF_TEAM', 'error');
         return $this->app->redirect($return);
     }
     // Get the total members in the team because we do not want to allow empty team members in a team
     $count = $team->getMemberCount();
     if ($count <= 1) {
         $this->info->set('COM_EASYBLOG_TEAMBLOG_YOU_ARE_LAST_MEMBER', 'error');
         return $this->app->redirect($return);
     }
     // Delete the member now
     $team->deleteMembers($this->my->id);
     $this->info->set('COM_EASYBLOG_TEAMBLOG_LEAVE_TEAM_SUCCESS', 'success');
     return $this->app->redirect($return);
 }
コード例 #11
0
ファイル: view.html.php プロジェクト: knigherrant/decopatio
 /**
  * Deprecated. Use view=calendar
  *
  * @since	4.0
  * @access	public
  * @param	string
  * @return
  */
 public function calendar($tmpl = null)
 {
     return $this->app->redirect(EB::_('index.php?option=com_easyblog&view=calendar', false));
 }
コード例 #12
0
ファイル: default.php プロジェクト: knigherrant/decopatio
">
								<i class="fa fa-tags"></i> <?php 
            echo JText::_('COM_EASYBLOG_TOOLBAR_TAGS');
            ?>
							</a>
						</li>
						<?php 
        }
        ?>

						<?php 
        if ($this->acl->get('allow_subscription')) {
            ?>
						<li>
							<a href="<?php 
            echo EB::_('index.php?option=com_easyblog&view=subscription');
            ?>
">
								<i class="fa fa-envelope"></i> <?php 
            echo JText::_('COM_EASYBLOG_TOOLBAR_MANAGE_SUBSCRIPTIONS');
            ?>
							</a>
						</li>
						<?php 
        }
        ?>

						<?php 
        if ((EB::isTeamAdmin() || EB::isSiteAdmin()) && $this->config->get('toolbar_teamrequest')) {
            ?>
						<li>
コード例 #13
0
ファイル: default.php プロジェクト: knigherrant/decopatio
					<div class="eb-table-content mt-10 mb-10 pb-10">
						<?php 
        echo JString::substr(strip_tags($obj->intro), 0, 250);
        ?>
 <?php 
        echo JText::_('COM_EASYBLOG_ELLIPSES');
        ?>
					</div>

					<?php 
        if (!$post->current) {
            ?>
					<div class="eb-table-toolbar btn-toolbar mt-15">
						<div class="btn-group btn-group-sm">
							<a class="btn btn-default" href="<?php 
            echo EB::_('index.php?option=com_easyblog&view=dashboard&layout=diff&id=' . $post->id . '&post_id=' . $post->post_id);
            ?>
" data-post-diff>
								<?php 
            echo JText::_('Compare');
            ?>
							</a>

						</div>
					</div>
					<?php 
        }
        ?>
				</div>
			</div>
			<?php 
コード例 #14
0
ファイル: posts.php プロジェクト: BetterBetterBetter/B3App
 /**
  * Deletes blog posts
  *
  * @since	4.0
  * @access	public
  * @param	string
  * @return
  */
 public function delete()
 {
     // Check for tokens
     EB::checkToken();
     // Get the list of blog id's
     $ids = $this->input->get('ids', '', 'array');
     // Get any return url
     $return = EB::_('index.php?option=com_easyblog&view=dashboard&layout=entries', false);
     if ($this->getReturnURL()) {
         $return = $this->getReturnURL();
     }
     foreach ($ids as $id) {
         $post = EB::post($id);
         if (!$post->canDelete()) {
             $this->info->set(JText::_('COM_EASYBLOG_NO_PERMISSION_TO_DELETE_BLOG'), 'error');
             return $this->app->redirect($return);
         }
         $post->delete();
     }
     EB::info()->set(JText::_('COM_EASYBLOG_DASHBOARD_DELETE_SUCCESS'), 'success');
     return $this->app->redirect($return);
 }
コード例 #15
0
ファイル: profile.php プロジェクト: knigherrant/decopatio
 /**
  * Saves a user profile
  *
  * @since	4.0
  * @access	public
  * @param	string
  * @return
  */
 public function save()
 {
     // Check for request forgeries
     EB::checkToken();
     // Require user to be logged in
     EB::requireLogin();
     // Get the post data here
     $post = $this->input->getArray('post');
     // Since adsense codes may contain html codes
     $post['adsense_code'] = $this->input->get('adsense_code', '', 'raw');
     // Prepare the redirection url
     $redirect = EB::_('index.php?option=com_easyblog&view=dashboard&layout=profile', false);
     if (EB::isSiteAdmin() || $this->config->get('layout_dashboard_biography_editor')) {
         $post['description'] = $this->input->get('description', '', 'raw');
         $post['biography'] = $this->input->get('biography', '', 'raw');
     }
     // Trim data
     array_walk($post, array($this, '_trim'));
     if ($this->config->get('main_dashboard_editaccount')) {
         if (!$this->validateProfile($post)) {
             return $this->app->redirect($redirect);
         }
         $this->my->name = $post['fullname'];
         $this->my->save();
     }
     // Determines if we should save the user's params.
     if ($this->config->get('main_joomlauserparams')) {
         $email = $post['email'];
         $password = $post['password'];
         $password2 = $post['password2'];
         if (JString::strlen($password) || JString::strlen($password2)) {
             if ($password != $password2) {
                 EB::info()->set(JText::_('COM_EASYBLOG_DASHBOARD_ACCOUNT_PASSWORD_ERROR'), 'error');
                 return $this->app->redirect($redirect);
             }
         }
         // Store Joomla info
         $user = JFactory::getUser();
         $data = array('email' => $email, 'password' => $password, 'password2' => $password2);
         // Bind data
         $user->bind($data);
         $state = $user->save();
         if (!$state) {
             EB::info()->set($user->getError(), 'error');
             return $this->app->redirect($redirect);
         }
         $session = JFactory::getSession();
         $session->set('user', $user);
         $table = JTable::getInstance('Session');
         $table->load($session->getId());
         $table->username = $user->get('username');
         $table->store();
     }
     // Set the permalink
     $post['permalink'] = $post['user_permalink'];
     unset($post['user_permalink']);
     // Get users model
     $model = EB::model('Users');
     // Ensure that the permalink doesn't exist
     if ($model->permalinkExists($post['permalink'], $this->my->id)) {
         EB::info()->set(JText::_('COM_EASYBLOG_DASHBOARD_ACCOUNT_PERMALINK_EXISTS'), 'error');
         return $this->app->redirect($redirect);
     }
     // Load up EasyBlog's profile
     $profile = EB::user($this->my->id);
     $profile->bind($post);
     // Bind Feedburner data
     $profile->bindFeedburner($post, $this->acl);
     // Bind oauth settings
     $profile->bindOauth($post, $this->acl);
     // Bind adsense settings
     $profile->bindAdsense($post, $this->acl);
     // Bind avatar
     $avatar = $this->input->files->get('avatar', '');
     // Save avatar
     if (isset($avatar['tmp_name']) && !empty($avatar['tmp_name'])) {
         $profile->bindAvatar($avatar, $this->acl);
     }
     $acl = EB::acl();
     //save meta
     if ($acl->get('add_entry')) {
         //meta post info
         $metaId = JRequest::getInt('metaid', 0);
         $metapos = array();
         $metapost['keywords'] = $this->input->get('metakeywords', '', 'raw');
         $metapost['description'] = $this->input->get('metadescription', '', 'raw');
         $metapost['content_id'] = $this->my->id;
         $metapost['type'] = META_TYPE_BLOGGER;
         $meta = EB::table('Meta');
         $meta->load($metaId);
         $meta->bind($metapost);
         $meta->store();
     }
     //save params
     $userparams = EB::registry();
     $userparams->set('theme', $post['theme']);
     // @rule: Save google profile url
     if (isset($post['google_profile_url'])) {
         $userparams->set('google_profile_url', $post['google_profile_url']);
     }
     if (isset($post['show_google_profile_url'])) {
         $userparams->set('show_google_profile_url', $post['show_google_profile_url']);
     }
     $profile->params = $userparams->toString();
     // If user is allowed to save their settings
     if ($this->config->get('main_dashboard_editaccount') && $this->config->get('main_joomlauserparams')) {
         $this->my->save(true);
     }
     $state = $profile->store();
     if (!$state) {
         EB::info()->set(JText::_('COM_EASYBLOG_DASHBOARD_PROFILE_UPDATE_FAILED'), 'error');
         return $this->app->redirect($redirect);
     }
     EB::info()->set(JText::_('COM_EASYBLOG_DASHBOARD_PROFILE_UPDATE_SUCCESS'), 'success');
     return $this->app->redirect($redirect);
 }
コード例 #16
0
            ?>
				</a>
			</li>
			<?php 
        }
        ?>
		<?php 
    }
    ?>

		<?php 
    if (EB::isSiteAdmin() || $this->acl->get('moderate_entry') || $post->isMine()) {
        ?>
		<li>
			<a href="<?php 
        echo EB::_('index.php?option=com_easyblog&view=composer&tmpl=component&uid=' . $post->id);
        ?>
" target="_blank" data-eb-composer><?php 
        echo JText::_('COM_EASYBLOG_ADMIN_EDIT_ENTRY');
        ?>
</a>
		</li>
		<?php 
    }
    ?>

		<?php 
    if (EB::isSiteAdmin() || $post->isMine() && $this->acl->get('delete_entry') || $this->acl->get('moderate_entry')) {
        ?>
		<li class="delete">
			<a href="javascript:void(0);" data-entry-delete data-id="<?php 
コード例 #17
0
ファイル: default.php プロジェクト: BetterBetterBetter/B3App
				</div>
			<?php 
        }
        ?>
		<?php 
    }
    ?>
	</div>
	<div class="col-cell dropdown_">
		<a data-bp-toggle="dropdown" href="#">
			<i class="fa fa-cog"></i>
		</a>
		<ul class="eb-toolbar-dropdown dropdown-menu reset-list text-left">
			<li>
				<a href="<?php 
    echo EB::_('index.php?option=com_easyblog&view=dashboard&layout=profile');
    ?>
">
					<i class="fa fa-gear muted"></i>&nbsp; <?php 
    echo JText::_('COM_EASYBLOG_DASHBOARD_TOOLBAR_ACCOUNT_SETTINGS');
    ?>
				</a>
			</li>
			<li role="presentation" class="divider"></li>

			<?php 
    if ($this->config->get('layout_dashboardlogout')) {
        ?>
			<li>
                <a href="javascript:void(0);" data-dashboard-sign-out>
                    <i class="fa fa-unlock-alt muted"></i>&nbsp; <?php 
コード例 #18
0
ファイル: form.php プロジェクト: knigherrant/decopatio
				    <label for="template-content">
				    	<?php 
echo JText::_('COM_EASYBLOG_DASHBOARD_TEMPLATES_CONTENT');
?>
				    </label>
				    <div>
				    	<?php 
echo $editor->display('template_content', $template->data->content, '100%', 350, 10, 10, array('image', 'pagebreak', 'ninjazemanta'), null, 'com_easyblog');
?>
				    </div>
				</div>

				<div class="form-group form-action clearfix">
					<div class="col-md-6">
						<a href="<?php 
echo EB::_('index.php?option=com_easyblog&view=dashboard&layout=templates');
?>
" class="btn btn-default"><?php 
echo JText::_('COM_EASYBLOG_CANCEL_BUTTON');
?>
</a>
					</div>

					<div class="col-md-6">
						<button class="btn btn-primary pull-right"><?php 
echo JText::_('COM_EASYBLOG_DASHBOARD_TEMPLATES_SAVE_TEMPLATE');
?>
</button>
					</div>
				</div>
			</div>
コード例 #19
0
ファイル: view.ajax.php プロジェクト: knigherrant/decopatio
 /**
  * Allows caller to reload recaptcha provided that the previous recaptcha reference
  * is given. This is to avoid any spams on the system.
  *
  * @since	4.0
  * @access	public
  * @param	string
  * @return
  */
 public function reloadCaptcha()
 {
     $ajax = EB::ajax();
     // Get the previous captcha id.
     $id = $this->input->get('previousId', 0, 'int');
     $captcha = EB::table('Captcha');
     $state = $captcha->load($id);
     if ($state) {
         $captcha->delete();
     }
     // Generate a new captcha
     $captcha = EB::table('Captcha');
     $captcha->created = EB::date()->toSql();
     $captcha->store();
     $image = EB::_('index.php?option=com_easyblog&task=captcha.generate&tmpl=component&no_html=1&id=' . $captcha->id, false);
     return $ajax->resolve($image, $captcha->id);
 }
コード例 #20
0
ファイル: default.php プロジェクト: knigherrant/decopatio
if ($tags) {
    ?>
			<div class="eb-box-tags">
				<?php 
    foreach ($tags as $tag) {
        ?>
				<div class="eb-box-tag">
					<i class="fa fa-tag"></i>
					<a class="eb-box-tag-remove" href="javascript:void(0);" data-tag-remove data-id="<?php 
        echo $tag->id;
        ?>
">
						<i class="fa fa-close"></i>
					</a>
					<a class="eb-box-tag-link" href="<?php 
        echo EB::_('index.php?option=com_easyblog&view=tags&layout=listings&id=' . $tag->id);
        ?>
"><?php 
        echo $tag->title;
        ?>
</a>
					<b><?php 
        echo $tag->post_count;
        ?>
</b>
				</div>
				<?php 
    }
    ?>
			</div>
			<?php 
コード例 #21
0
ファイル: easyblog.php プロジェクト: knigherrant/decopatio
 /**
  * Requires the user to be logged in
  *
  * @since	4.0
  * @access	public
  * @param	string
  * @return
  */
 public static function requireLogin()
 {
     $my = JFactory::getUser();
     if ($my->guest) {
         $url = EB::_('index.php?option=com_easyblog&view=login', false);
         $app = JFactory::getApplication();
         return $app->redirect($url);
     }
 }
コード例 #22
0
ファイル: calendar.php プロジェクト: BetterBetterBetter/B3App
defined('_JEXEC') or die('Unauthorized Access');
?>
<table class="eb-calendar table table-bordered" width="100%" border="1">
    <tbody>
        <tr class="eb-calendar-control">
            <td class="eb-calendar-previous text-center">
                <a class="btn-previous-month" href="javascript:void(0);" data-calendar-previous data-timestamp="<?php 
echo $calendar->previous;
?>
">
                    <i class="fa fa-chevron-left"></i>
                </a>
            </td>
            <td class="eb-calendar-month text-center" colspan="5">
                <a class="btn-select-month" href="<?php 
echo EB::_('index.php?option=com_easyblog&view=calendar&year=' . $date->year . '&month=' . $date->month);
?>
">
                    <?php 
echo JText::_($calendar->title . '_SHORT') . ' ' . $date->year;
?>
                </a>
            </td>
            <td class="eb-calendar-next text-center">
                <a class="btn-next-month" href="javascript:void(0);" data-calendar-next data-timestamp="<?php 
echo $calendar->next;
?>
">
                    <i class="fa fa-chevron-right"></i>
                </a>
            </td>
コード例 #23
0
ファイル: category.php プロジェクト: knigherrant/decopatio
 /**
  * Retrieves the permalink for this category
  *
  * @since	4.0
  * @access	public
  * @param	string
  * @return
  */
 public function getPermalink($xhtml = true)
 {
     $url = EB::_('index.php?option=com_easyblog&view=categories&layout=listings&id=' . $this->id, $xhtml);
     return $url;
 }
コード例 #24
0
ファイル: default.php プロジェクト: knigherrant/decopatio
        if ($category->childs) {
            ?>
                           <div id="cat-<?php 
            echo $category->id;
            ?>
" class="collapse">
                               <?php 
            foreach ($category->childs as $child) {
                ?>
                                   <div class="mod-item">
                                       <div class="mod-cell cell-tight">
                                           <i class="fa fa-folder mr-10"></i>
                                       </div>
                                       <div class="mod-cell">
                                           <a href="<?php 
                echo EB::_('index.php?option=com_easyblog&view=categories&layout=listings&id=' . $child->id);
                ?>
">
                                             <?php 
                echo $child->title;
                ?>
                                           </a>

                                           <span class="mod-muted">(<?php 
                echo $child->cnt;
                ?>
)</span>
                                       </div>
                                   </div>
                               <?php 
            }
コード例 #25
0
ファイル: views.php プロジェクト: knigherrant/decopatio
 /**
  * Use explicitly on dashboard view only.
  *
  * @since   4.0
  * @access  public
  * @param   string
  * @return
  */
 public function getDashboardToolbar()
 {
     // Get total pending blog posts
     $model = EB::model('Blogs');
     $total = $model->getTotalPending();
     $totalTeamRequest = 0;
     // Get total team requests to join team.
     if (EB::isTeamAdmin()) {
         $teamModel = EB::model('TeamBlogs');
         $totalTeamRequest = $teamModel->getTotalRequest();
     }
     // Get the logout link
     $logoutActionLink = 'index.php?option=com_users&task=user.logout';
     // @task: Determine if the current user is a blogger or not.
     $isBlogger = EB::isSiteAdmin() || $this->acl->get('add_entry');
     // Get the logout return url
     $itemId = EB::router()->getItemid('latest');
     $logoutReturn = base64_encode(EB::_('index.php?option=com_easyblog&view=latest&Itemid=' . $itemId, false));
     // Get the current active layout
     $layout = $this->input->get('layout', '', 'cmd');
     // Get the current user
     $user = EB::user(JFactory::getUser()->id);
     // Get the template
     $theme = EB::template();
     $theme->set('current', $this->getLayout());
     $theme->set('isBlogger', $isBlogger);
     $theme->set('totalPending', $total);
     $theme->set('user', $user);
     $theme->set('logoutURL', $logoutReturn);
     $theme->set('logoutActionLink', $logoutActionLink);
     $theme->set('totalTeamRequest', $totalTeamRequest);
     $output = $theme->output('site/dashboard/toolbar/default');
     return $output;
 }
コード例 #26
0
ファイル: default.php プロジェクト: knigherrant/decopatio
							<i class="mod-muted fa fa-bolt"></i>
						</span>
						<span class="mod-cell">
							<?php 
            echo JText::_('MOD_EASYBLOGWELCOME_QUICK_SHARE');
            ?>
						</span>
					</a>
				</div>
				<?php 
        }
        ?>

				<div class="eb-mod-item">
					<a href="<?php 
        echo EB::_('index.php?option=com_easyblog&view=composer&tmpl=component');
        ?>
" target="_blank" data-eb-composer>
						<span class="mod-cell">
							<i class="mod-muted fa fa-pencil"></i>
						</span>
						<span class="mod-cell">
							<?php 
        echo JText::_('MOD_EASYBLOGWELCOME_WRITE_NEW');
        ?>
						</span>
					</a>
				</div>

				<div class="eb-mod-item">
					<a href="<?php 
コード例 #27
0
ファイル: weblog.php プロジェクト: knigherrant/decopatio
<?php

/**
* @package		EasyBlog
* @copyright	Copyright (C) 2010 - 2014 Stack Ideas Sdn Bhd. All rights reserved.
* @license		GNU/GPL, see LICENSE.php
* EasySocial is free software. This version may have been modified pursuant
* to the GNU General Public License, and as distributed it includes or
* is derivative of works licensed under the GNU General Public License or
* other free or open source software licenses.
* See COPYRIGHT.php for copyright notices and details.
*/
defined('_JEXEC') or die('Unauthorized Access');
// Add RSD headers
$doc = JFactory::getDocument();
$config = EB::config();
if (!$config->get('main_remotepublishing_xmlrpc')) {
    return;
}
if ($doc->getType() == 'html') {
    $liveWriterLink = rtrim(JURI::root(), '/') . '/components/com_easyblog/wlwmanifest.xml';
    $doc->addHeadLink(EB::_('index.php?option=com_easyblog&view=rsd&tmpl=component'), 'EditURI', 'rel', array('type' => 'application/rsd+xml'));
    $doc->addHeadLink($liveWriterLink, 'wlwmanifest', 'rel', array('type' => 'application/wlwmanifest+xml'));
}
コード例 #28
0
ファイル: default.php プロジェクト: knigherrant/decopatio
">
					<?php 
        if ($ordering == 'title') {
            ?>
					<i class="fa fa-check"></i>
					<?php 
        }
        ?>
						<?php 
        echo JText::_('COM_EASYBLOG_TAGS_ORDER_BY_TITLE');
        ?>
					</a>
				</li>
				<li>
					<a href="<?php 
        echo EB::_($postURL);
        ?>
">
						<?php 
        if ($ordering == 'postcount') {
            ?>
						<i class="fa fa-check"></i>
						<?php 
        }
        ?>
						<?php 
        echo JText::_('COM_EASYBLOG_TAGS_ORDER_BY_POST_COUNT');
        ?>
					</a>
				</li>
			</ul>
コード例 #29
0
// get the post assets
$url = $blog->title;
foreach ($blog->assets as $asset) {
    if ($asset->key == 'link') {
        $url = $asset->value;
    }
}
?>
<div itemprop="blogPosts" itemscope itemtype="http://schema.org/BlogPosting" class="eb-post fd-cf" data-blog-posts-item data-id="<?php 
echo $blog->id;
?>
">
	<div class="eb-post-content">
		<div class="eb-post-head">
			<?php 
echo $this->output('site/blogs/admin.tools', array('blog' => $blog, 'return' => EB::_('index.php?option=com_easyblog')));
?>

			<?php 
echo $this->output('site/blogs/latest/part.aside', array('blog' => $blog));
?>

			<div class="eb-placeholder-link">
				<?php 
if ($blog->category->getParam('listing_show_title', true)) {
    ?>
				<h2 itemprop="name headline" class="eb-placeholder-link-title eb-post-title reset-heading">
					<?php 
    echo EasyBlogHelper::getHelper('String')->htmlAnchorLink($url, $blog->title);
    ?>
				</h2>
コード例 #30
0
ファイル: captcha.php プロジェクト: knigherrant/decopatio
* other free or open source software licenses.
* See COPYRIGHT.php for copyright notices and details.
*/
defined('_JEXEC') or die('Unauthorized Access');
?>
<div class="eb-comment-captcha" data-comment-captcha>
    <p class="hide">
        <b><?php 
echo JText::_('COM_EASYBLOG_CAPTCHA_COMMENTS_TITLE');
?>
</b>
    </p>
    
    <div class="eb-comment-captcha-form">
        <div class="eb-comment-captcha-img">
            <img src="<?php 
echo EB::_('index.php?option=com_easyblog&task=captcha.generate&no_html=1&tmpl=component&id=' . $id);
?>
" width="100" height="20" data-captcha-image style="max-width: none;" />
        </div>

        <div class="eb-comment-captcha-reload"><a href="javascript:void(0);" data-captcha-reload class="btn btn-default"><i class="fa fa-refresh"></i></a></div>
    </div>

    <input type="text" name="captcha-response" id="captcha-response" class="eb-comment-captcha-input form-control text-center" maxlength="5" data-captcha-input />

    <input type="hidden" name="captcha-id" id="captcha-id" value="<?php 
echo $id;
?>
" data-captcha-id/>
</div>