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: 195
  • 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 64685 times)

0 Members and 2 Guests 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.

Offline [SiNaN]

  • Mr. SimplePortal
  • Developer
  • *
  • Posts: 6782
  • SMF Version: 2.0.15
  • SP Version: 2.3.7
Re: E-Arcade?
« Reply #20 on: April 03, 2009, 02:13:42 AM »
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.

What was the error you were getting? Would you help us identifying it?

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.

Sorry but "I can't get it going." doesn't help much. Any errors you are getting? Check your Forum Error Log too.
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 #21 on: April 03, 2009, 02:22:36 AM »
Sorry, yes when I use the code above in a PHP Block (exactly like I had it using SP 2.1) in a left block it wipes out all the blocks execpt for the left side.

And in the block itself it just shows this...pic attatched

No errors in error log

Offline [SiNaN]

  • Mr. SimplePortal
  • Developer
  • *
  • Posts: 6782
  • SMF Version: 2.0.15
  • SP Version: 2.3.7
Re: E-Arcade?
« Reply #22 on: April 03, 2009, 02:52:14 AM »
In the other topic you said that you have SMF 2.0 RC1 installed but the block codes in the first page are for SMF 1.1. Is this for another forums of yours?
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 #23 on: April 03, 2009, 02:55:30 AM »
Should this still work in SP 2.2? I can't seem to get it going.

Thanks in advance for any help.

Sorry for the confusion but above is what I said earlier in this thread....

Offline [SiNaN]

  • Mr. SimplePortal
  • Developer
  • *
  • Posts: 6782
  • SMF Version: 2.0.15
  • SP Version: 2.3.7
Re: E-Arcade?
« Reply #24 on: April 03, 2009, 02:59:23 AM »
Well, SP 2.2 support both SMF versions, SMF 1.1 and SMF 2.0. I'm not the author of the block code in question and don't know much about Arcade mods. I suggest making a request to the author to update his codes for SMF 2.0 versions.
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 #25 on: April 03, 2009, 03:02:11 AM »
K, will do...tyvm

Offline JimM

  • Comrade
  • *
  • Posts: 15
  • Gender: Male
    • Southern Spirit Hunters
  • SMF Version: 2.0.15
  • SP Version: 2.3.6
Re: E-Arcade?
« Reply #26 on: April 03, 2009, 08:51:32 AM »
In the preview mode I get this error.

Quote
Fatal error: Call to undefined function Arcade_Get_Array() in
/Sources/ArcadeStats.php on line 94

If I go ahead and add it, it wipes out all but the blocks on the side that I put it on.  Basically if I put it on the left it causes all of the left side blocks to expand to full screen.

The E-Arcade block that you helped with earlier in this thread still works perfectly for me.  That's the reason I didn't initially post the error I got.

Offline [SiNaN]

  • Mr. SimplePortal
  • Developer
  • *
  • Posts: 6782
  • SMF Version: 2.0.15
  • SP Version: 2.3.7
Re: E-Arcade?
« Reply #27 on: April 03, 2009, 08:56:38 AM »
Okay, would you try this for me?

Sources/SPortal1-1.php

Find:

Code: [Select]
require_once($sourcedir . '/Subs-Arcade.php');
Replace:

Code: [Select]
require_once($sourcedir . '/Subs-Arcade.php');
if (file_exists($sourcedir . '/ArcadeDbConnector.php'))
require_once($sourcedir . '/ArcadeDbConnector.php');
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 #28 on: April 03, 2009, 09:06:18 AM »
I'll be glad to try it, when I get home this evening.  I'll let you know.


ETA:  Sorry to take so long.  I was at work today and didn't get a chance to make the change.

It worked perfectly! 
« Last Edit: April 03, 2009, 09:42:10 PM by JimM »

Offline WBA Dude

  • Semi Newbie
  • *
  • Posts: 6
Re: E-Arcade?
« Reply #29 on: May 24, 2009, 06:03:15 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>'
;

What is the sourcedir. htdocs/forum?

Joe

