Go Back   vb.org Archive > vBulletin 3 Discussion > vB3 Programming Discussions
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools Display Modes
  #1  
Old 12-21-2008, 07:57 AM
ishare ishare is offline
 
Join Date: Jun 2006
Location: Stockholm
Posts: 118
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default How to show the external page content using java script ?

Hi,

I have another webpage which is installed on my server and i would like to use the content of this page on my vbulletin forum.

I would like to show the content of an external page, using java script instead of iframe. Due to each movie has different size of content, its diffucult to use same size iframe for all. So for sure javascript will be much better.

An example :
Code:
<script src="http://services.imflexi.com/imdb/tt0172495/" 
type="text/javascript"></script>
I have also a custom bbcode called "movie". So to show the content of above page, i use "[movie]{param}[/movie]" in my forum.

Above is just an example. The page i would like to show the content is much different.

The problem is, i do not know how to use the javascript to show my own external page's content.

Does anyone know how to show an external page content in my vbulletin forum using java script ?

Thanks in advance...
Reply With Quote
  #2  
Old 12-21-2008, 02:59 PM
Lynne's Avatar
Lynne Lynne is offline
 
Join Date: Sep 2004
Location: California/Idaho
Posts: 41,180
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

The way vbulletin does it is by having a script, external.php, which gets called to serve up the content. So, you would have to write a script to serve up the content of your page and use that script in your javascript call.
Reply With Quote
  #3  
Old 12-21-2008, 04:35 PM
ishare ishare is offline
 
Join Date: Jun 2006
Location: Stockholm
Posts: 118
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Example :
http://www.dwshare.com/imdb/imdb.php?mid=0960144

As you can see from above page, i have the .php pages. There is nothing wrong with that.
I would like to show the above page in my forum.

I have prepared a bbcode called movieinfo for that.
BBCode Content :
Code:
<script src="http://www.dwshare.com/imdb/imdb.php?mid={param}"type="text/javascript"></script>
So when a user use the movieinfo bbcode as : [movieinfo]0960144[/movieinfo] he/she will display the above example's content.

Ofcourse i can show this content in iframe. But as i mentioned in my first message, due to all movies do not have same size info, its diffucult to use one size iframe. (Example : width:700px - height:280px) And beside that, it will not fit the style.

When i checked this webpage, i see that its possible to use javascript to display the content of an external page. When i use the movieinfo bbcode with other sites javascript code (at first message), its working.

So i would like to be able to do the same for my own page too. Through google, i learned that with document.write command we can display the info but i couldnt do that.

Thats why i opened this thread if i can find a way to do this kind of simple(!) javascript modify.

Regards
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 12:29 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.05076 seconds
  • Memory Usage 2,183KB
  • Queries Executed 13 (?)
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)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (2)bbcode_code
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)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
  • (3)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