vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 4.x Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=245)
-   -   Add-On Releases - v3 Arcade - Professional vBulletin Gaming (vB4) (https://vborg.vbsupport.ru/showthread.php?t=253211)

KW802 11-04-2010 10:00 PM

v3 Arcade - Professional vBulletin Gaming (vB4)
 
1 Attachment(s)
v3 Arcade is now a member of the vBadvanced family!

http://www.vbadvanced.com/forum/showthread.php?t=47571

The support forums & data from v3Arcade.com have been merged into the vBadvanced.com site.



=================================
v3 Arcade for vBulletin 4.x.x
For vBulletin 3.x.x, please see here.
=================================

Please note... until v3Arcade.com is upgraded to vBulletin 4, some demo sites can be found here. Also, because of styling changes introduced in vB 4.0.8 to allow customized user profile pages, this version requires 4.0.8+ to be installed.

"v3 Arcade" is the premiere arcade system written specifically for vBulletin. It's coded from scratch - not a port of an older version - and because it was coded specifically for vBulletin it uses the product system for code modifications & utilizes AJAX technology throughout. Here's a brief rundown of the features in this version of v3 Arcade.

Supports MochiAds, v3 Arcade and IBPArcade games!
  • Download THOUSANDS of *legal* free and premium games directly from Mochi Media to your v3 Arcade installation. Earn money from people playing games on your site! :eek: With just a few mouse clicks you download games directly from within your ACP or from the Mochi Media web site. You have to check it out it to see just how easy it is.
  • Tournaments! Challenge your friends to see who the champ is! :D
  • Integrated arcade statistics on your user's profile pages!
  • AJAX based instant ratings, for simple to use game ratings.
  • AJAX based inline score moderation.
  • AJAX based instant game searching.
  • Tabbed, customizable categories.
  • Challenge system for one-on-one contests.
  • User-permission based settings for email/PM notification, challenge settings.
  • Streamlined viewing modes for users with lower resolutions.
  • AJAX based quick stats, for viewing statistics by passing the cursor over a username.Mass import tools for importing games in bulk.
  • Reverse and decimal based scoring.
  • Arcade-only closure with customizable message.
  • Per game criteria, allows you to control access to games by reputation, posts, registration length.
  • Postbit based awards.
  • Personalized recommendations for other games users might like, based on what they?re playing.
  • Quick stats, letting a user know how many other scores are above and below theirs.
  • Score ranking.
  • Admin customizable ?score feedback?, displays a message based on how well as user has done.
  • Numerous Admin CP settings to control things like popup opacity, maximum comment length, hover delay length, and numerous other behaviors.
  • Full admin control over the types of content allowed in comments (BB code, HTML, smilies, etc.)
  • Usergroup based access permissions.
  • Fully phrased, for each translation into other languages.
  • An ever growing collection of third party add-ons
  • A slick, professional layout.
  • Edit-free template updates!
  • User ability to specify viewing resolution while playing games.
v3 Arcade for vBulletin 4 also has some feature differences versus v3 Arcade for vBulletin 3. Currently that list includes....
  • The separate Arcade navbar has been replaced with the options being moved up to the standard vB navbar. Be sure to turn on the navbar link! (ACP => v3 Arcade => v3 Arcade Settings => v3 Arcade General Settings => Navbar Link Position)
  • When viewing a game categories other than the 'All' category, the category name will now be included in the navbar breadcrumbs.
  • Added a new template "v3arcade_postbit_userid_trophy_wrapper" to allow adding some HTML around the arcade award images in the postbit.
  • The category tabs shown on the main page will use the vB styling instead of their own defined styles. As we go forward the vB4 version of v3A will lose more & more of it's custom styling and instead use more of the new vB4 styling features elements.
  • New option to display a "New" game category tab that will display all games in newest to oldest order. In addition to the new tab a "New Games" link will also be shown in the vB "What's New" navbar link. (ACP => v3 Arcade => v3 Arcade Settings => v3 Arcade Homepage Settings => Display "New" Category Tab)
=================================
Branding Free
=================================
All v3 Arcade installations carry and require a small "v3 Arcade" logo in the footer, as well as the text "Powered by v3 Arcade" which links to http:www.v3arcade.com. For information on legally removing the branding, please visit www.v3arcade.com.


=================================
www.v3arcade.com
=================================
If you're looking for more games, add-ons, support, tutorials, or anything Arcade related - www.v3arcade.com is the place to go. :)


=================================
Copyright
=================================
All code & images distributed in this zip is Copyright ?2010 CinVin, with the following exceptions:
  • class_tar.php - Credits within.
  • All games & associated images, unless otherwise noted.
=================================
Many thanks to...
=================================
  • All branding-free customers and donors, for supporting the project!
  • John, the original founder behind the v3 Arcade platform. :cool:
  • Tigga, the v3 Arcade lead developer (as well as all of the vBadvanced products! ;))
  • Everybody who has provided feedback & suggestions to help us make v3 Arcade to be the best arcade platform.
=================================
Change Log
=================================
For the complete change log, please click here. The change log is getting too big to include inline with this thread. ;)

KW802 11-05-2010 06:19 PM

{reserved for screen shots, misc. stuff going forward, etc.}...

numberguy 11-05-2010 06:42 PM

How do I go from ibProArcade for vBulletin, to V3 arcade for vBulletin? will there be an issue with the .tar files? will the new system adapt?

I am relatively new to this, but know enough to maintain a healthy board. I just don't want to mess my arcade up as it is now---it works!

KW802 11-05-2010 07:27 PM

Quote:

Originally Posted by numberguy (Post 2118390)
How do I go from ibProArcade for vBulletin, to V3 arcade for vBulletin? will there be an issue with the .tar files? will the new system adapt?

I am relatively new to this, but know enough to maintain a healthy board. I just don't want to mess my arcade up as it is now---it works!

NumberGuy,

Before you doing anything, make a backup copy of your vB database! That is always the first to be done before any type of update to your site.

After that follow the steps here carefully. The most important things to remember are (a) backups, backups, backups, and (b) not to uninstall your existing arcade until you are comfortable with how your new v3A installation is working.

For the .tar files question, do you mean installing new games or existing games? If you mean existing games then those .tar files unpacked during installation and the original .tar files remove. That's the way it works with both your existing arcade and v3A. Check the /games folder on your server and you can find the actual games files. As long as you do not uninstall or delete anything from your server then everything should be imported fine and, if need be, reverted back to your existing arcade.

numberguy 11-05-2010 08:12 PM

Thank-you, KW802!

Should I switch from ibProArcade - professional Arcade System for vBulletin, or go to v3 and why? If you don't mind me asking.

sorry, english is my second language.

KW802 11-05-2010 09:50 PM

Quote:

Originally Posted by numberguy (Post 2118425)
Thank-you, KW802!

Should I switch from ibProArcade - professional Arcade System for vBulletin, or go to v3 and why? If you don't mind me asking.

sorry, english is my second language.

That is not the easiest answer because everybody will have a different opinion on it. My opinion will be a bit biased because v3 Arcade is my project. But, with that said, a few things to consider would be...

- v3 Arcade has been designed from scratch to work with vBulletin; the other arcade was not.

- v3 Arcade has a dedicated support site; the other arcade does not.

- v3 Arcade has support for Mochi Media games, which can help bring in some revenue to your site and provides you with access to thousands of free games; the other arcade does not.

- v3 Arcade has a dedicated lead developer; the other arcade, at least at the present time, does not appear to.

- v3 Arcade is constantly adding new features and looking for ways to make integration with vBulletin easier (and hence why there are two separate versions for vB3 & vB4); the other arcade seems to rely mostly upon hacks & fixes submitted by users.


Again, though, that is just my own personal opinion. Some people love the other arcade and find no problems with it on their site.

Trip3151 11-05-2010 10:00 PM

v3 Arcade = Supported - own community - easy to install games - easy to install - no template changes


ibProArcade = Not supported - Issues with VB4 - poor support , heaps of template / tweaks changes to get it to work with VB4 saying that there is 1 guy that has been working out the fixes for VB4.

present day v3 Arcade is 100% yes to go with

Just my thoughts :)

KevinL 11-05-2010 10:01 PM

Awesome work!

cory_booth 11-05-2010 10:18 PM

I get the security tokin is missing with an arcade score save - is there any code for the index.php?

KW802 11-05-2010 10:32 PM

Quote:

Originally Posted by cory_booth (Post 2118462)
I get the security tokin is missing with an arcade score save - is there any code for the index.php?

Cory, thanks for reminding about that. :)

Because there is no corresponding plugin available for us to use to capture IPB scores in the CMS page, like there is in the forum home page, there is a file edit needed.

FAQ: IPB Scores Not Saving With vB4 Suite CMS


For vBadvanced CMPS users who have vBa CMPS as their home page and they have vBa CMPS in the same folder as vBulletin, you will also need to do an edit for saving IPB scores for the same reason as the CMS users (because the plugin available to use in the forum home page is not available to us in the vBa CMPS page).

FAQ: IPB Scores Not Saving With vBadvanced CMPS


Don't worry, we tried making it as simple as possible so it is just a one-line change.

cory_booth 11-05-2010 10:40 PM

Thanks! Yep, that did it and I must say - seems MUCH faster than the other.
Scores are saving where they didn't before - that's cool!

I was looking forward to this release as it will get my games in the right format for a "different" forum I have... :-)

cory_booth 11-05-2010 10:46 PM

OK...
So let me get the smack now if I missed the post on v3arcade...

But...
Are there any ready available php scripts for building a CMPS or PHP Widget for scores?

cory_booth 11-05-2010 10:50 PM

One issue...
I noticed I had to enable Tournaments to get permission to play a game.
I set all Arcade permissions to "yes" for admin - got No permission
I then saw the tournament and set all to "yes" and was allowed.

Strange I needed to enable tournaments for the aracde?

KW802 11-05-2010 11:41 PM

Quote:

Originally Posted by cory_booth (Post 2118469)
OK...
So let me get the smack now if I missed the post on v3arcade...

But...
Are there any ready available php scripts for building a CMPS or PHP Widget for scores?

There is the "Stats" module available for vBa CMPS on vB4. That is the big module (like what is shown on the front page of v3A.com) converted for vB4. That seems to the one most people wanted converted over. If you see any other 'arcade' related modules that you'd like to see converted over just point me in the direction. :)

Quote:

Originally Posted by cory_booth (Post 2118470)
One issue...
I noticed I had to enable Tournaments to get permission to play a game.
I set all Arcade permissions to "yes" for admin - got No permission
I then saw the tournament and set all to "yes" and was allowed.

Strange I needed to enable tournaments for the aracde?

I will try to recreate that one. There should be no relation between the tournament permissions and being able to play a game but there is always the chance that I was coding after midnight again. (Programmers are like mogwai; there are certain things they shouldn't do after midnight.).

Magz 11-05-2010 11:46 PM

Hi Just wondering if its possible to run v3arcade as well as ipbproarcade ? If so what steps would be needed to ensure no conflicts etc ?

KW802 11-06-2010 12:19 AM

Quote:

Originally Posted by Magz (Post 2118483)
Hi Just wondering if its possible to run v3arcade as well as ipbproarcade ? If so what steps would be needed to ensure no conflicts etc ?

Out of the box, no, they would conflict since both platforms will end up trying to save scores being submitted. With the 2.0.0 v3A rewrite we went through and tried making sure that all of the v3A assets (templates, phrases, files, etc.) were uniquely prefixed. Some may have been missed but to date we have not gotten any feedback that are any remaining asset conflicts. So the short answer is... no known conflicts of assets but there are conflicts when trying to save scores because IPB can use IPB & v3A games and v3A can use v3A & IPB games (and Mochi games as well).

However it shouldn't be that hard to do something where both are installed and IPB is only used for one type of game (eg: IPB games) and v3A is used for other types of games (eg: v3A formatted games and Mochi games). It would be matter of renaming IPB's 'index.php' to something else, updating the IPB templates to point to the new name, turning off any IPB related plugins that are being used for v3A compatibility, use IPB for only IPB formatted games, installing v3A as normal, turn off v3A's plugins for IPB compatibility, and then use v3A only for v3A formatted games & Mochi games.

It is not something that I personally have done but I know others have. If you can reach him, "Mark.B" in the vB support forums might be able to give some pointers since he is doing this on his vB3 site. Check http://www.bowlandcentral.com/ and in the "Arcades" drop-down list the "Yellow Arcade" is v3 Arcade and the "Blue Arcade" is IPB.

K4GAP 11-06-2010 12:27 AM

I have hundreds of games that have an ".rar" file extension. I've looked over all the posts looking for any mention of how to install these games with the .rar extension...
Any help would be greatly appreciated.

KW802 11-06-2010 12:50 AM

Quote:

Originally Posted by GaryT (Post 2118499)
I have hundreds of games that have an ".rar" file extension. I've looked over all the posts looking for any mention of how to install these games with the .rar extension...
Any help would be greatly appreciated.

A ".rar" file a compressed file, like ".zip" or ".tar" files. IPB games are typically packed as a .tar file and both v3 Arcade and IPB are able to uncompress them to extract & install the games.

My memory may be fuzzy but I don't recall IPB being able to work with a .rar file directly.

If you take a look inside of the .rar file (using something line WinRar), what is there? Just the game files (a .swf file and .gif files) or a .tar file? Are these IPB games or v3A games or something else?

cory_booth 11-06-2010 01:42 AM

Quote:

Originally Posted by KW802 (Post 2118481)
There is the "Stats" module available for vBa CMPS on vB4. That is the big module (like what is shown on the front page of v3A.com) converted for vB4.

Thanks...
After some serious hacking and slashing I was able to run this as a CMS Widget.

Starting to look real good!

cory_booth 11-06-2010 02:07 AM

One more permission error.

This time with playing a Mochi(sp) game.
Attempt to save uses the following:
http://xxx.com/arcade.php?sessdo=burn&mochigame=5173

This brings back a "you don't have access".
This is with an "Admin" account with everything on or Yes

KW802 11-06-2010 02:19 AM

Quote:

Originally Posted by cory_booth (Post 2118526)
One more permission error.

This time with playing a Mochi(sp) game.
Attempt to save uses the following:
http://xxx.com/arcade.php?sessdo=burn&mochigame=5173

This brings back a "you don't have access".
This is with an "Admin" account with everything on or Yes

Is it all Mochi games or just one? If all Mochi games, then please check item #6 of the Mochi FAQ.

You'll also want to make you aren't using an ad blocker in your browser since that'll block the communications to bounce & verify the score against the Mochi servers.

K4GAP 11-06-2010 03:37 AM

Quote:

Originally Posted by KW802 (Post 2118508)
A ".rar" file a compressed file, like ".zip" or ".tar" files. IPB games are typically packed as a .tar file and both v3 Arcade and IPB are able to uncompress them to extract & install the games.

My memory may be fuzzy but I don't recall IPB being able to work with a .rar file directly.

If you take a look inside of the .rar file (using something line WinRar), what is there? Just the game files (a .swf file and .gif files) or a .tar file? Are these IPB games or v3A games or something else?

Contents after unzipping a random .rar game folder....

basketballrally1.gif
basketballrally2.gif
basketballrally.game.php
basketballrally.swf


Any clues?

KW802 11-06-2010 04:13 AM

Quote:

Originally Posted by GaryT (Post 2118550)
Contents after unzipping a random .rar game folder....

basketballrally1.gif
basketballrally2.gif
basketballrally.game.php
basketballrally.swf


Any clues?

Mind posting the contents of the .php file (either here or v3A.com)? To give some insight, years ago games were being distributed with an installation .php script so that each game was installed manually one at a time via it's own script instead of as a batch import. The contents of the .php will tell us what we're dealing with (whether they are IPB formatted games or v3A formatted games and how they were expected to be installed).

Veer 11-06-2010 06:12 AM

Quote:

Originally Posted by KW802 (Post 2118454)
That is not the easiest answer because everybody will have a different opinion on it. My opinion will be a bit biased because v3 Arcade is my project. But, with that said, a few things to consider would be...

- v3 Arcade has been designed from scratch to work with vBulletin; the other arcade was not.

- v3 Arcade has a dedicated support site; the other arcade does not.

- v3 Arcade has support for Mochi Media games, which can help bring in some revenue to your site and provides you with access to thousands of free games; the other arcade does not.

- v3 Arcade has a dedicated lead developer; the other arcade, at least at the present time, does not appear to.

- v3 Arcade is constantly adding new features and looking for ways to make integration with vBulletin easier (and hence why there are two separate versions for vB3 & vB4); the other arcade seems to rely mostly upon hacks & fixes submitted by users.


Again, though, that is just my own personal opinion. Some people love the other arcade and find no problems with it on their site.

100% agree. And I already switched from ibProArcade to v3 Arcade and loving it.

Thank you so much, keep it up man. :)

K4GAP 11-06-2010 06:20 AM

Quote:

Originally Posted by KW802 (Post 2118557)
Mind posting the contents of the .php file (either here or v3A.com)? To give some insight, years ago games were being distributed with an installation .php script so that each game was installed manually one at a time via it's own script instead of as a batch import. The contents of the .php will tell us what we're dealing with (whether they are IPB formatted games or v3A formatted games and how they were expected to be installed).

Php content from another one of the games...

PHP Code:

<?php
/*======================================================================*\
|| #################################################################### ||
|| # vBulletin 3.0.0 Release Candidate 2 - Licence Number L1665f2b
|| # ---------------------------------------------------------------- # ||
|| # All PHP code in this file is ?2000-2004 Jelsoft Enterprises Ltd. # ||
|| # This file may not be redistributed in whole or significant part. # ||
|| # ---------------- VBULLETIN IS NOT FREE SOFTWARE ---------------- # ||
|| # http://www.vbulletin.com | http://www.vbulletin.com/license.html # ||
|| #################################################################### ||
\*======================================================================*/

// ######################## SET PHP ENVIRONMENT ###########################
error_reporting(E_ALL & ~E_NOTICE);

// ##################### DEFINE IMPORTANT CONSTANTS #######################
define('CVS_REVISION''$RCSfile: butch_01.game.php,v $ - $Revision: 1.35 $');
define('NO_REGISTER_GLOBALS'1);

// #################### PRE-CACHE TEMPLATES AND DATA ######################
$phrasegroups = array();
$specialtemplates = array();

require_once(
'./global.php');

print_cp_header("v3 Arcade - Butch Mushroom");

// welcome step
if (!isset($_POST['do']))
{
    
$gameexists $DB_site->query("SELECT * FROM " TABLE_PREFIX "games WHERE shortname='butch_01'");
    if (
$DB_site->num_rows($gameexists)==0) {
        
print_form_header('butch_01.game''stepone');
        
print_table_header("v3 Arcade - Butch Mushroom");
        
print_description_row("This script will install Butch Mushroom for your v3 Arcade.<p>
        Make sure you upload the following files:<br>
        butch_011.gif -> /images/arcade/butch_011.gif<br>
        butch_012.gif -> /images/arcade/butch_012.gif<br>
        butch_01.swf -> /games/butch_01.swf<p>
        Click on \"Install Butch Mushroom\" to begin the installation."
);
        
print_submit_row("Install Butch Mushroom"0);
    } else {
        
print_form_header('butch_01.game''stepone');
        
print_table_header("v3 Arcade - Butch Mushroom");
        
print_description_row("Butch Mushroom is already installed!");
    }
}

// #############################################################################
// step 1
if ($_POST['do'] == "stepone")
{
    
$DB_site->query("INSERT INTO " TABLE_PREFIX "games (shortname, gameid, title, descr, file, width, height, miniimage, stdimage, gamesettings, highscorerid, highscore) VALUES ('butch_01', NULL, 'Butch Mushroom', 'Eat as many bugs as you can within the time limit.', 'butch_01.swf', 550, 405, 'butch_012.gif', 'butch_011.gif', 29, NULL, NULL)");        
    
$DB_site->query("
        INSERT INTO " 
TABLE_PREFIX "gamenews (newstext,newstype,datestamp) VALUES ('New game installed, <b>Butch Mushroom</b>','newgame'," TIMENOW ")
    "
);    
    
print_form_header('butch_01.game''');
    
print_table_header("v3 Arcade - Butch Mushroom");
    
print_description_row("Installation Complete! (PLEASE DELETE THIS FILE.)");
}


/*======================================================================*\
|| ####################################################################
|| # Downloaded: 13:43, Tue Jan 6th 2004
|| # CVS: $RCSfile: usertitle.php,v $ - $Revision: 1.35 $
|| ####################################################################
\*======================================================================*/
?>


Veer 11-06-2010 06:21 AM

I have a suggestion, I see user can not see others scores on Tournament page, Is there any possibility to make it viewable for players and tournament creator? In ibproArcade everyone can see.

Gemma 11-06-2010 11:41 AM

Great to see this finally released on vb.org, well done Kevin and the v3arcade team for all your hard work and efforts :)

Paul K 11-06-2010 12:13 PM

Wow it's so awesome, 1 of the best detailed extended mods I've got on my forums!

Great job! Really!

--Edit-- does anyone know if it's possible to remove the ads out of the games from mochi media?

cory_booth 11-06-2010 12:38 PM

Quote:

Originally Posted by KW802 (Post 2118531)
Is it all Mochi games or just one? If all Mochi games, then please check item #6 of the Mochi FAQ.

You'll also want to make you aren't using an ad blocker in your browser since that'll block the communications to bounce & verify the score against the Mochi servers.

I will test it out and let you know... BTW, might it require the upload of crossdomain.xml to the forum root? I don't recall reading about that file, but realize it might be needed.

cory_booth 11-06-2010 12:41 PM

Yep, that was it... Needed to upload the crossdomain.xml file... Same game I had a problem with now works fine (and quickly I might add).

EXCELLENT! Nice to have such a major mod keep up with the times!

cory_booth 11-06-2010 12:46 PM

1 Attachment(s)
And to contribute to everyone here with CMS.
If you would like to add a Widget to your CMS.

Download the CMPS module here:
http://www.v3arcade.com/forums/showthread.php?t=3502

Open the .xml file and manually add the templates to your skin.
Just look for the template name and copy everything between the [CDATA] tags.

Then create a new PHP widget and paste this:

PHP Code:

global $vbulletin$bbcode$parser$path$db;
$g_limit 5;
$g_champs_limit 5;
$g_news_limit 5;
$g_scores_limit 5;

function 
get_games ($as_handle$as_title$limit) {
    global 
$vbulletin;

    switch (
$as_handle) {
        case 
'recent':
            
$orderby "dateadded DESC";
            break;
        case 
'played':
            
$orderby "sessioncount DESC";
            break;
        case 
'popular':
            
$orderby "votepoints DESC";
            break;
        default:
            
$orderby "gameid ASC";
            break;
    }


    
$getgames $vbulletin->db->query("
            SELECT games.* FROM " 
TABLE_PREFIX "v3arcade_games AS games
            ORDER BY " 
$orderby "
            LIMIT 
$limit
    "
);

    while (
$game $vbulletin->db->fetch_array($getgames))
    {
            
$game['gamename'] = fetch_trimmed_title(stripslashes($game['title']),$maxtitlechars);
            
$game['gamedate'] = vbdate($vbulletin->options['dateformat'], $game['dateadded']);
            
$getbgrow exec_switch_bg();

        switch (
$as_handle) {
            case 
'recent':
                
$as_game_data $game['gamedate'];
                break;
            case 
'played':
                
$as_game_data "Played " $game['sessioncount'] . " times";
                break;
            case 
'popular':
                
$as_game_data $game['votepoints'] . " votes";
                break;
            default:
                
$as_game_data "";
                break;
        }

            
//eval('$as_gamebits .= "' . fetch_template('adv_portal_as_gamebits') . '";');
            
$templater vB_Template::create('adv_portal_as_gamebits');
        
$templater->register('as_game_data',$as_game_data);
          
$templater->register('game',$game);
          
$as_gamebits .= $templater->render();

    }
    
$vbulletin->db->free_result($getgames);

     
// eval('$gametable = "' . fetch_template("adv_portal_as_{$as_handle}_gametable") . '";');
    
$templater vB_Template::create('adv_portal_as_' $as_handle '_gametable');
     
$templater->register('as_title',$as_title);
     
$templater->register('as_gamebits',$as_gamebits);
    
$gametable $templater->render();
    return 
$gametable;
}

function 
get_champs ($limit) {
    global 
$vbulletin;

    
$champs $vbulletin->db->query_read("
            SELECT COUNT(games.highscorerid) AS count, user.username, user.userid
        FROM " 
TABLE_PREFIX "v3arcade_games AS games
            LEFT JOIN " 
TABLE_PREFIX "user AS user ON user.userid = games.highscorerid
            WHERE user.userid IS NOT NULL
            GROUP BY user.username, user.userid
        ORDER BY count DESC, user.userid ASC
        LIMIT " 
$limit
    
);

    
$row '0';
    
$awards '0';
    
$leaders '0';
    while (
$champ $vbulletin->db->fetch_array($champs)) {
         
$leaders++;
        if (
$awards != $champ['count']) {
            
$row $leaders;
        }
        
$awards $champ['count'];
        
$getbgrow exec_switch_bg();
        
//eval('$as_champbits .= "' . fetch_template('adv_portal_as_champbits') . '";');
        
$templater vB_Template::create('adv_portal_as_champbits');
        
$templater->register('getbrow',$getbrow);
          
$templater->register('champ',$champ);
          
$as_champbits .= $templater->render();
    }
    
$vbulletin->db->free_result($champs);

    
//eval('$champstable = "' . fetch_template("adv_portal_as_champstable") . '";');
    
$templater vB_Template::create('adv_portal_as_champstable');
     
$templater->register('as_champbits',$as_champbits);
    
$champstable $templater->render();
    return 
$champstable;
}

function 
get_random_game () {
    global 
$vbulletin;

    
$random_game $vbulletin->db->query_first("
        SELECT gameid,title,description,stdimage,highscore,user.userid,user.username
        FROM " 
TABLE_PREFIX "v3arcade_games AS games
            LEFT JOIN " 
TABLE_PREFIX "user AS user ON user.userid = games.highscorerid
        ORDER BY RAND()
        LIMIT 1
    "
);

    
$as_random_gameid $random_game[gameid];
        
$as_random_gametitle $random_game[title];
        
$as_random_stdimage $random_game[stdimage];
        
$as_random_description $random_game[description];
    if(
$random_game[highscore] == 0)
    {
        
$as_random_highscore     "No Score";
        
$as_random_highscorer    "";
        
$as_random_userid    "";
    }
    else
    {
        
$as_random_highscore     intval($random_game[highscore]);
        
$as_random_highscorer    "(" $random_game[username] . ")";
        
$as_random_userid    $random_game[userid];
    }
    
$vbulletin->db->free_result($random_game);
    
//eval('$random_table = "' . fetch_template('adv_portal_as_random') . '";');
    
$templater vB_Template::create('adv_portal_as_random');
     
$templater->register('as_random_gameid',$as_random_gameid);
     
$templater->register('as_random_gametitle',$as_random_gametitle);
     
$templater->register('as_random_highscore',$as_random_highscore);
     
$templater->register('as_random_userid',$as_random_userid);
     
$templater->register('as_random_highscorer',$as_random_highscorer);
     
$templater->register('as_random_stdimage',$as_random_stdimage);
     
$templater->register('as_random_description',$as_random_description);
    
$random_table $templater->render();
    return 
$random_table;
}

