TP-Docs
HTML5 Icon HTML5 Icon HTML5 Icon
TP on Social Media

Recent

Welcome to TinyPortal. Please login or sign up.

Members
  • Total Members: 3,973
  • Latest: NonStop
Stats
  • Total Posts: 196,234
  • Total Topics: 21,353
  • Online today: 639
  • Online ever: 8,223 (February 19, 2025, 04:35:35 AM)
Users Online
  • Users: 1
  • Guests: 230
  • Total: 231
  • @rjen

Pulling a web address into the frontpage.

Started by Dazed, May 15, 2007, 04:24:48 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Dazed

I want to call this address into the frontpage of the forums... http://www.grumpyoldmen.us/WebSpectator/index.php

I thought I found something about Iframes but I am not sure if that is the best was to go about it. I just want to show the stats whether by article or whatever...

Zetan

an iFrame will work, but not all browsers like iFrames. You may need to size the frame. I've put some of my iFrames in tables.

Have a look at this site regarding iFrames.
http://www.w3schools.com/tags/tag_iframe.asp

I use this site quite a lot  :up:

akulion

u also may wana take a look at this code by thurnok
http://www.tinyportal.net/index.php?topic=7159.0

it allows u to set a default page to load in an article or in a block in ur front page. And also your members can choose to define their own pages if they wish :up:

Dazed

Thanks guys! I got it to work but cannot seem to get the height changed no matter what I set it to.

<iframe
src ="/WebSpectator/index.php"
width ="100%">
height ="100%">
</iframe>


Any idea what I am doing wrong?

Thurnok

The problem with setting a height to a percentage in an article or block is that the block is trying to size itself according to the content that is going to be placed into it.  At the time the block/article is about to be displayed, it will not know the full (or 100% in this case) height of the page you want to load "into" the iframe.

Therefore, there are two things you can do.  First, you can set the height to an actual pixel value instead of a percentage, or you can add some javascript code (I believe there is already a nice javascript snippet on www.dynamicdrive.com) to autosize the IFrame for you according to the size of the page you are loading into it.
Thurnok
The one, the only!

Dazed

#5
Ok, Thurnok, that appears to be what I would like to do. Where would I make the edits? The script in question is here... http://www.dynamicdrive.com/dynamicindex17/iframessi.htm

Can I call it directly from the block or will I have to hardcode it into the theme? If it needs hard coded, which file? I am using Cityscape.

Thank you for your input so far. :up:


Also, this looks a bit more simplistic.... maybe this one would be better? http://www.dynamicdrive.com/dynamicindex17/ajaxincludes.htm

Thurnok

To be honest, I haven't looked at either of them.  I simply remembered one being on the dynamicdrive site from past reference.

I'd say try the non-iframe one (the second one) first to see if that works well in an article/block.  If not, try the first one instead.  Should be able to put the javascript code into the block, but you might need to make a php block and use echo statements for implementing the javascript depending on your overall script and what you want to do with it.
Thurnok
The one, the only!

Dazed

No matter what I do with this I cannot make it work properly. I call the page into the block in the center but the height will not adjust. I follow the instructions, I have also tried to echo it, but I get parse errors when I put in the edit. It says to put the main file in the "head" section but I cannot make it work when I do. The only way it will show at all is with the Iframe command in a block but I cannot get it bigger...

tick

Grumpy.  The way I call custom pages in is I use the custom action mod from smf.  All you will have to do is create a custom action in the admin panel and put the Iframe with the address of what you want to display .  It that simple thats why i use it. 



Edit:  Silly me I didnt see you wanted it on the frontpage.  Sorry.

IchBin


This website is proudly hosted on Crocweb Cloud Website Hosting.