Offline [SiNaN]

  • Mr. SimplePortal
  • Developer
  • *
  • Posts: 6782
  • SMF Version: 2.0.15
  • SP Version: 2.3.7
Re: E-Arcade?
« Reply #30 on: May 24, 2009, 06:08:51 AM »
Sources directory.

{forum_root}/Sources
And slowly, you come to realize... It's all as it should be...

Offline WBA Dude

  • Semi Newbie
  • *
  • Posts: 6
Re: E-Arcade?
« Reply #31 on: May 24, 2009, 06:13:49 AM »
Thanks. I installed this but none of the images show. Preview

Offline [SiNaN]

  • Mr. SimplePortal
  • Developer
  • *
  • Posts: 6782
  • SMF Version: 2.0.15
  • SP Version: 2.3.7
Re: E-Arcade?
« Reply #32 on: May 24, 2009, 06:25:10 AM »
You need to edit this in the codes:

Code: [Select]
$gamesUrl = 'http://edit this to your path/Games/';
And slowly, you come to realize... It's all as it should be...

Offline Old Fossil

  • Beta Tester
  • *
  • Posts: 796
  • Gender: Male
  • SMF Version: 2.0.4
  • SP Version: 2.3.5
Re: E-Arcade?
« Reply #33 on: March 20, 2010, 07:08:02 PM »
Any chance that all the correct codes for the latest RC3 and arcade can be put into a post for people please folks.

I want that arcade to scroll.
Daily backups mean less headaches

Block Set Up

I may be no coding expert but I am willing to help where I can.

I eat Spammers for breakfast

Offline Chen Zhen

  • The Underdog
  • Operations Manager
  • *
  • Posts: 1350
  • Gender: Male
  • Kinesis
    • WebDev
  • SMF Version: 2.1
  • EhPortal Version: 1.22
Re: E-Arcade?
« Reply #34 on: March 22, 2010, 06:25:02 PM »
Any chance that all the correct codes for the latest RC3 and arcade can be put into a post for people please folks.

I want that arcade to scroll.



Any E-Arcade blocks for smf2 rc2 should also work with smf2 rc3.

The block you are requesting is here:

SMF 2.0 and E-Arcade Beta4 Scrolling Champs Block.
Download the attached file, unzip it and add its contents to: Themes / default / images / arc_icons

Add this to a PHP Portal Block:
Code: [Select]
/* Combined Games and Scrolling Champ Block
  for use with E-Arcade and SMF2
  File by:            Eric Lawson - www.ericsworld.eu  */

/* Configure settings at start of block
- 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> - should be ok to leave current settings
- Set $no_games = <number of game icons to show at top of block>
- Set $icons_per_row = <number of icons per row>


- Uploads:
- Upload a pic called arcade_block.gif
- (you can use you own gif - just name it arcade_block.gif) to each:
- Themes/default/images/                                  */



global $gamesUrl, $boardurl;

/*  Configure your settings:  */
$no_games=8;
$icons_per_row = 4;
$no_topten = 10;
$gamesUrl = $boardurl.'/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, $smcFunc,$modSettings,$settings;

$arc_icon1 = $boardurl . '/Themes/default/images/arc_icons/arcade_block.gif';
require_once($sourcedir.'/ArcadeStats.php');

echo '<table width="100%">
         <tr>
            <td align="center">
               <br />
               <a href="',$scripturl,'?action=arcade"><img src="',$arc_icon1,'" 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);

Function games3($no,$curr_position,$icons_per_row)
{
   global $smcFunc, $scripturl, $gamesUrl;
$result = array();
$game = array();
   /*  show the latest games  */
   echo '<div align="center">Latest Games<br />
   <table cellpadding="2" cellspacing="5">
   <tr>';
   
      $result = $smcFunc['db_query']('', '
      SELECT id_game, game_name, thumbnail, game_directory
      FROM {db_prefix}arcade_games
      ORDER BY id_game, game_name DESC
      LIMIT 0,{int:no}',
         array(
         'no' => $no,
         )
      );
     
      while ($game = $smcFunc['db_fetch_assoc']($result))
      {

      $game_thumb = !$game['game_directory'] ?   $gamesUrl.$game['thumbnail'] : $gamesUrl.$game['game_directory']."/".$game['thumbnail'];
      if($curr_position == $icons_per_row)
      {
         echo '</tr><tr>';
         $curr_position=0;
      }
      echo'
      <td>
      <a href="'.$scripturl.'?action=arcade;sa=play;game='.$game['id_game'].'">
      <img src="'.$game_thumb.'" border="0" alt="'.$game['game_name'].'" width="30" height="30" title="Play '.$game['game_name'].'"/></a>
      </td>';
      $curr_position++;
   }
   $smcFunc['db_free_result']($result);

   echo '
   </tr>
   </table></div>';
}

