Esempio n. 1
0
 /**
  * Add the header controls to the main screen gui component
  * 
  * @param object Component $mainScreen
  * @return object Component The allWrapper
  * @access public
  */
 public function addHead(Component $mainScreen)
 {
     $harmoni = Harmoni::instance();
     /*********************************************************
      * Additional setup
      *********************************************************/
     $rootSiteComponent = SiteDispatcher::getCurrentRootNode();
     $outputHandler = $harmoni->getOutputHandler();
     /*********************************************************
      * Theme
      *********************************************************/
     $outputHandler->setCurrentTheme($rootSiteComponent->getTheme());
     /*********************************************************
      * Other headers and footers
      *********************************************************/
     // Remove any existing title tags from the head text
     print preg_replace("/<title>[^<]*<\\/title>/", "", $outputHandler->getHead());
     //Add our new title
     print "\n\t\t<title>";
     print strip_tags(SiteDispatcher::getCurrentNode()->acceptVisitor(new BreadCrumbsVisitor(SiteDispatcher::getCurrentNode())));
     print "</title>";
     $outputHandler->setHead(ob_get_clean());
     // Add the RSS head links
     RssLinkPrinter::addHeadLinks(SiteDispatcher::getCurrentNode());
 }
 /**
  * Return the markup that represents the plugin.
  * Plugin writers should override this method with their own functionality
  * as needed.
  * 
  * @return string
  * @access public
  * @since 1/12/06
  */
 public function getMarkup()
 {
     ob_start();
     $RssLinks = RssLinkPrinter::getLinkBlock(SiteDispatcher::getCurrentNode());
     print "<div class='breadcrumbs'>" . $RssLinks . "</div>";
     return ob_get_clean();
 }
Esempio n. 3
0
 /**
  * Add the header controls to the main screen gui component
  * 
  * @param object Component $mainScreen
  * @return object Component The allWrapper
  * @access public
  * @since 4/7/08
  */
 public function addHeaderControls(Component $mainScreen)
 {
     $harmoni = Harmoni::instance();
     /*********************************************************
      * Additional setup
      *********************************************************/
     $rootSiteComponent = SiteDispatcher::getCurrentRootNode();
     $outputHandler = $harmoni->getOutputHandler();
     /*********************************************************
      * Theme
      *********************************************************/
     $outputHandler->setCurrentTheme($rootSiteComponent->getTheme());
     /*********************************************************
      * Other headers and footers
      *********************************************************/
     // Remove any existing title tags from the head text
     print preg_replace("/<title>[^<]*<\\/title>/", "", $outputHandler->getHead());
     //Add our new title
     print "\n\t\t<title>";
     print strip_tags(SiteDispatcher::getCurrentNode()->acceptVisitor(new BreadCrumbsVisitor(SiteDispatcher::getCurrentNode())));
     print "</title>";
     // Add our common Harmoni javascript libraries
     require POLYPHONY_DIR . "/main/library/Harmoni.js.inc.php";
     print Segue_MediaLibrary::getHeadHtml();
     $outputHandler->setHead(ob_get_clean());
     UserDataHelper::writeHeadJs();
     // Add the RSS head links
     RssLinkPrinter::addHeadLinks(SiteDispatcher::getCurrentNode());
     // Add the selection Panel
     Segue_Selection::instance()->addHeadJavascript();
     $allWrapper = new Container(new YLayout(), BLANK, 1);
     if (defined('SEGUE_SITE_HEADER')) {
         $this->siteMessage = $allWrapper->add(new Component($this->getSegueSiteHeader(), BLANK, 1), "100%", null, CENTER, TOP);
     }
     // :: login, links and commands
     $this->headRow = $allWrapper->add(new Container(new XLayout(), BLANK, 1), $rootSiteComponent->getWidth(), null, CENTER, TOP);
     $this->leftHeadColumn = $this->headRow->add($this->getSegueLinksComponent(), null, null, LEFT, TOP);
     $rightHeadColumn = $this->headRow->add(new Container(new YLayout(), BLANK, 1), null, null, CENTER, TOP);
     $rightHeadColumn->add($this->getLoginComponent(), null, null, RIGHT, TOP);
     if ($this->isAuthorizedToExecute()) {
         $rightHeadColumn->add($this->getCommandsComponent(), null, null, RIGHT, TOP);
     }
     $allWrapper->add($mainScreen, $rootSiteComponent->getWidth(), null, CENTER, TOP);
     // :: Top Row ::
     // 		$this->headRow = $mainScreen->add(
     // 			new Container(new XLayout, HEADER, 1),
     // 			"100%", null, CENTER, TOP);
     // 		$this->leftHeadColumn = $this->headRow->add(
     // 			new UnstyledBlock("<h1>".$rootSiteComponent->getTitleMarkup()."</h1>"),
     // 			null, null, LEFT, TOP);
     return $allWrapper;
 }