Version: 1.00, by amykhar
Developer Last Online: Nov 2013
Version: 3.5.1
Rating:
Released: 11-28-2005
Last Update: 01-31-2006
Installs: 38
DB Changes Template Edits
No support by the author.
As written, the favorites list is generated by the number of times a game is played. This modification changes that behavior so that users can select their own favorite games. It includes the ability to add and remove games from the favorites list.
I am not offering support for this modification. It is provided as-is. It is working fine for me, but I'm not guaranteeing that it will work for you.
Show Your Support
This modification may not be copied, reproduced or published elsewhere without author's permission.
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.
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.
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?
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?
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?