Function games1($no,$curr_position,$icons_per_row)
{
   /* show most played games (one score version only) */
    global $smcFunc, $scripturl, $gamesUrl;
$result = array();
$game = array();
   echo '<div align="center">Most Played<br />
   <table cellpadding="2" cellspacing="5">
   <tr>';

    $result = $smcFunc['db_query']('', '
      SELECT id_game, game_name, thumbnail, game_directory
      FROM {db_prefix}arcade_games
      ORDER BY number_plays DESC , game_name ASC
      LIMIT 0,{int:no}',
         array(
         'no' => $no,
         )
      );
     
      while ($game = $smcFunc['db_fetch_assoc']($result))
      {
      $game_thumb = !$game['game_directory'] ?   $gamesUrl.$game['thumbnail'] : $gamesUrl.$game['game_directory']."/".$game['thumbnail'];
      if($curr_position == $icons_per_row)
      {
         echo '</tr><tr>';
         $curr_position=0;
      }
      echo'
      <td>
      <a href="'.$scripturl.'?action=arcade;sa=play;game='.$game['id_game'].'">
      <img src="'.$game_thumb.'" border="0" alt="'.$game['game_name'].'" width="30" height="30" title="Play '.$game['game_name'].'"/></a>
      </td>';
      $curr_position++;
   }
   $smcFunc['db_free_result']($result);

   echo '
   </tr>
   </table></div>';
}


Function games4($no,$curr_position,$icons_per_row)
{
   /* show least played games (one score version only)  */
   global $smcFunc, $scripturl, $gamesUrl;
$result = array();
$game = array();
   echo '<div align="center">Least Played<br />
   <table cellpadding="2" cellspacing="5">
   <tr>';

    $result = $smcFunc['db_query']('', '
      SELECT id_game, game_name, thumbnail, game_directory
      FROM {db_prefix}arcade_games
      ORDER BY number_plays ASC , game_name ASC
      LIMIT 0,{int:no}',
         array(
         'no' => $no,
         )
      );
     
      while ($game = $smcFunc['db_fetch_assoc']($result))
      {
      $game_thumb = !$game['game_directory'] ?   $gamesUrl.$game['thumbnail'] : $gamesUrl.$game['game_directory']."/".$game['thumbnail'];
      if($curr_position == $icons_per_row)
      {
         echo '</tr><tr>';
         $curr_position=0;
      }
      echo'
      <td>
      <a href="'.$scripturl.'?action=arcade;sa=play;game='.$game['id_game'].'">
      <img src="'.$game_thumb.'" border="0" alt="'.$game['game_name'].'" width="30" height="30" title="Play '.$game['game_name'].'"/></a>
      </td>';
      $curr_position++;
   }
     $smcFunc['db_free_result']($result);

   echo '
   </tr>
   </table></div>';
}