function 
get_latest_champs ($limit)
{
    global 
$vbulletin$bbcode_parser;

    
//var_dump($vbulletin);
    //highlight_file('./modules/arcadestats.php');
    //exit;
    
$news_items $vbulletin->db->query_read("
        SELECT *
        FROM " 
TABLE_PREFIX "v3arcade_news
        WHERE newstext LIKE '%is the new%'
        ORDER BY datestamp DESC
        LIMIT 
$limit
    "
);

    while (
$news_item $vbulletin->db->fetch_array($news_items)) {
           
//$as_news_text =  $bbcode_parser->do_parse($news_item['newstext'], 1, 1, 1, 0);
        
$as_news_text $news_item['newstext'];
        
$as_news_text str_replace("arcade.php"$vbulletin->options['bburl'] . "/arcade.php"$as_news_text);

        
$as_news_date vbdate($vbulletin->options['dateformat'],$news_item['datestamp']);
        
$as_news_time vbdate($vbulletin->options['timeformat'],$news_item['datestamp']);
        
$getbgrow exec_switch_bg();
        
//eval('$as_newsbits .= "' . fetch_template('adv_portal_as_newsbits') . '";');
        
$templater vB_Template::create('adv_portal_as_newsbits');
          
$templater->register('getbrow',$getbrow);
          
$templater->register('as_news_text',$as_news_text);
          
$templater->register('as_news_date',$as_news_date);
          
$templater->register('as_news_time',$as_news_time);
          
$as_newsbits .= $templater->render();

    }
    
$vbulletin->db->free_result($news_items);

    
//eval('$news_table = "' . fetch_template('adv_portal_as_newstable') . '";');
    
$templater vB_Template::create('adv_portal_as_newstable');
     
$templater->register('as_newsbits',$as_newsbits);
     
$news_table $templater->render();
    return 
$news_table;
}

function 
get_latest_scores ($limit)
{
    global 
$vbulletin;

    
$latest_scores $vbulletin->db->query_read("
        SELECT sessions.userid, sessions.gamename, sessions.gameid, sessions.score, sessions.start, sessions.finish,
            user.username,
            games.title
        FROM " 
TABLE_PREFIX "v3arcade_sessions as sessions
        LEFT JOIN " 
TABLE_PREFIX "user AS user
            ON (sessions.userid = user.userid)
        LEFT JOIN " 
TABLE_PREFIX "v3arcade_games as games
            on (sessions.gameid = games.gameid)
        WHERE sessions.finish <> 0
        ORDER BY  sessions.sessionid DESC
        LIMIT 
$limit
    "
);

    while (
$latest_score $vbulletin->db->fetch_array($latest_scores)) {
        
$as_score_userid $latest_score['userid'];
        
$as_score_gameid $latest_score['gameid'];
        
$as_score_name $latest_score['username'];
        
$as_score_score intval($latest_score['score']);
        
$as_score_gametitle $latest_score['title'];
        
$as_score_date vbdate($vbulletin->options['dateformat'],$latest_score['finish']);
        
$as_score_time vbdate($vbulletin->options['timeformat'],$latest_score['finish']);
        
//echo "foo: $as_score_gametitle<br>\n";
        
$getbgrow exec_switch_bg();
        
//eval('$as_scorebits .= "' . fetch_template('adv_portal_as_scorebits') . '";');
        
$templater vB_Template::create('adv_portal_as_scorebits');
          
$templater->register('getbrow',$getbrow);
          
$templater->register('as_score_userid',$as_score_userid);
          
$templater->register('as_score_name',$as_score_name);
          
$templater->register('as_score_score',$as_score_score);
          
$templater->register('as_score_gameid',$as_score_gameid);
          
$templater->register('as_score_gametitle',$as_score_gametitle);
          
$templater->register('as_score_date',$as_score_date);
          
$templater->register('as_score_time',$as_score_time);
          
$as_scorebits .= $templater->render();
    }
    
$vbulletin->db->free_result($latest_scores);

    
//eval('$score_table = "' . fetch_template('adv_portal_as_scoretable') . '";');
    
$templater vB_Template::create('adv_portal_as_scoretable');
     
$templater->register('as_scorebits',$as_scorebits);
     
$score_table $templater->render();
    return 
$score_table;
}

$as_score_table get_latest_scores($g_scores_limit);
$as_news_table get_latest_champs($g_news_limit);
$as_random_table get_random_game();
$as_champs_table get_champs($g_champs_limit);
$as_recent_table get_games("recent","Most Recent"$g_limit);
$as_played_table get_games("played","Most Played"$g_limit);
$as_popular_table get_games("popular","Most Popular"$g_limit);

$collapseobj_arcadestats $vbcollapse['collapseobj_arcadestats'];
$collapseimg_arcadestats $vbcollapse['collapseimg_arcadestats'];

