 |
|
|
|

| Autor |
Nachricht |
cback
phpBB2.de User
 [KB] Manager

Anmeldungsdatum: 16.01.2004
Beiträge: 3321
Wohnort: Saarland
|
Verfasst am:
Sa 28 Aug, 2004 00:37 |
  |
So hier mal ein beliebtes Feature für phpBB Angepasst. Sollte auf allen Foren mit EZ Portal von Smartor laufen:
| Code: |
#########################################################################
## Title: Heise Newsticker in Portal
## Version: 1.0.1
## Author: CBACK < > (Christian Knerr) http://www.cback.de
## Info: Dieser Mod fügt ein Heise Newsfeld im Portal mit installiertem
## CMX News Mod ein. Der Bilderlink zum Newsimage kann in der
## Codestelle für die portal_body.tpl angepasst werden. Das
## Layout des Heise Newsfeldes gleicht den Boxen des CMX NewsMods
## und ist im Portal direkt unter dem Willkommenstext sichtbar.
#########################################################################
##
## Installation Level: Easy
## Installation Time: 2 Minutes
## Files To Edit: portal.php
## portal_body.tpl
##
## Compatibility: CBACK Orion, phpBB Plus 1.5.x,
## other phpBB with Smartors Portal and CMX News for Portal
##
## Included Files: n/a
##
#########################################################################
#
#-----[ OPEN ]---------------------------------------------------------
#
includes/page_header.php
#
#-----[ FIND ]---------------------------------------------------------
#
// Format Timezone. We are unable to use array_pop here, because of PHP3 compatibility
#
#-----[ BEFORE ADD ]---------------------------------------------------------
#
//
// Heise Newsticker Add-on
//
$content = implode ("", file ("http://www.heise.de/newsticker/heise.rdf"));
preg_match_all("|<item>(.*)</item>|Uism",$content, $items, PREG_PATTERN_ORDER);
for ($i=0;$i<count($items[1]);$i++)
{
preg_match_all("|<title>(.*)</title>(.*)<link>(.*)</link>|Uism",$items[1][$i], $regs, PREG_PATTERN_ORDER);
$template->assign_block_vars('newsticker',array(
'heise_Ticker' => "• <a href='".$regs[3][0]."' target='_blank' class='mainmenu'><b>".$regs[1][0]."</b></a><br>"));
}
#
#-----[ OPEN ]---------------------------------------------------------
#
templates/fisubsilversh/portal_body.tpl
#
#-----[ FIND ]---------------------------------------------------------
#
<!-- END welcome_text -->
#
#-----[ AFTER ADD ]---------------------------------------------------------
#
<TABLE class=forumline cellSpacing=1 cellPadding=3 width="100%" border=0>
<TBODY>
<TR>
<TD class=cat colSpan=2><SPAN class=genmed> <a href="http://www.heise.de" target="_blank">Heise - News</a></SPAN></TD></TR>
<TR>
<td class="row2" colspan="2" valign="middle" height="18"><span class="gensmall"><b>Die neuesten News von heise.de</b> auf <a href="http://www.cback.de" target="_blank"><b>CBACK.DE<b/></a></span></td>
<TR>
<TD class=row1 vAlign=top><img src="images/news/www.gif" border="0" alt="Heise News" title="Heise News" /></A> </TD>
<TD class=row1 vAlign=top width="100%">
<SPAN class=gensmall><p class="genmed">
<!-- BEGIN newsticker -->
<SPAN class=gensmall>{newsticker.heise_Ticker}</span>
<!-- END newsticker -->
</p>
</SPAN></TD>
<TR>
</TR></TBODY></TABLE>
<table border="0" cellpadding="0" cellspacing="0" class="tbl"><tr><td class="tbll"><img src="images/spacer.gif" alt="" width="8" height="4" /></td><td class="tblbot"><img src="images/spacer.gif" alt="" width="8" height="4" /></td><td class="tblr"><img src="images/spacer.gif" alt="" width="8" height="4" /></td></tr></table>
<br />
#
#-----[ SAVE/UPLOAD ALL FILES ]------------------------------------------
#
# EoF |
|
_________________ [ Forensoftware | CBACK Software | SYNTACTION ]
Support only in Forum! - Support nur im Forum!
Zuletzt bearbeitet von cback am Di 06 Dez, 2005 21:44, insgesamt einmal bearbeitet |
|
     |
 |
Google
|
Verfasst am:
|
 |
|
|
 |
LaraCroft
phpBB2.de User


Anmeldungsdatum: 23.07.2004
Beiträge: 297
|
Verfasst am:
Fr 10 Sep, 2004 09:15 |
  |
Dankeschön !!
funzt astrein !! |
_________________
|
|
     |
 |
DarkScorpion
phpBB2.de User

Anmeldungsdatum: 01.09.2004
Beiträge: 34
|
Verfasst am:
Di 14 Sep, 2004 21:55 |
  |
hmm irgendwieblick ich mich da nicht durch was ich da ändern soll
mit dem before add after add
und da steht ja die 2 datein sollen geändert werden
portal.php
portal_body.tpl
aber ich les nur was von
page_header.php
portal_body.tpl
hmm ich blick da echt nicht durch... |
|
|
   |
 |
EwaldB
phpBB2.de User


Anmeldungsdatum: 13.08.2002
Beiträge: 691
|
Verfasst am:
Di 14 Sep, 2004 22:41 |
  |
Klasse cback! Eine Frage noch: Wie bekomme ich die heise News unter den Standard News Block?
Alternative: Wie bekomme ich es im Portal unter "Zuletzt online"?
Danke |
_________________ Liebe Grüße,
EwaldB |
|
     |
 |
cback
phpBB2.de User
 [KB] Manager

Anmeldungsdatum: 16.01.2004
Beiträge: 3321
Wohnort: Saarland
|
Verfasst am:
Di 14 Sep, 2004 22:46 |
  |
Um es unter den Newsblock zu bekommen musst Du im Portal nach End CMX News Mod oder End News Mod suchen und es danach einfügen.
Unter Zuletzt online ist eine Box und zwar müsstest Du mir dafür die portal_body.tpl anhängen dann mache ich die Änderung. |
_________________ [ Forensoftware | CBACK Software | SYNTACTION ]
Support only in Forum! - Support nur im Forum! |
|
     |
 |
EwaldB
phpBB2.de User


Anmeldungsdatum: 13.08.2002
Beiträge: 691
|
Verfasst am:
Do 16 Sep, 2004 20:22 |
  |
Auf dieses Angebot komme ich gerne zurück
Hier meine portal_body. Leider wies ich nicht, welche Endungen hier erlaubt sind.
| Code: |
<table width="100%" border="0" cellspacing="2" cellpadding="2">
<tr>
<td class="nav"><span class="maintitle">{SITENAME}</span>
<br />
<a href="{U_PORTAL}">{L_HOME}</a></td>
</tr>
</table>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="150" valign="top"><table width="100%" cellpadding="3" cellspacing="1" border="0" class="forumline">
<tr>
<th>{L_BOARD_NAVIGATION}</th>
</tr>
<tr>
<td class="row1"><span class="genmed">
<a href="#"><b>{L_NAVIGATE}</b></a><br />
<img src="templates/L6UGD_silver/images/arrow.gif" alt="{L_HOME}"> <a href="{U_PORTAL}">{L_HOME}</a><br />
<img src="templates/L6UGD_silver/images/arrow.gif" alt="{L_FORUM}"> <a href="{U_FORUM}">{L_FORUM}</a><br />
<a href="#"><b>{L_NEWS}</b></a><br />
<img src="templates/L6UGD_silver/images/arrow.gif" alt="{L_CATEGORIES}"> <a href="{INDEX_FILE}?news=categories" alt="Index">{L_CATEGORIES}</a><br />
<img src="templates/L6UGD_silver/images/arrow.gif" alt="{L_ARCHIVES}"> <a href="{INDEX_FILE}?news=archives" alt="Index">{L_ARCHIVES}</a><br />
<a href="{U_DOWNLOAD}"><b>{L_DOWNLOAD}</b></a><br />
<img src="templates/L6UGD_silver/images/arrow.gif" alt="{L_NEWEST_DL}"> <a href="dload.php?action=toplist&list=newest">{L_NEWEST_DL}</a><br />
<img src="templates/L6UGD_silver/images/arrow.gif" alt="{L_SEARCH}"> <a href="dload.php?action=search">{L_SEARCH}</a><br />
<img src="templates/L6UGD_silver/images/arrow.gif" alt="{L_TOP_DL}"> <a href="dload.php?action=toplist&list=downloads">{L_TOP_DL}</a><br />
<a href="#"><b>{L_TOOLS}</b></a><br />
<img src="templates/L6UGD_silver/images/arrow.gif" alt="{L_RECENT}"> <a href="{U_RECENT}">{L_RECENT}</a><br />
<img src="templates/L6UGD_silver/images/arrow.gif" alt="{L_NICKPAGELIST}"> <a href="{U_NICKPAGELIST}">{L_NICKPAGELIST}</a><br />
<img src="templates/L6UGD_silver/images/arrow.gif" alt="{L_CALENDAR}"> <a href="{U_CALENDAR}">{L_CALENDAR}</a><br />
<img src="templates/L6UGD_silver/images/arrow.gif" alt="{L_ALBUM}"> <a href="{U_ALBUM}">{L_ALBUM}</a><br />
<img src="templates/L6UGD_silver/images/arrow.gif" alt="{L_LINKS}"> <a href="{U_LINKS}">{L_LINKS}</a><br />
<img src="templates/L6UGD_silver/images/arrow.gif" alt="Games"> <a href="{U_ACTIVITY}">{L_ACTIVITY}</a><br />
<a href="#"><b>{L_ABOUT_US}</b></a><br />
<img src="templates/L6UGD_silver/images/arrow.gif" alt="{L_FAQ}"> <a href="{U_FAQ}">{L_FAQ}</a><br />
<img src="templates/L6UGD_silver/images/arrow.gif" alt="{L_STAFF}"> <a href="{U_STAFF}">{L_STAFF}</a><br />
<img src="templates/L6UGD_silver/images/arrow.gif" alt="{L_MEMBERLIST}"> <a href="{U_MEMBERLIST}">{L_MEMBERLIST}</a><br />
<img src="templates/L6UGD_silver/images/arrow.gif" alt="{L_USERGROUPS}"> <a href="{U_GROUP_CP}">{L_USERGROUPS}</a><br />
<img src="templates/L6UGD_silver/images/arrow.gif" alt="{L_STATISTICS}"> <a href="{U_STATISTICS}">{L_STATISTICS}</a><br />
<img src="templates/L6UGD_silver/images/arrow.gif" alt="{L_RANKS}"> <a href="{U_RANKS}">{L_RANKS}</a><br />
<img src="templates/L6UGD_silver/images/arrow.gif" alt="{L_CONTACT}"> <a href="{U_CONTACT}">{L_CONTACT}</a>
</span>
</td>
</tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" class="tbl"><tr><td class="tbll"><img src="images/spacer.gif" alt="" width="8" height="4" /></td><td class="tblbot"><img src="images/spacer.gif" alt="" width="8" height="4" /></td><td class="tblr"><img src="images/spacer.gif" alt="" width="8" height="4" /></td></tr></table>
<br />
<table width="100%" cellpadding="2" cellspacing="1" border="0" class="forumline">
<tr>
<th colspan="2">{L_TOP_POSTERS}</th>
</tr>
<tr>
<td class="row1" align="center"><span class="genmed">{L_TOP_MEMBER}</span></td>
<td class="row1" align="center"><span class="genmed">{L_TOP_POSTS}</span></td>
</tr>
<tr>
<!-- BEGIN users -->
<td class="row1" align="left"><span class="gensmall"><a href="{users.URL}"> {users.USERNAME}</a></span></td>
<td class="row1" align="center"><span class="gensmall"><b> {users.POSTS}</b></span></td>
</tr>
<!-- END users -->
</table>
<table border="0" cellpadding="0" cellspacing="0" class="tbl"><tr><td class="tbll"><img src="images/spacer.gif" alt="" width="8" height="4" /></td><td class="tblbot"><img src="images/spacer.gif" alt="" width="8" height="4" /></td><td class="tblr"><img src="images/spacer.gif" alt="" width="8" height="4" /></td></tr></table>
<br />
<script type="text/javascript">
<!--
function checkSearch()
{
if (document.search_block.search_engine.value == 'google')
{
window.open('http://www.google.de/search?q=' + document.search_block.search_keywords.value, '_google', '');
return false;
}
else
{
return true;
}
}
//-->
</script>
<form name="search_block" method="post" action="{U_SEARCH}" onsubmit="return checkSearch()">
<table width="100%" cellpadding="3" cellspacing="1" border="0" class="forumline">
<tr>
<th>{L_QUICK_SEARCH}</th>
</tr>
<tr>
<td align="center" class="row1">
<table border="0" cellspacing="0" cellpadding="2">
<tr>
<td align="center"><input class="post" type="text" name="search_keywords" size="15" /></td>
</tr>
<tr>
<td align="center"><select class="post" name="search_engine">
<option value="site">{L_FORUM}</option>
<option value="google">Google</option>
</select></td>
</tr>
<tr>
<td align="center"><input class="mainoption" type="submit" value="{L_SEARCH}" /><br /></td>
</tr>
</table>
<input type="hidden" name="search_fields" value="all" />
<input type="hidden" name="show_results" value="topics" />
<br />
[ <a href="{U_SEARCH}" class="gensmall">{L_ADV_SEARCH}</a> ]
</td>
</tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" class="tbl"><tr><td class="tbll"><img src="images/spacer.gif" alt="" width="8" height="4" /></td><td class="tblbot"><img src="images/spacer.gif" alt="" width="8" height="4" /></td><td class="tblr"><img src="images/spacer.gif" alt="" width="8" height="4" /></td></tr></table>
<br />
</form>
<table width="100%" cellpadding="2" cellspacing="1" border="0" class="forumline">
<tr>
<th>{L_RECENT_TOPICS}</th>
</tr>
<!-- BEGIN switch_recent_topics_yes -->
<tr>
<td class="row1" align="left"><span class="gensmall">
<!-- BEGIN recent_topic_row -->
<img src="templates/L6UGD_silver/images/arrow.gif"> <a href="{switch_recent_topics_yes.recent_topic_row.U_TITLE}">{switch_recent_topics_yes.recent_topic_row.L_TITLE}</a><br />
by <a href="{switch_recent_topics_yes.recent_topic_row.U_POSTER}">{switch_recent_topics_yes.recent_topic_row.S_POSTER}</a> on {switch_recent_topics_yes.recent_topic_row.S_POSTTIME}<br /><br />
<!-- END recent_topic_row -->
</span></td>
</tr>
<!-- END switch_recent_topics_yes -->
<!-- BEGIN switch_recent_topics_no -->
<tr>
<td class="row1" align="left"><span class="gensmall">{L_NO_RECENT_TOPICS}</span></td>
</tr>
<!-- END switch_recent_topics_no -->
</table>
<table border="0" cellpadding="0" cellspacing="0" class="tbl"><tr><td class="tbll"><img src="images/spacer.gif" alt="" width="8" height="4" /></td><td class="tblbot"><img src="images/spacer.gif" alt="" width="8" height="4" /></td><td class="tblr"><img src="images/spacer.gif" alt="" width="8" height="4" /></td></tr></table>
<br />
<!-- BEGIN switch_nickpages_yes -->
<table width="100%" cellpadding="3" cellspacing="1" border="0" class="forumline">
<tr>
<th nowrap="nowrap" colspan="2">{L_RECENT_NICKPAGES}</th>
</tr>
<tr>
<td class="row1"><span class="gensmall"><img src="templates/L6UGD_silver/images/arrow.gif" /> {NAME}</span></td>
<td class="row2" align="center"><span class="gensmall">{LSEEN_TIME}</span></td>
</tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" class="tbl"><tr><td class="tbll"><img src="images/spacer.gif" alt="" width="8" height="4" /></td><td class="tblbot"><img src="images/spacer.gif" alt="" width="8" height="4" /></td><td class="tblr"><img src="images/spacer.gif" alt="" width="8" height="4" /></td></tr></table>
<br />
<!-- END switch_nickpages_yes -->
<!-- BEGIN switch_nickpages_no -->
<table width="100%" cellpadding="3" cellspacing="1" border="0" class="forumline">
<tr>
<th nowrap="nowrap" colspan="2">{L_RECENT_NICKPAGES}</th>
</tr>
<tr>
<td class="row1"><span class="gensmall">{L_NO_RECENT_NICKPAGES}</span></td>
</tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" class="tbl"><tr><td class="tbll"><img src="images/spacer.gif" alt="" width="8" height="4" /></td><td class="tblbot"><img src="images/spacer.gif" alt="" width="8" height="4" /></td><td class="tblr"><img src="images/spacer.gif" alt="" width="8" height="4" /></td></tr></table>
<br />
<!-- END switch_nickpages_no -->
<table width="100%" cellpadding="2" cellspacing="1" border="0" class="forumline">
<tr>
<th>{L_RECENT_FILES}</th>
</tr>
<!-- BEGIN switch_show_recentfiles -->
<tr>
<td class="row1" align="left"><span class="gensmall">
<!-- BEGIN recent_files_row -->
» <a href="{recent_files_row.U_TITLE}">{recent_files_row.L_TITLE}</a><br />
<!-- END recent_files_row -->
</span></td>
</tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" class="tbl"><tr><td class="tbll"><img src="images/spacer.gif" alt="" width="8" height="4" /></td><td class="tblbot"><img src="images/spacer.gif" alt="" width="8" height="4" /></td><td class="tblr"><img src="images/spacer.gif" alt="" width="8" height="4" /></td></tr></table>
<br />
<!-- END switch_show_recentfiles -->
<!-- BEGIN switch_none_recentfiles -->
<tr>
<td class="row1" align="left"><span class="gensmall">{L_NO_RECENT_FILE}</span></td>
</tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" class="tbl"><tr><td class="tbll"><img src="images/spacer.gif" alt="" width="8" height="4" /></td><td class="tblbot"><img src="images/spacer.gif" alt="" width="8" height="4" /></td><td class="tblr"><img src="images/spacer.gif" alt="" width="8" height="4" /></td></tr></table>
<br />
<!-- END switch_none_recentfiles -->
<table width="100%" cellpadding="3" cellspacing="1" border="0" class="forumline">
<tr>
<th>{L_STATISTICS}</th>
</tr>
<tr>
<td class="row1"><span class="gensmall">{TOTAL_USERS}<br />
{NEWEST_USER}<br />
<br/>
{TOTAL_POSTS}</span></td>
</tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" class="tbl"><tr><td class="tbll"><img src="images/spacer.gif" alt="" width="8" height="4" /></td><td class="tblbot"><img src="images/spacer.gif" alt="" width="8" height="4" /></td><td class="tblr"><img src="images/spacer.gif" alt="" width="8" height="4" /></td></tr></table>
<br />
<table width="100%" cellpadding="3" cellspacing="1" border="0" class="forumline">
<tr>
<th>{L_LINKS}</th>
</tr>
<tr>
<td class="row1" align="center">{BANNER_16_IMG}<br /><img src="images/spacer.gif" alt="" width="8" height="4" /><br />{BANNER_17_IMG}<br /><img src="images/spacer.gif" alt="" width="8" height="4" /><br />{BANNER_18_IMG}<br /><img src="images/spacer.gif" alt="" width="8" height="4" /><br />{BANNER_19_IMG}<br /><img src="images/spacer.gif" alt="" width="8" height="4" /></td>
<tr>
<td align="center" class="row2"><span class="gensmall">ezPortal by <a href="http://smartor.is-root.com/" target="_blank">Smartor</a></span></td>
</tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" class="tbl"><tr><td class="tbll"><img src="images/spacer.gif" alt="" width="8" height="4" /></td><td class="tblbot"><img src="images/spacer.gif" alt="" width="8" height="4" /></td><td class="tblr"><img src="images/spacer.gif" alt="" width="8" height="4" /></td></tr></table>
<br />
<table width="100%" cellpadding="2" cellspacing="1" border="0" class="forumline">
<tr>
<th class="thTop" height="25" nowrap="nowrap">{L_NEWEST_PICS}</th>
</tr>
<!-- BEGIN no_pics -->
<tr>
<td class="row1" align="center" height="50"><span class="gen">{L_NO_PICS}</span></td>
</tr>
<!-- END no_pics -->
<!-- BEGIN recent_pics -->
<!-- BEGIN recent_detail -->
<tr>
<td class="row1" width="{S_COL_WIDTH1}" align="center"><a href="{recent_pics.recent_detail.U_PIC}" {TARGET_BLANK}><img src="{recent_pics.recent_detail.THUMBNAIL}" border="0" alt="{recent_pics.recent_detail.DESC}" title="{recent_pics.recent_detail.DESC}" vspace="10" width="{recent_pics.recent_detail.WIDTH}" height="{recent_pics.recent_detail.HEIGHT}"/></a></td>
</tr>
<tr>
<td class="row2">
<span class="gensmall">{L_PIC_TITLE}: {recent_pics.recent_detail.TITLE}<br />
{L_POSTER}: {recent_pics.recent_detail.POSTER}<br />{L_POSTED}: {recent_pics.recent_detail.TIME}<br />
{L_VIEW}: {recent_pics.recent_detail.VIEW}<br />{recent_pics.recent_detail.RATING}{recent_pics.recent_detail.COMMENTS}<br /></span>
</td>
</tr>
<!-- END recent_detail -->
<!-- END recent_pics -->
<tr>
<td class="row3" height="25" align="center"><span class="gensmall">[ <a href="{U_ALBUM}">{L_ALBUM}</a> ]</span></td>
</tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" class="tbl"><tr><td class="tbll"><img src="images/spacer.gif" alt="" width="8" height="4" /></td><td class="tblbot"><img src="images/spacer.gif" alt="" width="8" height="4" /></td><td class="tblr"><img src="images/spacer.gif" alt="" width="8" height="4" /></td></tr></table>
</td>
<td width="10"><img src="images/spacer.gif" alt="" width="10" height="30" /></td>
<td valign="top">
<!-- BEGIN welcome_text -->
<table width="100%" cellpadding="3" cellspacing="1" border="0" class="forumline">
<tr>
<th>{SITENAME} - {SITE_DESCRIPTION}</th>
</tr>
<tr>
<td class="row1" align="left"><p class="genmed">{WELCOME_TEXT}</p></td>
</tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" class="tbl"><tr><td class="tbll"><img src="images/spacer.gif" alt="" width="8" height="4" /></td><td class="tblbot"><img src="images/spacer.gif" alt="" width="8" height="4" /></td><td class="tblr"><img src="images/spacer.gif" alt="" width="8" height="4" /></td></tr></table>
<br />
<!-- END welcome_text -->
<!-- BEGIN news_categories -->
<table width="100%" cellpadding="2" cellspacing="1" border="0" class="forumline">
<tr>
<th class="thTop" height="25" align="center" colspan="{S_COLS}" nowrap="nowrap">{L_NEWS_CATS}</th>
</tr>
<!-- END news_categories -->
<!-- BEGIN no_news -->
<tr>
<td class="row1" align="center" height="50"><span class="gen">{L_NO_NEWS_CATS}</span></td>
</tr>
<!-- END no_news -->
<!-- BEGIN newsrow -->
<tr>
<!-- BEGIN newscol -->
<td align="center" width="{S_COL_WIDTH}" class="row1"><span class="genmed"><a href="{INDEX_FILE}?cat_id={newsrow.newscol.ID}"><img src="{newsrow.newscol.THUMBNAIL}" border="0" alt="{newsrow.newscol.DESC}" title="{newsrow.newscol.DESC}" vspace="10" /></a></span></td>
<!-- END newscol -->
</tr>
<tr>
<!-- BEGIN news_detail -->
<td class="row2" align="center"><span class="gensmall">
{newsrow.news_detail.NEWSCAT}</td>
<!-- END news_detail -->
</tr>
<!-- END newsrow -->
<!-- BEGIN news_categories -->
<tr>
<td class="cat" colspan="{S_COLS}" align="center" height="28"> </td>
</tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" class="tbl"><tr><td class="tbll"><img src="images/spacer.gif" alt="" width="8" height="4" /></td><td class="tblbot"><img src="images/spacer.gif" alt="" width="8" height="4" /></td><td class="tblr"><img src="images/spacer.gif" alt="" width="8" height="4" /></td></tr></table>
<!-- END news_categories -->
<!-- BEGIN news_archives -->
<table class="forumline" width="100%" cellspacing="1" cellpadding="3" border="0">
<tr>
<th>{L_NEWS_ARCHIEVES}</th>
</tr>
<tr>
<td class="row1">
<!-- END news_archives -->
<!-- BEGIN arch -->
<ul style=" padding: 0 1.3em; margin: 10px 0;">
<!-- BEGIN year -->
<li class="gen"><a href="{INDEX_FILE}?news=archives&year={arch.year.YEAR}">{arch.year.YEAR}</a></li>
<!-- BEGIN month -->
<li class="gen" style="margin-left: 1em;"> <a href="{INDEX_FILE}?news=archives&year={arch.year.YEAR}&month={arch.year.month.MONTH}">{arch.year.month.L_MONTH} {arch.year.month.POST_COUNT} </a></li>
<!-- BEGIN day -->
<li class="gen" style="margin-left: 2em;"> <a href="{INDEX_FILE}?news=archives&year={arch.year.YEAR}&month={arch.year.month.MONTH}&day={arch.year.month.day.DAY}">{arch.year.month.day.L_DAY} {arch.year.month.day.POST_COUNT}</a></li>
<!-- END day -->
<!-- END month -->
<!-- END year -->
</ul>
<!-- END arch -->
<!-- BEGIN news_archives -->
</td>
</tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" class="tbl"><tr><td class="tbll"><img src="images/spacer.gif" alt="" width="8" height="4" /></td><td class="tblbot"><img src="images/spacer.gif" alt="" width="8" height="4" /></td><td class="tblr"><img src="images/spacer.gif" alt="" width="8" height="4" /></td></tr></table>
<!-- END news_archives -->
<!-- BEGIN no_articles -->
<table class="forumline" width="100%" cellspacing="1" cellpadding="3" border="0">
<tr>
<td class="row1" align="center" height="50"><span class="gen">{no_articles.L_NO_NEWS}</span></td>
</tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" class="tbl"><tr><td class="tbll"><img src="images/spacer.gif" alt="" width="8" height="4" /></td><td class="tblbot"><img src="images/spacer.gif" alt="" width="8" height="4" /></td><td class="tblr"><img src="images/spacer.gif" alt="" width="8" height="4" /></td></tr></table>
<!-- END no_articles -->
<!-- BEGIN articles -->
<table class="forumline" width="100%" cellspacing="1" cellpadding="3" border="0">
<tr>
<td class="cat">
<table width="100%" cellspacing="0" cellpadding="0" border="0">
<tr>
<td align="left" class="topictitle">{articles.L_TITLE_ICON} <a href="{INDEX_FILE}?topic_id={articles.ID}">{articles.L_TITLE}</a></td>
<td align="right">
<a href="posting.php?mode=reply&t={articles.ID}"><img src="{NEWS_REPLY_IMG}" alt="{L_REPLY_NEWS}" title="{L_REPLY_NEWS}" /></a>
<a href="printview.php?t={articles.ID}&start=0" target="_blank"><img src="{NEWS_PRINT_IMG}" alt="{L_PRINT_NEWS}" title="{L_PRINT_NEWS}" /></a>
<a href="tellafriend.php?topic={articles.L_TITLE}&link={TELL_LINK}{articles.ID}"><img src="{NEWS_EMAIL_IMG}" alt="{L_EMAIL_NEWS}" title="{L_EMAIL_NEWS}" /></a>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td class="row2" valign="middle" height="18"><span class="gensmall"><a href="{articles.U_COMMENT}"><img src="{MINIPOST_IMG}"></a>{L_POSTED} {L_WORD_ON} {articles.POST_DATE} {L_WORD_BY} {articles.L_POSTER}</span></td>
</tr>
<tr>
<td class="row1" valign="top" width="100%">
<table width="100%" cellspacing="2" cellpadding="2" border="0">
<tr>
<td align="left" valign="top"><a href="{INDEX_FILE}?cat_id={articles.CAT_ID}"><img src="{articles.CAT_IMG}" alt="{articles.CATEGORY}" /></a></td>
<td align="left" valign="top" width="100%">
{articles.BODY}{articles.ATTACHMENTS}<br /><br /><span class="gensmall">{articles.READ_MORE_LINK}</span></td>
</tr>
</table>
</td>
<tr>
<td class="row3" valign="middle" align="center" height="18">
<table width="100%" cellspacing="0" cellpadding="0" border="0">
<tr>
<td align="left" class="row3"><span class="gensmall">{L_NEWS_SUMMARY} <b><a href="{articles.U_VIEWS}">{articles.COUNT_VIEWS}</b> {L_NEWS_VIEWS}</a> {L_NEWS_AND}<b> <a href="{articles.U_COMMENT}">{articles.COUNT_COMMENTS}</b> {L_NEWS_COMMENTS}</a>.</span></td>
<td align="right">
<span class="gensmall"><a href="{articles.U_POST_COMMENT}">{L_POST_COMMENT}</a>
</td>
</tr>
</table>
</td>
</tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" class="tbl"><tr><td class="tbll"><img src="images/spacer.gif" alt="" width="8" height="4" /></td><td class="tblbot"><img src="images/spacer.gif" alt="" width="8" height="4" /></td><td class="tblr"><img src="images/spacer.gif" alt="" width="8" height="4" /></td></tr></table>
<br />
<!-- END articles -->
<!-- BEGIN comments -->
<hr />
<div style="border: #ddd solid 1px; padding: 10px; margin: 10px 0 10px 20px; clear: both;">
<div class="topictitle">{comments.L_TITLE}</div>
<div class="postdetails">{comments.POST_DATE} by {comments.L_POSTER}</div>
<hr />
<div class="postbody">
{comments.BODY}
</div>
</div>
<!-- END comments -->
<!-- BEGIN switch_user_logged_in -->
<table width="100%" height="100%" cellpadding="3" cellspacing="1" border="0" class="forumline">
<tr>
<th>{L_SHOUTBOX}</th>
</tr>
<tr>
<td class="row1"><span class="genmed"><iframe src="{U_SHOUTBOX}" scrolling="NO" width="100%" height="460" frameborder="0" marginheight="0" marginwidth="0" allowtransparency="true"></iframe></span></td>
</tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" class="tbl"><tr><td class="tbll"><img src="images/spacer.gif" alt="" width="8" height="4" /></td><td class="tblbot"><img src="images/spacer.gif" alt="" width="8" height="4" /></td><td class="tblr"><img src="images/spacer.gif" alt="" width="8" height="4" /></td></tr></table>
<br />
<!-- END switch_user_logged_in -->
<!-- BEGIN pagination -->
<hr />
<div class="nav" style="text-align: right; padding: 10px; margin: 10px 0 10px 20px; clear: both;">
{pagination.PAGINATION}
</div>
<!-- END pagination -->
</td>
<td width="10"><img src="images/spacer.gif" alt="" width="10" height="30" /></td>
<td width="150" valign="top">
<!-- BEGIN switch_user_logged_in -->
<table width="100%" cellpadding="3" cellspacing="1" border="0" class="forumline">
<tr>
<th>{L_NAME_WELCOME}</th>
</tr>
<tr>
<td align="center" class="row1"><br />
{AVATAR_IMG}<br /><br />
<span class="name">{U_NAME_LINK}<br /><br /></span>
<span class="gensmall">{LAST_VISIT_DATE}<br />
{CURRENT_TIME}<br /><br />
<a href="{U_SEARCH_NEW}">{L_SEARCH_NEW_P}</a><br />
<a href="{U_SEARCH_UNANSWERED}">{L_SEARCH_UNANSWERED}</a><br />
<a href="{U_SEARCH_SELF}">{L_SEARCH_SELF}</a></span></td>
</tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" class="tbl"><tr><td class="tbll"><img src="images/spacer.gif" alt="" width="8" height="4" /></td><td class="tblbot"><img src="images/spacer.gif" alt="" width="8" height="4" /></td><td class="tblr"><img src="images/spacer.gif" alt="" width="8" height="4" /></td></tr></table>
<br />
<!-- END switch_user_logged_in -->
<!-- BEGIN switch_user_logged_out -->
<form method="post" action="{S_LOGIN_ACTION}">
<table width="100%" cellpadding="3" cellspacing="1" border="0" class="forumline">
<tr>
<th>{L_LOGIN}</th>
</tr>
<tr>
<td align="center" class="row1"><span class="gensmall">
<input type="hidden" name="redirect" value="{U_PORTAL}" />
{L_USERNAME}:<br />
<input class="post" type="text" name="username" size="15" />
<br />
{L_PASSWORD}:<br />
<input class="post" type="password" name="password" size="15" />
<br />
</span> <table border="0" cellspacing="0" cellpadding="0">
<tr>
<td><input class="text" type="checkbox" name="autologin" /></td>
<td class="gensmall"> {L_REMEMBER_ME}</td>
</tr>
</table>
<br/> <input type="submit" class="mainoption" name="login" value="{L_LOGIN}" />
<br /> <br /> <a href="{U_SEND_PASSWORD}" class="gensmall">{L_SEND_PASSWORD}</a><br />
<br /><p class="gensmall">{L_REGISTER_NEW_ACCOUNT}</p></td>
</tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" class="tbl"><tr><td class="tbll"><img src="images/spacer.gif" alt="" width="8" height="4" /></td><td class="tblbot"><img src="images/spacer.gif" alt="" width="8" height="4" /></td><td class="tblr"><img src="images/spacer.gif" alt="" width="8" height="4" /></td></tr></table>
<br />
</form>
<!-- END switch_user_logged_out -->
<table width="100%" cellpadding="3" cellspacing="1" border="0" class="forumline">
<tr>
<th>{L_WHO_IS_ONLINE}</th>
</tr>
<tr>
<td class="row1">
<p class="gensmall">{TOTAL_USERS_ONLINE}<br />
<br />
{LOGGED_IN_USER_LIST}<br /><br />
</p>
<p class="gensmall" align="center">[ <a href="{U_VIEWONLINE}">{L_VIEW_COMPLETE_LIST}</a> ]</p>
<br />
<p class="gensmall">{RECORD_USERS}</p></td>
</tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" class="tbl"><tr><td class="tbll"><img src="images/spacer.gif" alt="" width="8" height="4" /></td><td class="tblbot"><img src="images/spacer.gif" alt="" width="8" height="4" /></td><td class="tblr"><img src="images/spacer.gif" alt="" width="8" height="4" /></td></tr></table>
<br />
{PORTAL_POLL}
{MINI_CAL_OUTPUT}
<table width="100%" cellpadding="3" cellspacing="1" border="0" class="forumline">
<tr>
<th nowrap="nowrap">{L_LAST_SEEN}</th>
</tr>
<tr>
<td class="row1"><span class="gensmall">{L_USERS_TODAY}{L_USERS_LASTHOUR}</span></td>
</tr>
<!-- BEGIN last_seen_row -->
<tr>
<td class="row1"><span class="gensmall">{last_seen_row.L_LSEEN_USERNAME} {L_WORD_ON} {last_seen_row.L_LSEEN_TIME}</span></td>
</tr>
<!-- END last_seen_row -->
</table>
<table border="0" cellpadding="0" cellspacing="0" class="tbl"><tr><td class="tbll"><img src="images/spacer.gif" alt="" width="8" height="4" /></td><td class="tblbot"><img src="images/spacer.gif" alt="" width="8" height="4" /></td><td class="tblr"><img src="images/spacer.gif" alt="" width="8" height="4" /></td></tr></table>
<br />
</td>
</tr>
</table> |
|
_________________ Liebe Grüße,
EwaldB |
|
     |
 |
EwaldB
phpBB2.de User


Anmeldungsdatum: 13.08.2002
Beiträge: 691
|
Verfasst am:
So 26 Sep, 2004 09:42 |
  |
cback?  |
_________________ Liebe Grüße,
EwaldB |
|
     |
 |
cback
phpBB2.de User
 [KB] Manager

Anmeldungsdatum: 16.01.2004
Beiträge: 3321
Wohnort: Saarland
|
Verfasst am:
So 26 Sep, 2004 10:37 |
  |
Ups sorry hab den Thread wohl übersehen also hier die Änderung, die funktioniert auch, hab ich bei mir auch jetzt so gemacht ( http://www.community.cback.de ganz rechts unten)
Öffne:
portal.php
Finde dort den alten Heise-Ticker Code und ersetze diesen mit:
| Code: |
//
// Heise Newsticker
//
$content = implode ("", file ("http://www.heise.de/newsticker/heise.rdf"));
preg_match_all("|<item>(.*)</item>|Uism",$content, $items, PREG_PATTERN_ORDER);
for ($i=0;$i<count($items[1]);$i++)
{
preg_match_all("|<title>(.*)</title>(.*)<link>(.*)</link>|Uism",$items[1][$i], $regs, PREG_PATTERN_ORDER);
$template->assign_block_vars('newsticker',array(
'heise_Ticker' => "<a href='".$regs[3][0]."' target='_blank' class='mainmenu'><b>".$regs[1][0]."</b></a><br><br>"));
} |
Öffne templates/xxxxxx/portal_body.tpl
Finde:
| Code: |
<table width="100%" cellpadding="3" cellspacing="1" border="0" class="forumline">
<tr>
<th>{L_WHO_IS_ONLINE}</th>
</tr>
<tr>
<td class="row1">
<p class="gensmall">{TOTAL_USERS_ONLINE}<br />
<br />
{LOGGED_IN_USER_LIST}<br /><br />
</p>
<p class="gensmall" align="center">[ <a href="{U_VIEWONLINE}">{L_VIEW_COMPLETE_LIST}</a> ]</p>
<br />
<p class="gensmall">{RECORD_USERS}</p></td>
</tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" class="tbl"><tr><td class="tbll"><img src="images/spacer.gif" alt="" width="8" height="4" /></td><td class="tblbot"><img src="images/spacer.gif" alt="" width="8" height="4" /></td><td class="tblr"><img src="images/spacer.gif" alt="" width="8" height="4" /></td></tr></table>
<br />
|
Danach einfügen:
| Code: |
<table width="100%" cellpadding="3" cellspacing="1" border="0" class="forumline">
<tr>
<th>Heise News</th>
</tr>
<tr>
<td class="row1" align="left"><span class="gensmall">
<SPAN class=gensmall><p class="genmed">
<div>
<marquee id="scroll_heise" behavior="scroll" direction="up" height="100" scrolldelay="80" scrollamount="1">
<!-- BEGIN newsticker -->
<SPAN class=gensmall>{newsticker.heise_Ticker}</span>
<!-- END newsticker -->
</p>
</marquee>
</div>
</SPAN></td>
</tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" class="tbl"><tr><td class="tbll"><img src="images/spacer.gif" alt="" width="8" height="4" /></td><td class="tblbot"><img src="images/spacer.gif" alt="" width="8" height="4" /></td><td class="tblr"><img src="images/spacer.gif" alt="" width="8" height="4" /></td></tr></table>
<br />
|
Und abschließend natürlich noch das Heise-Feld wies normal ist im Portal entfernen also alles zwischen
<!-- END welcome_text -->
und
<!-- BEGIN newsitem -->
löschen |
_________________ [ Forensoftware | CBACK Software | SYNTACTION ]
Support only in Forum! - Support nur im Forum! |
|
     |
 |
EwaldB
phpBB2.de User


Anmeldungsdatum: 13.08.2002
Beiträge: 691
|
Verfasst am:
So 26 Sep, 2004 13:58 |
  |
Könntest Du bitte meine weiter oben eingeklinkte Portal.php prüfen? Ich finde die von dir genannten Abschnitte nicht.
Danke |
_________________ Liebe Grüße,
EwaldB |
|
     |
 |
cback
phpBB2.de User
 [KB] Manager

Anmeldungsdatum: 16.01.2004
Beiträge: 3321
Wohnort: Saarland
|
Verfasst am:
So 26 Sep, 2004 14:27 |
  |
portal.PHP? Das oben war doch die portla_body.tpl?
Also in der portal.php kannst Du auch nach
// Generate the page
suchen und es dann davor einfügen dann geht der Heise Mod auch an dieser Stelle. Oder dieser PHP codeabschnitt wenn Du das Plus Forum hast befindet sich der in der includes/page_header.php dort auch nach // Generate the Page suchen und das dann davor einfügen
(sieht so aus die Zeile:)
//
// Generate the page
// |
_________________ [ Forensoftware | CBACK Software | SYNTACTION ]
Support only in Forum! - Support nur im Forum! |
|
     |
 |
EwaldB
phpBB2.de User


Anmeldungsdatum: 13.08.2002
Beiträge: 691
|
Verfasst am:
So 26 Sep, 2004 14:51 |
  |
Jo. Hast selbstredend recht mit der portal_body.tpl.
In der aktuellen Plus 1.52 ist es in der portal.php
So habe es jetzt eingebaut. Allerdings läuft nichts in der Box
In der portal_body.tpl habe ich Deinen Code eingefügt
hier meine portal.php
| Code: |
<?php
/***************************************************************************
* portal.php
* -------------------
* begin : Tuesday, August 13, 2002
* copyright : (C) 2002 Smartor
* email : smartor_xp@hotmail.com
*
* $Id: portal.php,v 2.1.7 2003/01/30, 17:05:58 Smartor Exp $
*
***************************************************************************/
/***************************************************************************
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
***************************************************************************/
/***************************************************************************
*
* Some code in this file I borrowed from the original index.php, Welcome
* Avatar MOD and others...
*
***************************************************************************/
//
// Set configuration for ezPortal
//
// Portal Configuration has moved to phpBB2 plus Admin Panel
//
// END configuration
// --------------------------------------------------------
define('IN_PHPBB', true);
$phpbb_root_path = './';
$album_root_path = $phpbb_root_path . 'album_mod/';
include($phpbb_root_path . 'extension.inc');
include($phpbb_root_path . 'common.'.$phpEx);
include($phpbb_root_path . 'fetchposts.'.$phpEx);
include_once($phpbb_root_path.'includes/functions_color_groups.'.$phpEx);
include_once ($phpbb_root_path . 'includes/news.' . $phpEx );
include_once ($phpbb_root_path . 'pafiledb/includes/pafiledb_constants.' . $phpEx );
//
// Start session management
//
$userdata = session_pagestart( $user_ip, PAGE_INDEX, $session_length );
init_userprefs($userdata);
//
// End session management
//
// Start add - Photo Album Block
include($album_root_path . 'album_common.'.$phpEx);
// End add - Photo Album Block
//
// If you don't use these stats on your index you may want to consider
// removing them
//
$total_posts = get_db_stat('postcount');
$total_users = get_db_stat('usercount');
$total_topics = get_db_stat('topiccount');
$newest_userdata = get_db_stat('newestuser');
$newest_user = $newest_userdata['username'];
$newest_uid = $newest_userdata['user_id'];
if( $total_posts == 0 )
{
$l_total_post_s = $lang['Posted_articles_zero_total'];
}
else if( $total_posts == 1 )
{
$l_total_post_s = $lang['Posted_article_total'];
}
else
{
$l_total_post_s = $lang['Posted_articles_total'];
}
if( $total_users == 0 )
{
$l_total_user_s = $lang['Registered_users_zero_total'];
}
else if( $total_users == 1 )
{
$l_total_user_s = $lang['Registered_user_total'];
}
else
{
$l_total_user_s = $lang['Registered_users_total'];
}
// Read Portal Configuration from DB
define('PORTAL_TABLE', $table_prefix.'portal');
$CFG = array();
$sql = "SELECT * FROM " . PORTAL_TABLE;
if( !($result = $db->sql_query($sql)) )
{
message_die(CRITICAL_ERROR, "Could not query config information", "", __LINE__, __FILE__, $sql);
}
while ( $row = $db->sql_fetchrow($result) )
{
$CFG[$row['portal_name']] = $row['portal_value'];
}
// last seen hack
$sql = "SELECT username, user_id, user_level, user_allow_viewonline, user_lastvisit FROM " . USERS_TABLE . " WHERE user_id > 0 AND username <> 'Anonymous' ORDER BY user_lastvisit DESC LIMIT " . $CFG['last_seen'];
if (!$result = $db->sql_query($sql))
{
message_die(GENERAL_ERROR, 'Could not query last seen information', '', __LINE__, __FILE__, $sql);
}
while ($row = $db->sql_fetchrow($result))
{
$user_online_link = color_group_colorize_name($row['user_id']);
if ( $row['user_allow_viewonline'] )
{
$logged_visible_online++;
}
else
{
$logged_hidden_online++;
}
if ( $row['user_allow_viewonline'] || $userdata['user_level'] == ADMIN )
{
$template->assign_block_vars('last_seen_row', array(
'L_LSEEN_USERNAME' => $user_online_link,
'L_LSEEN_TIME' => create_date($board_config['default_dateformat'], $row['user_lastvisit'], $board_config['board_timezone'])));
}
}
//
// Recent Topics
//
$sql = "SELECT * FROM ". FORUMS_TABLE . " ORDER BY forum_id";
if (!$result = $db->sql_query($sql))
{
message_die(GENERAL_ERROR, 'Could not query forums information', '', __LINE__, __FILE__, $sql);
}
$forum_data = array();
while( $row = $db->sql_fetchrow($result) )
{
$forum_data[] = $row;
}
$is_auth_ary = array();
$is_auth_ary = auth(AUTH_ALL, AUTH_LIST_ALL, $userdata, $forum_data);
if( $CFG['exceptional_forums'] == '' )
{
$except_forum_id = '\'start\'';
}
else
{
$except_forum_id = $CFG['exceptional_forums'];
}
for ($i = 0; $i < count($forum_data); $i++)
{
if ((!$is_auth_ary[$forum_data[$i]['forum_id']]['auth_read']) or (!$is_auth_ary[$forum_data[$i]['forum_id']]['auth_view']))
{
if ($except_forum_id == '\'start\'')
{
$except_forum_id = $forum_data[$i]['forum_id'];
}
else
{
$except_forum_id .= ',' . $forum_data[$i]['forum_id'];
}
}
}
$sql = "SELECT t.topic_id, t.topic_title, t.topic_last_post_id, t.forum_id, t.topic_icon, t.topic_type, p.post_id, p.poster_id, p.post_time, u.user_id, u.username
FROM " . TOPICS_TABLE . " AS t, " . POSTS_TABLE . " AS p, " . USERS_TABLE . " AS u
WHERE t.forum_id NOT IN (" . $except_forum_id . ")
AND t.topic_status <> 2
AND p.post_id = t.topic_last_post_id
AND p.poster_id = u.user_id
ORDER BY p.post_id DESC
LIMIT " . $CFG['number_recent_topics'];
if (!$result = $db->sql_query($sql))
{
message_die(GENERAL_ERROR, 'Could not query recent topics information', '', __LINE__, __FILE__, $sql);
}
$number_recent_topics = $db->sql_numrows($result);
$recent_topic_row = array();
if ( $number_recent_topics != 0 )
{
$template->assign_block_vars('switch_recent_topics_yes', array());
while ($row = $db->sql_fetchrow($result))
{
$recent_topic_row[] = $row;
}
for ($i = 0; $i < $number_recent_topics; $i++)
{
$template->assign_block_vars('switch_recent_topics_yes.recent_topic_row', array(
'U_TITLE' => append_sid("viewtopic.$phpEx?" . POST_POST_URL . '=' . $recent_topic_row[$i]['post_id']) . '#' .$recent_topic_row[$i]['post_id'],
'L_TITLE' => $recent_topic_row[$i]['topic_title'],
'LAST_TITLE_ICON' => get_icon_title($recent_topic_row[$i]['topic_icon'], 0, $recent_topic_row[$i]['topic_type']),
'U_POSTER' => append_sid("profile.$phpEx?mode=viewprofile&" . POST_USERS_URL . "=" . $recent_topic_row[$i]['user_id']),
'S_POSTER' => color_group_colorize_name($recent_topic_row[$i]['user_id'],true),
'S_POSTTIME' => create_date($board_config['default_dateformat'], $recent_topic_row[$i]['post_time'], $board_config['board_timezone'])
)
);
}
}
else
{
$template->assign_block_vars('switch_recent_topics_no', array());
$template->assign_vars(array(
'L_NO_RECENT_TOPICS' => $lang['No_recent_topics'])
);
}
//
// END - Recent Topics
//
//
// Recent Files
//
$sql = "SELECT file_id, file_time, file_name, file_approved FROM ". PA_FILES_TABLE . " WHERE file_approved = 1 ORDER BY file_time DESC
LIMIT " . $CFG['number_recent_files'];
if (!$result = $db->sql_query($sql))
{
message_die(GENERAL_ERROR, 'Could not query files information', '', __LINE__, __FILE__, $sql);
}
$files_data = array();
while( $row = $db->sql_fetchrow($result) )
{
$files_data[] = $row;
}
$number_recent_files = $db->sql_numrows($result);
$recent_files_row = array();
if ($number_recent_files != 0)
{
$template->assign_block_vars('switch_show_recentfiles', array());
while ($row = $db->sql_fetchrow($result))
{
$recent_files_row[] = $row;
}
$db->sql_freeresult($result);
for ($i = 0; $i < $number_recent_files; $i++)
{
$template->assign_block_vars('switch_show_recentfiles.recent_files_row', array(
'U_TITLE' => append_sid("dload.$phpEx?action=download&file_id=" .$files_data[$i]['file_id']),
'L_TITLE' => $files_data[$i]['file_name']
)
);
}
}
else
{
$template->assign_block_vars('switch_none_recentfiles', array());
$template->assign_vars(array(
'L_NO_RECENT_FILE' => $lang['No_recent_files'])
);
}
//
// END - Recent Files
//
// Birthday Mod, Show users with birthday
$sql = ($board_config['birthday_check_day']) ? "SELECT user_id, username, user_birthday,user_level FROM " . USERS_TABLE. " WHERE user_birthday!=999999 ORDER BY username" :"";
if($result = $db->sql_query($sql))
{
if (!empty($result))
{
$time_now = time();
$this_year = create_date('Y', $time_now, $board_config['board_timezone']);
$date_today = create_date('Ymd', $time_now, $board_config['board_timezone']);
$date_forward = create_date('Ymd', $time_now+($board_config['birthday_check_day']*86400), $board_config['board_timezone']);
while ($birthdayrow = $db->sql_fetchrow($result))
{
usleep(2);
$user_birthday2 = $this_year.($user_birthday = realdate("md",$birthdayrow['user_birthday'] ));
if ( $user_birthday2 < $date_today ) $user_birthday2 += 10000;
if ( $user_birthday2 > $date_today && $user_birthday2 <= $date_forward )
{
// user are having birthday within the next days
$user_age = ( $this_year.$user_birthday < $date_today ) ? $this_year - realdate ('Y',$birthdayrow['user_birthday'])+1 : $this_year- realdate ('Y',$birthdayrow['user_birthday']);
$style_color = color_group_colorize_name($birthdayrow['user_id'],true);
$birthday_week_list .= ' <a href="' . append_sid("profile.$phpEx?mode=viewprofile&" . POST_USERS_URL . "=" . $birthdayrow['user_id']) . '" class="gensmall">' . $style_color . ' ('.$user_age.')</a>,';
} else if ( $user_birthday2 == $date_today )
{
//user have birthday today
$user_age = $this_year - realdate ( 'Y',$birthdayrow['user_birthday'] );
$style_color = color_group_colorize_name($birthdayrow['user_id'],true);
$birthday_today_list .= ' <a href="' . append_sid("profile.$phpEx?mode=viewprofile&" . POST_USERS_URL . "=" . $birthdayrow['user_id']) . '" class="gensmall">' . $style_color . ' ('.$user_age.')</a>,';
}
}
if ($birthday_today_list) $birthday_today_list[ strlen( $birthday_today_list)-1] = ' ';
if ($birthday_week_list) $birthday_week_list[ strlen( $birthday_week_list)-1] = ' ';
}
$db->sql_freeresult($result);
}
// Start add - Last visit MOD
$time_now=time();
$time1Hour=$time_now-3600;
$minutes = date('is', $time_now);
$hour_now = $time_now - (60*($minutes[0].$minutes[1])) - ($minutes[2].$minutes[3]);
$dato=create_date('H', $time_now,$board_config['board_timezone']);
$timetoday = $hour_now - (3600*$dato);
$sql = 'SELECT session_ip, MAX(session_time) as session_time FROM '.SESSIONS_TABLE.' WHERE session_user_id="'.ANONYMOUS.'" AND session_time >= '.$timetoday.' AND session_time< '.($timetoday+86399).' GROUP BY session_ip';
if (!$result = $db->sql_query($sql)) message_die(GENERAL_ERROR, "Couldn't retrieve guest user today data", "", __LINE__, __FILE__, $sql);
while( $guest_list = $db->sql_fetchrow($result))
{
if ($guest_list['session_time'] >$time1Hour) $users_lasthour++;
}
$guests_today = $db->sql_numrows($result);
$sql = 'SELECT user_id,username,user_allow_viewonline,user_level,user_lastlogon FROM ' . USERS_TABLE . ' WHERE user_id!="'.ANONYMOUS.'" AND user_session_time >= '.$timetoday.' AND user_session_time< '.($timetoday+86399).' ORDER BY username';
if (!$result = $db->sql_query($sql)) message_die(GENERAL_ERROR, "Couldn't retrieve user today data", "", __LINE__, __FILE__, $sql);
while( $todayrow = $db->sql_fetchrow($result))
{
$style_color = "";
if ($todayrow['user_lastlogon']>=$time1Hour)
{
$users_lasthour++;
}
switch ($todayrow['user_level'])
{
case ADMIN :
$todayrow['username'] = '<b>' . $todayrow['username'] . '</b>';
$style_color = 'style="color:#' . $theme['fontcolor3'] . '"';
break;
case MOD :
$todayrow['username'] = '<b>' . $todayrow['username'] . '</b>';
$style_color = 'style="color:#' . $theme['fontcolor2'] . '"';
break;
}
$users_today_list.=( $todayrow['user_allow_viewonline'])?' <a href="' . append_sid("profile.$phpEx?mode=viewprofile&" . POST_USERS_URL . "=" . $todayrow['user_id']) . '"' . $style_color .'>' . $todayrow['username'] . '</a>,' : (($userdata[user_level]==ADMIN) ? ' <a href="' . append_sid("profile.$phpEx?mode=viewprofile&" . POST_USERS_URL . "=" . $todayrow['user_id']) . '"' . $style_color .'><i>' . $todayrow['username'] . '</i></a>,' : '');
if (!$todayrow['user_allow_viewonline']) $logged_hidden_today++;
else $logged_visible_today++;
}
if ($users_today_list)
{
$users_today_list[ strlen( $users_today_list)-1] = ' ';
} else
{
$users_today_list = $lang['None'];
}
$total_users_today = $db->sql_numrows($result)+$guests_today;
$users_today_list = $lang['Registered_users'].' ' . $users_today_list;
$l_today_user_s = ($total_users_today) ? ( ( $total_users_today == 1 )? $lang['User_today_total'] : $lang['Users_today_total'] ) : $lang['Users_today_zero_total'];
$l_today_r_user_s = ($logged_visible_today) ? ( ( $logged_visible_today == 1 ) ? $lang['Reg_user_total'] : $lang['Reg_users_total'] ) : $lang['Reg_users_zero_total'];
$l_today_h_user_s = ($logged_hidden_today) ? (($logged_hidden_today == 1) ? $lang['Hidden_user_total'] : $lang['Hidden_users_total'] ) : $lang['Hidden_users_zero_total'];
$l_today_g_user_s = ($guests_today) ? (($guests_today == 1) ? $lang['Guest_user_total'] : $lang['Guest_users_total']) : $lang['Guest_users_zero_total'];
$l_today_users = sprintf($l_today_user_s, $total_users_today);
$l_today_users .= sprintf($l_today_r_user_s, $logged_visible_today);
$l_today_users .= sprintf($l_today_h_user_s, $logged_hidden_today);
$l_today_users .= sprintf($l_today_g_user_s, $guests_today);
// End add - Last visit MOD
//
// Start output of page
//
define('SHOW_ONLINE', true);
$page_title = $lang['Home'];
include($phpbb_root_path . 'includes/page_header.'.$phpEx);
$template->set_filenames(array(
'news' => 'portal_body.tpl')
);
//
// Avatar On Index MOD
//
$avatar_img = '';
if ( $userdata['user_avatar_type'] && $userdata['user_allowavatar'] )
{
switch( $userdata['user_avatar_type'] )
{
case USER_AVATAR_UPLOAD:
$size = check_avatar_size($board_config['avatar_path'] . '/' . $userdata['user_avatar'], $CFG['pics_thumbsize']);
$avatar_img = ( $board_config['allow_avatar_upload'] ) ? '<img src="' . $board_config['avatar_path'] . '/' . $userdata['user_avatar'] . '" '.$size.' alt="" border="0" />' : '';
break;
case USER_AVATAR_REMOTE:
$size = check_avatar_size($userdata['user_avatar'], $CFG['pics_thumbsize']);
$avatar_img = ( $board_config['allow_avatar_remote'] ) ? '<img src="' . $userdata['user_avatar'] . '" '.$size.' alt="" border="0" />' : '';
break;
case USER_AVATAR_GALLERY:
$size = check_avatar_size($board_config['avatar_gallery_path'] . '/' . $userdata['user_avatar'], $CFG['pics_thumbsize']);
$avatar_img = ( $board_config['allow_avatar_local'] ) ? '<img src="' . $board_config['avatar_gallery_path'] . '/' . $userdata['user_avatar'] . '" '.$size.' alt="" border="0" />' : '';
break;
}
}
// Check For Anonymous User
if ($userdata['user_id'] != '-1')
{
$name_link = color_group_colorize_name($userdata['user_id']);
}
else
{
$name_link = $lang['Guest'];
}
//
// END: Avatar On Index MOD
//
// Start add - Photo Album Block
// Build Categories Index
$sql = "SELECT c.*, COUNT(p.pic_id) AS count
FROM ". ALBUM_CAT_TABLE ." AS c
LEFT JOIN ". ALBUM_TABLE ." AS p ON c.cat_id = p.pic_cat_id
WHERE cat_id <> 0
GROUP BY cat_id
ORDER BY cat_order ASC";
if ( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, 'Could not query categories list', '', __LINE__, __FILE__, $sql);
}
$catrows = array();
while( $row = $db->sql_fetchrow($result) )
{
$album_user_access = album_user_access($row['cat_id'], $row, 1, 0, 0, 0, 0, 0); // VIEW
if ($album_user_access['view'] == 1)
{
$catrows[] = $row;
}
}
if ( $CFG['pics_all'] == '1' )
{
$allowed_cat = '0'; // For Recent Public Pics below
}
else
{
$allowed_cat = '';
}
//
// $catrows now stores all categories which this user can view. Dump them out!
//
for ($i = 0; $i < count($catrows); $i++)
{
// Build allowed category-list (for recent pics after here)
$allowed_cat .= ($allowed_cat == '') ? $catrows[$i]['cat_id'] : ',' . $catrows[$i]['cat_id'];
// Get Last Pic of this Category
if ($catrows[$i]['count'] == 0)
{
// Category is empty
$last_pic_info = $lang['No_Pics'];
$u_last_pic = '';
$last_pic_title = '';
}
else
{
// Check Pic Approval
if ( ($catrows[$i]['cat_approval'] == ALBUM_ADMIN) or ($catrows[$i]['cat_approval'] == ALBUM_MOD) )
{
$pic_approval_sql = 'AND p.pic_approval = 1'; // Pic Approval ON
}
else
{
$pic_approval_sql = ''; // Pic Approval OFF
}
}
// END of Last Pic
}
// Recent Public Pics
if ( $CFG['pics_all'] == '1' )
{
$pics_allowed = '0';
}
else
{
$pics_allowed = '';
}
if ( $allowed_cat != $pics_allowed )
{
$CategoryID = $CFG['cat_id'];
if ( $CFG['pics_sort'] == '1' )
{
if ( $CategoryID != 0 )
{
$sql = "SELECT p.pic_id, p.pic_title, p.pic_thumbnail, p.pic_desc, p.pic_user_id, p.pic_user_ip, p.pic_username, p.pic_time, p.pic_cat_id, p.pic_view_count, u.user_id, u.username, r.rate_pic_id, AVG(r.rate_point) AS rating, COUNT(DISTINCT c.comment_id) AS comments
FROM ". ALBUM_TABLE ." AS p
LEFT JOIN ". USERS_TABLE ." AS u ON p.pic_user_id = u.user_id
LEFT JOIN ". ALBUM_CAT_TABLE ." AS ct ON p.pic_cat_id = ct.cat_id
LEFT JOIN ". ALBUM_RATE_TABLE ." AS r ON p.pic_id = r.rate_pic_id
LEFT JOIN ". ALBUM_COMMENT_TABLE ." AS c ON p.pic_id = c.comment_pic_id
WHERE p.pic_cat_id IN ($allowed_cat) AND ( p.pic_approval = 1 OR ct.cat_approval = 0 ) AND pic_cat_id = ($CategoryID)
GROUP BY p.pic_id
ORDER BY RAND()
LIMIT ". $CFG['pics_number'];
}
else
{
$sql = "SELECT p.pic_id, p.pic_title, p.pic_thumbnail, p.pic_desc, p.pic_user_id, p.pic_user_ip, p.pic_username, p.pic_time, p.pic_cat_id, p.pic_view_count, u.user_id, u.username, r.rate_pic_id, AVG(r.rate_point) AS rating, COUNT(DISTINCT c.comment_id) AS comments
FROM ". ALBUM_TABLE ." AS p
LEFT JOIN ". USERS_TABLE ." AS u ON p.pic_user_id = u.user_id
LEFT JOIN ". ALBUM_CAT_TABLE ." AS ct ON p.pic_cat_id = ct.cat_id
LEFT JOIN ". ALBUM_RATE_TABLE ." AS r ON p.pic_id = r.rate_pic_id
LEFT JOIN ". ALBUM_COMMENT_TABLE ." AS c ON p.pic_id = c.comment_pic_id
WHERE p.pic_cat_id IN ($allowed_cat) AND ( p.pic_approval = 1 OR ct.cat_approval = 0 )
GROUP BY p.pic_id
ORDER BY RAND()
LIMIT ". $CFG['pics_number'];
}
}
else if ( $CFG['pics_sort'] == '0' )
{
if ( $CategoryID != 0 )
{
$sql = "SELECT p.pic_id, p.pic_title, p.pic_thumbnail, p.pic_desc, p.pic_user_id, p.pic_user_ip, p.pic_username, p.pic_time, p.pic_cat_id, p.pic_view_count, u.user_id, u.username, r.rate_pic_id, AVG(r.rate_point) AS rating, COUNT(DISTINCT c.comment_id) AS comments
FROM ". ALBUM_TABLE ." AS p
LEFT JOIN ". USERS_TABLE ." AS u ON p.pic_user_id = u.user_id
LEFT JOIN ". ALBUM_CAT_TABLE ." AS ct ON p.pic_cat_id = ct.cat_id
LEFT JOIN ". ALBUM_RATE_TABLE ." AS r ON p.pic_id = r.rate_pic_id
LEFT JOIN ". ALBUM_COMMENT_TABLE ." AS c ON p.pic_id = c.comment_pic_id
WHERE p.pic_cat_id IN ($allowed_cat) AND ( p.pic_approval = 1 OR ct.cat_approval = 0 ) AND pic_cat_id = ($CategoryID)
GROUP BY p.pic_id
ORDER BY pic_time DESC
LIMIT ". $CFG['pics_number'];
}
else
{
$sql = "SELECT p.pic_id, p.pic_title, p.pic_thumbnail, p.pic_desc, p.pic_user_id, p.pic_user_ip, p.pic_username, p.pic_time, p.pic_cat_id, p.pic_view_count, u.user_id, u.username, r.rate_pic_id, AVG(r.rate_point) AS rating, COUNT(DISTINCT c.comment_id) AS comments
FROM ". ALBUM_TABLE ." AS p
LEFT JOIN ". USERS_TABLE ." AS u ON p.pic_user_id = u.user_id
LEFT JOIN ". ALBUM_CAT_TABLE ." AS ct ON p.pic_cat_id = ct.cat_id
LEFT JOIN ". ALBUM_RATE_TABLE ." AS r ON p.pic_id = r.rate_pic_id
LEFT JOIN ". ALBUM_COMMENT_TABLE ." AS c ON p.pic_id = c.comment_pic_id
WHERE p.pic_cat_id IN ($allowed_cat) AND ( p.pic_approval = 1 OR ct.cat_approval = 0 )
GROUP BY p.pic_id
ORDER BY pic_time DESC
LIMIT ". $CFG['pics_number'];
}
}
if ( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, 'Could not query recent pics information', '', __LINE__, __FILE__, $sql);
}
$recentrow = array();
while( $row = $db->sql_fetchrow($result) )
{
$recentrow[] = $row;
}
if (count($recentrow) > 0)
{
for ($i = 0; $i < count($recentrow); $i += $album_config['cols_per_page'])
{
$template->assign_block_vars('recent_pics', array());
for ($j = $i; $j < ($i + $album_config['cols_per_page']); $j++)
{
if ( $j >= count($recentrow) )
{
break;
}
if (!$recentrow[$j]['rating'])
{
$recentrow[$j]['rating'] = $lang['Not_rated'];
}
else
{
$recentrow[$j]['rating'] = round($recentrow[$j]['rating'], 2);
}
$pic_size = @getimagesize(ALBUM_CACHE_PATH . $recentrow[$j]['pic_thumbnail']);
$pic_width = $pic_size[0];
$pic_height = $pic_size[1];
if ($pic_width > $pic_height)
{
$width = $CFG['pics_thumbsize'];
$height = $CFG['pics_thumbsize'] * ($pic_height/$pic_width);
}
else if ($pic_width < $pic_height)
{
$height = $CFG['pics_thumbsize'];
$width = $CFG['pics_thumbsize'] * ($pic_width/$pic_height);
}
else
{
$width = '90%';
$height = '90%';
}
// Display pics horizontally
$template->assign_block_vars('recent_pics.recent_col', array(
'U_PIC' => ($album_config['fullpic_popup']) ? append_sid("album_pic.$phpEx?pic_id=". $recentrow[$j]['pic_id']) : append_sid("album_showpage.$phpEx?pic_id=". $recentrow[$j]['pic_id']),
'THUMBNAIL' => append_sid("album_thumbnail.$phpEx?pic_id=". $recentrow[$j]['pic_id']),
'WIDTH' => $width,
'HEIGHT' => $height,
'DESC' => $recentrow[$j]['pic_desc'])
);
if( ($recentrow[$j]['user_id'] == ALBUM_GUEST) or ($recentrow[$j]['username'] == '') )
{
$recent_poster = ($recentrow[$j]['pic_username'] == '') ? $lang['Guest'] : $recentrow[$j]['pic_username'];
}
else
{
$recent_poster = '<a href="'. append_sid("profile.$phpEx?mode=viewprofile&". POST_USERS_URL .'='. $recentrow[$j]['user_id']) .'">'. $recentrow[$j]['username'] .'</a>';
}
// Display pics vertically
$template->assign_block_vars('recent_pics.recent_detail', array(
'U_PIC' => ($album_config['fullpic_popup']) ? append_sid("album_pic.$phpEx?pic_id=". $recentrow[$j]['pic_id']) : append_sid("album_showpage.$phpEx?pic_id=". $recentrow[$j]['pic_id']),
'THUMBNAIL' => append_sid("album_thumbnail.$phpEx?pic_id=". $recentrow[$j]['pic_id']),
'WIDTH' => $width,
'HEIGHT' => $height,
'DESC' => $recentrow[$j]['pic_desc'],
'TITLE' => $recentrow[$j]['pic_title'],
'POSTER' => $recent_poster,
'TIME' => create_date($board_config['default_dateformat'], $recentrow[$j]['pic_time'], $board_config['board_timezone']),
'VIEW' => $recentrow[$j]['pic_view_count'],
'RATING' => ($album_config['rate'] == 1) ? ( $lang['Rating'] . ': ' . $recentrow[$j]['rating'] . '<br />') : '',
'COMMENTS' => ($album_config['comment'] == 1) ? ( $lang['Comments'] . ': ' . $recentrow[$j]['comments'] . '<br />') : '')
);
}
}
}
else
{
// No Pics Found
$template->assign_block_vars('no_pics', array());
}
}
else
{
// No Cats Found
$template->assign_block_vars('no_pics', array());
}
// End add - Photo Album Block
$template->assign_vars(array(
'WELCOME_TEXT' => $CFG['welcome_text'],
'TOTAL_POSTS' => sprintf($l_total_post_s, $total_posts),
'TOTAL_USERS' => sprintf($l_total_user_s, $total_users),
'TOTAL_TOPICS' => sprintf($lang['total_topics'], $total_topics),
'NEWEST_USER' => sprintf($lang['Newest_user'], '<a href="' . append_sid("profile.$phpEx?mode=viewprofile&" . POST_USERS_URL . "=$newest_uid") . '">', $newest_user, '</a>'),
'L_FORUM' => $lang['Forum'],
// Start add - Birthday MOD
'L_WHOSBIRTHDAY_WEEK' => ($board_config['birthday_check_day'] > 1) ? sprintf( (($birthday_week_list) ? $lang['Birthday_week'] : $lang['Nobirthday_week']), $board_config['birthday_check_day']).$birthday_week_list : '',
'L_WHOSBIRTHDAY_TODAY' => ($board_config['birthday_check_day']) ? ($birthday_today_list) ? $lang['Birthday_today'].$birthday_today_list : $lang['Nobirthday_today'] : '',
// End add - Birthday MOD
'L_BOARD_NAVIGATION' => $lang['Board_navigation'],
'L_STATISTICS' => $lang['Statistics'],
'L_ANNOUNCEMENT' => $lang['Post_Announcement'],
'L_POSTED' => $lang['Posted'],
'L_COMMENTS' => $lang['Comments'],
'L_VIEW_COMMENTS' => $lang['View_comments'],
'L_POST_COMMENT' => $lang['Post_your_comment'],
'L_SEND_PASSWORD' => $lang['Forgotten_password'],
'U_SEND_PASSWORD' => append_sid("profile.$phpEx?mode=sendpassword"),
'L_REGISTER_NEW_ACCOUNT' => sprintf($lang['Register_new_account'], '<a href="' . append_sid("profile.$phpEx?mode=register") . '">', '</a>'),
'L_REMEMBER_ME' => $lang['Remember_me'],
'L_VIEW_COMPLETE_LIST' => $lang['View_complete_list'],
'L_POLL' => $lang['Poll'],
'L_VOTE_BUTTON' => $lang['Vote'],
'L_RECENT_FILES' => $lang['Recent_files'],
// Recent Topics
'L_RECENT_TOPICS' => $lang['Recent_topics'],
// Start add - Fully integrated shoutbox MOD
'U_SHOUTBOX' => append_sid("shoutbox.$phpEx"),
'L_SHOUTBOX' => $lang['Shoutbox'],
'U_SHOUTBOX_MAX' => append_sid("shoutbox_max.$phpEx"),
'U_FORUM' => append_sid("index.$phpEx"),
'U_LINKS' => append_sid("links.$phpEx"),
'U_CONTACT' => append_sid("kontakt.$phpEx"),
// Start add - Last visit MOD
'USERS_TODAY_LIST' => $users_today_list,
'L_USERS_LASTHOUR' =>($users_lasthour)?sprintf($lang['Users_lasthour_explain'],$users_lasthour):$lang['Users_lasthour_none_explain'],
'L_USERS_TODAY' =>$l_today_users,
// End add - Last visit MOD
// End add - Fully integrated shoutbox MOD
'S_COLS' => $plus_config['cols_per_page'],
'S_COL_WIDTH' => (100/$plus_config['cols_per_page']) . '%',
// Photo Album
'L_NEWEST_PIC' => $lang['Newest_pic'],
'PIC_IMAGE' => append_sid('album_thumbnail.'. $phpEx . '?pic_id=' . $picrow['pic_id']),
'PIC_TITLE' => $picrow['pic_title'],
'PIC_POSTER' => $picrow['pic_username'],
'U_PIC_LINK' => append_sid('album_showpage.' . $phpEx . '?pic_id=' . $picrow['pic_id']),
'PIC_TIME' => create_date($board_config['default_dateformat'], $picrow['pic_time'], $board_config['board_timezone']),
// Start add - Photo Album Block
'S_COLS1' => $album_config['cols_per_page'],
'S_COL_WIDTH1' => (100/$album_config['cols_per_page']) . '%',
'TARGET_BLANK' => ($album_config['fullpic_popup']) ? 'target="_blank"' : '',
'L_NEWEST_PICS' => $lang['Newest_pics'],
'L_NO_PICS' => $lang['No_Pics'],
'L_PIC_TITLE' => $lang['Pic_Title'],
'L_VIEW' => $lang['View'],
'L_POSTER' => $lang['Poster'],
'L_POSTED' => $lang['Posted'],
// End add - Photo Album Block
// Portal News Additions
'L_WORD_ON' => $lang['L_Word_on'],
'L_WORD_BY' => $lang['L_Word_by'],
'MINIPOST_IMG' => $images['icon_minipost'],
'NEWS_PRINT_IMG' => $images['news_print'],
'NEWS_EMAIL_IMG' => $images['news_email'],
'NEWS_REPLY_IMG' => $images['news_reply'],
'L_REPLY_NEWS' => $lang['News_Reply'],
'L_PRINT_NEWS' => $lang['News_Print'],
'L_EMAIL_NEWS' => $lang['News_Email'],
'L_NEWS_CATEGORIES' => $lang['News_Categories'],
'L_NEWS_ARCHIEVES' => $lang['News_Archieves'],
'L_NEWS_SUMMARY' => $lang['News_Summary'],
'L_NEWS_VIEWS' => $lang['News_Views'],
'L_NEWS_AND' => $lang['News_And'],
'L_NEWS_COMMENTS' => $lang['News_Comments'],
'L_NEWS_CATS' => $lang['News_Cats'],
'L_NO_NEWS_CATS' => $lang['No_News_Cats'],
'L_ABOUT_US' => $lang['About_us'],
'L_NAVIGATE' => $lang['Portal_Navigate'],
'L_TOOLS' => $lang['Portal_Tools'],
'L_LINKS' => $lang['Site_links'],
'L_CONTACT' => $lang['Site_Contact'],
'L_TOP_POSTERS' => $lang['Top_Posters'],
'L_TOP_MEMBER' => $lang['Top_Member'],
'L_TOP_POSTS' => $lang['Top_Posts'],
'L_QUICK_SEARCH' => $lang['Quick_Search'],
'L_ADV_SEARCH' => $lang['Advanced_Search'],
'L_SHOUTBOX' => $lang['Shoutbox'],
'L_SEARCH_NEW_P' => $lang['Search_new_p'],
// Welcome Avatar
'L_NAME_WELCOME' => $lang['Welcome'],
'U_NAME_LINK' => $name_link,
'L_LAST_SEEN' => $lang['Last_Seen'],
'AVATAR_IMG' => $avatar_img)
);
//
// Start Top 5 Posters hack
$sql = "SELECT post_id FROM " . POSTS_TABLE . " ORDER BY post_id DESC LIMIT 1";
$result = $db->sql_query($sql);
$row = $db->sql_fetchrow($result);
$total_post_perc = $row['post_id'];
$perc_mult = 3;
$perc_mult_set = 0;
$rank = 0;
$sql = "SELECT user_id, username, user_posts FROM " . USERS_TABLE ." WHERE user_id <> -1 ORDER BY user_posts DESC LIMIT 5";
$result = $db->sql_query($sql);
while( $row = $db->sql_fetchrow($result)) {
$rank++;
if (!($rank % 2)) $class = 'row2'; else $class= 'row1';
$percentage = (get_db_stat('postcount') != 0) ? round(100 * $row['user_posts'] / get_db_stat('postcount'),0) : 0;
$bar_perc = round($percentage * $perc_mult,0);
$template->assign_block_vars("users", array(
'RANK' => $rank,
'CLASS' => $class,
'USERNAME' => color_group_colorize_name($row['user_id']),
'PERCENTAGE' => $percentage,
'URL' => $phpbb_root_path . "profile.php?mode=viewprofile&u=" . $row['user_id'],
'BAR' => $bar_perc,
'POSTS' => $row['user_posts'])
);
}
// End Top 5 Posters hack
//
//\\
//\\ Start - vgan's Portal Poll Mod V. 2.0
//\\
// Set the vote graphic length to 100
// Note: If the bars look too long at %100, (only 1 vote) set this value lower.
// Likewise, if it looks too short to you, increase it here.
$length = 70;
// Get the poll forum from EZportal config above
$poll_forum = $CFG['poll_forum'];
{
$template->assign_block_vars('PORTAL_POLL', array());
$sql = 'SELECT
t.*, vd.*
FROM
' . TOPICS_TABLE . ' AS t,
' . VOTE_DESC_TABLE . ' AS vd
WHERE
t.forum_id IN (' . $poll_forum . ') AND
t.topic_status <> 1 AND
t.topic_status <> 2 AND
t.topic_vote = 1 AND
t.topic_id = vd.topic_id
ORDER BY
t.topic_time DESC
LIMIT
0,1';
if(!$result = $db->sql_query($sql))
{
message_die(GENERAL_ERROR, "Couldn't obtain poll information.", "", __LINE__, __FILE__, $sql);
}
$total_polls = $db->sql_numrows($result);
$pollrow = $db->sql_fetchrowset($result);
$db->sql_freeresult($result);
if ( $total_polls != 0 )
{
$topic_id = $pollrow[0]['topic_id'] ;
$sql = "SELECT vd.vote_id, vd.vote_text, vd.vote_start, vd.vote_length, vr.vote_option_id, vr.vote_option_text, vr.vote_result
FROM " . VOTE_DESC_TABLE . " vd, " . VOTE_RESULTS_TABLE . " vr
WHERE vd.topic_id = $topic_id
AND vr.vote_id = vd.vote_id
ORDER BY vr.vote_option_id ASC";
if( !$result = $db->sql_query($sql) )
{
message_die(GENERAL_ERROR, "Couldn't obtain vote data for this topic", "", __LINE__, __FILE__, $sql);
}
if( $vote_options = $db->sql_numrows($result) )
{
$vote_info = $db->sql_fetchrowset($result);
$vote_id = $vote_info[0]['vote_id'];
$vote_title = $vote_info[0]['vote_text'];
$sql = "SELECT vote_id
FROM " . VOTE_USERS_TABLE . "
WHERE vote_id = $vote_id
AND vote_user_id = " . $userdata['user_id'];
if( !$result = $db->sql_query($sql) )
{
message_die(GENERAL_ERROR, "Couldn't obtain user vote data for this topic", "", __LINE__, __FILE__, $sql);
}
$user_voted = ( $db->sql_numrows($result) ) ? TRUE : 0;
if( isset($HTTP_GET_VARS['vote']) || isset($HTTP_POST_VARS['vote']) )
{
$view_result = ( ( ( isset($HTTP_GET_VARS['vote']) ) ? $HTTP_GET_VARS['vote'] : $HTTP_POST_VARS['vote'] ) == "viewresult" ) ? TRUE : 0;
}
else
{
$view_result = 0;
}
$poll_expired = ( $vote_info[0]['vote_length'] ) ? ( ( $vote_info[0]['vote_start'] + $vote_info[0]['vote_length'] < time() ) ? TRUE : 0 ) : 0;
if( $user_voted || $view_result || $poll_expired || $forum_row['topic_status'] == TOPIC_LOCKED )
{
$template->set_filenames(array(
"pollbox" => "portal_poll_result.tpl")
);
$vote_results_sum = 0;
for($i = 0; $i < $vote_options; $i++)
{
$vote_results_sum += $vote_info[$i]['vote_result'];
}
$vote_graphic = 0;
$vote_graphic_max = count($images['voting_graphic']);
for($i = 0; $i < $vote_options; $i++)
{
$vote_percent = ( $vote_results_sum > 0 ) ? $vote_info[$i]['vote_result'] / $vote_results_sum : 0;
$portal_vote_graphic_length = round($vote_percent * $length);
$vote_graphic_img = $images['voting_graphic'][$vote_graphic];
$vote_graphic = ($vote_graphic < $vote_graphic_max - 1) ? $vote_graphic + 1 : 0;
if( count($orig_word) )
{
$vote_info[$i]['vote_option_text'] = preg_replace($orig_word, $replacement_word, $vote_info[$i]['vote_option_text']);
}
$template->assign_block_vars("poll_option", array(
"POLL_OPTION_CAPTION" => $vote_info[$i]['vote_option_text'],
"POLL_OPTION_RESULT" => $vote_info[$i]['vote_result'],
"POLL_OPTION_PERCENT" => sprintf("%.1d%%", ($vote_percent * 100)),
"POLL_OPTION_IMG" => $vote_graphic_img,
"POLL_OPTION_IMG_WIDTH" => $portal_vote_graphic_length/1)
);
}
$template->assign_vars(array(
"L_TOTAL_VOTES" => $lang['Total_votes'],
"TOTAL_VOTES" => $vote_results_sum,
"L_VIEW_RESULTS" => $lang['View_results'],
"U_VIEW_RESULTS" => append_sid("viewtopic.$phpEx?" . POST_TOPIC_URL . "=$topic_id&postdays=$post_days&postorder=$post_order&vote=viewresult"))
);
}
else
{
$template->set_filenames(array(
"pollbox" => "portal_poll_ballot.tpl")
);
for($i = 0; $i < $vote_options; $i++)
{
if( count($orig_word) )
{
$vote_info[$i]['vote_option_text'] = preg_replace($orig_word, $replacement_word, $vote_info[$i]['vote_option_text']);
}
$template->assign_block_vars("poll_option", array(
"POLL_OPTION_ID" => $vote_info[$i]['vote_option_id'],
"POLL_OPTION_CAPTION" => $vote_info[$i]['vote_option_text'])
);
}
$template->assign_vars(array(
"LOGIN_TO_VOTE" => '<b><a href="' . append_sid("login.$phpEx?redirect=portal.$phpEx") . '">' . $lang['Login_to_vote'] . '</a><b>')
);
$s_hidden_fields = '<input type="hidden" name="topic_id" value="' . $topic_id . '"><input type="hidden" name="mode" value="vote">';
}
if( count($orig_word) )
{
$vote_title = preg_replace($orig_word, $replacement_word, $vote_title);
}
$template->assign_vars(array(
"POLL_QUESTION" => '<b>'.$vote_title.'</b>',
"L_SUBMIT_VOTE" => '<input type="submit" name="submit" value="'.$lang['Submit_vote'].'" class="liteoption" />',
"S_HIDDEN_FIELDS" => ( !empty($s_hidden_fields) ) ? $s_hidden_fields : "",
"S_POLL_ACTION" => append_sid("posting.$phpEx?" . POST_TOPIC_URL . "=$topic_id"))
);
$template->assign_var_from_handle("PORTAL_POLL", "pollbox");
}
}
else
{
$template->set_filenames(array(
"pollbox" => "portal_poll_ballot.tpl")
);
$template->assign_vars(array(
"POLL_QUESTION" => $lang['No_poll'],
"L_SUBMIT_VOTE" => '',
"S_HIDDEN_FIELDS" => "",
"S_POLL_ACTION" => '',
"LOGIN_TO_VOTE" => '')
);
$template->assign_var_from_handle("PORTAL_POLL", "pollbox");
}
}
//\\
//\\ End - vgan's Portal Poll Mod V. 2.0
//\\
$template->assign_vars(array(
"TELL_LINK" => append_sid("http://".$HTTP_SERVER_VARS['HTTP_HOST'].$HTTP_SERVER_VARS['PHP_SELF']."?t=$topic_id", true)));
if ($plus_config['show_shoutbox'] == 1)
{
$template->assign_block_vars('switch_show_shoutbox', array());
}
include($phpbb_root_path . 'mods/netclectic/mini_cal/mini_cal.'.$phpEx);
$content =& new NewsModule( $phpbb_root_path );
$content->setVariables( array(
'L_INDEX' => $lang['Index'],
'L_CATEGORIES' => $lang['Categories'],
'L_ARCHIVES' => $lang['Archives']
) );
if( (isset( $_GET['news'] ) && $_GET['news'] == 'categories'))
{
// View the news categories.
$data_access = new NewsDataAccess( $phpbb_root_path );
$news_cats = $data_access->fetchCategories( );
$template->assign_block_vars('news_categories', array());
$cats = count($news_cats);
if ($cats == 0)
{
$template->assign_block_vars('no_news', array());
}
for ($i = 0; $i < count($news_cats); $i += $plus_config['cols_per_page'])
{
if ($cats >0)
{
$template->assign_block_vars('newsrow', array());
}
for ($j = $i; $j < ($i + $plus_config['cols_per_page']); $j++)
{
if( $j >= count($news_cats) )
{
break;
}
$template->assign_block_vars('newsrow.newscol', array(
'THUMBNAIL' => $this->root_path . 'templates/'.$theme['template_name'].'/images/news/' . $news_cats[$j]['news_image'],
'ID' => $news_cats[$j]['news_id'],
'DESC' => $news_cats[$j]['news_category'],
)
);
$template->assign_block_vars('newsrow.news_detail', array(
'NEWSCAT' => $news_cats[$j]['news_category'],
'CATEGORY' => $newsrow[$j]['news_category']
)
);
}
}
}
elseif( isset( $_GET['news'] ) && $_GET['news'] == 'archives' )
{
// View the news Archives.
$year = (isset( $_GET['year'] )) ? $_GET['year'] : 0;
$month = (isset( $_GET['month'] )) ? $_GET['month'] : 0;
$day = (isset( $_GET['day'] )) ? $_GET['day'] : 0;
$key = (isset( $_GET['key'] )) ? $_GET['key'] : '';
$template->assign_block_vars('news_archives', array());
$content->setVariables( array( 'TITLE' => $lang['News'] . ' ' . $lang['Archives'] ) );
$content->renderArchives( $year, $month, $day, $key );
}
else
{
// View news articles.
$topic_id = 0;
if( isset( $_GET['topic_id'] ) )
{
$topic_id = $_GET['topic_id'];
}
elseif( isset( $_GET['news_id'] ) )
{
$topic_id = $_GET['news_id'];
}
$template->assign_block_vars('welcome_text', array());
$content->setVariables( array( 'TITLE' => $lang['News'] . ' ' . $lang['Articles'] ) );
$content->renderArticles( $topic_id );
}
$content->renderPagination( );
$content->display( );
$content->clear( );
//
// Heise Newsticker
//
$content = implode ("", file ("http://www.heise.de/newsticker/heise.rdf"));
preg_match_all("|<item>(.*)</item>|Uism",$content, $items, PREG_PATTERN_ORDER);
for ($i=0;$i<count($items[1]);$i++)
{
preg_match_all("|<title>(.*)</title>(.*)<link>(.*)</link>|Uism",$items[1][$i], $regs, PREG_PATTERN_ORDER);
$template->assign_block_vars('newsticker',array(
'heise_Ticker' => "<a href='".$regs[3][0]."' target='_blank' class='mainmenu'><b>".$regs[1][0]."</b></a><br><br>"));
}
//
// Generate the page
//
include($phpbb_root_path . 'includes/page_tail.'.$phpEx);
?> |
|
_________________ Liebe Grüße,
EwaldB |
|
     |
 |