Function games2($no,$curr_position,$icons_per_row)
{
   /* show best rated games  */
    global $smcFunc, $scripturl, $gamesUrl, $boardurl;
$result = array();
$game = array();
   echo '<div align="center">Top Rated<br />
   <table cellpadding="2" cellspacing="5">
   <tr>';

    $result = $smcFunc['db_query']('', '
      SELECT id_game, game_name, thumbnail, game_directory
      FROM {db_prefix}arcade_games
      ORDER BY game_rating DESC , game_name ASC
      LIMIT 0,{int:no}',
         array(
         'no' => $no,
         )
      );
     
      while ($game = $smcFunc['db_fetch_assoc']($result))
      {
      $game_thumb = !$game['game_directory'] ?   $gamesUrl.$game['thumbnail'] : $gamesUrl.$game['game_directory']."/".$game['thumbnail'];
      if($curr_position == $icons_per_row)
      {
         echo '</tr><tr>';
         $curr_position=0;
      }
      echo'
      <td>
      <a href="'.$scripturl.'?action=arcade;sa=play;game='.$game['id_game'].'">
      <img src="'.$game_thumb.'" border="0" alt="'.$game['game_name'].'" width="30" height="30" title="Play '.$game['game_name'].'"/></a>
      </td>';
      $curr_position++;
   }
   $smcFunc['db_free_result']($result);

   echo '
   </tr>
   </table></div>';
}


/* Get newest champ or die  */

   $result = $smcFunc['db_query']('', '
   SELECT game.id_game, game.game_name, game.thumbnail, game.game_directory,
        mem.id_member, mem.member_name, 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',
      array(
      )
   );
   $row = $smcFunc['db_fetch_row']($result);
   $smcFunc['db_free_result']($result);
   
/* newest champ details  */
$playerid = $row[4];
$player = $row[5];
$game_id = $row[0];
$game_name = $row[1];
$score = round($row[6], 3);
$game_pic = !$row[3] ?   $gamesUrl.$row[2] : $gamesUrl.$row[3]."/".$row[2];


$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++;
$score_poss_trophy '<img src ="'.$boardurl.'/Themes/default/images/arc_icons/'.$score_poss.'.gif" width="36" height ="27" alt="'.$score_poss.'" title="'.$score_poss.'" />';
                  echo 
'<div align="center">',$score_poss_trophy,'</div><div align="center">',$out['link'],'</div>',$txtwin,' ',$out['champions'],'
                       <br /><br />'
;
               };
   echo 
'</div>
         </div>
      </div>'
;

« Last Edit: March 22, 2010, 09:50:41 PM by Underdog »

Offline Old Fossil

  • Beta Tester
  • *
  • Posts: 796
  • Gender: Male
  • SMF Version: 2.0.4
  • SP Version: 2.3.5
Re: E-Arcade?
« Reply #35 on: March 22, 2010, 06:46:59 PM »
Have this error in the log.

      Apply Filter: Only show the error messages of this member  BigEars
Apply Filter: Only show the error messages of this IP address 78.32.149.114 
     Reverse chronological order of list 1 minute ago
Apply Filter: Only show the error messages of this session 9d7fe8a4079b074d9b6edbf9e8052581
Apply Filter: Only show the errors of this type Type of error: Undefined
Apply Filter: Only show the error messages of this URL
http://xxxxxxxxk/index.php?action=admin;area=portalblocks;sa=list;f5ecc4740=9d7fe8a4079b074d9b6edbf9e8052581
Apply Filter: Only show the errors with the same message
8: Undefined offset: 1
Apply Filter: Only show the errors from this file
File: /xxxxxxxxxxxxxxxxxx/Themes/default/Portal.template.php
Line: 32    

if (!empty($modSettings['showleft']) && !empty($context['SPortal']['blocks'][1]))
30:    

{
31:    
echo '
==>32:    
<td id="sp_left"', !empty($modSettings['leftwidth']) ? ' width="' . $modSettings['leftwidth'] . '"' : '', $context['SPortal']['sides'][1]['collapsed'] && empty($modSettings['sp_disable_side_collapse']) ? ' style="display: none;"' : '', '>';
33:    
34:    
foreach ($context['SPortal']['blocks'][1] as $block)
35:    
template_block($block);
36:    
37:    
echo '

Looks good tho.
Daily backups mean less headaches

Block Set Up

I may be no coding expert but I am willing to help where I can.

I eat Spammers for breakfast

Offline Chen Zhen

  • The Underdog
  • Operations Manager
  • *
  • Posts: 1350
  • Gender: Male
  • Kinesis
    • WebDev
  • SMF Version: 2.1
  • EhPortal Version: 1.22
Re: E-Arcade?
« Reply #36 on: March 22, 2010, 07:04:40 PM »

This block works fine for me without errors when I test it on smf 2 rc3 with E-Arcade and Simple portal (only these 2 mods) installed.


You are showing me an error after using the filter... how many do you have??  ;)

