Jump to content

Making a games website but can't figure something out


Justinx89x

Recommended Posts

How can I modify my template file to put something like this...

[img src=\"http://www.dxcr.com/whatiwant.JPG\" border=\"0\" alt=\"IPB Image\" /]

here...
[img src=\"http://www.dxcr.com/whatihave.JPG\" border=\"0\" alt=\"IPB Image\" /]

The template file I am trying to change is the file that has the template for everytime a game is opened. I want my users to be able to see a code that they can copy and paste on to their site.
Here is my template code...<br>
[code]
<?php
$templates = array();

$templates['category'] = '<div class=\"header\">{$category[\'cName\']}</div>
{$gamedata}';

$templates['game'] = '<div class=\"game\">
<p class=\"img\">
<img src=\"{$this->imgdir}/{$game[\'gThumb\']}\" alt=\"{$game[\'gName\']} - {$game[\'gDescription\']}\" />
</p>
<p class=\"ic\">
<strong>{$game[\'gName\']}</strong>
<br />
{$game[\'gDescription\']}
<br />
<strong><a href=\"{$_SERVER[\'PHP_SELF\']}?act=play&id={$game[\'gId\']}\">Play</a></strong>
</p>
<div style=\"clear:both\"></div>
</div>';
                
                
$templates['gdoublewrapper'] = '<div>
{$games}
<div style=\"clear:both\"></div>
</div>';


$templates['list_wrapper_all'] = '<div class=\"header\">{$action}</div>
<p class=\"general\" style=\"margin-bottom: 10px;\">
{$list}
</p>';

$templates['list_repeat_all'] = '<a href=\"{$_SERVER[\'PHP_SELF\']}?act=play&id={$stat[\'gId\']}\">{$stat[\'gName\']}</a><em>{$extra}</em><br />';

$templates['game_play'] = '
<div class=\"playcenter\">
<p class=\"header\">{$game[\'cName\']} » {$game[\'gName\']}</p>
<object classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" codebase=\"http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0\" width=\"{$game[\'gWidth\']}\" height=\"{$game[\'gHeight\']}\">
  <param name=\"movie\" value=\"{$this->swfdir}/{$game[\'gSwfFile\']}\" />
  <param name=\"quality\" value=\"high\" />
  <embed src=\"{$this->swfdir}/{$game[\'gSwfFile\']}\" quality=\"high\" pluginspage=\"http://www.macromedia.com/go/getflashplayer\" type=\"application/x-shockwave-flash\" width=\"{$game[\'gWidth\']}\" height=\"{$game[\'gHeight\']}\"></embed>
</object>
<p class=\"header\"> </p>
<p class=\"general\"><strong>Description: </strong>{$game[\'gDescription\']}<br />

<strong>Player: </strong>You are player number {$this->gamedata[$game[\'gInCategory\']][\'games\'][$game[\'gId\']][\'Played\']}</p>
<br>

</div>';

?>[/code]
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.