cback
phpBB2.de User
 [KB] Manager

Anmeldungsdatum: 16.01.2004
Beiträge: 3321
Wohnort: Saarland
|
Verfasst am:
So 26 Sep, 2004 16:47 |
  |
Hallo!
Setze den Code den ich oben für die portal.php gepostet hatte mal in der
includes/page_header.php vor diesem Bereich ein
| Code: |
//
// Start output of page
// |
Beim Plus gibts da ein Problem mit einem Portal Mod sodass du die änderungen in der page_header.php machen musst damit die Variable richtig übergeben wird. |
_________________ [ Forensoftware | CBACK Software | SYNTACTION ]
Support only in Forum! - Support nur im Forum! |
|
     |
 |
EwaldB
phpBB2.de User


Anmeldungsdatum: 13.08.2002
Beiträge: 691
|
Verfasst am:
So 26 Sep, 2004 16:55 |
  |
Sorry, wenn ich nerve, aber auch das gibt es nicht in der page_header.php
| Code: |
<?php
/***************************************************************************
* page_header.php
* -------------------
* begin : Saturday, Feb 13, 2001
* copyright : (C) 2001 The phpBB Group
* email : support@phpbb.com
*
* $Id: page_header.php,v 1.106.2.22 2004/03/01 16:46:37 psotfx Exp $
*
*
***************************************************************************/
/***************************************************************************
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
***************************************************************************/
if ( !defined('IN_PHPBB') )
{
die("Hacking attempt");
}
define('HEADER_INC', TRUE);
//
// gzip_compression
//
$do_gzip_compress = FALSE;
if ( $board_config['gzip_compress'] )
{
$phpver = phpversion();
$useragent = (isset($_SERVER["HTTP_USER_AGENT"]) ) ? $_SERVER["HTTP_USER_AGENT"] : $HTTP_USER_AGENT;
if ( $phpver >= '4.0.4pl1' && ( strstr($useragent,'compatible') || strstr($useragent,'Gecko') ) )
{
if ( extension_loaded('zlib') )
{
ob_start('ob_gzhandler');
}
}
else if ( $phpver > '4.0' )
{
if ( strstr($HTTP_SERVER_VARS['HTTP_ACCEPT_ENCODING'], 'gzip') )
{
if ( extension_loaded('zlib') )
{
$do_gzip_compress = TRUE;
ob_start();
ob_implicit_flush(0);
header('Content-Encoding: gzip');
}
}
}
}
if( $userdata['session_logged_in'] )
{
$sql = "SELECT COUNT(post_id) as total
FROM " . POSTS_TABLE . "
WHERE post_time >= " . $userdata['user_lastvisit'] . "
AND poster_id != " . $userdata['user_id'];
$result = $db->sql_query($sql);
if( $result )
{
$row = $db->sql_fetchrow($result);
$lang['Search_new'] = $lang['Search_new'] . " (" . $row['total'] . ")";
$lang['Search_new2'] = $lang['Search_new2'] . " (" . $row['total'] . ")";
$lang['Search_new_p'] = $lang['Search_new_p'] . " (" . $row['total'] . ")";
}
}
//-- mod : today at yesterday at ------------------------------------------------------------------------
//-- add
//
// PARSE DATEFORMAT TO GET TIME FORMAT
//
$time_reg = '([gh][[:punct:][:space:]]{1,2}[i][[:punct:][:space:]]{0,2}[a]?[[:punct:][:space:]]{0,2}[S]?)';
eregi($time_reg, $board_config['default_dateformat'], $regs);
$board_config['default_timeformat'] = $regs[1];
unset($time_reg);
unset($regs);
//
// GET THE TIME TODAY AND YESTERDAY
//
$today_ary = explode('|', create_date('m|d|Y', time(),$board_config['board_timezone']));
$board_config['time_today'] = gmmktime(0 - $board_config['board_timezone'] - $board_config['summer_time'],0,0,$today_ary[0],$today_ary[1],$today_ary[2]);
$board_config['time_yesterday'] = $board_config['time_today'] - 86400;
unset($today_ary);
//-- end mod : today at yesterday at ------------------------------------------------------------------------
//
// Dr DLP's Google Visit Counter MOD
//
$google_visit_counter = $board_config['google_visit_counter'];
$tmp_list = explode(".", $REMOTE_ADDR);
if (($tmp_list[0] == "64" && $tmp_list[1] == "68" && $tmp_list[2] == "82") || ($tmp_list[0] == "216" && $tmp_list[1] == "239" && $tmp_list[2] == "46"))
{
$sql = "UPDATE " . CONFIG_TABLE . "
SET config_value = '" . ($google_visit_counter + 1) . "'
WHERE config_name = 'google_visit_counter'";
if( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, 'Could not update google counter information', '', __LINE__, __FILE__, $sql);
}
$google_visit_counter++;
}
// ------------------------------------
//
//
// Parse and show the overall header.
//
$template->set_filenames(array(
'overall_header' => ( empty($gen_simple_header) ) ? 'overall_header.tpl' : 'simple_header.tpl')
);
//
// Generate logged in/logged out status
//
if ( $userdata['session_logged_in'] )
{
$u_login_logout = 'login.'.$phpEx.'?logout=true&sid=' . $userdata['session_id'];
$l_login_logout = $lang['Logout'] . ' [ ' . $userdata['username'] . ' ]';
}
else
{
$u_login_logout = 'login.'.$phpEx;
$l_login_logout = $lang['Login'];
}
//-- mod : today at yesterday at ------------------------------------------------------------------------
//-- add
$s_last_visit = ( $userdata['session_logged_in'] ) ? create_date_day($board_config['default_dateformat'], $userdata['user_lastvisit'], $board_config['board_timezone']) : '';
//-- end mod : today at yesterday at ------------------------------------------------------------------------
// Start add - Last visit MOD
if ( !$userdata['user_level']==MOD )
{
$template->assign_block_vars('switch_user_is_not_moderator', array());
} else
{
$template->assign_block_vars('switch_user_is_moderator', array());
}
// End add - Last visit MOD
//
// Get basic (usernames + totals) online
// situation
//
$logged_visible_online = 0;
$logged_hidden_online = 0;
$guests_online = 0;
$online_userlist = '';
$l_online_users = '';
if (defined('SHOW_ONLINE'))
{
include_once($phpbb_root_path.'includes/functions_color_groups.'.$phpEx);
// Start replacement - Topic in Who is online MOD
$user_forum_sql = ( !empty($topic_id) ) ? "AND s.session_topic = " . intval($topic_id) :(( !empty($forum_id) ) ? "AND s.session_page = ".intval($forum_id) : '');
// End replacement - Topic in Who is online MOD
$sql = "SELECT u.username, u.user_id, u.user_allow_viewonline, u.user_level, s.session_logged_in, s.session_ip
FROM ".USERS_TABLE." u, ".SESSIONS_TABLE." s
WHERE u.user_id = s.session_user_id
AND s.session_time >= ".( time() - 300 ) . "
$user_forum_sql
ORDER BY u.username ASC, s.session_ip ASC";
if( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, 'Could not obtain user/online information', '', __LINE__, __FILE__, $sql);
}
$userlist_ary = array();
$userlist_visible = array();
$prev_user_id = 0;
$prev_user_ip = $prev_session_ip = '';
while( $row = $db->sql_fetchrow($result) )
{
// User is logged in and therefor not a guest
if ( $row['session_logged_in'] )
{
// Skip multiple sessions for one user
if ( $row['user_id'] != $prev_user_id )
{
$user_online_link = color_group_colorize_name($row['user_id']);
if ( $row['user_allow_viewonline'] )
{
$logged_visible_online++;
}
else
{
$logged_hidden_online++;
}
if ( $row['user_allow_viewonline'] || $userdata['user_level'] == ADMIN )
{
$online_userlist .= ( $online_userlist != '' ) ? ', ' . $user_online_link : $user_online_link;
}
}
$prev_user_id = $row['user_id'];
}
else
{
// Skip multiple sessions for one user
if ( $row['session_ip'] != $prev_session_ip )
{
$guests_online++;
}
}
$prev_session_ip = $row['session_ip'];
}
$db->sql_freeresult($result);
if ( empty($online_userlist) )
{
$online_userlist = $lang['None'];
}
// Start replacement - Topic in Who is online MOD
if ($plus_config['index_layout'] == 'index_body_plus.tpl')
{
$online_userlist = $online_userlist;
}
else
{
$online_userlist = $lang['Registered_users'].' ' . $online_userlist;
}
// End replacement - Topic in Who is online MOD
$total_online_users = $logged_visible_online + $logged_hidden_online + $guests_online;
if ( $total_online_users > $board_config['record_online_users'])
{
$board_config['record_online_users'] = $total_online_users;
$board_config['record_online_date'] = time();
$sql = "UPDATE " . CONFIG_TABLE . "
SET config_value = '$total_online_users'
WHERE config_name = 'record_online_users'";
if ( !$db->sql_query($sql) )
{
message_die(GENERAL_ERROR, 'Could not update online user record (nr of users)', '', __LINE__, __FILE__, $sql);
}
$sql = "UPDATE " . CONFIG_TABLE . "
SET config_value = '" . $board_config['record_online_date'] . "'
WHERE config_name = 'record_online_date'";
if ( !$db->sql_query($sql) )
{
message_die(GENERAL_ERROR, 'Could not update online user record (date)', '', __LINE__, __FILE__, $sql);
}
}
// Start replacement - Topic in Who is online MOD
if ( $total_online_users == 0 )
{
$l_t_user_s = ( ( isset($topic_id) ) ? $lang['Browsing_topic'] : ( ( isset($forum_id) ) ? $lang['Browsing_forum'] : $lang['Online_users_zero_total'] ) );
}
else
{
$l_t_user_s = ( ( isset($topic_id) ) ? $lang['Browsing_topic'] : ( ( isset($forum_id) ) ? $lang['Browsing_forum'] : $lang['Online_users_total'] ) );
}
// End replacement - Topic in Who is online MOD
if ( $logged_visible_online == 0 )
{
$l_r_user_s = $lang['Reg_users_zero_total'];
}
else if ( $logged_visible_online == 1 )
{
$l_r_user_s = $lang['Reg_user_total'];
}
else
{
$l_r_user_s = $lang['Reg_users_total'];
}
if ( $logged_hidden_online == 0 )
{
$l_h_user_s = $lang['Hidden_users_zero_total'];
}
else if ( $logged_hidden_online == 1 )
{
$l_h_user_s = $lang['Hidden_user_total'];
}
else
{
$l_h_user_s = $lang['Hidden_users_total'];
}
if ( $guests_online == 0 )
{
$l_g_user_s = $lang['Guest_users_zero_total'];
}
else if ( $guests_online == 1 )
{
$l_g_user_s = $lang['Guest_user_total'];
}
else
{
$l_g_user_s = $lang['Guest_users_total'];
}
$l_online_users = sprintf($l_t_user_s, $total_online_users);
$l_online_users .= sprintf($l_r_user_s, $logged_visible_online);
$l_online_users .= sprintf($l_h_user_s, $logged_hidden_online);
$l_online_users .= sprintf($l_g_user_s, $guests_online);
}
include($phpbb_root_path . "congrat." . $phpEx);
//
// Obtain number of new private messages
// if user is logged in
//
if ( ($userdata['session_logged_in']) && (empty($gen_simple_header)) )
{
// Start add - Birthday MOD
// see if user has or have had birthday, also see if greeting are enabled
if ( $userdata['user_birthday']!=999999 && $board_config['birthday_greeting'] && create_date('Ymd', time(), $board_config['default_timezone']) >= $userdata['user_next_birthday_greeting'].realdate ('md',$userdata['user_birthday'] ) )
{
$sql = "UPDATE " . USERS_TABLE . "
SET user_next_birthday_greeting = " . (create_date('Y', time(), $board_config['board_timezone'])+1) . "
WHERE user_id = " . $userdata['user_id'];
if( !$status = $db->sql_query($sql) )
{
message_die(GENERAL_ERROR, "Could not update next_birthday_greeting for user.", "", __LINE__, __FILE__, $sql);
}
$template->assign_var("GREETING_POPUP",
"<script language=\"Javascript\" type=\"text/javascript\"><!--
window.open('".append_sid('birthday_popup.'.$phpEx)."', '_phpbbprivmsg', 'HEIGHT=225,resizable=yes,WIDTH=400');
//-->
</script>");
} //Sorry user shall not have a greeting this year
// End add - Birthday MOD
if ( $userdata['user_new_privmsg'] )
{
$l_message_new = ( $userdata['user_new_privmsg'] == 1 ) ? $lang['New_pm'] : $lang['New_pms'];
$l_privmsgs_text = sprintf($l_message_new, $userdata['user_new_privmsg']);
if ( $userdata['user_last_privmsg'] > $userdata['user_lastvisit'] )
{
$sql = "UPDATE " . USERS_TABLE . "
SET user_last_privmsg = " . $userdata['user_lastvisit'] . "
WHERE user_id = " . $userdata['user_id'];
if ( !$db->sql_query($sql) )
{
message_die(GENERAL_ERROR, 'Could not update private message new/read time for user', '', __LINE__, __FILE__, $sql);
}
$s_privmsg_new = 1;
$icon_pm = $images['pm_new_msg'];
}
else
{
$s_privmsg_new = 0;
$icon_pm = $images['pm_new_msg'];
}
}
else
{
$l_privmsgs_text = $lang['No_new_pm'];
$s_privmsg_new = 0;
$icon_pm = $images['pm_no_new_msg'];
}
if ( $userdata['user_unread_privmsg'] )
{
$l_message_unread = ( $userdata['user_unread_privmsg'] == 1 ) ? $lang['Unread_pm'] : $lang['Unread_pms'];
$l_privmsgs_text_unread = sprintf($l_message_unread, $userdata['user_unread_privmsg']);
}
else
{
$l_privmsgs_text_unread = $lang['No_unread_pm'];
}
}
else
{
$icon_pm = $images['pm_no_new_msg'];
$l_privmsgs_text = $lang['Login_check_pm'];
$l_privmsgs_text_unread = '';
$s_privmsg_new = 0;
}
//
// Generate HTML required for Mozilla Navigation bar
//
if (!isset($nav_links))
{
$nav_links = array();
}
$nav_links_html = '';
$nav_link_proto = '<link rel="%s" href="%s" title="%s" />' . "\n";
while( list($nav_item, $nav_array) = @each($nav_links) )
{
if ( !empty($nav_array['url']) )
{
$nav_links_html .= sprintf($nav_link_proto, $nav_item, append_sid($nav_array['url']), $nav_array['title']);
}
else
{
// We have a nested array, used for items like <link rel='chapter'> that can occur more than once.
while( list(,$nested_array) = each($nav_array) )
{
$nav_links_html .= sprintf($nav_link_proto, $nav_item, $nested_array['url'], $nested_array['title']);
}
}
}
// Format Timezone. We are unable to use array_pop here, because of PHP3 compatibility
$l_timezone = explode('.', $board_config['board_timezone']);
$l_timezone = (count($l_timezone) > 1 && $l_timezone[count($l_timezone)-1] != 0) ? $lang[sprintf('%.1f', $board_config['board_timezone'])] : $lang[number_format($board_config['board_timezone'])];
// Start add - Complete banner MOD
$time_now=time();
$hour_now=create_date('Hi',$time_now,$board_config['board_timezone']);
$date_now=create_date('Ymd',$time_now,$board_config['board_timezone']);
$week_now=create_date('w',$time_now,$board_config['board_timezone']);
$sql_level= ($userdata['user_id']==ANONYMOUS) ? ANONYMOUS : (($userdata['user_level']==ADMIN) ? MOD : (($userdata['user_level']==MOD) ? ADMIN : $userdata['user_level']));
$sql = "SELECT DISTINCT banner_id, banner_name, banner_spot, banner_description, banner_forum, banner_type, banner_width, banner_height, banner_filter FROM ".BANNERS_TABLE ."
WHERE banner_active
AND IF(banner_level_type,IF(banner_level_type=1,".intval($sql_level)."<=banner_level,IF(banner_level_type=2,".intval($sql_level).">=banner_level,".intval($sql_level)."<>banner_level)),banner_level=".intval($sql_level).")
AND (banner_timetype=0
OR (( $hour_now BETWEEN time_begin AND time_end) AND ((banner_timetype=2
OR (( $week_now BETWEEN date_begin AND date_end) AND banner_timetype=4)
OR (( $date_now BETWEEN date_begin AND date_end) AND banner_timetype=6)
)))) ORDER BY banner_spot,banner_weigth*SUBSTRING(RAND(),6,2) DESC";
if ( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, "Couldn't get banners data", "", __LINE__, __FILE__, $sql);
}
$banners = array();
$i=0;
while ($banners[$i] = $db->sql_fetchrow($result))
{
$cookie_name = $board_config['cookie_name'] . '_b_' . $banners[$i]['banner_id'];
if ( !($HTTP_COOKIE_VARS[$cookie_name] && $banners[$i]['banner_filter']) )
{
$banner_spot=$banners[$i]['banner_spot'];
if ($banner_spot<>$last_spot AND ($banners[$i]['banner_forum']==$forum_id || empty($banners[$i]['banner_forum'])))
{
$banner_size = ($banners[$i]['banner_width'] && $banners[$i]['banner_height']) ? '"width="'.$banners[$i]['banner_width'].'" height="'.$banners[$i]['banner_height'].'"' : '';
switch ($banners[$i]['banner_type'])
{
case 6 :
// swf file
$template->assign_vars(array(
// ******************** BEGIN phpBBChatSpot MOD ********************
'S_JOIN_CHAT' => append_sid( "chatspot/chatspot.$phpEx" . "?initialize=1" ),
'CHATSPOT_NAME' => 'Lobby',
// ********************* END phpBBChatSpot MOD ********************
'BANNER_'.$banner_spot.'_IMG' => '<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,23,0" id=macromedia '.$banner_size.' align="abscenter"><param name=movie value="'.$banners[$i]['banner_name'].'"><param name=quality value=high><embed src="'.$banners[$i]['banner_name'].'" quality=high pluginspage="http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash" type="application/x-shockwave-flash" autostart="true" /><noembed><a href="'.append_sid('redirect.'.$phpEx.'?banner_id='.$banners[$i]['banner_id']).'" target="_blank">'.$banners[$i]['banner_description'].'</a></noembed></object>'));
break;
case 4 :
// custom code
$template->assign_var('BANNER_'.$banner_spot.'_IMG', $banners[$i]['banner_name'] );
break;
case 2 :
// Text link
$template->assign_var('BANNER_'.$banner_spot.'_IMG', '<a href="'.append_sid('redirect.'.$phpEx.'?banner_id='.$banners[$i]['banner_id']).'" target="_blank" alt="'.$banners[$i]['banner_description'].'" title="'.$banners[$i]['banner_description'].'">'.$banners[$i]['banner_name'].'</a>');
break;
case 0 :
default:
$template->assign_var('BANNER_'.$banner_spot.'_IMG', '<a href="'.append_sid('redirect.'.$phpEx.'?banner_id='.$banners[$i]['banner_id']).'" target="_blank"><img src="'.$banners[$i]['banner_name'].'" '.$banner_size.' border="0" alt="'.$banners[$i]['banner_description'].'" title="'.$banners[$i]['banner_description'].'" /></a>');
}
$banner_show_list.= ', '.$banners[$i]['banner_id'];
}
$last_spot = ($banners[$i]['banner_forum']==$forum_id || empty($banners[$i]['banner_forum'])) ? $banner_spot : $last_spot;
}
$i++;
}
// End add - Complete banner MOD
//
// The following assigns all _common_ variables that may be used at any point
// in a template.
//
if ($plus_config['index_layout'] == 'index_body_plus.tpl')
{
$template->assign_vars(array(
// ******************** BEGIN phpBBChatSpot MOD ********************
'S_JOIN_CHAT' => append_sid( "chatspot/chatspot.$phpEx" . "?initialize=1" ),
'CHATSPOT_NAME' => 'Lobby',
// ********************* END phpBBChatSpot MOD ********************
'RECORD_USERS_P' => sprintf($board_config['record_online_users'], create_date($board_config['default_dateformat'], $board_config['record_online_date'], $board_config['board_timezone'])),
'ONLINE_USERLIST_P' => $online_userlist
));
}
$template->assign_vars(array(
// ******************** BEGIN phpBBChatSpot MOD ********************
'S_JOIN_CHAT' => append_sid( "chatspot/chatspot.$phpEx" . "?initialize=1" ),
'CHATSPOT_NAME' => 'Lobby',
// ********************* END phpBBChatSpot MOD ********************
'SITENAME' => $board_config['sitename'],
'SITE_DESCRIPTION' => $board_config['site_desc'],
'PAGE_TITLE' => $page_title,
'LAST_VISIT_DATE' => sprintf($lang['You_last_visit'], $s_last_visit),
'CURRENT_TIME' => sprintf($lang['Current_time'], create_date($board_config['default_dateformat'], time(), $board_config['board_timezone'])),
'TOTAL_USERS_ONLINE' => $l_online_users,
'LOGGED_IN_USER_LIST' => $online_userlist,
'RECORD_USERS' => sprintf($lang['Record_online_users'], $board_config['record_online_users'], create_date($board_config['default_dateformat'], $board_config['record_online_date'], $board_config['board_timezone'])),
'PRIVATE_MESSAGE_INFO' => $l_privmsgs_text,
'PRIVATE_MESSAGE_INFO_UNREAD' => $l_privmsgs_text_unread,
'PRIVATE_MESSAGE_NEW_FLAG' => $s_privmsg_new,
'PRIVMSG_IMG' => $icon_pm,
'L_USERNAME' => $lang['Username'],
'L_PASSWORD' => $lang['Password'],
'L_NAME' => $lang['Name'],
'L_SEARCH_FOR' => $lang['Search_for'],
'L_THAT_CONTAINS' => $lang['That_contains'],
'L_LOGIN_LOGOUT' => $l_login_logout,
'L_LOGIN' => $lang['Login'],
'L_LOG_ME_IN' => $lang['Log_me_in'],
'L_AUTO_LOGIN' => $lang['Log_me_in'],
'L_INDEX' => sprintf($lang['Forum_Index'], $board_config['sitename']),
'L_REGISTER' => $lang['Register'],
'L_PROFILE' => $lang['Profile'],
'L_SEARCH' => $lang['Search'],
'L_Acronymes' => $lang['AcronymesWords_title'],
'L_FORUM_SEARCH' => $lang['Forum_Search'],
'L_BOOKMARKS' => $lang['Bookmarks'],
'L_PRIVATEMSGS' => $lang['Private_Messages'],
// MOD: PM Popup Blocker Fix - by tomlevens (tom@tomlevens.co.uk)
// (1 line added)
//
'L_PRIVATEMSG_NEW' => ($userdata['user_new_privmsg'] == 1) ? $lang['You_new_pm'] : $lang['You_new_pms'],
//
// END MOD
'L_WHO_IS_ONLINE' => $lang['Who_is_Online'],
'L_MEMBERLIST' => $lang['Memberlist'],
'L_FAQ' => $lang['FAQ'],
'L_KB' => $lang['KB_title'],
'L_NEWS' => $lang['News'],
'L_DOWNLOAD' => $lang['Download'],
'L_NEWEST_DL' => $lang['Newest_Downloads'],
'L_TOP_DL' => $lang['Top_Downloads'],
'L_USERGROUPS' => $lang['Usergroups'],
'L_SEARCH_NEW' => $lang['Search_new'],
'L_SEARCH_NEW2' => $lang['Search_new2'],
'L_SEARCH_UNANSWERED' => $lang['Search_unanswered'],
'L_SEARCH_SELF' => $lang['Search_your_posts'],
'L_WHOSONLINE_ADMIN' => sprintf($lang['Admin_online_color'], '<span style="color:#' . $theme['fontcolor3'] . '">', '</span>'),
'L_WHOSONLINE_MOD' => sprintf($lang['Mod_online_color'], '<span style="color:#' . $theme['fontcolor2'] . '">', '</span>'),
'L_ImpressumMOD1' => $lang['ImpressumMOD1'],
'U_RECENT' => append_sid("recent.$phpEx"),
'L_RECENT' => $lang['link'],
'U_STATISTICS' => append_sid("statistics.$phpEx"),
'L_STATISTICS' => $lang['Statistics'],
'U_SEARCH_UNANSWERED' => append_sid('search.'.$phpEx.'?search_id=unanswered'),
'U_SEARCH_SELF' => append_sid('search.'.$phpEx.'?search_id=egosearch'),
'U_SEARCH_NEW' => append_sid('search.'.$phpEx.'?search_id=newposts'),
'U_INDEX' => append_sid('index.'.$phpEx),
'U_REGISTER' => append_sid('profile.'.$phpEx.'?mode=register'),
'U_PROFILE' => append_sid('profile.'.$phpEx.'?mode=editprofile'),
'U_PRIVATEMSGS' => append_sid('privmsg.'.$phpEx.'?folder=inbox'),
'U_PRIVATEMSGS_POPUP' => append_sid('privmsg.'.$phpEx.'?mode=newpm'),
'U_ABSENCE_POPUP' => append_sid('absence_notify_popup.'.$phpEx),
'U_SEARCH' => append_sid('search.'.$phpEx),
'U_BOOKMARKS' => append_sid('search.'.$phpEx.'?search_id=bookmarks'),
'U_MEMBERLIST' => append_sid('memberlist.'.$phpEx),
'U_MODCP' => append_sid('modcp.'.$phpEx),
'U_FAQ' => append_sid('faq.'.$phpEx),
'U_KB' => append_sid('kb.'.$phpEx),
'U_NEWS' => append_sid($board_config['news_base_url'] . $board_config['news_index_file']),
'U_DOWNLOAD' => append_sid('dload.'.$phpEx),
'U_VIEWONLINE' => append_sid('viewonline.'.$phpEx),
'U_LOGIN_LOGOUT' => append_sid($u_login_logout),
'U_GROUP_CP' => append_sid('groupcp.'.$phpEx),
// Activity MOD
'U_ACTIVITY' => append_sid('activity.'.$phpEx),
'L_ACTIVITY' => $lang['Activity'],
'U_ImpressumMOD1' => append_sid('impressum.'.$phpEx),
'U_STAFF' => append_sid('staff.'.$phpEx),
'L_STAFF' => $lang['Staff'],
// Album MOD
'L_ALBUM' => $lang['Album'],
'U_ALBUM' => append_sid('album.'.$phpEx),
// ezPortal
'U_PORTAL' => append_sid('portal.'.$phpEx),
'L_HOME' => $lang['Home'],
'S_CONTENT_DIRECTION' => $lang['DIRECTION'],
'S_CONTENT_ENCODING' => $lang['ENCODING'],
'S_CONTENT_DIR_LEFT' => $lang['LEFT'],
'S_CONTENT_DIR_RIGHT' => $lang['RIGHT'],
// Start replacement - Advanced time management MOD
'S_TIMEZONE' => sprintf($lang['All_times'], $l_timezone),
// End replacement - Advanced time management MOD
'S_LOGIN_ACTION' => append_sid('login.'.$phpEx),
'T_HEAD_STYLESHEET' => $theme['head_stylesheet'],
'T_BODY_BACKGROUND' => $theme['body_background'],
'T_BODY_BGCOLOR' => '#'.$theme['body_bgcolor'],
'T_BODY_TEXT' => '#'.$theme['body_text'],
'T_BODY_LINK' => '#'.$theme['body_link'],
'T_BODY_VLINK' => '#'.$theme['body_vlink'],
'T_BODY_ALINK' => '#'.$theme['body_alink'],
'T_BODY_HLINK' => '#'.$theme['body_hlink'],
'T_TR_COLOR1' => '#'.$theme['tr_color1'],
'T_TR_COLOR2' => '#'.$theme['tr_color2'],
'T_TR_COLOR3' => '#'.$theme['tr_color3'],
'T_TR_CLASS1' => $theme['tr_class1'],
'T_TR_CLASS2' => $theme['tr_class2'],
'T_TR_CLASS3' => $theme['tr_class3'],
'T_TH_COLOR1' => '#'.$theme['th_color1'],
'T_TH_COLOR2' => '#'.$theme['th_color2'],
'T_TH_COLOR3' => '#'.$theme['th_color3'],
'T_TH_CLASS1' => $theme['th_class1'],
'T_TH_CLASS2' => $theme['th_class2'],
'T_TH_CLASS3' => $theme['th_class3'],
'T_TD_COLOR1' => '#'.$theme['td_color1'],
'T_TD_COLOR2' => '#'.$theme['td_color2'],
'T_TD_COLOR3' => '#'.$theme['td_color3'],
'T_TD_CLASS1' => $theme['td_class1'],
'T_TD_CLASS2' => $theme['td_class2'],
'T_TD_CLASS3' => $theme['td_class3'],
'T_FONTFACE1' => $theme['fontface1'],
'T_FONTFACE2' => $theme['fontface2'],
'T_FONTFACE3' => $theme['fontface3'],
'T_FONTSIZE1' => $theme['fontsize1'],
'T_FONTSIZE2' => $theme['fontsize2'],
'T_FONTSIZE3' => $theme['fontsize3'],
'T_FONTCOLOR1' => '#'.$theme['fontcolor1'],
'T_FONTCOLOR2' => '#'.$theme['fontcolor2'],
'T_FONTCOLOR3' => '#'.$theme['fontcolor3'],
'T_SPAN_CLASS1' => $theme['span_class1'],
'T_SPAN_CLASS2' => $theme['span_class2'],
'T_SPAN_CLASS3' => $theme['span_class3'],
'GOOGLE_VISIT_COUNTER' => sprintf($lang['Google_Visit_counter'], $google_visit_counter),
'NAV_LINKS' => $nav_links_html)
);
//
// Login box?
//
if ( !$userdata['session_logged_in'] )
{
$template->assign_block_vars('switch_user_logged_out', array());
}
else
{
$template->assign_block_vars('switch_user_logged_in', array());
if ( !empty($userdata['user_popup_pm']) )
{
$template->assign_block_vars('switch_enable_pm_popup', array());
}
if ( $userdata['user_absence'] == TRUE )
{
$template->assign_block_vars('switch_absence', array());
}
}
// Add no-cache control for cookies if they are set
//$c_no_cache = (isset($HTTP_COOKIE_VARS[$board_config['cookie_name'] . '_sid']) || isset($HTTP_COOKIE_VARS[$board_config['cookie_name'] . '_data'])) ? 'no-cache="set-cookie", ' : '';
// Work around for "current" Apache 2 + PHP module which seems to not
// cope with private cache control setting
if (!empty($_SERVER['SERVER_SOFTWARE']) && strstr($_SERVER['SERVER_SOFTWARE'], 'Apache/2'))
{
header ('Cache-Control: no-cache, pre-check=0, post-check=0');
}
else
{
header ('Cache-Control: private, pre-check=0, post-check=0, max-age=0');
}
header ('Expires: 0');
header ('Pragma: no-cache');
//-- mod : categories hierarchy --------------------------------------------------------------------
//-- add
// get the nav sentence
$nav_key = '';
if (isset($HTTP_POST_VARS[POST_CAT_URL]) || isset($HTTP_GET_VARS[POST_CAT_URL]))
{
$nav_key = POST_CAT_URL . ((isset($HTTP_POST_VARS[POST_CAT_URL])) ? intval($HTTP_POST_VARS[POST_CAT_URL]) : intval($HTTP_GET_VARS[POST_CAT_URL]));
}
if (isset($HTTP_POST_VARS[POST_FORUM_URL]) || isset($HTTP_GET_VARS[POST_FORUM_URL]))
{
$nav_key = POST_FORUM_URL . ((isset($HTTP_POST_VARS[POST_FORUM_URL])) ? intval($HTTP_POST_VARS[POST_FORUM_URL]) : intval($HTTP_GET_VARS[POST_FORUM_URL]));
}
if (isset($HTTP_POST_VARS[POST_TOPIC_URL]) || isset($HTTP_GET_VARS[POST_TOPIC_URL]))
{
$nav_key = POST_TOPIC_URL . ((isset($HTTP_POST_VARS[POST_TOPIC_URL])) ? intval($HTTP_POST_VARS[POST_TOPIC_URL]) : intval($HTTP_GET_VARS[POST_TOPIC_URL]));
}
if (isset($HTTP_POST_VARS[POST_POST_URL]) || isset($HTTP_GET_VARS[POST_POST_URL]))
{
$nav_key = POST_POST_URL . ((isset($HTTP_POST_VARS[POST_POST_URL])) ? intval($HTTP_POST_VARS[POST_POST_URL]) : intval($HTTP_GET_VARS[POST_POST_URL]));
}
if ( empty($nav_key) && (isset($HTTP_POST_VARS['selected_id']) || isset($HTTP_GET_VARS['selected_id'])) )
{
$nav_key = isset($HTTP_GET_VARS['selected_id']) ? $HTTP_GET_VARS['selected_id'] : $HTTP_POST_VARS['selected_id'];
}
if (empty($nav_key)) $nav_key = 'Root';
$nav_cat_desc = make_cat_nav_tree($nav_key, $nav_pgm);
if ($nav_cat_desc != '') $nav_cat_desc = $nav_separator . $nav_cat_desc;
// send to template
$template->assign_vars(array(
// ******************** BEGIN phpBBChatSpot MOD ********************
'S_JOIN_CHAT' => append_sid( "chatspot/chatspot.$phpEx" . "?initialize=1" ),
'CHATSPOT_NAME' => 'Lobby',
// ********************* END phpBBChatSpot MOD ********************
'SPACER' => $images['spacer'],
'NAV_SEPARATOR' => $nav_separator,
'NAV_CAT_DESC' => $nav_cat_desc,
)
);
//-- fin mod : categories hierarchy ----------------------------------------------------------------
//-- mod : mods settings ---------------------------------------------------------------------------
//-- add
$template->assign_vars(array(
// ******************** BEGIN phpBBChatSpot MOD ********************
'S_JOIN_CHAT' => append_sid( "chatspot/chatspot.$phpEx" . "?initialize=1" ),
'CHATSPOT_NAME' => 'Lobby',
// ********************* END phpBBChatSpot MOD ********************
'U_PREFERENCES' => append_sid("./profile_options.$phpEx"),
'L_PREFERENCES' => $lang['Preferences'],
'I_PREFERENCES' => $images['Preferences'],
)
);
//-- fin mod : mods settings -----------------------------------------------------------------------
//-- mod : calendar --------------------------------------------------------------------------------
//-- add
if (!defined('IN_CALENDAR'))
{
if ( intval($board_config['calendar_header_cells']) > 0 )
{
include_once($phpbb_root_path . './includes/functions_calendar.' . $phpEx);
display_calendar('CALENDAR_BOX', intval($board_config['calendar_header_cells']));
}
}
$template->assign_vars(array(
// ******************** BEGIN phpBBChatSpot MOD ********************
'S_JOIN_CHAT' => append_sid( "chatspot/chatspot.$phpEx" . "?initialize=1" ),
'CHATSPOT_NAME' => 'Lobby',
// ********************* END phpBBChatSpot MOD ********************
'L_CALENDAR' => $lang['Calendar'],
'I_CALENDAR' => $images['menu_calendar'],
'U_CALENDAR' => append_sid("./calendar.$phpEx"),
'I_RANKS' => '<img src="' . $images['Ranks'] . '" width="12" height="13" border="0" alt="' . $lang['Ranks'] . '" hspace="3" />',
'U_RANKS' => append_sid("ranks.$phpEx"),
'L_RANKS' => $lang['Ranks'],
)
);
//-- fin mod : calendar ----------------------------------------------------------------------------
//-- mod : ranks -----------------------------------------------------------------------------------
//-- add
$check_access = true;
include( $phpbb_root_path . 'ranks.' . $phpEx );
//-- fin mod : ranks -------------------------------------------------------------------------------
//
//Nickpagelink zeigen?
//
if ( $userdata['session_logged_in'] )
{
//Nickpage vorhanden?
$sql = "SELECT COUNT(uid) AS zaehle FROM ".NICKPAGE_TABLE." WHERE uid='".$userdata['user_id']."'";
if( !($result = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, 'Konnte Querrie nicht ausführen!', '', __LINE__, __FILE__, $sql);
}
$row = $db->sql_fetchrow($result);
//Konfiguration (ab wieviel posts...)
$sql = "SELECT anzahl_posts FROM ".NICKPAGECONFIG_TABLE;
if( !($result2 = $db->sql_query($sql)) )
{
message_die(GENERAL_ERROR, 'Konnte Querrie nicht ausführen!', '', __LINE__, __FILE__, $sql);
}
$row2 = $db->sql_fetchrow($result2);
if($row['zaehle'] == "1" OR $row2['anzahl_posts'] <= $userdata['user_posts'])
{
$template->assign_block_vars('Shownickpagebutton',array(
'U_NICKPAGE' => append_sid('nickpage.'.$phpEx.'?admin='.$userdata['username']),
));
}
}
$template->pparse('overall_header');
?> |
|
_________________ Liebe Grüße,
EwaldB |
|
     |
 |
cback
phpBB2.de User
 [KB] Manager

Anmeldungsdatum: 16.01.2004
Beiträge: 3321
Wohnort: Saarland
|
Verfasst am:
So 26 Sep, 2004 17:54 |
  |
Ne nervst nich für Support sind wir ja da
Ist beim Plus 1.5.2 wohl durch nen Mod anders wie ich sehe. Wenn Du es vor dem da einfügst:
| Code: |
//
// Parse and show the overall header.
// |
sollte auch gehn. |
_________________ [ Forensoftware | CBACK Software | SYNTACTION ]
Support only in Forum! - Support nur im Forum! |
|
     |
 |
juk
phpBB2.de User

Anmeldungsdatum: 07.12.2003
Beiträge: 58
|
Verfasst am:
So 26 Sep, 2004 18:24 |
  |
Meiner Meinung nach ist das in der page_header.php mehr als schlecht plaziert, da dann bei JEDEM Seitenaufruf ein Zugriff auf die Heise-Site erfolgt. Dieser ist aber nur auf der Portalseite wirklich notwendig.
Deshalb ist die portal.php der bessere Platz für den Code. In den bisherigen Beschreibungen stimmen aber zwei Sachen nicht (zumindest beim Plus1.52):
Zum ersten hier ein Codeausschnitt aus der portal.php der Plus 1.52:
| Code: |
$content->renderPagination( );
$content->display( );
$content->clear( );
//
// Generate the page
//
|
Würde man den Code wie oben beschrieben vor "Generate the page" einbauen, wäre die Seite schon erzeugt und der Code wäre wirkungslos.
Der Code muß also vor den gesamten oberen Block gesetzt werden.
Zum zweiten sieht man in obigem Codeblock auch, daß die Variable $content schon anderweitig in Benutzung ist. Deshalb würde der Ticker-Code sie wieder überschreiben und Fehlermeldungen wären die Folge. Stattdessen irgendeine andere Variable nehmen. Bei mir sieht der Code so aus:
| Code: |
//
// Heise Newsticker Add-on
//
$heisecontent = implode("", file ("http://www.heise.de/newsticker/heise.rdf"));
preg_match_all("|<item>(.*)</item>|Uism",$heisecontent, $items, PREG_PATTERN_ORDER);
for ($i=0;$i<count($items[1]);$i++)
{
preg_match_all("|<title>(.*)</title>(.*)<link>(.*)</link>|Uism",$items[1][$i], $regs, PREG_PATTERN_ORDER);
$template->assign_block_vars('newsticker',array(
'heise_Ticker' => "• <a href='".$regs[3][0]."' target='_blank' class='mainmenu' onMouseOver='scroll_heise.stop();' onMouseOut='scroll_heise.start();'><b>".$regs[1][0]."</b></a>"));
} |
@cback
Wenn Du anderer Meinung bist, laß ich mich gern überzeugen  |
|
|
   |
 |
|
|
|
|
Gehe zu Seite 1, 2 Weiter
|
Nächstes Thema anzeigen
Vorheriges Thema anzeigen
Du kannst keine Beiträge in dieses Forum schreiben. Du kannst auf Beiträge in diesem Forum nicht antworten. Du kannst deine Beiträge in diesem Forum nicht bearbeiten. Du kannst deine Beiträge in diesem Forum nicht löschen. Du kannst an Umfragen in diesem Forum nicht mitmachen. Du kannst Dateien in diesem Forum posten Du kannst Dateien in diesem Forum herunterladen
|
|
| |