View Full Version : [CMPS v2.0 RC1][ibProArcade v2.5.1] Random Game V1.1 Using AJAX Tech
untold4you
06-18-2005, 01:55 PM
Displays a random arcade game in a side block refreshing itself every x seconds without the need of a complete page refresh thanks to AJAX Tech.
Install:
Install the "randomgame.module" in you vBa CP
Upload "ajax.random_arcade_game.php" To your forum root
Settings:
Open "ajax.random_arcade_game.php"
Find:
/* Path to arcade images */
$path = "/forum/arcade/images/"; //---> Do not forget the '/' --->
$path = Fill in the correct path to your arcade images.
Open template: adv_portal_arcade_random_game
Find:
<!-- Set interval here -->
var interval = 6000
<!-- / Set interval here -->
Change the interval amount to your needs, given in miliseconds.
Your done! Have Fun.
Note: IE Is a ***** :p
Michael-MI
07-31-2005, 01:01 PM
Hi there,
I am getting a Fatal error: Call to a member function on a non-object in C:\Program Files\Ensim\Sitedata\*****\Inetpub\wwwroot\forums\ajax.random_arcade_game.php on line 39
Any ideas?
Thank you!
Michael
pepel13
08-25-2005, 11:26 AM
Hi there,
I am getting a Fatal error: Call to a member function on a non-object in C:\Program Files\Ensim\Sitedata\*****\Inetpub\wwwroot\forums\ajax.random_arcade_game.php on line 39
Any ideas?
Thank you!
Michael
Got the same error :confused:
untold4you
08-26-2005, 04:12 AM
This is what's on line 39:
/* Get a game random from the database */
$game = $DB_site->query_first(
"SELECT gid, gname, gtitle, gwords FROM
" . TABLE_PREFIX . "games_list WHERE active='1' ORDER BY RAND() LIMIT 1"
);
What version of vbulletin, vBa are you using ??
Mark.B
08-27-2005, 02:50 PM
I have it working on 3.0.7
http://www.bowlandcentral.com
Mark.B
08-28-2005, 04:39 AM
Hmm..I have had to switch it off.
What it does, if someone has the vba page up, is it shows them in your whos online as being in the arcade. If they then go away and leave the PC, they refresh in the whos online every time the arcade game changes, thus they stay online in your forums until they change pages.
untold4you
08-28-2005, 05:15 AM
Hmm..I have had to switch it off.
What it does, if someone has the vba page up, is it shows them in your whos online as being in the arcade. If they then go away and leave the PC, they refresh in the whos online every time the arcade game changes, thus they stay online in your forums until they change pages.
Noticed that to, but that has nothing to do with my module. See, the online bit is checked in the index file.
// ibproarcade modification
globalize($_REQUEST, array(
'act' => STR_NOHTML,
'showuser' => INT
));
if(isset($act) && $act == 'Arcade') {
include "arcade.php";
exit();
}
if(isset($showuser) && $showuser >= 1) {
$u = $showuser;
$_GET['u'] = $showuser;
include "member.php";
exit();
}
// end of ibproarcade modification
This is where the online thing get screwed imo, see this in includes/functions_online.php
case 'index':
//ibProArcade
if(strpos($userinfo['location'], "act")) {
$urlstring = substr($userinfo['location'], strpos($userinfo['location'], "?") + 1, strlen($userinfo['location']) - (strpos($userinfo['location'], "?") + 1));
$urlvars = explode("&", $urlstring);
foreach($urlvars as $key => $value) {
$temp = explode("=", $value);
$realvars[$temp[0]] = $temp[1];
}
$actionwords = explode("|", $lang['WHERE_Arcade']);
switch($realvars['do']) {
case 'play':
$userinfo['action'] = $actionwords[0] . "<a href=\"$vboptions[forumhome].php?act=Arcade&do=play&gameid=$realvars[gameid]\">" . $games[$realvars['gameid']] . "</a>";
break;
case 'stats':
$userinfo['action'] = $actionwords[1] . "<a href=\"$vboptions[forumhome].php?act=Arcade&do=stats&gameid=$realvars[gameid]\">" . $games[$realvars['gameid']] . "</a>";
break;
default:
$userinfo['action'] = "<a href=\"arcade.php?$session[sessionurl]\">" . $lang['arcade_home'] . "</a>";
break;
}
} else {
$userinfo['action'] = $vbphrase['viewing_index'];
$userinfo['where'] = "<a href=\"$vboptions[forumhome].php?$session[sessionurl]\">$vboptions[bbtitle]</a>";
}
//ibProArcade
break;
So the arcade is really looking in the index, that should explain why it shows up as if you are in the arcade. (Look here to find out more about the online bit: http://www.vbulletin.org/forum/showthread.php?t=62164)
Gr3łTz!
Mark.B
08-28-2005, 05:26 AM
\hmm that's a bit of a pain.
I wonder if someone knows of any changes that could be made to the arcade that would workaround this?
Neutral Singh
09-22-2005, 09:52 AM
Has anybody got it running on vB 3.5 RCx ??
Teepeg
01-17-2006, 06:06 PM
Has anybody got it running on vB 3.5 RCx ??
*BUMP*
No it does not work on 3.5
zdig1
10-04-2007, 10:09 PM
is it working with cmps 3.0 rc2 and ibparcade 2.6.4
i need one without refresh can you help me ?
megamoose
01-06-2008, 12:19 PM
To get this working I just changed all the:
$DB_site->
to
$db->
It seemed to work okay for me then.
Mark
vBulletin® v3.7.2, Copyright ©2000-2008, Jelsoft Enterprises Ltd.