Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > Premium Archives > ibProArcade Archive
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
How do I get a popup window to work in the 'Game Objective'? Details »»
How do I get a popup window to work in the 'Game Objective'?
Version: , by jdelasko jdelasko is offline
Developer Last Online: Aug 2015 Show Printable Version Email this Page

Version: Unknown Rating:
Released: 07-02-2008 Last Update: Never Installs: 0
 
No support by the author.

I'd like to be able to add a button to the 'Game Objective' that pops up a window. I added the script below to the skin_arcade.php file but it doesn't work. Where can I add this script so that the popup function works?

===========Below is the javascript==============

<SCRIPT TYPE="TEXT/JAVASCRIPT">
<!--
var popupWindow=null;
function popup(mypage,myname,w,h,pos,infocus){

if (pos == 'random')
{LeftPosition=(screen.width)?Math.floor(Math.rando m()*(screen.width-w)):100;TopPosition=(screen.height)?Math.floor(Mat h.random()*((screen.height-h)-75)):100;}
else
{LeftPosition=(screen.width)?(screen.width-w)/2:100;TopPosition=(screen.height)?(screen.height-h)/2:100;}
settings='width='+ w + ',height='+ h + ',top=' + TopPosition + ',left=' + LeftPosition + ',scrollbars=yes,location=yes,directories=yes,stat us=no,menubar=no,toolbar=no,resizable=no';popupWin dow=window.open('',myname,settings);
if(infocus=='front'){popupWindow.focus();popupWind ow.location=mypage;}
if(infocus=='back'){popupWindow.blur();popupWindow .location=mypage;popupWindow.blur();}

}
// -->
</script>


============Below is the code for the button===========

<input style="font-size:10px;color:#9999ff;font-family:verdana;background-color:#222829;" type="button" name="B1" value="More Info" onClick="popup('http://www.majorleaguetalk.com/forums/arcade/gamedata/pinchhitter2.html','Pinch Hitter 2 Help','640','480','center','front');">


As you can see from the link below, the button appears in the game objective box, but a page error occurs becausae the function is apparently not available. I'd like to use this popup funtion to display things such as detailed game information or to display a specific game thread in the forums to encourage game players to post comments about the various games.

http://www.majorleaguetalk.com/forum...lay&gameid=295

--------------- Added [DATE]1214973910[/DATE] at [TIME]1214973910[/TIME] ---------------

Update:

OK, it all works with Firefox and Opera but not with internet explorer. Strange.

--------------- Added [DATE]1214986701[/DATE] at [TIME]1214986701[/TIME] ---------------

OK.... figured out a different way to do it that works with all browsers.

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #2  
Old 01-16-2009, 01:14 PM
theque's Avatar
theque theque is offline
 
Join Date: Jul 2008
Posts: 52
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

how did you get this to work ? and did you do it with the v3 skin thats what im trying to do also cheers
Reply With Quote
  #3  
Old 01-16-2009, 03:06 PM
Gemma's Avatar
Gemma Gemma is offline
 
Join Date: Apr 2004
Location: Scotland
Posts: 1,229
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by theque View Post
how did you get this to work ? and did you do it with the v3 skin thats what im trying to do also cheers
https://vborg.vbsupport.ru/showthread.php?t=155835
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 04:40 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.04576 seconds
  • Memory Usage 2,214KB
  • Queries Executed 18 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (3)post_thanks_box
  • (3)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (3)post_thanks_postbit_info
  • (2)postbit
  • (3)postbit_onlinestatus
  • (3)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete