Beispiel #1
0
 /**
  * Prepares the document
  */
 protected function _prepareDocument()
 {
     $app = JFactory::getApplication();
     $menus = $app->getMenu();
     $title = NULL;
     // Because the application sets a default page title,
     // we need to get it from the menu item itself
     $menu = $menus->getActive();
     if ($menu) {
         $this->params->def('page_heading', $this->params->get('page_title', $menu->title));
     }
     $title = $this->params->get('page_title', '');
     $title .= " - " . JText::_('COM_EVENTGALLERY_ORDERS_PATH');
     // Check for empty title and add site name if param is set
     if (empty($title)) {
         $title = $app->getCfg('sitename');
     } elseif ($app->getCfg('sitename_pagetitles', 0) == 1) {
         $title = JText::sprintf('JPAGETITLE', $app->getCfg('sitename'), $title);
     } elseif ($app->getCfg('sitename_pagetitles', 0) == 2) {
         $title = JText::sprintf('JPAGETITLE', $title, $app->getCfg('sitename'));
     }
     if ($this->document) {
         $this->document->setTitle($title);
     }
 }
Beispiel #2
0
 /**
  * Prepares the document
  */
 protected function _prepareDocument()
 {
     $app = JFactory::getApplication();
     $menus = $app->getMenu();
     $title = null;
     // Because the application sets a default page title,
     // we need to get it from the menu item itself
     $menu = $menus->getActive();
     if ($menu) {
         $this->params->get('page_heading', $this->params->get('page_title', $menu->title));
     }
     $title = $this->params->get('page_title', '');
     if (empty($title)) {
         $title = $app->getCfg('sitename');
     } elseif ($app->getCfg('sitename_pagetitles', 0) == 1) {
         $title = JText::sprintf('JPAGETITLE', $app->getCfg('sitename'), $title);
     } elseif ($app->getCfg('sitename_pagetitles', 0) == 2) {
         $title = JText::sprintf('JPAGETITLE', $title, $app->getCfg('sitename'));
     }
     $this->document->setTitle($title);
     if ($this->params->get('menu-meta_description')) {
         $this->document->setDescription($this->params->get('menu-meta_description'));
     }
     if ($this->params->get('menu-meta_keywords')) {
         $this->document->setMetadata('keywords', $this->params->get('menu-meta_keywords'));
     }
     if ($this->params->get('robots')) {
         $this->document->setMetadata('robots', $this->params->get('robots'));
     }
 }
Beispiel #3
0
 /**
  * Prepares the document
  */
 protected function _prepareDocument()
 {
     $app = JFactory::getApplication();
     $menus = $app->getMenu();
     $title = NULL;
     // Because the application sets a default page title,
     // we need to get it from the menu item itself
     $menu = $menus->getActive();
     if ($menu) {
         $this->params->def('page_heading', $this->params->get('page_title', $menu->title));
     }
     $title = $this->params->get('page_title', '');
     if ($this->folder->getDisplayName()) {
         $title = $this->folder->getDisplayName();
     }
     // Check for empty title and add site name if param is set
     if (empty($title)) {
         $title = $app->getCfg('sitename');
     } elseif ($app->getCfg('sitename_pagetitles', 0) == 1) {
         $title = JText::sprintf('JPAGETITLE', $app->getCfg('sitename'), $title);
     } elseif ($app->getCfg('sitename_pagetitles', 0) == 2) {
         $title = JText::sprintf('JPAGETITLE', $title, $app->getCfg('sitename'));
     }
     if (empty($title)) {
         $title = $this->folder->getDisplayName();
     }
     $this->document->setTitle($title);
     if ($this->folder->getText()) {
         $this->document->setDescription($this->folder->getText());
     } elseif (!$this->folder->getText() && $this->params->get('menu-meta_description')) {
         $this->document->setDescription($this->params->get('menu-meta_description'));
     }
 }
Beispiel #4
0
	/**
	 * @todo Implement testSetTitle().
	 */
	public function testSetTitle() {
		$this->object = new JDocument;

		$this->object->setTitle('My Title');

		$this->assertThat(
			$this->object->title,
			$this->equalTo('My Title')
		);
	}
Beispiel #5
0
 public function execute()
 {
     KUNENA_PROFILER ? KunenaProfiler::instance()->start('function ' . get_class($this) . '::' . __FUNCTION__ . '()') : null;
     // Run before executing action.
     $result = $this->before();
     if ($result === false) {
         KUNENA_PROFILER ? KunenaProfiler::instance()->stop('function ' . get_class($this) . '::' . __FUNCTION__ . '()') : null;
         throw new KunenaExceptionAuthorise(JText::_('COM_KUNENA_NO_ACCESS'), 404);
     }
     // Wrapper layout.
     $this->output = KunenaLayout::factory('Page')->set('me', $this->me)->setOptions($this->getOptions());
     if ($this->config->board_offline && !$this->me->isAdmin()) {
         // Forum is offline.
         $this->setResponseStatus(503);
         $this->output->setLayout('offline');
         $this->content = KunenaLayout::factory('Widget/Custom')->set('header', JText::_('COM_KUNENA_FORUM_IS_OFFLINE'))->set('body', $this->config->offline_message);
     } elseif ($this->config->regonly && !$this->me->exists()) {
         // Forum is for registered users only.
         $this->setResponseStatus(403);
         $this->output->setLayout('offline');
         $this->content = KunenaLayout::factory('Widget/Custom')->set('header', JText::_('COM_KUNENA_LOGIN_NOTIFICATION'))->set('body', JText::_('COM_KUNENA_LOGIN_FORUM'));
     } else {
         // Display real content.
         try {
             // Split into two lines for exception handling.
             $content = $this->display()->set('breadcrumb', $this->breadcrumb);
             $this->content = $content->render();
         } catch (KunenaExceptionAuthorise $e) {
             $this->setResponseStatus($e->getResponseCode());
             $this->output->setLayout('unauthorized');
             $this->document->setTitle($e->getResponseStatus());
             $this->content = KunenaLayout::factory('Widget/Custom')->set('header', $e->getResponseStatus())->set('body', $e->getMessage());
         } catch (Exception $e) {
             if (!$e instanceof KunenaExceptionAuthorise) {
                 $header = 'Error while rendering layout';
                 $content = isset($content) ? $content->renderError($e) : $this->content->renderError($e);
                 $e = new KunenaExceptionAuthorise($e->getMessage(), $e->getCode(), $e);
             } else {
                 $header = $e->getResponseStatus();
                 $content = $e->getMessage();
             }
             $this->setResponseStatus($e->getResponseCode());
             $this->output->setLayout('unauthorized');
             $this->document->setTitle($header);
             $this->content = KunenaLayout::factory('Widget/Custom')->set('header', $header)->set('body', $content);
         }
     }
     // Display wrapper layout with given parameters.
     $this->output->set('content', $this->content)->set('breadcrumb', $this->breadcrumb);
     // Run after executing action.
     $this->after();
     KUNENA_PROFILER ? KunenaProfiler::instance()->stop('function ' . get_class($this) . '::' . __FUNCTION__ . '()') : null;
     return $this->output;
 }
Beispiel #6
0
 /**
  * Prepares the document
  */
 protected function _prepareDocument()
 {
     $app = JFactory::getApplication();
     $menus = $app->getMenu();
     $title = null;
     // Because the application sets a default page title,
     // we need to get it from the menu item itself
     $menu = $menus->getActive();
     if ($menu) {
         $this->params->get('page_heading', $this->params->get('page_title', $menu->title));
     }
     $title = $this->params->get('page_title', '');
     // checks for empty title or sets the category title if
     // the current menu item has a different catid than the current catid is
     if (empty($title) || isset($menu->query['catid']) && $this->catid != $menu->query['catid']) {
         $title = $this->category->title;
     }
     if (empty($title)) {
         $title = $app->getCfg('sitename');
     } elseif ($app->getCfg('sitename_pagetitles', 0) == 1) {
         $title = JText::sprintf('JPAGETITLE', $app->getCfg('sitename'), $title);
     } elseif ($app->getCfg('sitename_pagetitles', 0) == 2) {
         $title = JText::sprintf('JPAGETITLE', $title, $app->getCfg('sitename'));
     }
     $this->document->setTitle($title);
     if (!empty($this->category->metadesc)) {
         $this->document->setDescription($this->category->metadesc);
     } else {
         if ($this->params->get('menu-meta_description')) {
             $this->document->setDescription($this->params->get('menu-meta_description'));
         }
     }
     if (!empty($this->category->metadesc)) {
         $this->document->setMetadata('keywords', $this->category->metakey);
     } else {
         if ($this->params->get('menu-meta_keywords')) {
             $this->document->setMetadata('keywords', $this->params->get('menu-meta_keywords'));
         }
     }
     $robots = $this->category->getMetadata()->get('robots');
     if (!empty($robots)) {
         $this->document->setMetadata('robots', $robots);
     } else {
         if ($this->params->get('robots')) {
             $this->document->setMetadata('robots', $this->params->get('robots'));
         }
     }
     /**
      * @var JPathway $pathway
      */
     $pathway = $app->getPathway();
 }
Beispiel #7
0
 /**
  * Sets the document title according to Global Configuration options
  *
  * @param   string  $title  The page title
  *
  * @return  void
  *
  * @since   3.6
  */
 public function setDocumentTitle($title)
 {
     $app = JFactory::getApplication();
     // Check for empty title and add site name if param is set
     if (empty($title)) {
         $title = $app->get('sitename');
     } elseif ($app->get('sitename_pagetitles', 0) == 1) {
         $title = JText::sprintf('JPAGETITLE', $app->get('sitename'), $title);
     } elseif ($app->get('sitename_pagetitles', 0) == 2) {
         $title = JText::sprintf('JPAGETITLE', $title, $app->get('sitename'));
     }
     $this->document->setTitle($title);
 }
Beispiel #8
0
 /**
  * Prepares the document
  */
 protected function _prepareDocument()
 {
     $app = JFactory::getApplication();
     $menus = $app->getMenu();
     $menu = $menus->getActive();
     $title = null;
     // Because the application sets a default page title,
     // we need to get it from the menu item itself
     if ($menu) {
         $this->params->def('page_heading', $this->params->get('page_title', $menu->title));
     }
     $title = $this->params->get('page_title', '');
     // checks for empty title or sets the folder description if
     // the current menu item is not the event view. This avoids
     // having the title of them menu item on all sub events
     if (empty($title) || isset($menu->query['view']) && strcmp($menu->query['view'], 'event') != 0) {
         $title = $this->folder->getDisplayName();
     }
     // Check for empty title and add site name if param is set
     if (empty($title)) {
         $title = $app->getCfg('sitename');
     } elseif ($app->getCfg('sitename_pagetitles', 0) == 1) {
         $title = JText::sprintf('JPAGETITLE', $app->getCfg('sitename'), $title);
     } elseif ($app->getCfg('sitename_pagetitles', 0) == 2) {
         $title = JText::sprintf('JPAGETITLE', $title, $app->getCfg('sitename'));
     }
     if (empty($title)) {
         $title = $this->folder->getDisplayName();
     }
     $this->document->setTitle($title);
     $description = $this->params->get('menu-meta_description');
     if (empty($description)) {
         $description = $this->folder->getMetadata()->get('metadesc');
     }
     // set the text of the folder as description if the meta desc is not set
     // or the menu item does not link to a single event
     if (empty($description) || isset($menu->query['view']) && strcmp($menu->query['view'], 'event') != 0) {
         $description = strip_tags($this->folder->getText());
     }
     $this->document->setDescription($description);
     $keys = $this->folder->getMetadata()->get('metakey');
     if ($this->params->get('menu-meta_keywords')) {
         $keys = $this->params->get('menu-meta_keywords');
     }
     $this->document->setMetadata('keywords', $keys);
     if ($this->params->get('robots')) {
         $this->document->setMetadata('robots', $this->params->get('robots'));
     }
     $this->document->setMetadata('fragment', '!');
 }
Beispiel #9
0
 /**
  * Prepares the document
  */
 protected function _prepareDocument()
 {
     $app = JFactory::getApplication();
     $menus = $app->getMenu();
     $title = null;
     // Because the application sets a default page title,
     // we need to get it from the menu item itself
     $menu = $menus->getActive();
     if ($menu) {
         $this->params->def('page_heading', $this->params->get('page_title', $menu->title));
     }
     $title = $this->params->get('page_title', '');
     if ($this->folder->getDisplayName()) {
         $title = $this->folder->getDisplayName();
     }
     $title .= " - " . $this->position . ' / ' . $this->folder->getFileCount();
     // Check for empty title and add site name if param is set
     if (empty($title)) {
         $title = $app->getCfg('sitename');
     } elseif ($app->getCfg('sitename_pagetitles', 0) == 1) {
         $title = JText::sprintf('JPAGETITLE', $app->getCfg('sitename'), $title);
     } elseif ($app->getCfg('sitename_pagetitles', 0) == 2) {
         $title = JText::sprintf('JPAGETITLE', $title, $app->getCfg('sitename'));
     }
     if (empty($title)) {
         $title = $this->folder->getDisplayName();
     }
     if ($this->document) {
         $description = $this->folder->getMetadata()->get('metadesc');
         if (!empty($description)) {
             $this->document->setDescription($description);
         } elseif ($this->folder->getText()) {
             $this->document->setDescription(strip_tags($this->folder->getText()));
         } elseif (!$this->folder->getText() && $this->params->get('menu-meta_description')) {
             $this->document->setDescription($this->params->get('menu-meta_description'));
         }
         if ($this->params->get('menu-meta_keywords')) {
             $this->document->setMetadata('keywords', $this->params->get('menu-meta_keywords'));
         } else {
             $this->document->setMetadata('keywords', $this->folder->getMetadata()->get('metakey'));
         }
         if ($this->params->get('robots')) {
             $this->document->setMetadata('robots', $this->params->get('robots'));
         }
         $this->document->setTitle($title);
         $this->document->setMetadata('fragment', '!');
     }
 }
 /**
  * Sets the page title
  *
  * @param  string  $title
  * @return void
  */
 public function setPageTitle($title)
 {
     if ($this->_cmsDoc) {
         $this->_cmsDoc->setTitle($title);
     }
 }
Beispiel #11
0
 /**
  * @testdox  Test that setTitle returns an instance of $this
  */
 public function testEnsureSetTitleReturnsThisObject()
 {
     $this->assertSame($this->object, $this->object->setTitle('Joomla! Rocks'));
 }
Beispiel #12
0
if (isset($myss)) {
    bc_userSignIn($myss);
} else {
    echo "Session variable not defined by system, adjust file api.blastchatc.php, function bc_getSessionData().";
    exit;
}
//GMT time for authentication purposes
$time_key = gmdate('Y-m-d H:i:s');
if ($detached == 2) {
    //overwrite not requested, load admin backend configuration for detached feature
    $detached = $website->detached;
}
$cur_template = bc_getCurrentTemplate();
//Create request for connection to blastchat server (iframe source)
$request = "https://www.blastchat.com/index2.php?option=com_blastchat&no_html=1" . "&task=client" . "&ctask=enter" . "&d=" . $detached . "&url=" . $website->url . "&intraid=" . $website->intra_id . "&userid=" . $myss->userid . "&usergid=" . $bc_groupid . "&nick=" . urlencode($myss->username) . "&rid=" . $rid . "&rsid=" . $rsid . "&lang=" . $backward_lang . "&nlang=" . $lang->getTag() . "&template=" . $cur_template . "&pub_key=" . md5($time_key . $website->priv_key) . "&sec_code=" . md5($time_key . $website->priv_key . $myss->userid) . "&time_key=" . $time_key . "&bcItemid=" . $bc_Itemid . "&bc_ver=3.0" . "&prod=" . $bc_version->PRODUCT . "&rel=" . $bc_version->RELEASE . "&dev=" . $bc_version->DEV_LEVEL;
JDocument::setTitle("BlastChat @ {$website->url}");
?>

<?php 
if ($detached == 1) {
    ?>
<div id="errmsg"></div>
<script language="javascript" type="text/javascript">
<!--
var mine = window.open("<?php 
    echo $request;
    ?>
","BlastChat @ <?php 
    echo $website->url;
    ?>
","WIDTH=<?php 
Beispiel #13
0
 /**
  * Sets the page Title
  * TuiyoControllerCore::setTitle()
  * 
  * @return void
  */
 public function setTitle($title)
 {
     JDocument::setTitle($title);
 }