vB Arcade - Oyunun Boyutunu Değiştirme

Dark_Angel

Webmaster
Yönetici



arcade.php dosyasını açın ve alttakini bulun;

PHP:
globalize($_GET, array('gameid'=>INT, 'do'=>STR_NOHTML));
alttaki ile değiştirin;

PHP:
globalize($_GET, array('gameid'=>INT, 'do'=>STR_NOHTML, 'resolution' => STR_NOHTML));
alttakini bulun;

PHP:
$thisGame = $DB_site->query_first("SELECT * FROM " . TABLE_PREFIX . "games WHERE gameid=$gameid");
hemen altına ekleyin;

PHP:
$gwidth = $thisGame['width'];
    $widthhalf = round($thisGame['width'] * .50);
    $width3q = round($thisGame['width'] * .75);
    $width1qx = round($thisGame['width'] * 1.25);
    $width2qx = round($thisGame['width'] * 1.50);
    $width3qx = round($thisGame['width'] * 1.75);
    $width2x = round($thisGame['width'] * 2);
    
    $gheight = $thisGame['height'];
    $heighthalf = round($thisGame['height'] * .50);
    $height3q = round($thisGame['height'] * .75);
    $height1qx = round($thisGame['height'] * 1.25);
    $height2qx = round($thisGame['height'] * 1.50);
    $height3qx = round($thisGame['height'] * 1.75);
    $height2x = round($thisGame['height'] * 2);

    switch ($resolution)
    {
        case 'half':
            $thisGame['width'] = $widthhalf;
            $thisGame['height'] = $heighthalf;
            break;
        case 'threeq':
            $thisGame['width'] = $width3q;
            $thisGame['height'] = $height3q;
            break;
        case 'plus25':
            $thisGame['width'] = $width1qx;
            $thisGame['height'] = $height1qx;
            break;
        case 'plus50':
            $thisGame['width'] = $width2qx;
            $thisGame['height'] = $height2qx;
            break;
        case 'plus75':
            $thisGame['width'] = $width3qx;
            $thisGame['height'] = $height3qx;
            break;
        case 'times2':
            $thisGame['width'] = $width2x;
            $thisGame['height'] = $height2x;
            break;        
        default:
            $resolution = 'none';
            $thisGame['width'] = $thisGame['width'];
            $thisGame['height'] = $thisGame['height'];
    }

    $ressel[$resolution] = 'selected="selected"';
arcade_play template nı acıp alttaki kodu bulun;

PHP:
<span class="smallfont"><a href="$vboptions[bburl]/arcade.php">Back to the Arcade</a><br><a href="$vboptions[bburl]/arcade.php?do=scores&name=$thisGame[shortname]">View High Scores</a></span></td></tr>
  <tr><td class="alt1" align="center"><img src="$stylevar[imgdir_arcade]/backtip.gif" border=0></td>
altına ekle

PHP:
</tr>
<tr><td id="gameres" class="alt2"><span class="smallfont">
<if condition="$show['popups']">
<a href="#top">Resolution: $thisGame[width] x $thisGame[height]</a> <script type="text/javascript"> vbmenu_register("gameres"); </script>
<else />
<form action="arcade.php" method="get">
<input name="do" type="hidden" value="play" />
<input name="gameid" type="hidden" value="$gameid" />

Resolution: <select name="resolution" onchange="this.form.submit();">
<option $ressel[half] value="half">$widthhalf x $heighthalf</option>
<option $ressel[threeq] value="threeq">$width3q x $height3q</option>
<option $ressel[none] value="none">$gwidth x $gheight</option>
<option $ressel[plus25] value="plus25">$width1qx x $height1qx</option>
<option $ressel[plus50] value="plus50">$width2qx x $height2qx</option>
<option $ressel[times2] value="times2">$width2x x $height2x</option></select> $gobutton
</form>
</if>
</span>
alttakini bul;

PHP:
<tr><td class="alt1" align="center"><img src="$stylevar[imgdir_arcade]/backtip.gif" border=0></td>
</table>
</td>
</tr></table>
hemen altına ekle;

PHP:
<div class="vbmenu_popup" id="gameres_menu" style="display:none">
    <table cellpadding="4" cellspacing="1" border="0">

        <tr>
            <td align="center" class="vbmenu_option"><b><a href="arcade.php?$session[sessionurl]do=play&gameid=$thisGame[gameid]&resolution=half">$widthhalf x $heighthalf</a></b></td>
        </tr>

        <tr>
            <td align="center" class="vbmenu_option"><b><a href="arcade.php?$session[sessionurl]do=play&gameid=$thisGame[gameid]&resolution=threeq">$width3q x $height3q</a></b></td>
        </tr>

        <tr>
            <td align="center" class="vbmenu_option">      <b><a href="arcade.php?$session[sessionurl]do=play&gameid=$thisGame[gameid]">$gwidth x $gheight</a></b>      </td>
        </tr>

        <tr>
            <td align="center" class="vbmenu_option"><b><a href="arcade.php?$session[sessionurl]do=play&gameid=$thisGame[gameid]&resolution=plus25">$width1qx x $height1qx</a></b></td>
        </tr>
        <tr>
            <td align="center" class="vbmenu_option"><b><a href="arcade.php?$session[sessionurl]do=play&gameid=$thisGame[gameid]&resolution=plus50">$width2qx x $height2qx</a></b></td>
        </tr>
        <tr>
            <td align="center" class="vbmenu_option"><b><a href="arcade.php?$session[sessionurl]do=play&gameid=$thisGame[gameid]&resolution=plus75">$width3qx x $height3qx</a></b></td>
        </tr>

        <tr>
            <td align="center" class="vbmenu_option"><b><a href="arcade.php?$session[sessionurl]do=play&gameid=$thisGame[gameid]&resolution=times2">$width2x x $height2x</a></b></td>
        </tr>

    </table>
</div>
 
Üst