Go Back   vb.org Archive > vBulletin Modifications > vBulletin 4.x Modifications > vBulletin 4.x Add-ons
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
v3 Arcade Add To Favourites In Game Play Area Details »»
v3 Arcade Add To Favourites In Game Play Area
Version: 1.00, by Gemma Gemma is offline
Developer Last Online: Nov 2023 Show Printable Version Email this Page

Category: Add-On Releases - Version: 4.x.x Rating:
Released: 04-28-2011 Last Update: Never Installs: 26
Template Edits
Re-useable Code Code Changes  
No support by the author.

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
    ));
Below that add:

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();
    }
Save the file and re-upload

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>
Below that add:

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 -->
If anyone wants to further develop any of my addons, you are free to do so.

Download Now

File Type: txt Add Favourites To Game Play Area.txt (2.5 KB, 40 views)

Screenshots

File Type: jpg favs.jpg (84.0 KB, 0 views)

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #2  
Old 04-30-2011, 09:09 AM
Rckcrwlr Rckcrwlr is offline
 
Join Date: Dec 2008
Location: PA
Posts: 182
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Tagged
Reply With Quote
  #3  
Old 05-02-2011, 05:22 PM
MortysTW MortysTW is offline
 
Join Date: Mar 2005
Location: Southern CA, USA
Posts: 272
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Nice!
Reply With Quote
  #4  
Old 05-03-2011, 07:38 AM
TEMPESTADE TEMPESTADE is offline
 
Join Date: Dec 2010
Posts: 49
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

very nice!!
Reply With Quote
  #5  
Old 05-30-2011, 04:08 PM
CK CK is offline
 
Join Date: Dec 2007
Location: http://xenforo.com/
Posts: 241
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Added great, thanks.

I wonder if anyone will be picking any of this up in Gemmas absence?
Reply With Quote
  #6  
Old 05-31-2011, 02:21 AM
nacaruncr nacaruncr is offline
 
Join Date: Nov 2010
Posts: 318
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Could you do it for ibProArcade?
It's awesome modification thanks
Reply With Quote
  #7  
Old 05-31-2011, 05:42 PM
Gemma's Avatar
Gemma Gemma is offline
 
Join Date: Apr 2004
Location: Scotland
Posts: 1,229
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by nacaruncr View Post
Could you do it for ibProArcade?
No but I'm sure someone who uses IbProArcade could do something similar
Reply With Quote
  #8  
Old 05-31-2011, 07:39 PM
nacaruncr nacaruncr is offline
 
Join Date: Nov 2010
Posts: 318
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

ok thank you
I going to try it... I only stand don't destroy it XD jajajajaa

thank you
Reply With Quote
  #9  
Old 08-17-2011, 07:06 PM
steve1966 steve1966 is offline
 
Join Date: Dec 2007
Posts: 504
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

working perfect thank you
Reply With Quote
  #10  
Old 05-23-2012, 07:55 PM
doubleclick doubleclick is offline
 
Join Date: Jul 2004
Posts: 218
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I added this, and you're right, this is exactly where it should be!

I'm having one issue with this in that the phrase never changes from "Add to Favorites" This is whether I click the icons or the words. The icons switch back and forth as they should, and so does the alt text. But the phrase stays the same.

I just upgraded to 4.2.0 so I don't know if this is just a coincidence or not, but worth mentioning.

---just noticed that the words actually staying the same no matter what the phrase is, depending on where it starts after a page load. When page refreshes, the icon, words, and alt text all match and correct. However, from then on, clicking doesn't change the words.
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 02:10 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.07002 seconds
  • Memory Usage 2,321KB
  • Queries Executed 24 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (4)bbcode_code
  • (1)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (4)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (9)postbit
  • (2)postbit_attachment
  • (10)postbit_onlinestatus
  • (10)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_attachment
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete