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)

vedman 12-03-2005 07:15 PM

Quote:

Originally Posted by Gizmo5h1t3
might be wise to add that this wont work with the alternative layout hack released on here......

I take it you're not referring to the template addition? :) That can be mangled to suit the alternate layout hack...

I use the alternate layout.. and games don't show up at all in specific categories (though "All" and "Random" games do appear).

Looks like it's this specific query in arcade.php:

PHP Code:

$games $db->query_read("SELECT arcade_games.*, favorites.favid AS favid, user.username, arcade_categories.catname FROM " TABLE_PREFIX "arcade_games AS arcade_games
        LEFT JOIN " 
TABLE_PREFIX "user AS user ON (arcade_games.highscorerid=user.userid)
        LEFT JOIN " 
TABLE_PREFIX "eaarcade_favorites AS favorites ON (favorites.gameid=arcade_games.gameid)
        LEFT JOIN " 
TABLE_PREFIX "arcade_categories AS arcade_categories ON (arcade_games.categoryid=arcade_categories.categoryid)
        " 
iif($vbulletin->GPC['categoryid']!=-1"WHERE favorites.userid="$vbulletin->userinfo[userid]." AND arcade_games.categoryid=" $vbulletin->GPC['categoryid'] . iif($bitfieldcheck" AND $bitfieldcheck"), iif($bitfieldcheck"WHERE $bitfieldcheck")) . "
        ORDER BY title ASC
        LIMIT 
$start, " $vbulletin->options['gamesperpage']); 

I'm guessing it's this...

PHP Code:

LEFT JOIN " . TABLE_PREFIX . "eaarcade_favorites AS favorites ON (favorites.gameid=arcade_games.gameid

Since there are no games in the favorites table initially, wouldn't that mean it doesn't match any games in the games table (and thus, none are displayed)? I don't know a lot about sql joins, but if they're anything like where conditions, if part of it doesn't match, it won't return any rows.

I'm sure it's something I'm doing wrong, since this mod obviously works for some people. One strange thing though - I don't see how it relates to the alternative layout mod (since that mod doesn't alter the "get games for specific category" query, above).

Despite all of that, it looks like a great mod, it makes v3arcade even more awesome (I'm an ibPro convert). Thanks a ton! Can't wait to get it working.

vedman 12-03-2005 10:02 PM

Ok, got it fixed. Hopefully this is useful to someone who has the same issue I had.

I downloaded the zip file this morning and installed it as is, so any additional code in this thread is not taken into account.

This is only for those using the alternate layout, and whose games are not showing up in any user-defined categories, after installing the Favorites mod.

However, I did add a line to arcadeadmin.php which deletes favorites whenever a game is removed... I guess anyone could use that. :nervous:

This is the first time I've written instructions for a hack, hopefully it makes sense.

.

dan35 12-06-2005 04:17 AM

I don't use the alternate layout, but the games are not showing up in specific categories after installing the Favorites mod.

Use your fix and it works ;)

Thanks Amy and Vedman!

FROGGYJ 12-08-2005 10:03 PM

installed~

Snake 12-09-2005 08:32 AM

Is this going to work fine on v3.5.2?

amykhar 12-09-2005 10:35 AM

Given that it doesn't change anything about VB, yes. This only changes arcade code.

Snake 12-09-2005 10:50 AM

Ah alright then.

dieselpowered 12-11-2005 07:21 PM

Quote:

Originally Posted by vedman
Ok, got it fixed. Hopefully this is useful to someone who has the same issue I had.

I downloaded the zip file this morning and installed it as is, so any additional code in this thread is not taken into account.

This is only for those using the alternate layout, and whose games are not showing up in any user-defined categories, after installing the Favorites mod.

However, I did add a line to arcadeadmin.php which deletes favorites whenever a game is removed... I guess anyone could use that. :nervous:

This is the first time I've written instructions for a hack, hopefully it makes sense.

.

Forgive this ignorant question, however, are we supposed to do this fix as well as the edits from the hack Amy posted?

I wonder why not not everyone reported that the games were not showing up in their specific categories...wouldn't that have affected everyone?

vedman 12-11-2005 09:04 PM

Quote:

Originally Posted by xtremeoff-road
Forgive this ignorant question, however, are we supposed to do this fix as well as the edits from the hack Amy posted?

My fix is based on the mod zip file only. The edits from the mod that were posted change it up a little, but not much.

My hack basically sets the $games query (for specific categories) back to the original code, and adds a small query to get the favorites seperately. It doesn't change what is called in the template, so it would actually fix the category problems with those not using the alt. layout mod, as long as you don't touch the template change.

Unless you understand PHP and see what changed, I'd recommend going one route or the other.

Quote:

Originally Posted by xtremeoff-road
I wonder why not not everyone reported that the games were not showing up in their specific categories...wouldn't that have affected everyone?

That's a good question. I installed this mod right after installing v3arcade, so maybe the fact that none of my games had been played had something to do with it?

dieselpowered 12-11-2005 09:27 PM

Thanks for the response...ok well I had already done the edits from the zip...and then saw you fix, so I did the edits you specified, therefore, I have edits from your file as well as Amy's. Should I upload a fresh arcade.php and only do your edits?


All times are GMT. The time now is 10:55 AM.

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.01084 seconds
  • Memory Usage 1,754KB
  • 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
  • (2)bbcode_php_printable
  • (4)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)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