Jump to content


10 Recently Added Arcade Games Unreal Portal


  • You cannot reply to this topic
7 replies to this topic

#1 redalert19882000

    Advanced Member

  • Members
  • PipPipPip
  • 54 posts

Posted 22 December 2006 - 08:07 AM

By -Calypso- Upgraded to works with ibProArcade 3.2.0 Final by redalert19882000

Go To: ACP > Unreal Mods > Add Custom Block

Block Name: 10recentadded
Block Title: Last 10 Added
Block PHP/HTML:

<tr><th width="10%" nowrap="nowrap">Img</th><th width="90%" nowrap="nowrap">Game Name</th></tr>
<? 
$champer = $this->ipsclass->DB->query("SELECT gid, gtitle, gname FROM ibf_games_list ORDER BY added DESC LIMIT 0,10");

while($goats=$this->ipsclass->DB->fetch_row($champer))

{ 
$game_id=$goats["gid"];
$game_name=$goats["gtitle"];

$content .= "<tr><td class='row1' colspan='1'><img src='arcade/images/{$goats['gname']}2.gif'></img></td><td class='row1' colspan='1'><a 

href='index.php?autocom=arcade&code=play&g=$game_id'><b>$game_name</b></a></td></tr>";
}
echo $content; 
?>


Edit the path!!!!!!

#2 ShootMePls

    Advanced Member

  • Members
  • PipPipPip
  • 51 posts

Posted 31 December 2006 - 10:34 AM

what path to where ?

#3 ShootMePls

    Advanced Member

  • Members
  • PipPipPip
  • 51 posts

Posted 06 January 2007 - 11:02 AM

this works fine and no path needs editing

#4 NiceM

    Newbie

  • Members
  • Pip
  • 4 posts

Posted 23 April 2007 - 10:42 AM

View Postredalert19882000, on Dec 22 2006, 09:06 AM, said:

By -Calypso- Upgraded to works with ibProArcade 3.2.0 Final by redalert19882000

Go To: ACP > Unreal Mods > Add Custom Block

Block Name: 10recentadded
Block Title: Last 10 Added
Block PHP/HTML:

<tr><th width="10%" nowrap="nowrap">Img</th><th width="90%" nowrap="nowrap">Game Name</th></tr>
<? 
$champer = $this->ipsclass->DB->query("SELECT gid, gtitle, gname FROM ibf_games_list ORDER BY added DESC LIMIT 0,10");

while($goats=$this->ipsclass->DB->fetch_row($champer))

{ 
$game_id=$goats["gid"];
$game_name=$goats["gtitle"];

$content .= "<tr><td class='row1' colspan='1'><img src='arcade/images/{$goats['gname']}2.gif'></img></td><td class='row1' colspan='1'><a 

href='index.php?autocom=arcade&code=play&g=$game_id'><b>$game_name</b></a></td></tr>";
}
echo $content; 
?>


Edit the path!!!!!!


If i want to make a block that shows the resently added games just for one out of more categrys, lets say action, haw should the sql query be then?

#5 il saggio

    Advanced Member

  • Members
  • PipPipPip
  • 39 posts

Posted 12 December 2007 - 08:15 AM

work with ipb 2.3 :)

#6 dheyrman

    Advanced Member

  • Members
  • PipPipPip
  • 49 posts

Posted 06 March 2009 - 04:31 AM

the code working only for viewing on portal

but not when they click on a game in the portal. it give an error and the fonts of the board is verry big.

it's working fine if remove the block from the portal, everything is working and everybody can play.

is using portal 2.2 -2.3 version and arcade 3.4.0

hope sombody can fix these code

#7 dheyrman

    Advanced Member

  • Members
  • PipPipPip
  • 49 posts

Posted 16 April 2009 - 06:19 PM

i added a new custom block for the arcade. works with ibProArcade 3.4
(you just need to translate the dutch language to english or any other)

this display ,
- Link to arcade
- Top 3 champions
- Newest game
- Random game
- Latest score

