Example #1
0
 /**
  * @param string $title Page title
  * @param string $body_class Optional value for the class attribute of the <body> element
  */
 function __initialize($title = "", $body_class = false)
 {
     // this makes HtmlPage.tpl.php the 'one and only' template
     // for all derivered classes, unless they override it after
     // parent::__initialize with $this->file = X
     $file = str_replace(".class.php", ".tpl.php", __FILE__);
     parent::__initialize($file);
     $this->set("title", $title);
     $this->set("meta", $this->meta);
     $this->set("js", $this->js);
     $this->set("css", $this->css);
     $this->set("content", array());
     $this->set("docready", $this->docready);
     $this->set("plaindocready", $this->plaindocready);
     $this->set("inlineheaderpre", $this->inlineheaderpre);
     $this->set("inlineheader", $this->inlineheader);
     if ($body_class) {
         $this->set("bodyClass", "{$body_class}");
     }
     if (resourceExists("favicon.ico")) {
         $this->set("favicon", resFile("favicon.ico"));
     }
     // set up correct display on mobile devices: http://stackoverflow.com/questions/8220267/jquery-detect-scroll-at-bottom
     $this->addMeta("viewport", "width=device-width, height=device-height, initial-scale=1.0");
 }
 function __initialize()
 {
     parent::__initialize();
     $links = array();
     $links[] = $this->CreateLink("TwitThis", "http://twitter.com/home?status={url}", resFile("socialbookmarks/twitter.png"));
     $links[] = $this->CreateLink("LinkedIn", "http://www.linkedin.com/shareArticle?mini=true&url={url}&title={title}&source={domain}&summary=EXCERPT", resFile("socialbookmarks/linkedin.png"));
     $links[] = $this->CreateLink("MySpace", "http://www.myspace.com/Modules/PostTo/Pages/?u={url}&t={title}", resFile("socialbookmarks/myspace.png"));
     $links[] = $this->CreateLink("del.icio.us", "http://delicious.com/post?url={url}&title={title}", resFile("socialbookmarks/delicious.png"));
     $links[] = $this->CreateLink("Digg", "http://digg.com/submit?phase=2&url={url}&title={title}", resFile("socialbookmarks/digg.png"));
     $links[] = $this->CreateLink("StumbleUpon", "http://www.stumbleupon.com/submit.php?url={url}", resFile("socialbookmarks/stumbleupon.png"));
     $links[] = $this->CreateLink("Reddit", "http://reddit.com/submit?url={url}&title={title}", resFile("socialbookmarks/reddit.png"));
     $links[] = $this->CreateLink("Y!GG", "http://yigg.de/neu?exturl={url}&exttitle={title}", resFile("socialbookmarks/yigg.png"));
     $links[] = $this->CreateLink("Google Bookmarks", "http://www.google.com/bookmarks/mark?op=edit&output=popup&bkmk={url}&title={title}", resFile("socialbookmarks/google.png"));
     $links[] = $this->CreateLink("Webnews", "http://www.webnews.de/einstellen?url={url}&title={title}", resFile("socialbookmarks/webnews.png"));
     $links[] = $this->CreateLink("YahooMyWeb", "http://myweb2.search.yahoo.com/myresults/bookmarklet?u={url}&={title}", resFile("socialbookmarks/yahoomyweb.png"));
     $links[] = $this->CreateLink("Furl", "http://www.furl.net/storeIt.jsp?u={url}&t={title}", resFile("socialbookmarks/furl.png"));
     $links[] = $this->CreateLink("Live-MSN", "https://favorites.live.com/quickadd.aspx?marklet=1&mkt=en-us&url={url}&title={title}&top=1", resFile("socialbookmarks/live.png"));
     $links[] = $this->CreateLink("BlinkList", "http://www.blinklist.com/index.php?Action=Blink/addblink.php&Url={url}&Title={title}", resFile("socialbookmarks/blinklist.png"));
     $links[] = $this->CreateLink("co.mments", "http://co.mments.com/track?url={url}&title={title}", resFile("socialbookmarks/co.mments.png"));
     $links[] = $this->CreateLink("Facebook", "http://www.facebook.com/share.php?u={url}", resFile("socialbookmarks/facebook.png"));
     $links[] = $this->CreateLink("Faves", "http://faves.com/Authoring.aspx?u={url}&title={title}", resFile("socialbookmarks/faves.png"));
     $links[] = $this->CreateLink("Folkd", "http://www.folkd.com/submit/{url}", resFile("socialbookmarks/folkd.png"));
     $links[] = $this->CreateLink("Squidoo", "http://www.squidoo.com/lensmaster/bookmark?{url}", resFile("socialbookmarks/squidoo.png"));
     $links[] = $this->CreateLink("Wikio", "http://www.wikio.com/vote?url={url}", resFile("socialbookmarks/wikio.png"));
     $links[] = $this->CreateLink("Ma.gnolia", "http://ma.gnolia.com/bookmarklet/add?url={url}&title={title}", resFile("socialbookmarks/magnolia.png"));
     $links[] = $this->CreateLink("NewsVine", "http://www.newsvine.com/_tools/seed&save?u={url}&h={title}", resFile("socialbookmarks/newsvine.png"));
     $links[] = $this->CreateLink("Shadows", "http://www.shadows.com/features/tcr.htm?url={url}&title={title}", resFile("socialbookmarks/shadows.png"));
     $this->set("links", $links);
 }
 /**
  * @param string $account_code Your GA account
  * @param string $js_varname Name of the JS variable
  * @param bool $track_immediately If true calls _trackPageview() instantly
  * @param string $track_prefix Prefix for tracked events
  */
 function __initialize($account_code, $js_varname = "pageTracker", $track_immediately = true, $track_prefix = "")
 {
     parent::__initialize();
     $this->set("account_code", $account_code);
     $this->set("js_varname", $js_varname);
     $this->set("track_immediately", $track_immediately);
     $this->set("track_prefix", $track_prefix);
     $this->set("tracker", array());
 }