* added featured article to tibiacom template (you can add them with add news button)

* added networks (facebook and twitter) and highscores (top 5) boxes to tibiacom template, configurable in templates/tibiacom/config.php
* fixed polls box in tibiacom template
* (internal) moved tibiacom boxes to separate directory
* (internal) renamed constant TICKET -> TICKER
This commit is contained in:
slawkens
2017-10-26 15:35:22 +02:00
parent 5e414ebda8
commit 583f3394fc
29 changed files with 795 additions and 121 deletions

View File

@@ -84,7 +84,7 @@ defined('MYAAC') or die('Direct access not allowed!');
$i = 0;
foreach($menus[$category] as $menu) {
if(strpos($menu['link'], 'http') !== false) {
if(strpos(trim($menu['link']), 'http') === 0) {
echo '<a href="' . $menu['link'] . '" target="_blank">' . $menu['name'] . '</a>';
}
else {

View File

@@ -106,7 +106,7 @@
<td >
<div style="float: right; margin-top: 20px;" >
<form class="MediumButtonForm" action="{{ getLink('account/create') }}" method="post" >
<div class="MediumButtonBackground" style="background-image:url({{ template_path }}/images/global/buttons/mediumbutton.gif)" onMouseOver="MouseOverMediumButton(this);" onMouseOut="MouseOutMediumButton(this);" ><div class="MediumButtonOver" style="background-image:url({{ template_path }}/images/global/buttons/mediumbutton-over.gif)" onMouseOver="MouseOverMediumButton(this);" onMouseOut="MouseOutMediumButton(this);" ></div>
<div class="MediumButtonBackground" style="background-image:url({{ template_path }}/images/global/buttons/mediumbutton.gif)" onMouseOver="MouseOverBigButton(this);" onMouseOut="MouseOutBigButton(this);" ><div class="MediumButtonOver" style="background-image:url({{ template_path }}/images/global/buttons/mediumbutton-over.gif)" onMouseOver="MouseOverBigButton(this);" onMouseOut="MouseOutBigButton(this);" ></div>
<input class="MediumButtonText" type="image" name="Create Account" alt="Create Account" src="{{ template_path }}/images/global/buttons/mediumbutton_createaccount.png" />
</div>
</form>

View File

@@ -740,6 +740,52 @@ img {
border: 0;
}
#Themeboxes #NetworksBox {
position: relative;
height: 204px;
}
#Themeboxes #NetworksBox #FacebookBlock {
position: relative;
top: 32px;
height: 113px;
}
#Themeboxes #NetworksBox #FacebookLikeBox {
position: relative;
left: 27px;
top: 3px;
height: 60px;
width: 115px;
overflow: hidden;
}
#Themeboxes #NetworksBox #FacebookLikeBox div {
position: relative;
left: -1px;
top: -1px;
}
#Themeboxes #NetworksBox #FacebookSendBox {
position: absolute;
left: 92px;
top: 14px;
width: 50px;
}
#Themeboxes #NetworksBox #FacebookLikes {
position: relative;
left: 14px;
top: 10px;
width: 155px;
left: 13px;
overflow: hidden;
}
#Themeboxes #NetworksBox #FacebookLikes div {
position: relative;
left: -69px;
}
#Themeboxes #NetworksBox #TwitterBlock {
position: relative;
top: 42px;
text-align: center;
}
/** -------------------------------
* OLD Stylesheet declarations for
* the CONTENT AREA

View File

@@ -0,0 +1,18 @@
<?php
if(PAGE != 'news') {
return;
}
$query = $db->query('SELECT `thumb` FROM `' . TABLE_PREFIX . 'gallery` WHERE `id` = ' . $db->quote($config['gallery_image']));
if($query->rowCount() == 1):
$image = $query->fetch();
?>
<div id="GalleryBox" class="Themebox" style="background-image:url(<?php echo $template_path; ?>/images/themeboxes/gallery/gallerybox.gif);">
<a href="?subtopic=gallery&image=<?php echo $config['gallery_image']; ?>" >
<img id="GalleryContent" class="ThemeboxContent" src="<?php echo $image['thumb']; ?>" alt="Screenshot of the Day" />
</a>
<div class="Bottom" style="background-image:url(<?php echo $template_path; ?>/images/general/box-bottom.gif);"></div>
</div>
<br/><br/><br/>
<?php endif; ?>

View File

@@ -0,0 +1,63 @@
<style type="text/css" media="all">
.Toplevelbox {
top: -4px;
position: relative;
margin-bottom: 10px;
width: 180px;
height: 200px;
}
.top_level {
position: absolute;
top: 29px;
left: 6px;
height: 160px;
width: 168px;
z-index: 20;
text-align: center;
padding-top: 6px;
font-family: Tahoma, Geneva, sans-serif;
font-size: 9.2pt;
color: #FFF;
font-weight: bold;
text-align: right;
text-decoration: inherit;
text-shadow: 0.1em 0.1em #333
}
#Topbar a {
text-decoration: none;
cursor: auto;
}
a.topfont {
font-family: Verdana, Arial, Helvetica;
font-size: 11px;
color: #FF0000;
text-decoration: none
}
a:hover.topfont {
font-family: Verdana, Arial, Helvetica;
font-size: 11px;
color: #CCC;
text-decoration:none
}
</style>
<div id="Topbar" class="Themebox" style="background-image:url(<?PHP echo $template_path; ?>/images/themeboxes/highscores/highscores.png);">
<div class="top_level" style="background:url(<?PHP echo $template_path; ?>/images/themeboxes/bg_top.png)" align=" ">
<?php
foreach(getTopPlayers(5) as $player) {
echo '<div align="left"><a href="'.getPlayerLink($player['name'], false).'" class="topfont">
<font color="#CCC">&nbsp;&nbsp;&nbsp;&nbsp;'.$player['rank'].' - </font>'.$player['name'].'
<br>
<small><font color="white">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Level: ('.$player['level'].')</font></small>
<br>
</a>
</div>';
}
?>
<div class="Bottom" style="background-image:url(<?PHP echo $template_path; ?>/images/general/box-bottom.gif); top: 159px;; left:-5px;">
</div>
</div>
</div>
<br/><br/><br/>

View File

@@ -0,0 +1,31 @@
<div id="NetworksBox" class="Themebox" style="background-image:url(<?php echo $template_path; ?>/images/themeboxes/networks/networksbox.png);">
<?php if(!empty($config['network_facebook'])) {?>
<div id="FacebookBlock">
<div id="FacebookLikeBox">
<div class="fb-like-box fb_iframe_widget" data-href="https://www.facebook.com/<?php echo $config['network_facebook']; ?>" data-width="175" data-height="180" data-show-faces="true" data-stream="false" data-border-color="none" data-header="false" fb-xfbml-state="rendered">
<span style="vertical-align: bottom; width: 181px; height: 180px;">
</span>
</div>
</div>
<div id="FacebookSendBox">
<div class="fb-send fb_iframe_widget" data-href="https://www.facebook.com/<?php echo $config['network_facebook']; ?>" data-width="50" data-height="20" fb-xfbml-state="rendered">
<span style="vertical-align: bottom; width: 50px; height: 20px;">
</span>
</div>
</div>
<div id="FacebookLikes">
<div class="fb-like fb_edge_widget_with_comment fb_iframe_widget" data-href="https://www.facebook.com/<?php echo $config['network_facebook']; ?>" data-send="false" data-width="225" data-show-faces="false" fb-xfbml-state="rendered">
<span style="height: 28px; width: 225px;">
</span>
</div>
</div>
</div>
<?php } ?>
<?php if(!empty($config['network_twitter'])){ ?>
<div id="TwitterBlock">
<a href="https://twitter.com/<?php echo $config['network_twitter']; ?>" class="twitter-follow-button" data-show-count="false">Follow @<?php echo $config['network_twitter']; ?></a>
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+'://platform.twitter.com/widgets.js';fjs.parentNode.insertBefore(js,fjs);}}(document, 'script', 'twitter-wjs');</script>
</div>
<?php } ?>
<div class="Bottom" style="background-image:url(<?php echo $template_path; ?>/images/general/box-bottom.gif);"></div>
</div>

View File

@@ -0,0 +1,5 @@
<div id="NewcomerBox" class="Themebox" style="background-image:url(<?php echo $template_path; ?>/images/themeboxes/newcomer/newcomerbox.gif);">
<a class="ThemeboxButton" href="<?php echo getLink('account/create'); ?>" onMouseOver="MouseOverBigButton(this);" onMouseOut="MouseOutBigButton(this);" style="background-image:url(<?php echo $template_path; ?>/images/global/buttons/sbutton.gif);"><div class="BigButtonOver" style="background-image:url(<?php echo $template_path; ?>/images/global/buttons/sbutton_over.gif);"></div><div class="ButtonText" style="background-image:url(<?php echo $template_path; ?>/images/global/buttons/_sbutton_jointibia.gif);"></div>
</a>
<div class="Bottom" style="background-image:url(<?php echo $template_path; ?>/images/general/box-bottom.gif);"></div>
</div>

View File

@@ -0,0 +1,21 @@
<?php
if(PAGE != 'news') {
return;
}
$poll = $db->query('SELECT `id`, `question` FROM `z_polls` WHERE end > ' . time() . ' ORDER BY `end` LIMIT 1');
if($poll->rowCount() > 0) {
$poll = $poll->fetch();
?>
<div id="CurrentPollBox" class="Themebox"
style="background-image:url(<?php echo $template_path; ?>/images/themeboxes/current-poll/currentpollbox.gif);">
<div id="CurrentPollText"><?php echo $poll['question']; ?></div>
<a class="ThemeboxButton" href="<?php echo getLink('polls') . '/' . $poll['id']; ?>" onMouseOver="MouseOverBigButton(this);" onMouseOut="MouseOutBigButton(this);" style="background-image:url(<?php echo $template_path; ?>/images/global/buttons/sbutton.gif);"><div class="BigButtonOver" style="background-image:url(<?php echo $template_path; ?>/images/global/buttons/sbutton_over.gif);"></div><div class="ButtonText" style="background-image:url(<?php echo $template_path; ?>/images/global/buttons/_sbutton_votenow.gif);"></div>
</a>
<div class="Bottom"
style="background-image:url(<?php echo $template_path; ?>/images/general/box-bottom.gif);"></div>
</div>
<?php
}
?>

View File

@@ -0,0 +1,7 @@
<div id="PremiumBox" class="Themebox" style="background-image:url(<?php echo $template_path; ?>/images/themeboxes/premium/premiumbox.gif);">
<a class="ThemeboxButton" href="<?php echo getLink('premium'); ?>" onMouseOver="MouseOverBigButton(this);" onMouseOut="MouseOutBigButton(this);" style="background-image:url(<?php echo $template_path; ?>/images/global/buttons/sbutton.gif);">
<div class="BigButtonOver" style="background-image:url(<?php echo $template_path; ?>/images/global/buttons/sbutton_over.gif);"></div>
<div class="ButtonText" style="background-image:url(<?php echo $template_path; ?>/images/global/buttons/_sbutton_getpremium.gif);"></div>
</a>
<div class="Bottom" style="background-image:url(<?php echo $template_path; ?>/images/general/box-bottom.gif);"></div>
</div>

View File

@@ -5,8 +5,12 @@ $config['vdarkborder'] = "#505050";
$config['news_title_color'] = "white";
$config['logo_monster'] = "Elder Beholder";
// separated by comma
// List: newcomer,gallery,premium,poll
$config['boxes'] = "newcomer,gallery";
// sequence is important! they will be shown in same order that you add them to the list
// List: newcomer,gallery,premium,poll,highscores,networks
$config['boxes'] = "highscores,newcomer,gallery,networks,poll";
$config['network_facebook'] = 'tibia'; // leave empty to disable
$config['network_twitter'] = 'tibia'; // leave empty to disable
$config['background_image'] = "background-artwork-860.jpg";
$config['logo_image'] = "tibia-logo-artwork-top.gif";
$config['gallery_image'] = 1;

View File

@@ -0,0 +1,98 @@
.fb_hidden{position:absolute;top:-10000px;z-index:10001}
.fb_invisible{display:none}
.fb_reset{background:none;border:0;border-spacing:0;color:#000;cursor:auto;direction:ltr;font-family:"lucida grande", tahoma, verdana, arial, sans-serif;font-size:11px;font-style:normal;font-variant:normal;font-weight:normal;letter-spacing:normal;line-height:1;margin:0;overflow:visible;padding:0;text-align:left;text-decoration:none;text-indent:0;text-shadow:none;text-transform:none;visibility:visible;white-space:normal;word-spacing:normal}
.fb_reset > div{overflow:hidden}
.fb_link img{border:none}
.fb_dialog{background:rgba(82, 82, 82, .7);position:absolute;top:-10000px;z-index:10001}
.fb_dialog_advanced{padding:10px;-moz-border-radius:8px;-webkit-border-radius:8px;border-radius:8px}
.fb_dialog_content{background:#fff;color:#333}
.fb_dialog_close_icon{background:url(http://static.ak.fbcdn.net/rsrc.php/v2/yq/r/IE9JII6Z1Ys.png) no-repeat scroll 0 0 transparent;_background-image:url(http://static.ak.fbcdn.net/rsrc.php/v2/yL/r/s816eWC-2sl.gif);cursor:pointer;display:block;height:15px;position:absolute;right:18px;top:17px;width:15px;top:8px\9;right:7px\9}
.fb_dialog_mobile .fb_dialog_close_icon{top:5px;left:5px;right:auto}
.fb_dialog_padding{background-color:transparent;position:absolute;width:1px;z-index:-1}
.fb_dialog_close_icon:hover{background:url(http://static.ak.fbcdn.net/rsrc.php/v2/yq/r/IE9JII6Z1Ys.png) no-repeat scroll 0 -15px transparent;_background-image:url(http://static.ak.fbcdn.net/rsrc.php/v2/yL/r/s816eWC-2sl.gif)}
.fb_dialog_close_icon:active{background:url(http://static.ak.fbcdn.net/rsrc.php/v2/yq/r/IE9JII6Z1Ys.png) no-repeat scroll 0 -30px transparent;_background-image:url(http://static.ak.fbcdn.net/rsrc.php/v2/yL/r/s816eWC-2sl.gif)}
.fb_dialog_loader{background-color:#f2f2f2;border:1px solid #606060;font-size:24px;padding:20px}
.fb_dialog_top_left,
.fb_dialog_top_right,
.fb_dialog_bottom_left,
.fb_dialog_bottom_right{height:10px;width:10px;overflow:hidden;position:absolute}
.fb_dialog_top_left{background:url(http://static.ak.fbcdn.net/rsrc.php/v2/ye/r/8YeTNIlTZjm.png) no-repeat 0 0;left:-10px;top:-10px}
.fb_dialog_top_right{background:url(http://static.ak.fbcdn.net/rsrc.php/v2/ye/r/8YeTNIlTZjm.png) no-repeat 0 -10px;right:-10px;top:-10px}
.fb_dialog_bottom_left{background:url(http://static.ak.fbcdn.net/rsrc.php/v2/ye/r/8YeTNIlTZjm.png) no-repeat 0 -20px;bottom:-10px;left:-10px}
.fb_dialog_bottom_right{background:url(http://static.ak.fbcdn.net/rsrc.php/v2/ye/r/8YeTNIlTZjm.png) no-repeat 0 -30px;right:-10px;bottom:-10px}
.fb_dialog_vert_left,
.fb_dialog_vert_right,
.fb_dialog_horiz_top,
.fb_dialog_horiz_bottom{position:absolute;background:#525252;filter:alpha(opacity=70);opacity:.7}
.fb_dialog_vert_left,
.fb_dialog_vert_right{width:10px;height:100%}
.fb_dialog_vert_left{margin-left:-10px}
.fb_dialog_vert_right{right:0;margin-right:-10px}
.fb_dialog_horiz_top,
.fb_dialog_horiz_bottom{width:100%;height:10px}
.fb_dialog_horiz_top{margin-top:-10px}
.fb_dialog_horiz_bottom{bottom:0;margin-bottom:-10px}
.fb_dialog_iframe{line-height:0}
.fb_dialog_content .dialog_title{background:#6d84b4;border:1px solid #3b5998;color:#fff;font-size:14px;font-weight:bold;margin:0}
.fb_dialog_content .dialog_title > span{background:url(http://static.ak.fbcdn.net/rsrc.php/v2/yd/r/Cou7n-nqK52.gif)
no-repeat 5px 50%;float:left;padding:5px 0 7px 26px}
body.fb_hidden{-webkit-transform:none;height:100%;margin:0;left:-10000px;overflow:visible;position:absolute;top:-10000px;width:100%
}
.fb_dialog.fb_dialog_mobile.loading{background:url(http://static.ak.fbcdn.net/rsrc.php/v2/ya/r/3rhSv5V8j3o.gif)
white no-repeat 50% 50%;min-height:100%;min-width:100%;overflow:hidden;position:absolute;top:0;z-index:10001}
.fb_dialog.fb_dialog_mobile.loading.centered{max-height:590px;min-height:590px;max-width:500px;min-width:500px}
#fb-root #fb_dialog_ipad_overlay{background:rgba(0, 0, 0, .45);position:absolute;left:0;top:0;width:100%;min-height:100%;z-index:10000}
#fb-root #fb_dialog_ipad_overlay.hidden{display:none}
.fb_dialog.fb_dialog_mobile.loading iframe{visibility:hidden}
.fb_dialog_content .dialog_header{-webkit-box-shadow:white 0 1px 1px -1px inset;background:-webkit-gradient(linear, 0 0, 0 100%, from(#738ABA), to(#2C4987));border-bottom:1px solid;border-color:#1d4088;color:#fff;font:14px Helvetica, sans-serif;font-weight:bold;text-overflow:ellipsis;text-shadow:rgba(0, 30, 84, .296875) 0 -1px 0;vertical-align:middle;white-space:nowrap}
.fb_dialog_content .dialog_header table{-webkit-font-smoothing:subpixel-antialiased;height:43px;width:100%
}
.fb_dialog_content .dialog_header td.header_left{font-size:12px;padding-left:5px;vertical-align:middle;width:60px
}
.fb_dialog_content .dialog_header td.header_right{font-size:12px;padding-right:5px;vertical-align:middle;width:60px
}
.fb_dialog_content .touchable_button{background:-webkit-gradient(linear, 0 0, 0 100%, from(#4966A6),
color-stop(0.5, #355492), to(#2A4887));border:1px solid #29447e;-webkit-background-clip:padding-box;-webkit-border-radius:3px;-webkit-box-shadow:rgba(0, 0, 0, .117188) 0 1px 1px inset,
rgba(255, 255, 255, .167969) 0 1px 0;display:inline-block;margin-top:3px;max-width:85px;line-height:18px;padding:4px 12px;position:relative}
.fb_dialog_content .dialog_header .touchable_button input{border:none;background:none;color:#fff;font:12px Helvetica, sans-serif;font-weight:bold;margin:2px -12px;padding:2px 6px 3px 6px;text-shadow:rgba(0, 30, 84, .296875) 0 -1px 0}
.fb_dialog_content .dialog_header .header_center{color:#fff;font-size:16px;font-weight:bold;line-height:18px;text-align:center;vertical-align:middle}
.fb_dialog_content .dialog_content{background:url(http://static.ak.fbcdn.net/rsrc.php/v2/y9/r/jKEcVPZFk-2.gif) no-repeat 50% 50%;border:1px solid #555;border-bottom:0;border-top:0;height:150px}
.fb_dialog_content .dialog_footer{background:#f2f2f2;border:1px solid #555;border-top-color:#ccc;height:40px}
#fb_dialog_loader_close{float:left}
.fb_dialog.fb_dialog_mobile .fb_dialog_close_button{text-shadow:rgba(0, 30, 84, .296875) 0 -1px 0}
.fb_dialog.fb_dialog_mobile .fb_dialog_close_icon{visibility:hidden}
.fb_iframe_widget{display:inline-block;position:relative}
.fb_iframe_widget span{display:inline-block;position:relative;text-align:justify}
.fb_iframe_widget iframe{position:absolute}
.fb_iframe_widget_lift{z-index:1}
.fb_hide_iframes iframe{position:relative;left:-10000px}
.fb_iframe_widget_loader{position:relative;display:inline-block}
.fb_iframe_widget_fluid{display:inline}
.fb_iframe_widget_fluid span{width:100%}
.fb_iframe_widget_loader iframe{min-height:32px;z-index:2;zoom:1}
.fb_iframe_widget_loader .FB_Loader{background:url(http://static.ak.fbcdn.net/rsrc.php/v2/y9/r/jKEcVPZFk-2.gif) no-repeat;height:32px;width:32px;margin-left:-16px;position:absolute;left:50%;z-index:4}
.fb_connect_bar_container div,
.fb_connect_bar_container span,
.fb_connect_bar_container a,
.fb_connect_bar_container img,
.fb_connect_bar_container strong{background:none;border-spacing:0;border:0;direction:ltr;font-style:normal;font-variant:normal;letter-spacing:normal;line-height:1;margin:0;overflow:visible;padding:0;text-align:left;text-decoration:none;text-indent:0;text-shadow:none;text-transform:none;visibility:visible;white-space:normal;word-spacing:normal;vertical-align:baseline}
.fb_connect_bar_container{position:fixed;left:0 !important;right:0 !important;height:42px !important;padding:0 25px !important;margin:0 !important;vertical-align:middle !important;border-bottom:1px solid #333 !important;background:#3b5998 !important;z-index:99999999 !important;overflow:hidden !important}
.fb_connect_bar_container_ie6{position:absolute;top:expression(document.compatMode=="CSS1Compat"? document.documentElement.scrollTop+"px":body.scrollTop+"px")}
.fb_connect_bar{position:relative;margin:auto;height:100%;width:100%;padding:6px 0 0 0 !important;background:none;color:#fff !important;font-family:"lucida grande", tahoma, verdana, arial, sans-serif !important;font-size:13px !important;font-style:normal !important;font-variant:normal !important;font-weight:normal !important;letter-spacing:normal !important;line-height:1 !important;text-decoration:none !important;text-indent:0 !important;text-shadow:none !important;text-transform:none !important;white-space:normal !important;word-spacing:normal !important}
.fb_connect_bar a:hover{color:#fff}
.fb_connect_bar .fb_profile img{height:30px;width:30px;vertical-align:middle;margin:0 6px 5px 0}
.fb_connect_bar div a,
.fb_connect_bar span,
.fb_connect_bar span a{color:#bac6da;font-size:11px;text-decoration:none}
.fb_connect_bar .fb_buttons{float:right;margin-top:7px}
.fb_edge_widget_with_comment{position:relative;*z-index:1000}
.fb_edge_widget_with_comment span.fb_edge_comment_widget{position:absolute}
.fb_edge_widget_with_comment span.fb_send_button_form_widget{z-index:1}
.fb_edge_widget_with_comment span.fb_send_button_form_widget .FB_Loader{left:0;top:1px;margin-top:6px;margin-left:0;background-position:50% 50%;background-color:#fff;height:150px;width:394px;border:1px #666 solid;border-bottom:2px solid #283e6c;z-index:1}
.fb_edge_widget_with_comment span.fb_send_button_form_widget.dark .FB_Loader{background-color:#000;border-bottom:2px solid #ccc}
.fb_edge_widget_with_comment span.fb_send_button_form_widget.siderender
.FB_Loader{margin-top:0}
.fbpluginrecommendationsbarleft,
.fbpluginrecommendationsbarright{position:fixed !important;bottom:0;z-index:999}
.fbpluginrecommendationsbarleft{left:10px}
.fbpluginrecommendationsbarright{right:10px}

Binary file not shown.

After

Width:  |  Height:  |  Size: 994 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 34 KiB

View File

@@ -12,14 +12,22 @@ if(isset($config['boxes']))
<link href="<?php echo $template_path; ?>/basic.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="tools/basic.js"></script>
<script type="text/javascript" src="<?php echo $template_path; ?>/ticker.js"></script>
<script id="twitter-wjs" src="<?php echo $template_path; ?>/js/twitter.js"></script>
<script id="facebook-jssdk" async src="<?php echo $template_path; ?>/js/facebook.js"></script>
<link href="<?php echo $template_path; ?>/css/facebook.css" rel="stylesheet" type="text/css">
<script type="text/javascript">
var loginStatus="<?php echo ($logged ? 'true' : 'false'); ?>";
<?php
if(strpos(URI, 'subtopic=') !== false) {
$tmp = $_REQUEST['subtopic'];
if(PAGE != 'news') {
if(strpos(URI, 'subtopic=') !== false) {
$tmp = $_REQUEST['subtopic'];
}
else {
$tmp = str_replace('/', '', URI);
}
}
else {
$tmp = str_replace('/', '', URI);
$tmp = 'news';
}
?>
var activeSubmenuItem="<?php echo $tmp; ?>";
@@ -200,6 +208,54 @@ if(isset($config['boxes']))
</head>
<body onBeforeUnLoad="SaveMenu();" onUnload="SaveMenu();">
<?php echo template_place_holder('body_start'); ?>
<?php if(!empty($config['network_facebook'])) {?>
<script type="text/javascript">
window.fbAsyncInit = function() {
FB.init({
appId : 497232093667125, // App ID
status : true, // check login status
cookie : true, // enable cookies to allow the server to access the session
xfbml : true // parse XFBML
});
FB.Event.subscribe('auth.login', function() {
var URLHelper = "?";
if (window.location.search.replace("?", "").length > 0) {
URLHelper = "&";
}
if (FB_TryLogin == 1) {
window.location = window.location + URLHelper + "step=facebooktrylogin&wasreloaded=1";
} else if (FB_TryLogin == 2) {
window.location = window.location + URLHelper + "page=facebooktrylogin&wasreloaded=1";
} else {
window.location = window.location + URLHelper + "wasreloaded=1";
}
});
FB.Event.subscribe('auth.logout', function(a_Response) {
if (a_Response.status !== 'connected') {
window.location.href=window.location.href;
} else {
/* nothing to do here*/
}
});
FB.Event.subscribe('auth.statusChange', function(response) {
if (FB_ForceReload == 1 && response.status == "connected") {
var URLHelper = "?";
if (window.location.search.replace("?", "").length > 0) {
URLHelper = "&";
}
window.location = window.location + URLHelper + "step=facebooktrylogin&wasreloaded=1";
}
});
};
(function(d){
var js, id = 'facebook-jssdk', ref = d.getElementsByTagName('script')[0];
if (d.getElementById(id)) {return;}
js = d.createElement('script'); js.id = id; js.async = true;
js.src = "//connect.facebook.net/en_US/all.js";
ref.parentNode.insertBefore(js, ref);
}(document));
</script>
<?php } ?>
<div id="top"></div>
<div id="ArtworkHelper" style="background-image:url(<?php echo $template_path; ?>/images/header/<?php echo $config['background_image']; ?>);" >
<div id="Bodycontainer">
@@ -269,7 +325,7 @@ foreach($config['menu_categories'] as $id => $cat) { ?>
<?php
if(isset($menus[$id])) {
foreach($menus[$id] as $category => $menu) {
$is_external = strpos($menu['link'], 'http') !== false;
$is_external = strpos(trim($menu['link']), 'http') === 0;
?>
<a href='<?php echo $is_external ? $menu['link'] : getLink($menu['link']); ?>'<?php echo $is_external ? ' target="_blank"' : ''?>>
<div id='submenu_<?php echo str_replace('/', '', $menu['link']); ?>' class='Submenuitem' onMouseOver='MouseOverSubmenuItem(this)' onMouseOut='MouseOutSubmenuItem(this)'>
@@ -353,56 +409,15 @@ foreach($config['menu_categories'] as $id => $cat) { ?>
</div>
<div id="Themeboxes">
<?php if(in_array("newcomer", $config['boxes'])): ?>
<div id="NewcomerBox" class="Themebox" style="background-image:url(<?php echo $template_path; ?>/images/themeboxes/newcomer/newcomerbox.gif);">
<a class="ThemeboxButton" href="<?php echo getLink('account/create'); ?>" onMouseOver="MouseOverBigButton(this);" onMouseOut="MouseOutBigButton(this);" style="background-image:url(<?php echo $template_path; ?>/images/global/buttons/sbutton.gif);">
<div class="BigButtonOver" style="background-image:url(<?php echo $template_path; ?>/images/global/buttons/sbutton_over.gif);"></div>
<div class="ButtonText" style="background-image:url(<?php echo $template_path; ?>/images/global/buttons/_sbutton_jointibia.gif);"></div>
</a>
<div class="Bottom" style="background-image:url(<?php echo $template_path; ?>/images/general/box-bottom.gif);"></div>
</div>
<?php endif; ?>
<?php if(in_array("premium", $config['boxes'])): ?>
<div id="PremiumBox" class="Themebox" style="background-image:url(<?php echo $template_path; ?>/images/themeboxes/premium/premiumbox.gif);">
<a class="ThemeboxButton" href="<?php echo getLink('premium'); ?>" onMouseOver="MouseOverBigButton(this);" onMouseOut="MouseOutBigButton(this);" style="background-image:url(<?php echo $template_path; ?>/images/global/buttons/sbutton.gif);">
<div class="BigButtonOver" style="background-image:url(<?php echo $template_path; ?>/images/global/buttons/sbutton_over.gif);"></div>
<div class="ButtonText" style="background-image:url(<?php echo $template_path; ?>/images/global/buttons/_sbutton_getpremium.gif);"></div>
</a>
<div class="Bottom" style="background-image:url(<?php echo $template_path; ?>/images/general/box-bottom.gif);"></div>
</div>
<?php endif; ?>
<?php
if(PAGE == 'news' && in_array("gallery", $config['boxes'])):
$query = $db->query('SELECT `thumb` FROM `' . TABLE_PREFIX . 'gallery` WHERE `id` = ' . $db->quote($config['gallery_image']));
if($query->rowCount() == 1):
$image = $query->fetch();
?>
<div id="GalleryBox" class="Themebox" style="background-image:url(<?php echo $template_path; ?>/images/themeboxes/gallery/gallerybox.gif);">
<a href="?subtopic=gallery&image=<?php echo $config['gallery_image']; ?>" >
<img id="GalleryContent" class="ThemeboxContent" src="<?php echo $image['thumb']; ?>" alt="Screenshot of the Day" />
</a>
<div class="Bottom" style="background-image:url(<?php echo $template_path; ?>/images/general/box-bottom.gif);"></div>
</div>
<?php endif; ?>
<?php endif; ?>
<?php if(PAGE == 'news' && in_array("poll", $config['boxes'])):
$poll = $db->query('SELECT id, question FROM '.$db->tableName(TABLE_PREFIX . 'polls') . ' WHERE end > ' . time() . ' ORDER BY end LIMIT 1');
if($poll->rowCount() > 0)
{
$poll = $poll->fetch();
?>
<div id="CurrentPollBox" class="Themebox" style="background-image:url(<?php echo $template_path; ?>/images/themeboxes/current-poll/currentpollbox.gif);">
<div id="CurrentPollText"><?php echo $poll['question']; ?></div>
<a class="ThemeboxButton" href="<?php echo getLink('polls') . '&id=' . $poll['id']; ?>" onMouseOver="MouseOverBigButton(this);" onMouseOut="MouseOutBigButton(this);" style="background-image:url(<?php echo $template_path; ?>/images/global/buttons/sbutton.gif);">
<div class="BigButtonOver" style="background-image:url(<?php echo $template_path; ?>/images/global/buttons/sbutton_over.gif);"></div>
<div class="ButtonText" style="background-image:url(<?php echo $template_path; ?>/images/global/buttons/_sbutton_votenow.gif);"></div>
</a>
<div class="Bottom" style="background-image:url(<?php echo $template_path; ?>/images/general/box-bottom.gif);"></div>
</div>
<?php
foreach($config['boxes'] as $box) {
$file = TEMPLATES . $template_name . '/boxes/' . $box . '.php';
if(file_exists($file)) {
include($file); ?>
<?php
}
endif; ?>
<br/><br/>
}
?>
<?php
if($config['template_allow_change'])
echo '<font color="white">Template:</font><br/>' . template_form();

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@@ -0,0 +1,45 @@
<div id="FeaturedArticle" class="Box">
<div class="Corner-tl" style="background-image:url({{ template_path }}/images/content/corner-tl.gif);"></div>
<div class="Corner-tr" style="background-image:url({{ template_path }}/images/content/corner-tr.gif);"></div>
<div class="Border_1" style="background-image:url({{ template_path }}/images/content/border-1.gif);"></div>
<div class="BorderTitleText" style="background-image:url({{ template_path }}/images/content/title-background-green.gif);"></div>
<img id="ContentBoxHeadline" class="Title" src="{{ template_path }}/images/header/headline-featuredarticle.gif" alt="Contentbox headline" />
<div class="Border_2">
<div class="Border_3">
<div class="BoxContent" style="background-image:url({{ template_path }}/images/content/scroll.gif);">
<div id="TeaserThumbnail">
{% if article.read_more is not empty %}<a href="{{ article.read_more }}">{% endif %}
<img src="{{ article.image }}" width="150" height="100" border=0 alt="" />
{% if article.read_more is not empty %}</a>{% endif %}
</div>
{% if article.read_more is not empty %}
<a id="Link" href="{{ article.read_more }}">&raquo; read more</a>
{% endif %}
<div id="TeaserText">
<div style="position: relative; top: -2px; margin-bottom: 2px;">
<b>
<p>{{ article.title|raw }}
{% if canEdit %}
<a href="?subtopic=news&action=edit&id={{ article.id }}" title="Edit">
<img src="images/edit.png"/>Edit
</a>
<a id="delete" href="?subtopic=news&action=delete&id={{ article.id }}" onclick="return confirm('Are you sure?');" title="Delete">
<img src="images/del.png"/>Delete
</a>
<a href="?subtopic=news&action=hide&id={{ article.id }}" title="{% if article.hidden != 1 %}Hide{% else %}Show{% endif %}">
<img src="images/{% if article.hidden != 1 %}success{% else %}error{% endif %}.png"/>
{% if article.hidden != 1 %}Hide{% else %}Show{% endif %}
</a>
{% endif %}
</p>
</b>
</div>
{{ article.text|raw }}
</div>
</div>
</div>
</div>
<div class="Border_1" style="background-image:url({{ template_path }}/images/content/border-1.gif);"></div>
<div class="CornerWrapper-b"><div class="Corner-bl" style="background-image:url({{ template_path }}/images/content/corner-bl.gif);"></div></div>
<div class="CornerWrapper-b"><div class="Corner-br" style="background-image:url({{ template_path }}/images/content/corner-br.gif);"></div></div>
</div>