<?php

   $this->ipsclass->DB->query("SELECT * FROM ibf_games_list WHERE active = 1 ORDER BY RAND() LIMIT 0, 1");
   $random_game = $this->ipsclass->DB->fetch_row();

   $this->ipsclass->DB->query("SELECT g.gtitle, g.gid, g.gname, s.gid, s.score, s.datescored, s.mid, m.mgroup, m.members_display_name, m.id FROM ibf_games_scores AS s LEFT JOIN ibf_games_list AS g ON (g.gid=s.gid) LEFT JOIN ibf_members AS m ON (m.id=s.mid) ORDER BY s.datescored DESC LIMIT 1");
   $newest_score = $this->ipsclass->DB->fetch_row();
  
	   $i = 0;
	   $this->ipsclass->DB->query("SELECT s.*, m.members_display_name as name, m.mgroup, g.* from ibf_games_scores as s LEFT JOIN ibf_games_list as g ON (s.gid = g.gid) LEFT JOIN ibf_members as m ON (s.mid = m.id) WHERE g.active = 1 AND s.is_highscore = 1 ORDER BY s.datescored DESC	LIMIT 0,1");
	   while( $champrow = $this->ipsclass->DB->fetch_row() )
	   {
		 $champrow['datescored'] = $this->ipsclass->get_date($champrow['datescored'],'ARCADE');
		
		 if( $champrow['datescored'] == date("m/d/Y") )
		 {
		   $champrow['datescored'] = $this->ipsclass->lang['today'];
		 }else{		
		   $yesterday = date("m/d/Y", mktime(0, 0, 0, date("m")  , date("d")-1, date("Y")));
		 }
		
		 if( $champrow['datescored'] == $yesterday )
		 {
		   $champrow['datescored'] = $this->ipsclass->lang['yesterday'];
		 }
	 
	   }

	   $league = $this->ipsclass->DB->query("select l.userid, AVG(l.position) AS position , sum(l.points) as totalpoints, m.members_display_name as name , m.mgroup , arcade_time_spent, id from ibf_games_league as l left join ibf_members as m on (l.userid = m.id) group by l.userid order by totalpoints desc LIMIT 3");
		while ($row = $this->ipsclass->DB->fetch_row($league) )
		{
		   extract($row);
		   $rank++;
		   $Ctt++;
		   $name = "<b>".$row['name']."</b>";			  
		   $Champion['ArcadeChampion'.$Ctt] = '<a href="'.$this->ipsclass->base_url.'showuser='.$row['userid'].'">'.$name.'</a>';
		}


   $this->ipsclass->DB->query("SELECT gname,gid,gtitle FROM ibf_games_list WHERE active=1 ORDER BY gid DESC LIMIT 1");
   $i=0;
   while ($rows = $this->ipsclass->DB->fetch_row() )
   {
	 $game = $rows['gid'];
	 $gtitle = $rows['gtitle'];
	 $glink = "<img src='arcade/images/{$rows[gname]}2.gif'> <a href='index.php?autocom=arcade&do=play&gameid={$game}'>{$gtitle}</a>";
   }
   
   echo "<center><b>[<a href='index.php?autocom=arcade'>Ga Naar Speelhal</a>]</b></center></tr>
   <tr><td class='darkrow3' colspan='2'>Kampioen Speelhal</td></tr>
   <tr>
   <td class='row2'><b>1ste Plaats:</b> {$Champion['ArcadeChampion1']}<br></td>
   </tr>
   <tr>
   <td class='row2'><b>2de Plaats:</b> {$Champion['ArcadeChampion2']}<br></td>
   </tr>
   <tr>
   <td class='row2'><b>3de Plaats:</b> {$Champion['ArcadeChampion3']}<br></td>
   </tr>
   <tr>
   <td class='darkrow3' colspan='2'>Nieuwe Game</td>
   </tr>
   <tr>
   <td class='row2'>{$glink}</td>
   </tr>
   <tr>
   <td class='darkrow3' colspan='2'>Willekeurige Game</td>
   </tr>
   <tr>
   <td class='row2'>
	 <img src='arcade/images/{$random_game[gname]}2.gif' title='{$random_game[gtitle]}' alt='{$random_game[gtitle]}'>  <a href='index.php?autocom=arcade&do=play&gameid={$random_game['gid']}'>{$random_game[gtitle]}</a>
   <tr>
   <td class='darkrow1' colspan='2'>Laatste Score</td>
   </tr>
   <tr>
   <td class='row2'>
	 {$newest_score['members_display_name']} scored {$newest_score['score']} points playing <a href='index.php?autocom=arcade&do=play&gameid={$newest_score['gid']}'>{$newest_score['gtitle']}</a> <img src='arcade/images/{$newest_score[gname]}2.gif' title='{$newest_score[gtitle]}' alt='{$newest_score[gtitle]}'>
   </td>
   </tr>";
   
?>


#8 Cyclops

    Newbie

  • Members
  • Pip
  • 3 posts

Posted 05 September 2009 - 03:19 PM

Nice code for the portal....Works great thnak you...





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users