vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 3.5 Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=113)
-   -   v3arcade Favorites Mod (https://vborg.vbsupport.ru/showthread.php?t=101862)

amykhar 11-29-2005 06:26 PM

Sure it would Michael. You just have to change the code to make that happen. ;)

FleaBag 11-29-2005 06:30 PM

LOL. :D Nice work.

amykhar 11-29-2005 06:40 PM

This is why I hate releasing code :D I always forget stuff in the directions. I left out the code chunk from the top of the file.

Code:

Find:
---------
$footer = construct_phrase($vbphrase['arcade_end'], $vbulletin->options['arcadeimages']) . $footer;
----------
Add After:
---------
if ($_REQUEST['do']=='addfav')
{
                $vbulletin->input->clean_array_gpc('r', array(
          'gameid' => TYPE_INT
        ));
       
        $favuser = $vbulletin->userinfo[userid];
        $favgame = $vbulletin->GPC['gameid'];
        if($favuser AND $favgame)
        {
                // Make sure it's not in the user's favorites
                $eaalreadythere = $db->query_first("SELECT gameid FROM " .TABLE_PREFIX."eaarcade_favorites WHERE userid=$favuser and gameid=$favgame");
                if(!$eaalreadythere)
                {
                  $db->query_write("INSERT INTO " . TABLE_PREFIX . "eaarcade_favorites (userid, gameid) VALUES ($favuser,$favgame)");
          }
        }
        // Go to the favorites page
        $vbulletin->url = 'arcade.php?categoryid=2';
  standard_redirect($vbphrase['favorite_added'], true);
}

if ($_REQUEST['do']=='delfav')
{
                $vbulletin->input->clean_array_gpc('r', array(
          'gameid' => TYPE_INT
        ));
       
        $favuser = $vbulletin->userinfo[userid];
        $favgame = $vbulletin->GPC['gameid'];
        if($favuser AND $favgame)
        {
                // Make sure it's in the user's favorites
                $eaalreadythere = $db->query_first("SELECT * FROM " .TABLE_PREFIX."eaarcade_favorites WHERE userid=$favuser AND gameid=$favgame");
                if($eaalreadythere)
                {
                  $db->query_write("DELETE FROM " . TABLE_PREFIX . "eaarcade_favorites WHERE userid=$favuser AND gameid=$favgame");
          }
        }
        // Go to the favorites page
        $vbulletin->url = 'arcade.php?categoryid=2';
  standard_redirect($vbphrase['favorite_removed'], true);
}

---------


Vizionz 11-29-2005 07:02 PM

now it works perfect thanks amy

monstergamer 11-29-2005 07:51 PM

worrks now

...installed...

nintendo 11-29-2005 08:48 PM

Quote:

Originally Posted by Oblivion Knight
[high]* Oblivion Knight gives Amy a hug!
[/high]
Thank you! This is much better than the current default.. :D

Try to get John to make this the default version. This is what we all wanted, not the current crummy one that's not a favorites section at all.

Vizionz 11-29-2005 08:51 PM

yeah this and the users online you did oblivion should be default settings

Vizionz 11-29-2005 08:53 PM

it would be also nice to have a stats page where it shows the most played games the top gamers and top ten most played players. < that one i mean total games played in the arcade by that user.

amykhar 11-30-2005 12:33 AM

You guys do realize that John's probably never going to read this thread and it might be better to discuss your arcade wish list somewhere John'll read it, right?

Lea Verou 11-30-2005 01:21 AM

Installed and works flawlessly. Thank you :)

On little suggestion: Check if the user has added the game when he is browsing other categories and display the remove link instead of the add one even if the game is already added ;)


All times are GMT. The time now is 04:34 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01129 seconds
  • Memory Usage 1,739KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_code_printable
  • (1)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (3)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.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/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.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
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete