How to Encapsulate third party HTML in an <iframe> element...
Collapse
This is a sticky topic.
X
X
-
My banners our 720px wide. When my browser width drops below 720px, the banners are cropped. I'm trying to make them responsive so the entire banner is visible. So far I haven't been able to do this.
VB 5.3.3 with latest Firefox browser.Leave a comment:
-
This works well for rotating banners, I could not make the ads module work for displaying more than one banner, seems its always showing the first one only. So with this tut and some googling I created this for rotating banners. I figured i would add to this page as someone might find it useful.
first create a html page named banners.html in your forum directory and add this code. Be sure to edit the image locations with your own images in adImages = new Array and the img src in the body. Save the file and upload.
Code:<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"> <html> <head> <title>Rotating Banners</title> <script language="Javascript" type="text/javascript"> adImages = new Array("images/pb.png", "images/wf.png" ) thisAd = 0 imgCt = adImages.length function rotate(){ if( document.images ){ thisAd++ if( thisAd == imgCt ){ thisAd = 0 } document.adBanner.src=adImages[thisAd] setTimeout("rotate()", 2 * 5000) } } </script> </head> <body onload="rotate()"> <center><img src="images/wf.png" name="adBanner" alt="Ad Banner" /></center> </body> </html>
then just add a html module were you want it like the original tutorial explains with this line here.
Leave the width so its the size of your forums, and the height is a bit bigger than my actual banner size for a nice looking module.
also edit the link to point to your site/banners.html
Code:<iframe src="http://www.YourSite.com/forums/banners.html" width='99%' height='120'></iframe>
Leave a comment:
-
This works well and is what I need, but the fixed height is unfortunate. Still, with some work I can leverage this to be my CMS replacement.Leave a comment:
-
Why is this thread stickied and there is nothing about "Basics of vBulletin 5 Customization" stickied?Leave a comment:
-
We actually imported from another BB system into 4.0, then upgraded it to some Betas, to 5.0 and now 5.0.1Leave a comment:
-
ok good, from which version to which version you made the upgrade? and can you show the url of the website to see the custom workLeave a comment:
-
Yes so far w/the upgrades it has worked... Of course if VB changes the way the headers /footers are called you'd have to fix those files.. but its working great here...Leave a comment:
-
thanks WDWMS but is your custom work compatible when you upgrade? I am looking for a solution which allow to upgrade without loosing the customization.Leave a comment:
-
This here will work a bit better for you: http://www.vbulletin.org/forum/showthread.php?t=289333 takes more work, but you'll be happier in the end w/the result.Leave a comment:
-
-
Maybe because they don't have anything to say?!
And?
Please keep this thread on topic for the discussion of the original postLeave a comment:
-
Why does this thread not display as closed when it sits in a sticky at the top?
- - - Updated - - -
And why has nobody replied when it has had over 200 view reports?
- - - Updated - - -
It is also over a month old.Leave a comment:
-
How to Encapsulate third party HTML in an <iframe> element...
Doing this takes a little setup work but gives you more control over your Static HTML modules.
1) First create a directory to hold your HTML files. If it were me, I'd create it in my %forumroot% directory and call it static_html.
2) Remember that most image and CSS calls in HTML are relative. You should change these to be absolute calls with the full URL to the resource. So if you store images in the images directory, the full URL would be http://%domain%/%forumroot%/images/resourcename.png
3) In your Static HTML module call the file like this:
HTML Code:<iframe src="http://%domain%/%forumroot/static_html/file.html"></iframe>
Code:iframe {width:99%;height:XXXpx;}
%domain% = This is your site's domain. For example, this site's domain is www.vbulletin.com
%forumroot% = This is where vBulletin is installed. This site's %forumroot% is /forum/Tags: None- Stuck
Related Topics
Collapse
-
by Wayne LukeThe Static HTML Module allows you to provide a lot of customization to your site including embedding from other sites, slideshows and even small custom games. However it does have a few caveats when being...
-
Channel: vBulletin 5 Tutorials
-
-
by In OmnibusI'm trying to add a simple HTML script with CSS and JS to a static HTML module.
The HTML and CSS are working perfectly.
The jquery meta tag is breaking the page.
...-
Channel: Support Issues & Questions
-
-
by DemOnstarBecause of my HTML ignorance I have downloaded a free template for ease and simplicity, or so I thought. The template looks like this.
I have put all of the contents of the...-
Channel: Support Issues & Questions
-
-
by DemOnstarHello there. I am about to embark on another aspect of this massive learning curve and I need your help. I have given up on permissions for the time being because I am not getting very far there.
...-
Channel: Support Issues & Questions
-
Leave a comment: