TP-Docs
HTML5 Icon HTML5 Icon HTML5 Icon
TP on Social Media

Recent

Welcome to TinyPortal. Please login or sign up.

Members
  • Total Members: 3,965
  • Latest: boruko
Stats
  • Total Posts: 195,982
  • Total Topics: 21,320
  • Online today: 231
  • Online ever: 8,223 (February 19, 2025, 04:35:35 AM)
Users Online
  • Users: 0
  • Guests: 126
  • Total: 126

Arcade in a block

Started by technodragon73, February 06, 2006, 06:07:32 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

G6Cad

If it is the Arcade champions block you want i have the code and the image needed.
If you want i can add it here, or fetch it from my site (Mods And Addons)

rebelrose


ganteng

excuse me can anybody tell me how to add arcade to my forum??

thanks and where can i download that??

Nokonium

Go to
http://www.smfarcade.net/ you will need to register.

They have different versions of the Arcade Mod, support the mod and have games to install for the Arcade.

nikita

A lot of our members look for this code, I will give it below - the code is courtsey - Ray from smfarcade. Hope this helps all  :)

My friend who also uses TP & smf helped me in getting this code.


require('./Settings.php');


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


$game = random_game();


echo "<center><a href=\"index.php?action=arcade;do=play;game={$game['id']}\"><img src=\"{$game['thumbnail']}\" alt=\"{$game['name']}\" /></a><br />
<a href=\"index.php?action=arcade;do=play;game={$game['id']}\">{$game['name']}</a></center>";


// Functions begin
// All returns array

// random_game( [category id] )


function random_game($cat_id = ""){
global $link,$db_prefix,$boarddir,$boardurl;
if($cat_id == ""){
$query = "SELECT * FROM {$db_prefix}games ORDER BY rand() LIMIT 0,1";
}else{
$query = "SELECT * FROM {$db_prefix}games WHERE category='{$cat_id}' ORDER BY rand() LIMIT 0,1 ";
}

$game = mysql_fetch_array(mysql_query($query));
$ext = array('gif','GIF','png','PNG','jpg','JPG',); // Extensions to look for
$game['thumbnail'] = ""; // No thumbnail for default

foreach($ext as $ex){
if(file_exists($boarddir. "/Games/".$game['game'].".".$ex)){
$game['thumbnail'] = $boardurl."/Games/".$game['game'].".".$ex;
}
}

return $game;

}



You need to have arcade installed with games for this block to work. Just paste this in a php block and there you go.... :)

G6Cad

Also you need to put a global string to the code or els it will fill up the error log

Mz.Betoch

so what global string would i add? and where?

Aunt Clair

I have successfully installed the arcade to SMF 1.1.4 and Tiny Portal .98 but I need help installing the games . Can sks teach a newbie what to do next ? Thanks .

Dragooon

That Question can be better answered over the SMFArcade site.

qayyom

Quote from: Aunt Clair on November 09, 2007, 04:34:54 AM
I have successfully installed the arcade to SMF 1.1.4 and Tiny Portal .98 but I need help installing the games . Can sks teach a newbie what to do next ? Thanks .

download games from smfarcade.net's download section in Zip form, upzip all and upload to " /public_html/games/ "with any ftp uploader like CuteFTP etc.

go to arcade manager > games > install

it is very easy after uploading manually other than it's own opload option

This website is proudly hosted on Crocweb Cloud Website Hosting.