Also... I believe you may have uploaded the images I included into the wrong folder... or possibly didn't following my directions regarding unzipping it first??  The title image is not showing up.

Undefined offset ... it might be because of the image files not being there. Please put the images in the proper folder and check again.
(Unzip the attachment and add its contents to: Themes / default / images / arc_icons)

If it still doesn't scroll, temporarily disable your posts scroll block to see if it is interfering.


UD

Offline Old Fossil

  • Beta Tester
  • *
  • Posts: 796
  • Gender: Male
  • SMF Version: 2.0.4
  • SP Version: 2.3.5
Re: E-Arcade?
« Reply #37 on: March 22, 2010, 07:08:47 PM »
Two errors only.
Daily backups mean less headaches

Block Set Up

I may be no coding expert but I am willing to help where I can.

I eat Spammers for breakfast

Offline Chen Zhen

  • The Underdog
  • Operations Manager
  • *
  • Posts: 1350
  • Gender: Male
  • Kinesis
    • WebDev
  • SMF Version: 2.1
  • EhPortal Version: 1.22
Re: E-Arcade?
« Reply #38 on: March 22, 2010, 07:14:58 PM »

Copy the code again... There might have been a mistake because I posted that with my other pc which seems to have problems with code blocks on sites. It should be ok now.

Offline Old Fossil

  • Beta Tester
  • *
  • Posts: 796
  • Gender: Male
  • SMF Version: 2.0.4
  • SP Version: 2.3.5
Re: E-Arcade?
« Reply #39 on: March 22, 2010, 07:18:32 PM »
Woohoo

Thanks UD

That looks great.
Daily backups mean less headaches

Block Set Up

I may be no coding expert but I am willing to help where I can.

I eat Spammers for breakfast

Offline Deezel

  • Jr. Member
  • **
  • Posts: 54
  • Gender: Male
  • It Is What It Is
    • Owner/Admin
  • SMF Version: 2.0.4
  • SP Version: 2.3.5
Re: E-Arcade?
« Reply #40 on: May 20, 2010, 02:04:14 PM »
Love it...thank you muchly.

Cheers
Deez 8)

Offline Deezel

  • Jr. Member
  • **
  • Posts: 54
  • Gender: Male
  • It Is What It Is
    • Owner/Admin
  • SMF Version: 2.0.4
  • SP Version: 2.3.5
Re: E-Arcade?
« Reply #41 on: May 20, 2010, 09:13:11 PM »
every so often i get this problem and none of the blocks show up beneath the arcade block...help????!!!!


wiecher

  • Guest
Re: E-Arcade?
« Reply #42 on: May 29, 2010, 05:32:33 PM »
every so often i get this problem and none of the blocks show up beneath the arcade block...help????!!!!
Me to.

wiecher

  • Guest
Re: E-Arcade?
« Reply #43 on: June 22, 2010, 03:40:59 PM »
stil have the problem.......

Offline busterone

  • Semi Newbie
  • *
  • Posts: 14
  • Gender: Male
    • The Demon's Den
  • SMF Version: 2.0.8
  • SP Version: 2.3.5
Re: E-Arcade?
« Reply #44 on: October 24, 2010, 05:01:44 PM »
I hate to shake an old topic, but I would like to get this block to work for me as well. I have tried it on my live site and my backup test copy of the live site. In both cases, when I click preview, the block looks as it should with no errors. When I click Add Block, I get an error stating -
An Error Has Occurred!
Database error in block code. Please check the code.

I am using SMF 2.0RC3, SP 2.3.2 and Earcade Beta4 smf2

It seems really odd that the preview works with no errors, but I cannot save the block.
Any ideas?
I would prefer to make it work, the SP arcade block is just too limited and plain.
:)

Edit- I got it. I had to disable php validation    :)
« Last Edit: October 26, 2010, 12:16:38 AM by busterone »