EzPortal - Portal Software for Forums

EzPortal - Made to Fit Your SMF Forum - Glad You Found Us!
+- +-

UserBox

Welcome, Guest.
Please login or register.
 
 
 
Forgot your password?

+- Recent Posts

New built in translations for six langauges! by EzPortal
March 26, 2024, 11:15:32 pm

Smiley missing in shoutbox 2.1.4 by hustreamload
July 26, 2023, 08:14:02 am

Re: Theme Select Box question? by Shades
March 15, 2023, 06:49:49 pm

Re: Theme Select Box question? by Shades
March 09, 2023, 02:09:24 pm

Re: Theme Select Box question? by Shades
March 09, 2023, 01:55:53 pm

Re: Theme Select Box question? by EzPortal
March 09, 2023, 01:47:42 pm

Re: Theme Select Box question? by Shades
March 09, 2023, 01:34:07 pm

Re: Theme Select Box question? by EzPortal
March 09, 2023, 12:20:17 pm

+- HTML Menu


Sample HTML Block Usage - You May Custom Code it, as needed!

Recent Topics ezBlock

New built in translations for six langauges! by EzPortal
March 26, 2024, 11:15:32 pm

Smiley missing in shoutbox 2.1.4 by hustreamload
July 26, 2023, 08:14:02 am

Theme Select Box question? by Shades
March 15, 2023, 06:49:49 pm

Where is the facebook button color? by EzPortal
February 28, 2023, 06:45:09 pm

Display on Mobile - SMF 2.1.3 and EZ 5.5.2 by BugginIn
December 29, 2022, 04:07:13 pm

Blocks Help by Riggs1973
November 20, 2022, 12:59:30 pm

Surface ol lite theme release Free! by Steffen K.
November 18, 2022, 03:57:24 am

Undefined index: href by EzPortal
October 04, 2022, 08:49:59 pm

SMF-ezportal_column_5.cache): failed to open stream: No such file or directory by EzPortal
June 04, 2022, 11:40:13 am

Arcade block error: failed to open stream: No such file or directory by Shades
May 20, 2022, 02:47:13 pm

Author Topic: SMF Arcade block Mulitble Champs?  (Read 13878 times)

0 Members and 1 Guest are viewing this topic.

Offline charmerSC

  • Newbie
  • *
  • Posts: 6
  • Karma: 0
SMF Arcade block Mulitble Champs?
« on: March 18, 2013, 07:00:45 pm »
Is there a block for SMF Arcade Multiple Champs?

Offline charmerSC

  • Newbie
  • *
  • Posts: 6
  • Karma: 0
Re: SMF Arcade block Mulitble Champs?
« Reply #1 on: March 19, 2013, 03:54:47 am »
I found this while surfing and it works.

Quote
//-------START-------------
/*
|----------------------------------
SMF ARCADE SCROLLING CHAMPS BLOCK for SMFARCADE V2
by Eric Lawson
|----------------------------------
Made for TinyPortal and SMF forum

*/
//Upload a pic called arcade_block.gif (you can use you own gif - just name it arcade_block.gif)
//to your Themes/<themename>/images/ folder

// -- SETUP EDITS ---

$no = 10; //number of top players to show

// --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

global $scripturl,$sourcedir,$boardurl,$smcFunc,$modSettings;
require_once($sourcedir.'/ArcadeStats.php');

//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.real_name,'') AS real_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";
if(!($request = $smcFunc['db_query']('', $sql)))
{
   die("Could not get the newest champ");
}
$row = $smcFunc['db_fetch_assoc']($request);
$smcFunc['db_free_result']($request);

if(isset($row['game_directory']))
{
   $row['game_directory']=$row['game_directory']."/";
}

//newest champ details
$playerid = $row['id_member'];
$player = $row['real_name'];
$game_id = $row['id_game'];
$game_name = $row['game_name'];
$score = $row['score'];
$game_pic = $modSettings['games_url'].$row['game_directory'].$row['thumbnail'];

$bp=ArcadeStats_BestPlayers($no);

$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 '<table width="100%">
         <tr>
            <td align="center">
               <br />
               <a href="',$scripturl,'?action=arcade"><img src="',$settings['images_url'],'/Games/arcade_block.gif" border= "0" alt="Arcade" /></a>
               <br /><br/>
            </td>
         </tr>
      </table>
      <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="/Games',$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>';
     
//---------END-------------- 

Offline EzPortal

  • Administrator
  • *****
  • Posts: 1299
  • Karma: 67
Re: SMF Arcade block Mulitble Champs?
« Reply #2 on: March 19, 2013, 08:31:48 am »
Cool that should be very helpfull.
Like ezPortal? Support me at https://www.patreon.com/vbgamer45/

 

Related Topics

  Subject / Started by Replies Last post
0 Replies
13166 Views
Last post December 25, 2008, 12:21:45 am
by Renegade
0 Replies
9339 Views
Last post August 11, 2010, 07:41:57 pm
by Martin
1 Replies
8756 Views
Last post May 21, 2016, 07:22:13 pm
by EzPortal
e-arcade

Started by hrroach Support

2 Replies
7697 Views
Last post May 03, 2019, 07:59:34 am
by hrroach
14 Replies
338570 Views
Last post May 20, 2022, 02:47:13 pm
by Shades

+-SMF Gallery

Quick Menu


Powered by EzPortal