Login  |  Register
HTML5 Icon HTML5 Icon HTML5 Icon
TP on Social Media

Recent

Welcome, Guest. Please login or register.
Did you miss your activation email?

August 19, 2022, 04:33:45 AM

Login with username, password and session length
Members
  • Total Members: 3843
  • Latest: Tricky
Stats
  • Total Posts: 193479
  • Total Topics: 21088
  • Online today: 51
  • Online ever: 1035
  • (November 26, 2020, 04:45:12 AM)
Users Online
Users: 1
Guests: 41
Total: 42

Author Topic: TP Champ Block?  (Read 20956 times)

0 Members and 1 Guest are viewing this topic.

bluedevil

  • Guest
TP Champ Block?
« on: October 10, 2006, 04:20:26 PM »
I wasnt sure where to post this.

I thought i saw a Tp Champ Block download once somewhere in there but i cant find it. Anyone know a link to dload it?



Thnx,BD.

Offline G6Cad

  • Friends
  • *
  • Posts: 12643
    • FamiljeGodis
Re: TP Champ Block?
« Reply #1 on: October 10, 2006, 04:23:32 PM »
TP Champ block ??? Can you explain it a bit more please ?

bluedevil

  • Guest
Re: TP Champ Block?
« Reply #2 on: October 10, 2006, 04:42:47 PM »
TP Champ block ??? Can you explain it a bit more please ?

Im sorry. I thought i saw a download for arcade champ block mod(scrolling up) for TP somewhere in this site,but i cant find it know. Any ideas?

Offline RoarinRow

  • Hero Member
  • *****
  • Posts: 1034
  • Ride my AV!
    • Avalanche Style
Re: TP Champ Block?
« Reply #3 on: October 10, 2006, 04:45:39 PM »
TP Champ block ??? Can you explain it a bit more please ?

Im sorry. I thought i saw a download for arcade champ block mod(scrolling up) for TP somewhere in this site,but i cant find it know. Any ideas?

I use this one in a right block -

Code: [Select]
global $scripturl;
/*
|----------------------------------
      SMF ARCADE CHAMPS BLOCK
      by Eric Lawson
|----------------------------------
      Made for

      TinyPortal
      SMF SMF forum 1.1RC1/RC2
      SMF Arcade_1.2.4b (1.2.4 should be ok :) )
      And Works with Beta Arcade


*/


// -- SETUP EDITS ---

$db_prefix = 'smf_'; //edit this to your your database prefix - usually smf_
$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

require('./Settings.php');


$link = mysql_connect($db_server, $db_user, $db_passwd);
mysql_select_db($db_name, $link);

// --START BLOCK CODE --
$content = "";  //set blank for a start

//Get newest champ or die
$sql = "SELECT m.ID_MEMBER,m.realName,g.id, g.game, g.name,g.champion_score "
. "FROM {$db_prefix}members m , {$db_prefix}games g "
. "WHERE g.champion_score > 0 AND m.ID_MEMBER=g.champion_member "
. "ORDER BY g.champion_time DESC LIMIT 0,1";

if(!($result = mysql_query($sql,$link)))
{
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_name = $row['name'];
$score = $row['champion_score'];

//now get the pic for the game
$ext = array('gif','GIF','png','PNG','jpg','JPG',);
$game_pic = ""; // No thumbnail for default
foreach($ext as $ex)
{
if(file_exists($boarddir. "/Games/".$row['game'].".".$ex))
{
$game_pic = $boardurl."/Games/".$row['game'].".".$ex;
}
}


//Get the 10 best players or die
$sql = "SELECT m.ID_MEMBER, m.realName, count(g.id) As cnt"
. " FROM {$db_prefix}games g, {$db_prefix}members m"
. " WHERE m.ID_MEMBER=g.champion_member"
. " GROUP BY realName "
. " ORDER BY cnt DESC LIMIT 0,{$no}";
if(!($result = db_query($sql,__FILE__,__LINE__)))
{
die("Could not get the best players");
}

$row = mysql_fetch_assoc($result);

$score_poss=0; //players position

//make the block content
$content .= "<table width=\"100%\" ><tr>
</tr>";

$content .= "
<tr>
<td>
<marquee behavior='scroll' align='center' direction='up' height='160' scrollamount='1' scrolldelay='50' onmouseover='this.stop()' onmouseout='this.start()'>
<br />
<div align=\"center\"><a href=\"{$scripturl}?action=arcade;sa=play;game={$game_id}\"><img src=\"{$game_pic}\" border= \"0\" /></a>
<br />{$txtlate}<br />
<a href=\"{$scripturl}?action=profile;u=$playerid\">{$player}</a><br />{$txtwit} {$score} {$txton} {$game_name}
<br />------------------<br />{$txtplay}
<br /> ";
do
{
$score_poss++;
$content .= "
$score_poss -
<a href=\"{$scripturl}?action=profile;u=".$row['ID_MEMBER']."\"> ".$row['realName']."</a>
<br /> $txtwin ".$row['cnt']."
<br /><br />";
}  while ($row = mysql_fetch_assoc($result));

mysql_free_result($result);
$content .= "</marquee></div></td></tr></table>" ;

echo $content;

SMF 2.0 RC3
TP 1.0 beta 5-1
Wordpress 3.0

bluedevil

  • Guest
Re: TP Champ Block?
« Reply #4 on: October 10, 2006, 09:24:21 PM »
TP Champ block ??? Can you explain it a bit more please ?

Im sorry. I thought i saw a download for arcade champ block mod(scrolling up) for TP somewhere in this site,but i cant find it know. Any ideas?

I use this one in a right block -

Code: [Select]
global $scripturl;
/*
|----------------------------------
      SMF ARCADE CHAMPS BLOCK
      by Eric Lawson
|----------------------------------
      Made for

      TinyPortal
      SMF SMF forum 1.1RC1/RC2
      SMF Arcade_1.2.4b (1.2.4 should be ok :) )
      And Works with Beta Arcade


*/


// -- SETUP EDITS ---

$db_prefix = 'smf_'; //edit this to your your database prefix - usually smf_
$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

require('./Settings.php');


$link = mysql_connect($db_server, $db_user, $db_passwd);
mysql_select_db($db_name, $link);

// --START BLOCK CODE --
$content = "";  //set blank for a start

//Get newest champ or die
$sql = "SELECT m.ID_MEMBER,m.realName,g.id, g.game, g.name,g.champion_score "
. "FROM {$db_prefix}members m , {$db_prefix}games g "
. "WHERE g.champion_score > 0 AND m.ID_MEMBER=g.champion_member "
. "ORDER BY g.champion_time DESC LIMIT 0,1";

if(!($result = mysql_query($sql,$link)))
{
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_name = $row['name'];
$score = $row['champion_score'];

//now get the pic for the game
$ext = array('gif','GIF','png','PNG','jpg','JPG',);
$game_pic = ""; // No thumbnail for default
foreach($ext as $ex)
{
if(file_exists($boarddir. "/Games/".$row['game'].".".$ex))
{
$game_pic = $boardurl."/Games/".$row['game'].".".$ex;
}
}


//Get the 10 best players or die
$sql = "SELECT m.ID_MEMBER, m.realName, count(g.id) As cnt"
. " FROM {$db_prefix}games g, {$db_prefix}members m"
. " WHERE m.ID_MEMBER=g.champion_member"
. " GROUP BY realName "
. " ORDER BY cnt DESC LIMIT 0,{$no}";
if(!($result = db_query($sql,__FILE__,__LINE__)))
{
die("Could not get the best players");
}

$row = mysql_fetch_assoc($result);

$score_poss=0; //players position

//make the block content
$content .= "<table width=\"100%\" ><tr>
</tr>";

$content .= "
<tr>
<td>
<marquee behavior='scroll' align='center' direction='up' height='160' scrollamount='1' scrolldelay='50' onmouseover='this.stop()' onmouseout='this.start()'>
<br />
<div align=\"center\"><a href=\"{$scripturl}?action=arcade;sa=play;game={$game_id}\"><img src=\"{$game_pic}\" border= \"0\" /></a>
<br />{$txtlate}<br />
<a href=\"{$scripturl}?action=profile;u=$playerid\">{$player}</a><br />{$txtwit} {$score} {$txton} {$game_name}
<br />------------------<br />{$txtplay}
<br /> ";
do
{
$score_poss++;
$content .= "
$score_poss -
<a href=\"{$scripturl}?action=profile;u=".$row['ID_MEMBER']."\"> ".$row['realName']."</a>
<br /> $txtwin ".$row['cnt']."
<br /><br />";
}  while ($row = mysql_fetch_assoc($result));

mysql_free_result($result);
$content .= "</marquee></div></td></tr></table>" ;

echo $content;

Thnx Ro!..........It worked. I was using SSI instead if php.

Offline RoarinRow

  • Hero Member
  • *****
  • Posts: 1034
  • Ride my AV!
    • Avalanche Style
Re: TP Champ Block?
« Reply #5 on: October 10, 2006, 10:03:08 PM »
No problemo, I should have said, put in a php block   :o

SMF 2.0 RC3
TP 1.0 beta 5-1
Wordpress 3.0

Tron420

  • Guest
Re: TP Champ Block?
« Reply #6 on: April 30, 2007, 12:22:12 PM »
how can i add the "arcade_block.gif" to the top of this block? so it will have the arcade_block pic at the top that u can click to go to the arcade and the scolling champs right under it ?? every time i try i get errors and the block dont work.

JPDeni

  • Guest
Re: TP Champ Block?
« Reply #7 on: April 30, 2007, 01:12:45 PM »
Add

Code: [Select]
echo '
  <a href="http://url/to/your/link"><img src="path/to/arcade_block.gif"></a>
';

joybreezy

  • Guest
Re: TP Champ Block?
« Reply #8 on: July 23, 2007, 12:35:25 PM »
Is there code available for SMF 1.1.3?

Offline G6Cad

  • Friends
  • *
  • Posts: 12643
    • FamiljeGodis
Re: TP Champ Block?
« Reply #9 on: July 23, 2007, 03:03:26 PM »