PDA


View Full Version : Display HTML pages within VBAdvanced?


MtnDewMan
06-24-2004, 02:29 AM
With the VBPortal and VBulletin 2 there was a php file that you could use to show an html page (that resides on the server as a separate html file) within the structure of the site ... For those familiar, the file is called display.php ...

An example is below:

http://www.reeffrontiers.com/display.php?file=html_files/sponsors.htm

Note that all of the black area where the sponsor banners are pulled from a file called sponsors.htm but displayed within the structure of the portal maintaining the headers and left module features.

http://www.reeffrontiers.com/html_files/sponsors.htm

Does anyone have a script or know how to do this with vbadvanced?

Thanks

Bryant
06-24-2004, 05:48 AM
I may not be following you exactly, but you could create a module that uses the iframe HTML tag to pull in another HTML or even PHP file. I do that a few places on my site, but here's one example of it in use;

http://www.buckeyeplanet.com/?page=recruiting

That pulls in a PHP file I have on the site at another location, and even preserves the sorting functionality within.

Apologies in advance if this isn't what you're talking about. A lot of this stuff is entirely foreign to me, just sort of have to learn as I go.


With the VBPortal and VBulletin 2 there was a php file that you could use to show an html page (that resides on the server as a separate html file) within the structure of the site ... For those familiar, the file is called display.php ...

An example is below:

http://www.reeffrontiers.com/display.php?file=html_files/sponsors.htm

Note that all of the black area where the sponsor banners are pulled from a file called sponsors.htm but displayed within the structure of the portal maintaining the headers and left module features.

http://www.reeffrontiers.com/html_files/sponsors.htm

Does anyone have a script or know how to do this with vbadvanced?

Thanks

MtnDewMan
06-25-2004, 03:51 AM
An IFrame does work, I still need to create a template to use this.

I am really looking for a way that a vbadvanced script or a 3rd party script can be executed such that it does it without having to make a template for each and every htm file I need to load. Or have one template made and the command URL passes the correct file name into the template?

I did get it to work with an iframe for your reference though ... I had to find some javascript though to have it automatically resize the height of the iframe.

http://www.fitermania.com/index.php?page=sponsors

Bryant
06-25-2004, 10:16 AM
I'd be interested in that JScript if you're willing to share it.

MtnDewMan
06-25-2004, 09:17 PM
Thiis is the code that is in the template ....


<script type="text/javascript">
function autoResize() {
var dest = document.getElementById('container');
var source = window.frames[0].document.body.innerHTML;
dest.innerHTML = source
} </script>
<div id="container">
<iframe onload="autoResize();" src="http://www.fitermania.com/html_files/sponsors.htm" frameborder="no" width="100%" scrolling="no">
</div>


So what I really need is to figure out how to make the URL that is in that code dynamic, meaning from a command line such as:

http://www.fitermania.com/xxxx.php?html_files/sponsors.htm

that it will replace that src with the info behind the question mark above. This will make the template "generic" ... so it can be called with a parameter of any htm file and it will display it without making any more templates ...

Any thoughts how to do this? Anyone?

bfoot045
07-01-2004, 09:04 PM
Why not just make a custom template and insert the html from the file that you want to put in vbadvanced into the custom template field?

russbo
12-09-2004, 07:40 PM
It works the way it is, but I can't figure out how to keep the html page that pops up within the CMPS box, within the confines of the box. It expands and takes over the other column. I think it has something to do with this part:
iframe onload="autoResize();

Example: http://x.russbo.com/index.php?page=journal

How would I bring that back within the confines of the CMPS frames?

Spydey
01-08-2005, 12:41 PM
iframe onload="autoResize();

Through some experimentation - it works when written this way:
iframe onload="autoResize()

russbo
01-10-2005, 02:59 AM
I couldn't get that to work. Also, the cmps box that contains this html from a different site, works, but prevents the right column from showing up, and, prevents any other cmps boxes below it from working.

http://x.russbo.com/index.php

rich

