|
v3 Arcade Add To Favourites In Game Play Area
I've noticed that there is no way of adding a game to your favourites whilst playing the game, at present you can only add via the category list or when submitting a score. Personally I think adding when playing makes more sense.
To do this, open your arcade.php file and find: Code:
// ############################################################################
// Play a game
// ############################################################################
if ($_REQUEST['do'] == 'play')
{
$vbulletin->input->clean_array_gpc('r', array(
'challengeid' => TYPE_UINT,
'gameid' => TYPE_UINT,
'resolution' => TYPE_INT,
'tid' => TYPE_UINT
));
Code:
$favcache = unserialize($vbulletin->userinfo['favcache']);
$show['fav'] = ($favcache[$vbulletin->GPC['gameid']]);
// set favorites
$favcache = unserialize($vbulletin->userinfo['favcache']);
if (!is_array($favcache))
{
$favcache = array();
}
In your v3ARCADE_PLAY template search for: Code:
<div class="blockrow" align="center">
<vb:if condition="!$show['challenge'] AND !$show['tournament']">
<img src="{vb:raw vboptions.arcadeimages}/backtip.gif" border="0" alt="" />
<vb:else />
{vb:rawphrase challenge_warning}
</vb:if>
</div>
Code:
<!-- favorites -->
<div class="blockrow" align="center">
<vb:if condition="$show['fav']">
<img src="{vb:raw vboptions.arcadeimages}/subfav.gif" id="fav_{vb:raw game.gameid}" class="point" onclick="dofav({vb:raw game.gameid})" alt="{vb:rawphrase sub_favorite}" border="0" />
<vb:else />
<img src="{vb:raw vboptions.arcadeimages}/addfav.gif" id="fav_{vb:raw game.gameid}" class="point" onclick="dofav({vb:raw game.gameid})" alt="{vb:rawphrase add_favorite}" border="0" />
</vb:if>
<span id="favlabel" onclick="dofav({vb:raw game.gameid})" style="cursor:pointer; text-decoration: underline">
<vb:if condition="$show['fav']">{vb:rawphrase sub_favorite}<vb:else />{vb:rawphrase add_favorite}</vb:if>
</span>
</div>
<!-- end of favorites -->
Download
Screenshots |
|||||||||