collapse

* Simple Portal Archived Forum

This is an Archive Forum.

The content in this forum may be out-of-date or have been superseded by newer information, and links in forum pages to other sites may not work.
This forum contains archives for future reference.

Visit our thread at Simple Machines Forum for current support.

SMF 2.1 users: EhPortal is a ported version of Simple Portal specifically designed for the SMF 2.1 branch.
Please visit web-develop.ca to download EhPortal and for its support.

* User Info

 
 
Welcome, Guest. Please login or register.

* Who's Online

  • Dot Guests: 250
  • Dot Hidden: 0
  • Dot Users: 0

There aren't any users online.

* Shoutbox

Refresh History
  • Shoutbox is not for support!
  • {OCS}MasterSeal: Yup, Still adore SP
    April 21, 2019, 07:08:06 PM
  • {OCS}MasterSeal: STILL love SP :)
    November 24, 2018, 05:05:50 AM
  • ♦ Ninja ZX-10RR ♦: <3 aegersz
    September 13, 2018, 03:36:09 PM
  • aegersz: I STILL <3 LOVE SimplePortal
    September 13, 2018, 07:11:39 AM
  • aegersz: o LOVE you guys - Simple Portal rocks !
    May 09, 2018, 05:18:59 AM
  • Chen Zhen: our apologies for the site being down.. please read server issues topic
    March 22, 2018, 05:32:38 AM
  • {OCS}MasterSeal: LOL PLEASE forget I just posted that. I found the answer in my own dang post back in 2015. lol sorry!
    July 04, 2017, 10:47:55 PM
  • {OCS}MasterSeal: I know this SB isnt' for support, but I just have a general question. Who would I contact to find out where SP stores its block info? Is it DB driven or files? I searched the site but came up with nothing. probably my fault any insight is appreciated.
    July 04, 2017, 10:43:36 PM
  • ♦ Ninja ZX-10RR ♦: Excuse me but what does Simpleportal have to deal with that?
    February 05, 2017, 08:21:14 PM
  • WhiteEagle: of course IMHO that site appears to be dead :(
    February 04, 2017, 01:08:05 PM
  • WhiteEagle: If I can get that, then I'll use it for that site...
    February 04, 2017, 01:07:35 PM
  • WhiteEagle: decided to not use SMF for any projects, unless I can get a copy of the premium version of the fanfiction archive plugin
    February 04, 2017, 01:06:54 PM
  • expertdecisions: cloudflare
    January 28, 2017, 08:01:47 AM
  • aegersz: SM release 2.0.13 !
    January 12, 2017, 06:00:13 AM
  • raffo: Tks Emanuele, even if I didn't understand the fix :D
    November 07, 2016, 02:01:20 AM
  • emanuele: [link]
    November 01, 2016, 12:43:50 PM
  • emanuele: raffo: the English support board is a good place. ;)
    November 01, 2016, 12:43:38 PM
  • raffo: Where can I find the fix for the shoutbox?
    November 01, 2016, 05:06:09 AM
  • {OCS}MasterSeal: To the SP team, I make a point to come here and thank you as much as possible for your work.  so again, THANK YOU!
    October 28, 2016, 10:38:05 AM
  • emanuele: That's indeed funny, the limit is present only in the patch and not the full install.
    October 22, 2016, 06:14:58 PM

* Recent Posts

Adding Forums Button to Nav bar by jirapon
[August 01, 2019, 09:07:12 AM]


Re: Board Icons by ♦ Ninja ZX-10RR ♦
[July 30, 2019, 04:03:41 PM]


MOVED: Czech translation???? by ♦ Ninja ZX-10RR ♦
[July 30, 2019, 03:04:51 PM]


Board Icons by jirapon
[July 30, 2019, 07:28:44 AM]


Re: Thankyou Simpleportal, by ♦ Ninja ZX-10RR ♦
[July 29, 2019, 09:41:29 AM]

Welcome to SimplePortal.net! You can download SimplePortal from the Downloads Area!

Author Topic: E-Arcade?  (Read 64687 times)

0 Members and 1 Guest are viewing this topic.

Offline mrtrc266

  • Jr. Member
  • **
  • Posts: 91
  • Gender: Male
    • Monsters Mansion
  • SMF Version: 2 RC3
  • SP Version: 2.3.1
E-Arcade?
« on: December 12, 2008, 02:11:43 PM »
E-Arcade Block for SP would be nice. It seems to be getting pretty popular

Offline hot rides

  • Semi Newbie
  • *
  • Posts: 42
    • Hot Rides Show & Cruise
Re: E-Arcade?
« Reply #1 on: December 13, 2008, 01:01:33 PM »
what do you mean e-arcade block?

Offline mrtrc266

  • Jr. Member
  • **
  • Posts: 91
  • Gender: Male
    • Monsters Mansion
  • SMF Version: 2 RC3
  • SP Version: 2.3.1
Re: E-Arcade?
« Reply #2 on: December 13, 2008, 05:01:30 PM »
what do you mean e-arcade block?

SP Currently has a block for SMF Arcade but E-Arcade is becoming very popular and it would be nice to have a block for E-Aracde as well.

You can check it out here on my site www.monsters-mansion.com and here is their site. http://www.ericsworld.eu/f2/index.php

Offline hot rides

  • Semi Newbie
  • *
  • Posts: 42
    • Hot Rides Show & Cruise
Re: E-Arcade?
« Reply #3 on: December 15, 2008, 02:49:28 PM »
thank you for enlightening me, I am really liking this e-arcade, the tournament feature is nice

Offline mrtrc266

  • Jr. Member
  • **
  • Posts: 91
  • Gender: Male
    • Monsters Mansion
  • SMF Version: 2 RC3
  • SP Version: 2.3.1
Re: E-Arcade?
« Reply #4 on: December 16, 2008, 12:42:36 AM »
thank you for enlightening me, I am really liking this e-arcade, the tournament feature is nice