//eval('$home[$mods[\'modid\']][\'content\'] .= "' . fetch_template('adv_portal_arcadestats') . '";');
$templater vB_Template::create('adv_portal_arcadestats');
$templater->register('as_score_table',$as_score_table);
$templater->register('as_news_table',$as_news_table);
//$templater->register('as_random_table',$as_random_table);
//$templater->register('as_champs_table',$as_champs_table);
//$templater->register('as_recent_table',$as_recent_table);
$templater->register('as_played_table',$as_played_table);
$templater->register('as_popular_table',$as_popular_table);
$output $templater->render(); 

Couple of notes:
1st... This isn't my code...
2nd... I commented out the BB_Code parse for the "news" since I don't know the global call for the do_parse command.
3rd... I did some edits to the templates to make mine fit nicely on the side.

stud 11-06-2010 12:59 PM

Is there a plugin/script to replace the trophy.gif icon in the users postbit with icons for each individual game?

KW802 11-06-2010 02:02 PM

Quote:

Originally Posted by GaryT (Post 2118576)
Php content from another one of the games...

That one is going to a tougher nut to crack. Essentially that is a very old method of manually installing games one at a time (2004! :eek: ). There is no quick answer to that one. I'll try some local tests to see if we can at least get them usable for you somehow since as it is now those games won't install on any version of v3A past 2.0.0 (since the table names have changed).

Quote:

Originally Posted by Veer (Post 2118577)
I have a suggestion, I see user can not see others scores on Tournament page, Is there any possibility to make it viewable for players and tournament creator? In ibproArcade everyone can see.

If you have an account over at v3Arcade.com, mind posting that in the suggestions forum over there? It's easier for me to track suggestions that way.

Quote:

Originally Posted by Gemma (Post 2118642)
Great to see this finally released on vb.org, well done Kevin and the v3arcade team for all your hard work and efforts :)

Actually, thank you, Gemma, for the help & feedback the past few months as we've worked on polishing the vB4 version. The feedback from yourself & others has been great.

Quote:

Originally Posted by Ninjapaul (Post 2118649)
--Edit-- does anyone know if it's possible to remove the ads out of the games from mochi media?

You can't get rid of the ads because it would also means that you would be blocking the communications to the Mochi servers which verifies your scores. The ads from Mochi is the small price to pay for getting access to thousands for free games. :)

Quote:

Originally Posted by cory_booth (Post 2118655)
Yep, that was it... Needed to upload the crossdomain.xml file... Same game I had a problem with now works fine (and quickly I might add).

EXCELLENT! Nice to have such a major mod keep up with the times!

Glad to see you got it sorted! :cool: The next time I edit the first post I will include a pointer to the FAQ over at the v3A forums about getting Mochi integrated.

KW802 11-06-2010 02:05 PM

Quote:

Originally Posted by stud (Post 2118662)
Is there a plugin/script to replace the trophy.gif icon in the users postbit with icons for each individual game?

No need for a manual plugin or other manual edit. ;)

ACP => v3 Arcade => v3 Arcade Settings => v3 Arcade General Settings => Enable Arcade Awards

You'll have your choice of showing either trophies, crowns (all the same color), multi-color crowns (random colored crowns), or the game's mini-icon.

msorin 11-06-2010 02:09 PM

I downloaded the version from v3 website. I get an error when I try to mass import games:

Fatal error: Call to a member function read() on a non-object in /admincp/v3arcade_admin.php on line 1157

KW802 11-06-2010 02:27 PM

Quote:

Originally Posted by msorin (Post 2118685)
I downloaded the version from v3 website. I get an error when I try to mass import games:

Fatal error: Call to a member function read() on a non-object in /admincp/v3arcade_admin.php on line 1157

Are you sure you downloaded the right version for the vBulletin you're using? The download drop-down has both vB3 & vB4 listed.

msorin 11-06-2010 02:34 PM

Yes I downloaded the one for 4.0.X

K4GAP 11-06-2010 08:31 PM

Quote:

Originally Posted by cory_booth (Post 2118655)
Yep, that was it... Needed to upload the crossdomain.xml file... Same game I had a problem with now works fine (and quickly I might add).

EXCELLENT! Nice to have such a major mod keep up with the times!

Where did you upload the crossdomain too? And what does it do? Do you know?

K4GAP 11-06-2010 08:34 PM

I need instructions for where and how to add games. What I really need is an "Install For Dummies" manual :)

Love this mod a lot better than IPB.

Gemma 11-06-2010 08:43 PM

Quote:

Originally Posted by GaryT (Post 2118802)
Where did you upload the crossdomain too? And what does it do? Do you know?

Upload crossdomain.xml to your site root


All times are GMT. The time now is 05:24 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.03820 seconds
  • Memory Usage 2,069KB
  • 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
  • (23)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (1)pagenav_pagelinkrel
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (40)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