Nabs
01-10-2005, 04:26 AM
I would really realllyyy like to know the steps to do this. I am a newbie so I need the exact steps to add an HTML page within the Vbadvanced homepage. Any help will be seriously appreciated.

russbo
01-10-2005, 04:35 AM
Read this thread. But, this "fix" still has issues....

http://www.vbadvanced.com/forum/showthread.php?p=24827#post24827

Spydey
01-10-2005, 01:48 PM
I couldn't get that to work. Also, the cmps box that contains this html from a different site, works, but prevents the right column from showing up, and, prevents any other cmps boxes below it from working.

http://x.russbo.com/index.php

rich

Here is the template I am using to pull a local cached html file. I needed this because the html file is updated every hour - and I don't want the module to be running th php script at every load.


<table align="center" border="0" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" class="tborder" width="100%">
<tr>
<td class="tcat"><span class="smallfont"><strong>$vba_options[portal_blockbullet] Ftp Cache File Check<!-- Module Title Here --></strong></span></td>
</tr>
<tr>
<td class="$getbgrow" width="100%">

<!-- Content for your module goes here -->
<script type="text/javascript">
function autoResize() {
var dest = document.getElementById('container');
var source = window.frames[0].document.body.innerHTML;
dest.innerHTML = source
} </script>
<div id=container>
<iframe onload="autoResize()" name="I1" src="http://yoururlhere/forums/ftpcache.htm" width="100%" scrolling="no" border="0" frameborder="0">
Your browser does not support inline frames or is currently configured not to display inline frames.
</iframe>
</div>


</td>
</tr>
</table>
<br />


And I tested it in the right column - as the number 1 block. And I have all the modules appearing below as configured.

I hope that helps you out some...

Spydey

russbo
01-10-2005, 08:03 PM
AWESOME. That worked beautifully. Navbar menu dropdowns work, footer works, and it stays within its box. Just great Spydey. Appreciate it.

Spydey
01-10-2005, 09:03 PM
No problem - I beat my head against the wall for a little trying to figure it out myself...

Every now and again - I get lucky..

Now - if I just figure out how to set up the Left Side bar properly on forumhome...
It works - but every forum after the Admin section takes the whole page - so I get a huge empty area after that forum is listed... But - that's for another thread... LOL

Spydey

merseybeat
03-27-2005, 10:11 AM
Is there a way to display more than one html module, I want to use the above script above for two modules that I will be displaying on the same page
One centre, and the other left... Do they need seperate identidy and what do I change to keep them from interfering with each other

Eddie

gellpak
03-29-2005, 12:42 AM
The problem with using iFrames is that search engines will not see those contents, nor will they see any contents pulled in via javascript... I've been trying to write a custom front page script and just pull in all my modules through that and link THAT into vbacmps but I'm having trouble... don't really get all the concepts this hack works on I suppose...

rlischer
03-29-2005, 09:16 AM
Here is the template I am using to pull a local cached html file. I needed this because the html file is updated every hour - and I don't want the module to be running th php script at every load.


<table align="center" border="0" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" class="tborder" width="100%">
<tr>
<td class="tcat"><span class="smallfont"><strong>$vba_options[portal_blockbullet] Ftp Cache File Check<!-- Module Title Here --></strong></span></td>
</tr>
<tr>
<td class="$getbgrow" width="100%">

<!-- Content for your module goes here -->
<script type="text/javascript">
function autoResize() {
var dest = document.getElementById('container');
var source = window.frames[0].document.body.innerHTML;
dest.innerHTML = source
} </script>
<div id=container>
<iframe onload="autoResize()" name="I1" src="http://yoururlhere/forums/ftpcache.htm" width="100%" scrolling="no" border="0" frameborder="0">
Your browser does not support inline frames or is currently configured not to display inline frames.
</iframe>
</div>


</td>
</tr>
</table>
<br />


And I tested it in the right column - as the number 1 block. And I have all the modules appearing below as configured.

I hope that helps you out some...

Spydey


I created a template with this in it. Now how do I get it onto my vbadvanced homepage?