Created
April 4, 2011 11:28
-
-
Save larsschenk/901492 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* class BoxesClass is where the webdesigner can layout specific page elements typical used | |
* in the right column as boxes. | |
* | |
* These elements are not usualy used on every single page like the PartialsClass elements. | |
* So the partials are much more basic (footer, header, Navigation...) | |
* | |
* The boxes are specific. | |
* Typical boxes are used for teasers. | |
* | |
* The boxes shown here are just demo. The webdesigner might use his/her own way to create them. | |
* The CMS may allow to make them dynamic in a way the are semic dynamic: | |
* The CMS will write this file often and change the content. | |
* | |
* Or the designer might want to make it full dynamic with php so that the CMS does not need | |
* to change content for a particular box. | |
* Maybe a teaser for the bog might be set by the CMS or by a PHP snippet. | |
* | |
*/ | |
class BoxesClass { | |
/** | |
* Construct a boxes object and let it have it's own $content array like descriped for particals. | |
* @param Array $content | |
*/ | |
function __construct($content) { | |
$this->content = $content; | |
} | |
/** | |
* Beta box has a link to documentation. | |
*/ | |
public function box_beta() { | |
?> | |
<div id="anzeigenbox_rectangle"> | |
<div id="teaserbox_header"><h4>Beta-Version</h4></div> | |
<div id="leerzeile"> </div> | |
<div style="margin: 0px 8px 15px 8px;" align="left"> | |
<b>Demo- und Staging-Server</b><br /> | |
<br /> | |
Informationen und Demos:<br /> | |
<ul style="margin:8px;""> | |
<li type="square">Showcase: <a href="/demos/ds-showcase/">Layouts & Selektionen testen</a></li> | |
<li type="square"><a href="/demos">Demos</a> zum Testen und Nachvollziehen.</li> | |
</ul> | |
</div> | |
<div id="teaserbox_footer"><a href="/doku/" class="teaserbox_footer_link">Doku & Status</a></div> | |
</div> | |
<?php | |
} | |
/** | |
* Downloads show scrollable ads that link to downloadable PDF. | |
*/ | |
public function box_downloads() { | |
?> | |
<div id="anzeigenbox"> | |
<div id="teaserbox_header"><h4>LN-Beilagen zum Download</h4></div> | |
<div id="leerzeile"> </div> | |
<div style="margin: 0px 1px 5px 1px;" align="left"> | |
<script> | |
jQuery.noConflict(); | |
// execute your scripts when the DOM is ready. this is a good habit | |
jQuery(function() { | |
// initialize scrollable | |
jQuery("div.scrollable-ads").scrollable({circular: true, clickable: false, size: 2}) | |
.autoscroll({loop: true}); | |
}); | |
</script> | |
<div class="scrollable-ads"> <!-- root element for scrollable-ads --> | |
<div class="items"> <!-- root element for the items --> | |
<div><a href="/cdn/kunden/Immomeile_2011" target=""><img src="<?php echo $this->content['url_cdn']; ?>/cdn/bilder/basics/ln/immomeile0411.jpg" width="145" height="200" border="0"></a></div><div><a href="/cdn/kunden/Bauhaus_April" target=""><img src="<?php echo $this->content['url_cdn']; ?>/cdn/bilder/basics/ln/250311_bauhaus.jpg" width="145" height="200" border="0"></a></div><div><a href="/cdn/kunden/Oekologisch/" target=""><img src="<?php echo $this->content['url_cdn']; ?>/cdn/bilder/basics/ln/beilage_oekologisch.jpg" width="145" height="200" border="0"></a></div><div><a href="/cdn/kunden/Bremer_April" target=""><img src="<?php echo $this->content['url_cdn']; ?>/cdn/bilder/basics/ln/beilage_bremer0411.jpg" width="145" height="200" border="0"></a></div><div><a href="/cdn/kunden/Leserreisen2011" target="_self"><img src="<?php echo $this->content['url_cdn']; ?>/cdn/bilder/basics/ln/beilage_ls_2011.jpg" width="145" height="200" border="0"></a></div> | |
</div> <!--- /items --> | |
</div> <!-- scrollable-ads --> | |
</div> | |
<div id="teaserbox_footer"><a href="/magazin/downloads" class="teaserbox_footer_link" target="_self">Weitere Downloads hier...</a></div> | |
</div> <!-- /anzeigenbox --> | |
<hr class="hide" /> | |
<?php | |
} | |
/** | |
* Teaser for the photo gallery. | |
* | |
* @TODO CMS: Change on a daily basis. | |
* @TODO or php can try to automate this process. | |
*/ | |
public function box_gallery() { | |
// @TODO Mit dem CMS tragen Sie hier taeglich das aktuelle Theme der Gallery ein: | |
$galleryText = 'Zauberer Klok in der MuK, Fischer\'s Wiehnacht, Berkenthiner Kanal-Brücke, Holzschnitzer, Pferdeschlitten...'; | |
// @TODO Mit dem CMS passen Sie die folgenden beiden Variablen an: | |
$url2gallery = 'http://fotos.ln-online.de/gallery/index.php?folder=/10d_Donnerstag/'; | |
$url2galleryThumbnail = 'http://fotos.ln-online.de/bilder/23_nju.jpg'; // @TODO make name reflecting the day. | |
?> | |
<div id="teaserbox"> | |
<div id="teaserbox_header"><h4>LN Online Bilder des Tages</h4></div> | |
<div id="leerzeile"> </div> | |
<div style="margin: 0px 5px 15px 8px; float: left;"><a href="<?php echo $url2gallery; ?>" target="_blank"><img src="<?php echo $url2galleryThumbnail; ?>" border="0" /></a></div> | |
<div id="teasertext_gal"> | |
<a href="<?php echo $url2gallery; ?>" class="intro" target="_blank"> | |
<?php echo $galleryText; ?><br /> | |
<br /> | |
</a> | |
</div> | |
<div id="teaserbox_footer"> | |
<a href="<?php echo $url2gallery; ?>" class="teaserbox_footer_link" target="_blank"> | |
Zu den Bildern des Tages</a> | |
</div> | |
</div> <!-- teaserbox --> | |
<hr class="hide" /> | |
<?php | |
} | |
/** | |
* box_blog shows the teaser for blog.ln-online.de. | |
* The content is parsed from the rss feed. Only the latest article will provide the vars | |
* $blogHeadline and $blogTeasertext. | |
* A cronjob will create the /cron/latest_blog.ln-online.de.php on a daily basis. | |
* No further requirements from the CMS necessary. | |
*/ | |
public function box_blog() { | |
$includeFilename = "${_SERVER['DOCUMENT_ROOT']}/cron/latest_blog.ln-online.de.php"; | |
if (file_exists($includeFilename)) include_once($includeFilename); | |
else { | |
$blogHeadline = 'blog.ln-online.de'; | |
$blogTeasertext = 'Vorschau derzeit nicht verfügbar.'; | |
} | |
?> | |
<div id="teaserbox"> | |
<div id="teaserbox_header"><h4>Aus unseren Weblogs </h4></div> | |
<div id="leerzeile"> </div> | |
<div style="margin: 0px 8px 15px 8px;" align="left"> | |
<b>onlinErleben: <?php echo $blogHeadline; ?></b><br /> | |
<a href="http://blog.ln-online.de" target="_blank" class="intro"> | |
<?php echo $blogTeasertext; ?> | |
</a> | |
</div> | |
<div id="teaserbox_footer"> | |
<a href="http://blog.ln-online.de" class="teaserbox_footer_link" target="_blank">zum Weblog</a> | |
</div> | |
</div> <!-- teaserbox --> | |
<hr class="hide" /> | |
<?php | |
} | |
/** | |
* box_facebook shows the FB fan box. | |
* Info: Has a speperate FB.init with it's own App id! | |
* Test if this conflicts with the FB integration for Like/Comments. | |
* Maybe we should use only ONE FB App ID. | |
* Otherwise this might result in a conflict, when this fan page is used on a | |
* full article rendering page that has fb like/comment button below the new text. | |
*/ | |
public function box_facebook () { | |
?> | |
<!-- facebook --> | |
<div id="anzeigenbox_rectangle"> | |
<script type="text/javascript">window.setTimeout('FB.init("35fc1f59226a94208f761ac3e148aa67")',2000);</script> | |
<fb:fan profile_id="373673517230" stream="0" connections="10" logobar="1" width="300"></fb:fan> | |
<div style="font-size:8px; padding-left:10px"> | |
<a href="http://www.facebook.com/pages/Lubecker-Nachrichten-Online/373673517230">Lübecker Nachrichten Online</a> on Facebook | |
</div> | |
</div> | |
<hr class="hide" /> | |
<!-- /facebook --> | |
<?php | |
} | |
/** | |
* shows the latest poll and links to umfragen.ln-online.de | |
* The include file | |
* /cron/umfrage_aktuell.utf8.php | |
* is placed with updated content by a cronjob. | |
* Checks if include file exists. | |
*/ | |
public function box_poll() { | |
?> | |
<div id="teaserbox"> | |
<div id="teaserbox_header"><h4>Umfragen von LN Online</h4></div> | |
<div id="leerzeile"> </div> | |
<div style="margin: 0px 8px 15px 8px;" align="center"> | |
<?php | |
$includeFilename = "${_SERVER['DOCUMENT_ROOT']}/cron/umfrage_aktuell.utf8.htm"; | |
if (file_exists($includeFilename)) include_once($includeFilename); | |
else echo "Vorschau derzeit nicht verfügbar."; | |
?> | |
</div> | |
<div id="teaserbox_footer"> | |
<a href="http://umfragen.ln-online.de" class="teaserbox_footer_link" target="_blank">zu den Umfragen</a> | |
</div> | |
</div> <!-- teaserbox --> | |
<hr class="hide" /> | |
<?php | |
} | |
/** | |
* teaser sonntagsreden | |
*/ | |
public function box_sonntagsreden() { | |
?> | |
<div class="teaserbox"><div class="teaserbox"> | |
<div class="teaserbox_header"><h4>Sonntagsreden</h4></div> | |
<div class="leerzeile"> </div> | |
<div style="margin: 0px 5px 5px 8px; float: left;"><a href="/magazin/sonntagsreden/" target="_self"> <img src="<?php echo ( 1 ? $this->content['url_cdn'] : $config_url_cdn); ?>/cdn/bilder/basics/ln/teaser_sonntagsreden.jpg" border="0"></a></div> | |
<div class="teasertext"><a href="/magazin/sonntagsreden/" target="_self"><DIV style="MIN-HEIGHT: 120px">Besonders beliebte Kolumnen aus der LN-Sonntagausgabe zum Nachlesen im Internet ...</DIV></a></div> | |
<div class="teaserbox_footer"><a href="/magazin/sonntagsreden/" class="teaserbox_footer_link" target="_self">Zu den Sonntagskolumnen</a></div> | |
</div> | |
<hr class="hide" /></div> | |
<hr class="hide" /> | |
<?php | |
} | |
/** | |
* teaser kugelblicke | |
*/ | |
public function box_kugelblick() { | |
?> | |
<div class="teaserbox"> | |
<div class="teaserbox_header"><h4>LN Online Kugelblicke</h4></div> | |
<div class="leerzeile"> </div> | |
<div style="margin: 0px 5px 5px 8px; float: left;"><a href="/extra/kugelblicke" target="_self"> <img src="<?php echo ( 1 ? $this->content['url_cdn'] : $config_url_cdn); ?>/cdn/bilder/basics/ln/teaser_kugelblick.jpg" border="0"></a></div> | |
<div class="teasertext"><a href="/extra/kugelblicke" target="_self">Spannende Blicke auf Lübecker Bauten - die Welt wie aus einer Kugel betrachtet ...</a></div> | |
<div class="teaserbox_footer"><a href="/extra/kugelblicke" class="teaserbox_footer_link" target="_self">zu unseren Kugelblicken</a></div> | |
</div> | |
<hr class="hide" /> | |
<?php | |
} | |
/** | |
* LN-Online interaktiv | |
* two column link box with no footer | |
* | |
* @TODO check if all target URLs are available. | |
*/ | |
public function box_interaktiv() { | |
?> | |
<div id="teaserbox"> | |
<div id="teaserbox_header"><h4>LN Online Interaktiv</h4></div> | |
<div id="doppelteaseranzeige_links"> | |
<p align="left"> | |
<a class="interaktiv" href="http://www.luebecker-nachrichten.de/index/epaper.html">E-Paper</a> | |
<a class="interaktiv" href="/veranstaltungen/">Termine</a> <!-- @TODO Veranstaltungen bei beta.ln-online.de noch nicht verfügbar. --> | |
<a class="interaktiv" href="/nachrichten/rss_feed/">RSS</a> <!-- @TODO Eine RSS Feed Verteilseite gibt es nicht mehr. --> | |
<a class="interaktiv" href="http://forum.ln-online.de/">Forum</a> | |
<a class="interaktiv" href="http://blog.ln-online.de/">WebLogs</a> | |
<a class="interaktiv" href="http://umfragen.ln-online.de/">Umfragen</a> | |
<a class="interaktiv" href="http://www.meinvz.net/luebeck/" target="_blank">VZ - Profil</a> | |
</p> | |
</div> | |
<div id="doppelteaseranzeige_rechts"> | |
<p align="left"> | |
<a class="interaktiv" href="/kino/">Kino</a> <!-- @TODO Kino ist noch nicht angelegt worden. --> | |
<a class="interaktiv" href="/newsletter/">Newsletter</a> | |
<a class="interaktiv" href="/sport/tabellen/">Sporttabellen</a> <!-- @TODO Tabellen sind noch nicht angelegt worden. --> | |
<a class="interaktiv" href="/artikel/2235238">Webwatcher</a> <!-- @TODO Artikel bei neu nicht verfügbar. Neu anlegen und neu verlinken. --> | |
<a class="interaktiv" href="/downloads/" target="_blank">Downloads</a> | |
<a class="interaktiv" href="http://twitter.com/LN_online">Twitter</a> | |
<a class="interaktiv" href="http://www.facebook.com/pages/Lubecker-Nachrichten-Online/373673517230" target="_blank">Facebook</a> | |
</p> | |
</div> | |
</div> <!-- teaserbox --> | |
<hr class="hide" /> | |
<?php | |
} | |
/** | |
* Link box "Nachrichten aus den Lokalredaktionen" | |
* Uses a transparent png. | |
*/ | |
public function box_lokalredaktion() { | |
?> | |
<div id="teaserbox"> | |
<div id="teaserbox_header"><h4>Nachrichten aus den Lokalredaktionen</h4></div> | |
<div style="margin: 20px 5px 20px 20px; float: left;"><img src="<?php echo $this->content['url_cdn']; ?>/cdn/bilder/ln/lokalkarte_small.png" /></div> | |
<div style="margin: 40px 8px 0 0;"> | |
<a href="/lokales/luebeck/" class="toplokal">Lübeck</a><br /> | |
<a href="/lokales/ostholstein/" class="toplokal">Ostholstein</a><br /> | |
<a href="/lokales/segeberg/" class="toplokal">Segeberg</a><br /> | |
<a href="/lokales/stormarn/" class="toplokal">Stormarn</a><br /> | |
<a href="/lokales/lauenburg/" class="toplokal">Hzgt. Lauenburg</a><br /> | |
<a href="/lokales/nordwestmecklenburg/" class="toplokal">NW-Mecklenburg</a> | |
</div> | |
<p> </p> | |
<div id="teaserbox_footer"> | |
<a href="/lokales/" class="teaserbox_footer_link">zu den Lokalseiten</a> | |
</div> | |
</div> <!-- teaserbox --> | |
<hr class="hide" /> | |
<?php | |
} | |
/** | |
* Link box "Newsletter" | |
*/ | |
public function box_newsletter() { | |
?> | |
<div id="teaserbox"> | |
<div id="teaserbox_header"><h4>LN Online Newsletter</h4></div> | |
<div id="leerzeile"> </div> | |
<div style="margin: 0px 5px 5px 8px; float: left;"> | |
<a href="/newsletter/"><img src="<?php echo $this->content['url_cdn']; ?>/cdn/bilder/ln/teaser_nl.jpg" border="0" /></a> | |
</div> | |
<div id="teasertext"> | |
<a href="/newsletter/">LN Online Newsletter - Aktuelle Meldungen per E-Mail.<br /> | |
Sie entscheiden, was Sie interessiert ...</a> | |
</div> | |
<div id="teaserbox_footer"> | |
<a href="/newsletter/" class="teaserbox_footer_link">zum Newsletter</a> | |
</div> | |
</div> <!-- teaserbox --> | |
<hr class="hide" /> | |
<?php | |
} | |
/** | |
* Link box "Sudoku" | |
*/ | |
public function box_sudoku() { | |
?> | |
<div id="teaserbox"> | |
<div id="teaserbox_header"><h4>Sudoku</h4></div> | |
<div id="leerzeile"> </div> | |
<div style="margin: 0px 5px 5px 8px; float: left;"> | |
<a href="/unterhaltung/spiele/sudoku/"><img src="<?php echo $this->content['url_cdn']; ?>/cdn/bilder/ln/sudoku.gif" border="0" /></a> | |
</div> | |
<div id="teasertext"> | |
<a href="/unterhaltung/spiele/sudoku/">Lust auf ein wenig Gehirntraining? Versuchen Sie es mit unserem Sudoku-Rätsel. Täglich neu!</a> | |
</div> | |
<div id="teaserbox_footer"> | |
<a href="/unterhaltung/spiele/sudoku/" class="teaserbox_footer_link">zum Sudoku</a> | |
</div> | |
</div> <!-- teaserbox --> | |
<hr class="hide" /> | |
<?php | |
} | |
/** | |
* Link box "Servicecenter" | |
*/ | |
public function box_servicecenter() { | |
?> | |
<div id="teaserbox"> | |
<div id="teaserbox_header"><h4>Lübecker Nachrichten Online</h4></div> | |
<div style="float:left; margin-bottom: 10px; margin-top: 10px;"> | |
<a href="http://www.luebecker-nachrichten.de/index/ln-abo" class="toplokalrot">Leserservice</a><br /> | |
<a href="http://www.luebecker-nachrichten.de/eap/eviva?~exiturl=http://www.luebecker-nachrichten.de" class="toplokalrot">Anzeigenservice</a><br /> | |
</div> | |
<div style="float:right; margin-bottom: 10px; margin-top: 10px;"> | |
<a href="http://www.luebecker-nachrichten.de/index/epaper.html" class="toplokalrot">E-Paper</a><br /> | |
<a href="/kunden/mediadaten/" class="toplokalrot">Bei uns Werben</a><br /> | |
</div> | |
<div style="clear:both;" id="teaserbox_footer"><a href="http://www.luebecker-nachrichten.de" class="teaserbox_footer_link">Zum Online Service Center</a></div> | |
</div> <!-- teaserbox --> | |
<hr class="hide" /> | |
<?php | |
} | |
/** | |
* Teaser for "Welt im Bild" | |
* Uses a static thumbnail. | |
*/ | |
public function box_weltimbild() { | |
?> | |
<div id="teaserbox"> | |
<div id="teaserbox_header"><h4>Die Welt im Bild</h4></div> | |
<div id="leerzeile"> </div> | |
<div style="margin: 0px 5px 5px 8px; float: left;"> | |
<a href="/nachrichten/bild/"> <img src="<?php echo $this->content['url_cdn']; ?>/cdn/bilder/ln/teaser_newsbild.jpg" border="0" /></a> | |
</div> | |
<div id="teasertext"> | |
<a href="/nachrichten/bild/">News im Bildformat- der aktuelle Ãœberblick über die Geschehnisse des Tages in unserer Bilder-Datenbank.</a> | |
</div> | |
<div id="teaserbox_footer"><a href="/nachrichten/bild/" class="teaserbox_footer_link">Zur Foto-Galerie</a></div> | |
</div> <!-- teaserbox --> | |
<hr class="hide" /> | |
<?php | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment