in die portal.php folgendes einfügen, z.B. vor // MOST POSTS START
Code: Alles auswählen
// EM TIPSPIEL START
include($phpbb_root_path . 'includes/functions_em.'.$phpEx);
$zeitstempel = time();
$zaehler = 0;
$teams_data = get_em_teams();
$games_data1 = get_em_games(); //Gruppen-Spiele
$games_data2 = get_em_finalgames(); //Final-Spiele
$games_data = array_merge($games_data1, $games_data2);
for ( $i = 0; $i < count($games_data); $i++ )
{
// Get current game data
$games_row = ( $i == 0 ) ? current($games_data) : next($games_data);
for ( $j = 0; $j < count($games_row); $j++ )
{
$game_time = $games_row[$j]['game_time'];
if($game_time > ($zeitstempel - 3600*2) AND $zaehler < 2)
{
$zaehler++;
$template->assign_block_vars('emtip', array(
'GAME_TIME' => date("d.m.Y, H:i", $game_time),
'GAME_LOC' => $games_row[$j]['game_loc'],
'TEAM_NAME2' => $teams_data[$games_row[$j]['game_away']]['team_name'],
'TEAM_NAME1' => $teams_data[$games_row[$j]['game_home']]['team_name'],
'TEAM_IMG2' => $teams_data[$games_row[$j]['game_away']]['team_img'],
'TEAM_IMG1' => $teams_data[$games_row[$j]['game_home']]['team_img'])
);
}
}
}
$sql = "SELECT a.tipp_user, sum(a.tipp_points) ges, b.username
FROM phpbb_em_tipps a, ".USERS_TABLE." b
WHERE b.user_id=a.tipp_user
group by tipp_user order by ges desc, b.username limit 3";
if (!$result = $db->sql_query($sql))
{
message_die(GENERAL_ERROR, 'Could not query Nickpage information', '', __LINE__, __FILE__, $sql);
}
$emtip_list = $db->sql_fetchrowset($result);
$em_ausgabe='';
for($i = 0; $i < count($emtip_list); $i++)
{
$user_id = $emtip_list[$i]['tipp_user'];
$ges = $emtip_list[$i]['ges'];
$user_name = $emtip_list[$i]['username'];
$em_ausgabe.= '<a class="genmed" href="profile.php?mode=viewprofile&u='.$user_id.'">'.$user_name.'</a> ('.$ges.'), ';
}
$em_ausgabe = substr($em_ausgabe,0,(strlen($em_ausgabe)-2));
// EM TIPSPIEL ENDE
'IntroPortaltext27' => $lang['IntroPortaltext27'],
diese Zeile einfügen
Code: Alles auswählen
'EM_AUSGABE' => $em_ausgabe,
Und in der portal_body.tpl habe ich diese Tabelle gleich nach dem CENTER START
Code: Alles auswählen
<table width="100%" border="0" cellpadding="1" cellspacing="1" style="border-collapse: collapse" class="forumline">
<tr>
<th colspan="7" class="thCornerL" height="25" nowrap="nowrap"> Fußball EM 2008 Tipspiel </th>
</tr>
<tr>
<td class="catHead" colspan="7" height="25"><span class="cattitle"> Die nächsten zwei EM-Spiele:</span></td>
</tr>
<!-- BEGIN emtip -->
<tr>
<td class="row1" align="center"> <span class="genmed">{emtip.GAME_TIME}</span> </td>
<td class="row1" align="right"> <span class="genmed"><img src="images/em/{emtip.TEAM_IMG1}"></span> </td>
<td class="row1" align="right"> <span class="genmed">{emtip.TEAM_NAME1}</span> </td>
<td class="row1" align="center"> <span class="genmed">-</span> </td>
<td class="row1" align="left"> <span class="genmed">{emtip.TEAM_NAME2}</span> </td>
<td class="row1" align="left"> <span class="genmed"><img src="images/em/{emtip.TEAM_IMG2}"></span> </td>
<td class="row1" align="center"> <span class="genmed">{emtip.GAME_LOC}</span> </td>
</tr>
<!-- END emtip -->
<tr>
<td class="catBottom" colspan="7" height="25"><span class="genmed">Die besten drei Tipper: {EM_AUSGABE}</span></td>
</tr>
</table><br />