Ich m�chte auf meinem Forum Flash-Games anbieten, die man �ber ein Men� ausw�hlen kann.
Leider bekomm ich es nicht hin, dass im {sender} die URL des Games steht.
games.php
Code: Alles auswählen
<?php
define('IN_PHPBB', true);
$phpbb_root_path = './';
include($phpbb_root_path . 'extension.inc');
include($phpbb_root_path . 'common.'.$phpEx);
$userdata = session_pagestart($user_ip, PAGE_INDEX);
init_userprefs($userdata);
$page_title = 'Games';
include($phpbb_root_path . 'includes/page_header.'.$phpEx);
$template->set_filenames(array(
'game_body' => 'game_body.tpl'
));
$template->assign_vars(array(
'txt_1' => 'Simon Sagt',
'txt_2' => 'Straight Pool Billiards',
'txt_3' => 'Blox Forever',
'txt_4' => 'Gold Miner Joe',
'txt_5' => 'Star Ball Online',
'txt_6' => 'Puissance 4',
'url_1' => 'games/simon.swf',
'url_2' => 'games/billiards.swf',
'url_3' => 'games/bloxforever.swf',
'url_4' => 'games/goldminer.swf',
'url_5' => 'games/starball.swf',
'url_6' => 'games/puissance4.swf',
'submit' => ''.$PHP_SELF.'',
'sender' => ''.$sender.''
));
$template->pparse('game_body');
include($phpbb_root_path . 'includes/page_tail.'.$phpEx);
?>
game_body.tpl
Code: Alles auswählen
<a href="{U_INDEX}" class="nav">{L_INDEX}</a>
<table width="100%" border="0" cellpadding="4" cellspacing="1" class="forumline"><form action="{submit}" id="selector" method="post">
<tr>
<th class="thTop">:: Games ::</th>
</tr>
<tr>
<td class="row1" colspan="2">
<select name="sender" onchange="document.getElementById('selector').submit()" style="width:226; color:#4d4d4d; font-family:Tahoma; font-size:11px; background-color:#f1f4dd">
<option value=""> Hier Game ausw�hlen </option>
<option value="{url_1}" > {txt_1}</option>
<option value="{url_2}" > {txt_2}</option>
<option value="{url_3}" > {txt_3}</option>
<option value="{url_4}" > {txt_4}</option>
<option value="{url_5}" > {txt_5}</option>
<option value="{url_6}" > {txt_6}</option>
</select></td>
</tr>
<tr>
<td class="genmed" align="justify"><object width="600" height="500"
data="{sender}"
type="application/x-shockwave-flash">
<param name="movie" value="{sender}">
<param name="menu" value="false">
<param name="quality" value="autohigh">
<param name="wmode" value="transparent">
</object>
</td>
</tr>
</td>
</tr>
</form>
</table>