vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=15)
-   -   Adding Javascript or flash games (https://vborg.vbsupport.ru/showthread.php?t=252220)

forum4 10-18-2010 03:34 AM

Adding Javascript or flash games
 
So I can't add javascript to posts, but I just wanted to be able to add some flash games manually. Is there any way to do that?

I already have an arcade, but just wanted to add some java code to embed some games into the forum without messing with the arcade. They will be holiday oriented, so wanting to change them up each month etc.

Is there any way to do it through the posts, or do I need to create a page for each one then maybe post the link to the page for each game?

Thanks so much.

BirdOPrey5 10-18-2010 05:34 PM

You could put any HTML you wanted (including flash embedding code) into a BB Code and call each game by unique code such as:

[pacman][/pacman]

It means without additional mods someone could put a pacman game in any post but in practice probably no one would know to even try and you could edit/delete it if it did happen.

forum4 10-20-2010 03:34 AM

Tried that, but nothing worked. It has "javascript" in it, so maybe that is why the BB code won't work.

BirdOPrey5 10-20-2010 11:05 AM

If you can show me the code(s) I can probably get it to work as a BB Code...

forum4 10-21-2010 09:18 PM

OK, here's one of the codes.

HTML Code:

<script language="JavaScript" type="text/JavaScript">
        novelgames_gameID = '22';
        novelgames_language = 'e';
               
</script>
<script language="JavaScript" type="text/JavaScript" src="http://www.novelgames.com/flashgames/game.js"></script>

Hope this works. Thanks so much for taking the time to help :)

BirdOPrey5 10-21-2010 11:11 PM

It's working fine for me... Your code as the replacement and all the Yes/No options set to "No"

Demo: http://www.juot.net/forums/showthread.php?t=48864

Because it's JavaScript if you are adding it to an existing thread and not posting a new one you have to refresh the page to see it. Other people visiting the page will see it fine though.

forum4 10-22-2010 03:12 AM

It works now....thanks so much :D

RobbieZ 10-28-2010 08:18 AM

I guess you should always lock the thread too, so no one can quote you and spy the code?

BirdOPrey5 10-28-2010 08:51 AM

If you feel that would be a problem then yes locking is a good idea.


All times are GMT. The time now is 07:23 PM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01470 seconds
  • Memory Usage 1,725KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_html_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (9)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete