SMF For Free Support Forum
Signup For Free Forum
March 22, 2010, 07:23:50 am *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: Welcome to SMF For Free. The best free SMF Host
 
   Home   Help Search Arcade Gallery Login Register  

Pages: [1]
  Print  
Author Topic: [Guide] Setting up a Custom Arcade  (Read 2178 times)
0 Members and 1 Guest are viewing this topic.
Omikron 9861
SMF For Free Full Member
*
Offline Offline

Posts: 229


High School Science.........


View Profile
« on: August 12, 2007, 12:12:01 am »

Basically, this will teach you how to make a custom arcade containing games from sites where they give you embed codes to use their games, like miniclip.com.

Some basic knowledge of HTML is recommended.

GETTING THE EMBED CODES
Any site which offers you games to use on your website usually gives you embed codes. For example, http://www.miniclip.com/games/en/webmaster-games.php.
Get the embed codes for all the games that you plan to use in your arcade.

MAKING THE ARCADE
This is fairly complicated. We'll use dynamic iframes for this. First, you need to make an individual HTML file for each of the games.
Code:
<HTML>
<HEAD>
<TITLE>REPLACE</TITLE>
</HEAD>
<BODY>
PLACE THE EMBED CODE HERE
</BODY>
</HTML>

You need to make one individual HTML file for each of your games. Replace 'PLACE THE EMBED CODE HERE' with the embed code for that game.. Also, replace 'REPLACE' with the game's name. Once you are done customizing the code, put it in notepad and save it as '*.html'. Replace * with a meaningful name that will tell you which game's it is. Upload the files somewhere (I prefer Google Pagecreator) Remember the urls of the files.

Now, you need the actual page that will be displayed to your users.

Code:
<HTML>
<HEAD>
<TITLE>Arcade</TITLE>
<script>
function loadIframe(id,theURL) {
document.getElementById(id).src = theURL;
}
</script>
</HEAD>
<BODY>
<table border="1" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" width="100%" id="AutoNumber1">
<tr>
<td width="25%"> </td>
<td width="75%"> <iframe id="arc" src="game1">Sorry, your browser does not support iframes</iframe> </td>
</tr>
</table>
</BODY>
</HTML>
That is the outline for the body.
In between <td width=25%> and the </td> following it, you place 1 link to each of the games.  Also, replace 'game1' with the url of the first game. This will be the game which will be shown by default.
For each of the games, you put this code between <td width=25%> and </td>
Code:
<a href="javascript:void(0);" onmousedown="loadiframe('arc','THEURL')">REPLACE THIS WITH THE GAME'S NAME</a>
You can also put this just before </BODY>:
Code:
<a href="javascript:history.go(-1);">Go back</a>
That will take you user back to your forum.
That will give you the HTML for the page which will be shown to your users. Copy-paste it into notepad and save it as Arcade.html
Upload it anywhere. I prefer Google PageCreator. Remember the URL, once again.
You can make any changes on that page to make it look better.

REDIRECTING YOUR USER
Then place this code into your headers/footers:
Code:
<script>
if(location.href.match(/action=arcade/i)) {
location.href="THE URL";
}
</script>
Replace 'THE URL' with arcade.html's access url.
eg. http://vikhyatk.googlepages.com/arcade.html
That will basically take your user to your page instead of the default SMF Arcade. Note that you need the SMF arcade installed for this to work.


If you have any questions, feel free to ask.
« Last Edit: August 27, 2007, 09:14:22 pm by simply sibyl » Logged


You have no idea what you are missing out on. The best place to discuss Eragon, Eldest and Book 3
 is just a single click away. So click!

Want a spoiler tag on your forum? Click here!
LightningKnight
SMF For Free Member
*
Offline Offline

Posts: 41



View Profile WWW
« Reply #1 on: November 09, 2007, 02:08:51 pm »

I just put the embed code around
Code:
[html] [/html]
and it works great...
Logged

Celebrus
SMF For Free Hero
*
Offline Offline

Posts: 941



View Profile WWW
« Reply #2 on: December 06, 2007, 01:25:36 am »

There seems to be a new, easier method to add games to the arcade. It's a code by Agent Moose.
http://smcodes.smfforfree3.com/index.php/topic,455.html
Logged

outlaw16151
SMF For Free Full Member
*
Offline Offline

Posts: 112


Come have fun at the Lounge


View Profile WWW
« Reply #3 on: January 01, 2009, 05:29:17 am »

lol i tried it and i didnt see anything no new link nothing
Logged




Pages: [1]
  Print  
 
Jump to:  



Powered by SMF 1.1.11 | SMF © 2006-2009, Simple Machines LLC
ServerBeach Coupon
Page created in 0.229 seconds with 16 queries. (Pretty URLs adds 0.039s, 2q)