FM Design
Would you like to react to this message? Create an account in a few clicks or log in to continue.

IMPORTANT

FM Design is in read-only mode, please click here for more information.

Latest topics
» Forumactif Edge - Releases
by Ange Tuteur Tue 03 Sep 2019, 11:49

» GIFActif - Giphy Button for the Editor
by Ange Tuteur Wed 08 May 2019, 17:21

» Forum Closure
by Ange Tuteur Mon 01 Jan 2018, 01:28

» Chit Chat Thread
by Valoish Sun 31 Dec 2017, 19:15

» Font/Text background color.
by Valoish Sun 31 Dec 2017, 19:11

» Forumactif Messenger - Instant Message Application for Forumotion
by Wolfuryo Sun 31 Dec 2017, 18:24

» [GAME] Count to One Million!
by brandon_g Fri 29 Dec 2017, 18:58

» Post Cards
by manikbiradar Wed 20 Dec 2017, 07:50

» [GAME] Countdown from 200,000
by Valoish Wed 13 Dec 2017, 23:22

» GeekPolice Tech Support Forums - GeekPolice.net
by Dr Jay Mon 11 Dec 2017, 19:12

» Asking about some plugin for Forumotion
by Dr Jay Mon 11 Dec 2017, 19:10

» [GAME] What are you thinking right now?
by Van-Helsing Sat 09 Dec 2017, 14:51

» Widget : Similar topics
by ranbac Wed 06 Dec 2017, 18:11

» Change the Background of the Forum and put an image and how to make prefixs?
by Clement Wed 06 Dec 2017, 15:19

» Hello from Western Australia
by SarkZKalie Wed 06 Dec 2017, 05:34

Recent Tutorials
Top posting users this month

Who is online?
In total there are 16 users online :: 0 Registered, 0 Hidden and 16 Guests :: 2 Bots

None

[ View the whole list ]


Most users ever online was 515 on Tue 14 Sep 2021, 15:24

[SOLVED] How to embed games into posts?

View previous topic View next topic Go down

Anonymous
Guest
Guest

PostGuest Tue 26 Apr 2016, 04:02

Hi.

I have seen forum sites which is from forumotion that has embedded flash games and the like into their posts. One of them is an affiliate of this forum. I know that it can be embedded using the flash button in posts, but there are other games that can't be embedded. I am given an HTML embed code, which doesn't work in my posts. I have allowed HTML in the posts of my forum but still it doesn't work.

Again, how do I do such thing? What embed code should I find from sites offering free games?
Anonymous
Guest
Guest

PostGuest Tue 26 Apr 2016, 04:52

I've got Flash games on my forum too: http://fcnl.actieforum.com/f17-flash-spelletjes . Usually, I search Google for 'flash game embed' and the name of the game. Below the game is usually the embed code. Be careful, because you may want to have to copy the whole code, including copyrights.

After copying and pasting the code in a new post, I sometimes need to adjust the dimensions. I always lock the topic after posting it, so nobody can comment to it.

Here's a sample code:
Code:
<center><iframe src="http://www.flashgirlgames.com/get-game-code/4837ba5cd49c7f03caaa423049e66daf" id="game_frame" name="game_frame" width="600" height="630" align="middle" scrolling="No" frameborder="0"></iframe><div style="width:600px;display:block;text-align:left"><a title="Cartoon Games" href="http://www.flashgirlgames.com/tag/cartoon">Cartoon Games</a></div></center>


But it all depends the way the embedded code was shared. Each code may be very different.
Anonymous
Guest
Guest

PostGuest Tue 26 Apr 2016, 04:58

But those embed codes (which I believe are HTML) does not work on mine, even if I had allowed HTML (ACP>General>Messages and e-mails>Configuration) and allowed the same when posting.
Anonymous
Guest
Guest

PostGuest Tue 26 Apr 2016, 05:06

JamesPH wrote:But those embed codes (which I believe are HTML) does not work on mine, even if I had allowed HTML (ACP>General>Messages and e-mails>Configuration) and allowed the same when posting.

Could you copy the link to that post AND the code in your reply?
Anonymous
Guest
Guest

PostGuest Tue 26 Apr 2016, 05:10

Code:
<div align="center"><embed src="http://www.classicgamesarcade.com/games/flash-tetris.swf" width="529px" height="522px" autostart="true" loop="false" controller="true"></embed><br /><a href="http://www.classicgamesarcade.com/game/21602/tetris-flash-arcade-game.html">Tetris Flash Arcade Game</a></div>

I have actually added some flash games, but those only with .swf formats. However, there are some that I cannot.
Anonymous
Guest
Guest

PostGuest Tue 26 Apr 2016, 05:20

JamesPH wrote:
Code:
<div align="center"><embed src="http://www.classicgamesarcade.com/games/flash-tetris.swf" width="529px" height="522px" autostart="true" loop="false" controller="true"></embed><br /><a href="http://www.classicgamesarcade.com/game/21602/tetris-flash-arcade-game.html">Tetris Flash Arcade Game</a></div>

I have actually added some flash games, but those only with .swf formats. However, there are some that I cannot.

Odd. Works on my phpBB3: http://fcnl.actieforum.com/t241-aaaa#2678

What happens on your board? And what about the link to the topic?

PS: I just got a friend visiting me. So I'll be looking into this in about an hour or so.
Anonymous
Guest
Guest

PostGuest Tue 26 Apr 2016, 05:25

The code is just posted as it is. Nothing else. I'll be looking forward for your return. Laughing
Anonymous
Guest
Guest

PostGuest Tue 26 Apr 2016, 05:25

<div align="center"><embed src="http://www.classicgamesarcade.com/games/flash-tetris.swf" width="529px" height="522px" autostart="true" loop="false" controller="true"></embed><br /><a href="http://www.classicgamesarcade.com/game/21602/tetris-flash-arcade-game.html">Tetris Flash Arcade Game</a></div>

^

That is how it is shown. It's not even embedded here.
Anonymous
Guest
Guest

PostGuest Tue 26 Apr 2016, 06:51

JamesPH wrote:<div align="center"><embed src="http://www.classicgamesarcade.com/games/flash-tetris.swf" width="529px" height="522px" autostart="true" loop="false" controller="true"></embed><br /><a href="http://www.classicgamesarcade.com/game/21602/tetris-flash-arcade-game.html">Tetris Flash Arcade Game</a></div>

^

That is how it is shown. It's not even embedded here.

Ah, ok, that means HTML in your posts has either not been activated (ACP) or you need to click Enable HTML in this post at the bottom of the post (not shown here) just below the editor: http://prntscr.com/ax06dq

So, either you didn't SAVE the settings in your ACP or you didn't check the option. Wink


Last edited by Samantha on Tue 26 Apr 2016, 06:52; edited 1 time in total


Administrator
Gender : Male
Posts : 95
Points : 4077
Reputation : 26
Location : Macungie, PA
Language : EN10, FR5
Browser : Browser : Brave Forum Version : Forum Version : Forumactif Edge
https://github.com/SethClydesdale https://twitter.com/sethc1995

Post Tue 26 Apr 2016, 06:51

Use the flash bbcode. Angel
Code:
[flash(500,500)]http://www.classicgamesarcade.com/games/flash-tetris.swf[/flash]
Anonymous
Guest
Guest

PostGuest Tue 26 Apr 2016, 06:54

Deux wrote:Use the flash bbcode. Angel
Code:
[flash(500,500)]http://www.classicgamesarcade.com/games/flash-tetris.swf[/flash]

Yeah, that's possible, but that's just for this .swf file. Not all the games are using .swf files.
Ange Tuteur
Ange Tuteur
Administrator
Gender : Male
Posts : 4741
Points : 12004
Reputation : 2375
Location : Pennsylvania
Language : EN, JA, FR
Browser : Browser : Brave Forum Version : Forum Version : Forumactif Edge
https://sethclydesdale.github.io/ https://twitter.com/sethc1995

PostAnge Tuteur Tue 26 Apr 2016, 08:47

If you're enabling HTML you should give this topic a read :
http://help.forumotion.com/t35636-enabling-html#217290

It'll note some commonly missed points, such as the profile preferences.
Anonymous
Guest
Guest

PostGuest Tue 26 Apr 2016, 09:50

Thanks to all. The link posted by @Ange Tuteur did help. However, is there any other way to automatically have the user's preferences, especially in "Allow HTML" to be ticked as yes? Or just like what was said, it should be manually done by the users?
Ange Tuteur
Ange Tuteur
Administrator
Gender : Male
Posts : 4741
Points : 12004
Reputation : 2375
Location : Pennsylvania
Language : EN, JA, FR
Browser : Browser : Brave Forum Version : Forum Version : Forumactif Edge
https://sethclydesdale.github.io/ https://twitter.com/sethc1995

PostAnge Tuteur Tue 26 Apr 2016, 10:19

This script should automatically enable it for any member if it's disabled :
Code:
$(function() {
  if (_userdata.session_logged_in && !my_getcookie('fa_html_checked')) {
    $.get('/profile?mode=editprofile&page_profil=preferences', function(d) {
      var form = $('#ucp', d);

      if (form[0] && !form[0].allowhtml[0].checked) {
        $.post('/profile', form.serialize().replace(/allowhtml=0/, 'allowhtml=1') + '&submit=1', function() {
          my_setcookie('fa_html_checked', '1');
        });
      } else {
        my_setcookie('fa_html_checked', '1');
      }
    });
  }
  'par ange tuteur';
});

Just install it in all the pages. Wink
Anonymous
Guest
Guest

PostGuest Tue 26 Apr 2016, 10:48

Oh my! Thanks @Ange Tuteur for making my job easier now!
Anonymous
Guest
Guest

PostGuest Tue 26 Apr 2016, 13:02

@Ange Tuteur : Why are guests able to play the games? They don't have an option to enable HTML, right? I don't understand why in particular members need to set the option in their profiles...

Thanks for the script. Smile And I don't think you mind me changing the 'par ange tuteur' bit by 'By Ange Tuteur'. I'm not that enthausiastic of having the French language sitting on my site Laughing
Ange Tuteur
Ange Tuteur
Administrator
Gender : Male
Posts : 4741
Points : 12004
Reputation : 2375
Location : Pennsylvania
Language : EN, JA, FR
Browser : Browser : Brave Forum Version : Forum Version : Forumactif Edge
https://sethclydesdale.github.io/ https://twitter.com/sethc1995

PostAnge Tuteur Tue 26 Apr 2016, 20:12

Poser wrote:Oh my! Thanks @Ange Tuteur for making my job easier now!
No problem. Wink

Samantha wrote:@Ange Tuteur : Why are guests able to play the games? They don't have an option to enable HTML, right? I don't understand why in particular members need to set the option in their profiles...

Thanks for the script. Smile And I don't think you mind me changing the 'par ange tuteur' bit by 'By Ange Tuteur'. I'm not that enthausiastic of having the French language sitting on my site Laughing
Nah, guests can use HTML as far as I know. It'd be an XSS risk if they did.

No problem with that, I just included that in case someone ends up reposting it somewhere ; easier to track. Razz
Sponsored content

PostSponsored content

View previous topic View next topic Back to top

Create an account or log in to leave a reply

You need to be a member in order to leave a reply.

Create an account

Join our community by creating a new account. It's easy!


Create a new account

Log in

Already have an account? No problem, log in here.


Log in

 
Permissions in this forum:
You cannot reply to topics in this forum