NP...This site ( http://sleepy-arcade.ath.cx/ ) has some great mods for E-Arcade and he's (wdm2005 ) extremely helpful if you need assistance with anything. If you look at the raw E-Arcade vs. what I have on my site ( http://monsters-mansion.com/index.php?action=arcade )   you can see that it has some very nice features that I got from Sleepy Arcade.

Offline hot rides

  • Semi Newbie
  • *
  • Posts: 42
    • Hot Rides Show & Cruise
Re: E-Arcade?
« Reply #5 on: December 20, 2008, 04:53:50 PM »
thanks for the info!

Offline JimM

  • Comrade
  • *
  • Posts: 15
  • Gender: Male
    • Southern Spirit Hunters
  • SMF Version: 2.0.15
  • SP Version: 2.3.6
Re: E-Arcade?
« Reply #6 on: February 17, 2009, 01:07:28 PM »
I found a nice scrolling Arcade block on the E-arcade site, here:

http://www.ericsworld.eu/f2/index.php?topic=1802.msg6349#msg6349

But it throws this error:

Fatal error: Cannot redeclare games3() (previously declared in /home/xxxxxxx/public_html/Sources/Subs-SPortal1-1.php(567) : eval()'d code:66) in /home/xxxxxxx/public_html/Sources/SPortal1-1.php(2071) : eval()'d code on line 98

Has anyone else got this to work?

Offline [SiNaN]

  • Mr. SimplePortal
  • Developer
  • *
  • Posts: 6782
  • SMF Version: 2.0.15
  • SP Version: 2.3.7
Re: E-Arcade?
« Reply #7 on: February 18, 2009, 10:50:09 AM »
Upload attached file to your sourcedir. Then use these codes in a PHP block:

Code: [Select]
/******************************************************************************
* Tiny Portal/SMF Arcade - Combined Games and Scrolling Champ Block           *
*******************************************************************************                      *
* File by:            Eric Lawson - www.ericsworld.eu                            *
*******************************************************************************
*                                                                             *
* To install:                                                                 *
* Copy the entire contents (crtl+a)(ctrl+c) of this file into a phpblock      *
*                                                                               *
* Edits:                                                                      *
* Change the txt strings to suit your language.                               *
* Set $no_topten = <number of top players to show>                            *
* Set $gamesUrl = <to the same as games url in arcade settings>                  *
* Set $no_games = <number of game icons to show at top of block>                     *
* Set $icons_per_row = <number of icons per row>                              *
* Set $gamesUrl = <to the same as games url in arcade settings>                  *
*                                                                             *
* Uploads:                                                                                                *
* Upload a pic called arcade_block.gif                                        *
* (you can use you own gif - just name it arcade_block.gif) to each:          *
* Themes/<themename>/images/                                                  *
*                                                                             *
* This file is distributed in the hope that it is and will be useful,         *
* but WITHOUT ANY WARRANTIES; without even any implied warranty of            *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.                        *
*                                                                             *
******************************************************************************/
global $gamesUrl;
/*******EDITS*****************************************************************/


$no_games=8;
$icons_per_row = 4;
$no_topten = 10;
$gamesUrl = 'http://edit this to your path/Games/';

// --LANGUAGE EDITS --
$txtplay = "The Top Players"; // change "The Top Players" to your language
$txtwin = "Number Of Wins :";// change "Number Of Wins :" to your language
$txtlate = "Latest High Score by ";// change "Latest High Score set by" to your language
$txtwit = "with ";// change "with" to your language
$txton = "on ";// change "on" to your language


//******NOTHING TO EDIT BELOW HERE********************************************

global $scripturl,$sourcedir,$boardurl,$db_prefix,$modSettings,$settings;
require_once($sourcedir.'/ArcadeDbConnector.php');
require_once($sourcedir.'/ArcadeStats.php');
require_once($sourcedir.'/sp_get_games.php');

echo '<table width="100%">
         <tr>
            <td align="center">
               <br />
               <a href="',$scripturl,'?action=arcade"><img src="',$settings['images_url'],'/arcade_block.gif" border= "0" alt="Arcade" /></a>
               <br />
            </td>
         </tr>
      </table>';
     
$random_games_choice = rand(1,4);
$games_choice = 'games'.$random_games_choice;
$curr_position = 0;
$games_choice($no_games,$curr_position,$icons_per_row);

//Get newest champ or die
$sql = "SELECT game.id_game, game.game_name, game.thumbnail, game.game_directory,
        IFNULL(mem.ID_MEMBER, 0) AS ID_MEMBER, IFNULL(mem.realName,'') AS realName, score.score
        FROM {$db_prefix}arcade_scores AS score
        LEFT JOIN {$db_prefix}members AS mem ON (mem.ID_MEMBER = score.id_member)
        JOIN {$db_prefix}arcade_games AS game ON (game.id_game = score.id_game)
        ORDER BY `champion_from` DESC
        LIMIT 0,1";
if(!($result = db_query($sql,__FILE__,__LINE__)))
{
   die("Could not get the newest champ");
}
$row = mysql_fetch_assoc($result);
mysql_free_result($result);

//newest champ details
$playerid = $row['ID_MEMBER'];
$player = $row['realName'];
$game_id = $row['id_game'];
$game_name = $row['game_name'];
$score = round($row['score'], 3);
$game_pic = !$row['game_directory'] ?   $gamesUrl.$row['thumbnail'] : $gamesUrl.$row['game_directory']."/".$row['thumbnail'];


$bp=ArcadeStats_BestPlayers($no_topten);

$score_poss=0; //players position

?>

<script type="text/javascript">

/***********************************************
* Cross browser Marquee II- © Dynamic Drive (www.dynamicdrive.com)
* This notice MUST stay intact for legal use
* Visit http://www.dynamicdrive.com/ for this script and 100s more.
***********************************************/

var delayb4scrollx=2000 //Specify initial delay before marquee starts to scroll on page (2000=2 seconds)
var marqueespeedx=1 //Specify marquee scroll speed (larger is faster 1-10)
var pauseitx=1 //Pause marquee onMousever (0=no. 1=yes)?

////NO NEED TO EDIT BELOW THIS LINE////////////

var copyspeedx=marqueespeedx
var pausespeedx=(pauseitx==0)? copyspeedx: 0
var actualheightx=''

function scrollmarqueex(){
if (parseInt(cross_marqueex.style.top)>(actualheightx*(-1)+8))
cross_marqueex.style.top=parseInt(cross_marqueex.style.top)-copyspeedx+"px"
else
cross_marqueex.style.top=parseInt(marqueeheightx)+8+"px"
}

function initializemarqueex(){
cross_marqueex=document.getElementById("vmarqueex")
cross_marqueex.style.top=0
marqueeheightx=document.getElementById("marqueecontainerx").offsetHeight
actualheightx=cross_marqueex.offsetHeight
if (window.opera || navigator.userAgent.indexOf("Netscape/7")!=-1){ //if Opera or Netscape 7x, add scrollbars to scroll and exit
cross_marqueex.style.height=marqueeheightx+"px"
cross_marqueex.style.overflow="scroll"
return
}
setTimeout('lefttime=setInterval("scrollmarqueex()",30)', delayb4scrollx)
}

if (window.addEventListener)
window.addEventListener("load", initializemarqueex, false)
else if (window.attachEvent)
window.attachEvent("onload", initializemarqueex)
else if (document.getElementById)
window.onload=initializemarqueex

</script>
<?php
echo '<br />
      <div id="marqueecontainerx" style="position: relative; width: 95%; height:200px; overflow: hidden; border: 0px; padding: 2px; padding-left: 4px;" onmouseover="copyspeedx=pausespeedx" onmouseout="copyspeedx=marqueespeedx">
         <div id="vmarqueex" style="position: absolute; width: 98%;">
            <div align="center">
               <a href="'
,$scripturl,'?action=arcade;sa=play;game=',$game_id,'"><img src="',$game_pic,'" border="0" alt="',$game_name,'" width="60" height="60"/></a>
               <br />'
,$txtlate,'<br />
               <a href="'
,$scripturl,'?action=profile;u=',$playerid,'">',$player,'</a>
               <br/>'
,$txtwit,' ',$score,' ',$txton,'<br />',$game_name,'
               <br />------------------<br />'
,$txtplay,'<br /><br />';
               foreach (
$bp as $out)
               {
                  
$score_poss++;
                  echo 
'',$score_poss,' - ',$out['link'],'<br />',$txtwin,' ',$out['champions'],'
                       <br /><br />'
;
               };
   echo 
'</div>
         </div>
      </div>'
;
And slowly, you come to realize... It's all as it should be...

Offline JimM

  • Comrade
  • *
  • Posts: 15
  • Gender: Male
    • Southern Spirit Hunters
  • SMF Version: 2.0.15
  • SP Version: 2.3.6
Re: E-Arcade?
« Reply #8 on: February 19, 2009, 06:39:26 PM »
You are the man...works perfect!  :thumbsup:

Thanks

Offline [SiNaN]

  • Mr. SimplePortal
  • Developer
  • *
  • Posts: 6782
  • SMF Version: 2.0.15
  • SP Version: 2.3.7
Re: E-Arcade?
« Reply #9 on: February 19, 2009, 11:08:57 PM »
My pleasure. Just so you know, SP silently parses your custom PHP block codes before really using them, to avoid any syntax errors totally breaking your forum.
And slowly, you come to realize... It's all as it should be...

Offline mrtrc266

  • Jr. Member
  • **
  • Posts: 91
  • Gender: Male
    • Monsters Mansion
  • SMF Version: 2 RC3
  • SP Version: 2.3.1
Re: E-Arcade?
« Reply #10 on: February 19, 2009, 11:55:51 PM »
Works perfectly! TYVM  :)

Offline Jakki

  • Semi Newbie
  • *
  • Posts: 48
  • Gender: Female
  • Peaceful living is the way to go.
    • roundablock
Re: E-Arcade?
« Reply #11 on: February 27, 2009, 03:14:09 PM »
This will not work with the SMF RC1, SP version 2.1.1 and the new arcade version E-Arcade Beta3-SMF2.  I know I've been playing with it for an hour now..lol

Offline WBA Dude

  • Semi Newbie
  • *
  • Posts: 6
Re: E-Arcade?
« Reply #12 on: February 28, 2009, 08:10:08 AM »
Upload attached file to your sourcedir. Then use these codes in a PHP block:

Code: [Select]
/******************************************************************************
* Tiny Portal/SMF Arcade - Combined Games and Scrolling Champ Block           *
*******************************************************************************                      *
* File by:            Eric Lawson - www.ericsworld.eu                            *
*******************************************************************************
*                                                                             *
* To install:                                                                 *
* Copy the entire contents (crtl+a)(ctrl+c) of this file into a phpblock      *
*                                                                               *
* Edits:                                                                      *
* Change the txt strings to suit your language.                               *
* Set $no_topten = <number of top players to show>                            *
* Set $gamesUrl = <to the same as games url in arcade settings>                  *
* Set $no_games = <number of game icons to show at top of block>                     *
* Set $icons_per_row = <number of icons per row>                              *
* Set $gamesUrl = <to the same as games url in arcade settings>                  *
*                                                                             *
* Uploads:                                                                                                *
* Upload a pic called arcade_block.gif                                        *
* (you can use you own gif - just name it arcade_block.gif) to each:          *
* Themes/<themename>/images/                                                  *
*                                                                             *
* This file is distributed in the hope that it is and will be useful,         *
* but WITHOUT ANY WARRANTIES; without even any implied warranty of            *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.                        *
*                                                                             *
******************************************************************************/
global $gamesUrl;
/*******EDITS*****************************************************************/


$no_games=8;
$icons_per_row = 4;
$no_topten = 10;
$gamesUrl = 'http://edit this to your path/Games/';

// --LANGUAGE EDITS --
$txtplay = "The Top Players"; // change "The Top Players" to your language
$txtwin = "Number Of Wins :";// change "Number Of Wins :" to your language
$txtlate = "Latest High Score by ";// change "Latest High Score set by" to your language
$txtwit = "with ";// change "with" to your language
$txton = "on ";// change "on" to your language


//******NOTHING TO EDIT BELOW HERE********************************************

global $scripturl,$sourcedir,$boardurl,$db_prefix,$modSettings,$settings;
require_once($sourcedir.'/ArcadeDbConnector.php');
require_once($sourcedir.'/ArcadeStats.php');
require_once($sourcedir.'/sp_get_games.php');

echo '<table width="100%">
         <tr>
            <td align="center">
               <br />
               <a href="',$scripturl,'?action=arcade"><img src="',$settings['images_url'],'/arcade_block.gif" border= "0" alt="Arcade" /></a>
               <br />
            </td>
         </tr>
      </table>';
     
$random_games_choice = rand(1,4);
$games_choice = 'games'.$random_games_choice;
$curr_position = 0;
$games_choice($no_games,$curr_position,$icons_per_row);

//Get newest champ or die
$sql = "SELECT game.id_game, game.game_name, game.thumbnail, game.game_directory,
        IFNULL(mem.ID_MEMBER, 0) AS ID_MEMBER, IFNULL(mem.realName,'') AS realName, score.score
        FROM {$db_prefix}arcade_scores AS score
        LEFT JOIN {$db_prefix}members AS mem ON (mem.ID_MEMBER = score.id_member)
        JOIN {$db_prefix}arcade_games AS game ON (game.id_game = score.id_game)
        ORDER BY `champion_from` DESC
        LIMIT 0,1";
if(!($result = db_query($sql,__FILE__,__LINE__)))
{
   die("Could not get the newest champ");
}
$row = mysql_fetch_assoc($result);
mysql_free_result($result);

//newest champ details
$playerid = $row['ID_MEMBER'];
$player = $row['realName'];
$game_id = $row['id_game'];
$game_name = $row['game_name'];
$score = round($row['score'], 3);
$game_pic = !$row['game_directory'] ?   $gamesUrl.$row['thumbnail'] : $gamesUrl.$row['game_directory']."/".$row['thumbnail'];


$bp=ArcadeStats_BestPlayers($no_topten);

$score_poss=0; //players position

?>

<script type="text/javascript">

/***********************************************
* Cross browser Marquee II- © Dynamic Drive (www.dynamicdrive.com)
* This notice MUST stay intact for legal use
* Visit http://www.dynamicdrive.com/ for this script and 100s more.
***********************************************/

var delayb4scrollx=2000 //Specify initial delay before marquee starts to scroll on page (2000=2 seconds)
var marqueespeedx=1 //Specify marquee scroll speed (larger is faster 1-10)
var pauseitx=1 //Pause marquee onMousever (0=no. 1=yes)?

////NO NEED TO EDIT BELOW THIS LINE////////////

var copyspeedx=marqueespeedx
var pausespeedx=(pauseitx==0)? copyspeedx: 0
var actualheightx=''

function scrollmarqueex(){
if (parseInt(cross_marqueex.style.top)>(actualheightx*(-1)+8))
cross_marqueex.style.top=parseInt(cross_marqueex.style.top)-copyspeedx+"px"
else
cross_marqueex.style.top=parseInt(marqueeheightx)+8+"px"
}

function initializemarqueex(){
cross_marqueex=document.getElementById("vmarqueex")
cross_marqueex.style.top=0
marqueeheightx=document.getElementById("marqueecontainerx").offsetHeight
actualheightx=cross_marqueex.offsetHeight
if (window.opera || navigator.userAgent.indexOf("Netscape/7")!=-1){ //if Opera or Netscape 7x, add scrollbars to scroll and exit
cross_marqueex.style.height=marqueeheightx+"px"
cross_marqueex.style.overflow="scroll"
return
}
setTimeout('lefttime=setInterval("scrollmarqueex()",30)', delayb4scrollx)
}

if (window.addEventListener)
window.addEventListener("load", initializemarqueex, false)
else if (window.attachEvent)
window.attachEvent("onload", initializemarqueex)
else if (document.getElementById)
window.onload=initializemarqueex

</script>
<?php
echo '<br />
      <div id="marqueecontainerx" style="position: relative; width: 95%; height:200px; overflow: hidden; border: 0px; padding: 2px; padding-left: 4px;" onmouseover="copyspeedx=pausespeedx" onmouseout="copyspeedx=marqueespeedx">
         <div id="vmarqueex" style="position: absolute; width: 98%;">
            <div align="center">
               <a href="'
,$scripturl,'?action=arcade;sa=play;game=',$game_id,'"><img src="',$game_pic,'" border="0" alt="',$game_name,'" width="60" height="60"/></a>
               <br />'
,$txtlate,'<br />
               <a href="'
,$scripturl,'?action=profile;u=',$playerid,'">',$player,'</a>
               <br/>'
,$txtwit,' ',$score,' ',$txton,'<br />',$game_name,'
               <br />------------------<br />'
,$txtplay,'<br /><br />';
               foreach (
$bp as $out)
               {
                  
$score_poss++;
                  echo 
'',$score_poss,' - ',$out['link'],'<br />',$txtwin,' ',$out['champions'],'
                       <br /><br />'
;
               };
   echo 
'</div>
         </div>
      </div>'
;

Source Directory?

Offline fl4pj4ck

  • Semi Newbie
  • *
  • Posts: 26
  • I pity the fools!
    • Poles in Limerick
  • SMF Version: 2 RC3
  • SP Version: 2.3.2
Re: E-Arcade?
« Reply #13 on: February 28, 2009, 08:24:32 AM »
Upload attached file to your sourcedir. Then use these codes in a PHP block:

Code: [Select]
/******************************************************************************
* Tiny Portal/SMF Arcade - Combined Games and Scrolling Champ Block           *
*******************************************************************************                      *
* File by:            Eric Lawson - www.ericsworld.eu                            *
*******************************************************************************
*                                                                             *
* To install:                                                                 *
* Copy the entire contents (crtl+a)(ctrl+c) of this file into a phpblock      *
*                                                                               *
* Edits:                                                                      *
* Change the txt strings to suit your language.                               *
* Set $no_topten = <number of top players to show>                            *
* Set $gamesUrl = <to the same as games url in arcade settings>                  *
* Set $no_games = <number of game icons to show at top of block>                     *
* Set $icons_per_row = <number of icons per row>                              *
* Set $gamesUrl = <to the same as games url in arcade settings>                  *
*                                                                             *
* Uploads:                                                                                                *
* Upload a pic called arcade_block.gif                                        *
* (you can use you own gif - just name it arcade_block.gif) to each:          *
* Themes/<themename>/images/                                                  *
*                                                                             *
* This file is distributed in the hope that it is and will be useful,         *
* but WITHOUT ANY WARRANTIES; without even any implied warranty of            *
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.                        *
*                                                                             *
******************************************************************************/
global $gamesUrl;
/*******EDITS*****************************************************************/


$no_games=8;
$icons_per_row = 4;
$no_topten = 10;
$gamesUrl = 'http://edit this to your path/Games/';

// --LANGUAGE EDITS --
$txtplay = "The Top Players"; // change "The Top Players" to your language
$txtwin = "Number Of Wins :";// change "Number Of Wins :" to your language
$txtlate = "Latest High Score by ";// change "Latest High Score set by" to your language
$txtwit = "with ";// change "with" to your language
$txton = "on ";// change "on" to your language


//******NOTHING TO EDIT BELOW HERE********************************************

global $scripturl,$sourcedir,$boardurl,$db_prefix,$modSettings,$settings;
require_once($sourcedir.'/ArcadeDbConnector.php');
require_once($sourcedir.'/ArcadeStats.php');
require_once($sourcedir.'/sp_get_games.php');

echo '<table width="100%">
         <tr>
            <td align="center">
               <br />
               <a href="',$scripturl,'?action=arcade"><img src="',$settings['images_url'],'/arcade_block.gif" border= "0" alt="Arcade" /></a>
               <br />
            </td>
         </tr>
      </table>';
     
$random_games_choice = rand(1,4);
$games_choice = 'games'.$random_games_choice;
$curr_position = 0;
$games_choice($no_games,$curr_position,$icons_per_row);

//Get newest champ or die
$sql = "SELECT game.id_game, game.game_name, game.thumbnail, game.game_directory,
        IFNULL(mem.ID_MEMBER, 0) AS ID_MEMBER, IFNULL(mem.realName,'') AS realName, score.score
        FROM {$db_prefix}arcade_scores AS score
        LEFT JOIN {$db_prefix}members AS mem ON (mem.ID_MEMBER = score.id_member)
        JOIN {$db_prefix}arcade_games AS game ON (game.id_game = score.id_game)
        ORDER BY `champion_from` DESC
        LIMIT 0,1";
if(!($result = db_query($sql,__FILE__,__LINE__)))
{
   die("Could not get the newest champ");
}
$row = mysql_fetch_assoc($result);
mysql_free_result($result);

//newest champ details
$playerid = $row['ID_MEMBER'];
$player = $row['realName'];
$game_id = $row['id_game'];
$game_name = $row['game_name'];
$score = round($row['score'], 3);
$game_pic = !$row['game_directory'] ?   $gamesUrl.$row['thumbnail'] : $gamesUrl.$row['game_directory']."/".$row['thumbnail'];


$bp=ArcadeStats_BestPlayers($no_topten);

$score_poss=0; //players position

?>

<script type="text/javascript">

/***********************************************
* Cross browser Marquee II- © Dynamic Drive (www.dynamicdrive.com)
* This notice MUST stay intact for legal use
* Visit http://www.dynamicdrive.com/ for this script and 100s more.
***********************************************/

var delayb4scrollx=2000 //Specify initial delay before marquee starts to scroll on page (2000=2 seconds)
var marqueespeedx=1 //Specify marquee scroll speed (larger is faster 1-10)
var pauseitx=1 //Pause marquee onMousever (0=no. 1=yes)?

////NO NEED TO EDIT BELOW THIS LINE////////////

var copyspeedx=marqueespeedx
var pausespeedx=(pauseitx==0)? copyspeedx: 0
var actualheightx=''

function scrollmarqueex(){
if (parseInt(cross_marqueex.style.top)>(actualheightx*(-1)+8))
cross_marqueex.style.top=parseInt(cross_marqueex.style.top)-copyspeedx+"px"
else
cross_marqueex.style.top=parseInt(marqueeheightx)+8+"px"
}

function initializemarqueex(){
cross_marqueex=document.getElementById("vmarqueex")
cross_marqueex.style.top=0
marqueeheightx=document.getElementById("marqueecontainerx").offsetHeight
actualheightx=cross_marqueex.offsetHeight
if (window.opera || navigator.userAgent.indexOf("Netscape/7")!=-1){ //if Opera or Netscape 7x, add scrollbars to scroll and exit
cross_marqueex.style.height=marqueeheightx+"px"
cross_marqueex.style.overflow="scroll"
return
}
setTimeout('lefttime=setInterval("scrollmarqueex()",30)', delayb4scrollx)
}

if (window.addEventListener)
window.addEventListener("load", initializemarqueex, false)
else if (window.attachEvent)
window.attachEvent("onload", initializemarqueex)
else if (document.getElementById)
window.onload=initializemarqueex

</script>
<?php
echo '<br />
      <div id="marqueecontainerx" style="position: relative; width: 95%; height:200px; overflow: hidden; border: 0px; padding: 2px; padding-left: 4px;" onmouseover="copyspeedx=pausespeedx" onmouseout="copyspeedx=marqueespeedx">
         <div id="vmarqueex" style="position: absolute; width: 98%;">
            <div align="center">
               <a href="'
,$scripturl,'?action=arcade;sa=play;game=',$game_id,'"><img src="',$game_pic,'" border="0" alt="',$game_name,'" width="60" height="60"/></a>
               <br />'
,$txtlate,'<br />
               <a href="'
,$scripturl,'?action=profile;u=',$playerid,'">',$player,'</a>
               <br/>'
,$txtwit,' ',$score,' ',$txton,'<br />',$game_name,'
               <br />------------------<br />'
,$txtplay,'<br /><br />';
               foreach (
$bp as $out)
               {
                  
$score_poss++;
                  echo 
'',$score_poss,' - ',$out['link'],'<br />',$txtwin,' ',$out['champions'],'
                       <br /><br />'
;
               };
   echo 
'</div>
         </div>
      </div>'
;

no go for me

Offline JimM

  • Comrade
  • *
  • Posts: 15
  • Gender: Male
    • Southern Spirit Hunters
  • SMF Version: 2.0.15
  • SP Version: 2.3.6
Re: E-Arcade?
« Reply #14 on: March 08, 2009, 10:27:16 PM »
@WBA Dude - you copy the content of the code tags to your PHP block and upload the file that is attached to Blue Dream's post to your /Sources/ directory.

@Jakki - The code came from the E-Arcade support site where it was being used with 2.0B4 and E-Arcade Beta3-SMF2

Offline mrtrc266

  • Jr. Member
  • **
  • Posts: 91
  • Gender: Male
    • Monsters Mansion
  • SMF Version: 2 RC3
  • SP Version: 2.3.1
Re: E-Arcade?
« Reply #15 on: April 02, 2009, 04:04:30 PM »
Should this still work in SP 2.2? I can't seem to get it going.

Thanks in advance for any help.

Offline Yağız...

  • Jr. Member
  • **
  • Posts: 80
  • Gender: Male
Re: E-Arcade?
« Reply #16 on: April 02, 2009, 04:15:29 PM »
You don't need this anymore if you are using SP 2.2. Just create a block with Arcade option.

Offline mrtrc266

  • Jr. Member
  • **
  • Posts: 91
  • Gender: Male
    • Monsters Mansion
  • SMF Version: 2 RC3
  • SP Version: 2.3.1
Re: E-Arcade?
« Reply #17 on: April 02, 2009, 04:34:48 PM »
You don't need this anymore if you are using SP 2.2. Just create a block with Arcade option.

Yeah I saw those but to show 5 of each category it goes a mile long down the side of the portal. The smaller block with the scrolling info was much more suitable IMO

Offline JimM

  • Comrade
  • *
  • Posts: 15
  • Gender: Male
    • Southern Spirit Hunters
  • SMF Version: 2.0.15
  • SP Version: 2.3.6
Re: E-Arcade?
« Reply #18 on: April 02, 2009, 08:50:30 PM »
Mine is still working in 2.2.  In fact I tried the Arcade block in 2.2 and got errors, so I'll stick with this one.

Offline mrtrc266

  • Jr. Member
  • **
  • Posts: 91
  • Gender: Male
    • Monsters Mansion
  • SMF Version: 2 RC3
  • SP Version: 2.3.1
Re: E-Arcade?
« Reply #19 on: April 03, 2009, 02:09:30 AM »
The custom code above still works on Sp 2.2? I can't get it going.

It would be nice to have all the categorys scroll in 1 block like this code provides.