TinyPortal

Development => Block Codes => Topic started by: scotte44 on November 13, 2005, 05:15:28 PM

Title: iframe in article
Post by: scotte44 on November 13, 2005, 05:15:28 PM
I am trying to pull in an external page to the middle of my site when a menu link to an article is clicked. All I get is the original iframe html. Here is what I am using:
echo '<IFRAME src="http://www.mbdguild.com/roster.php" width="100%" height="3600" marginwidth=0 marginheight=0 frameborder=0 scrolling=no></IFRAME>' ;
Title: Re: iframe in article
Post by: gerrymo on November 13, 2005, 05:28:52 PM
Try it without the php tags Just..


<IFRAME src="http://www.mbdguild.com/roster.php" width="100%" height="3600" marginwidth=0 marginheight=0 frameborder=0 scrolling=no></IFRAME>
Title: Re: iframe in article
Post by: snork13 on November 13, 2005, 05:32:22 PM
http://www.mbdguild.com/roster.php (http://www.mbdguild.com/roster.php)

doesn't appear to be anything there, it pulls the 404 in for me
Title: Re: iframe in article
Post by: gerrymo on November 13, 2005, 06:49:05 PM
I got a whole page of errors on your link snork.
Title: Re: iframe in article
Post by: scotte44 on November 13, 2005, 07:07:50 PM
I fixed the errors. Took out the php tags and it still just gives me text.
Title: Re: iframe in article
Post by: gerrymo on November 13, 2005, 07:14:47 PM
Try it in an html center block (no php tags), or a php block (with Tags). If that shows OK then it shouln't be too hard to get it into an article.
Title: Re: iframe in article
Post by: scotte44 on November 13, 2005, 07:34:52 PM
Im stumped, it works fine as an html or php center block, but since I dont want the content on my homepage I need an article.
Title: Re: iframe in article
Post by: tattooedpierre on November 13, 2005, 07:56:20 PM
Quote from: scotte44 on November 13, 2005, 07:34:52 PM
Im stumped, it works fine as an html or php center block, but since I dont want the content on my homepage I need an article.

Your implementation of overlib.. I've been trying to get that to work myself. There is a package called itemStats that allows you to link items in BB Code and display the mouseover data pulled from Allakhazam, but just now its only implemented for phpBB :(ÂÃ, 

http://forums.eqdkp.com/index.php?showtopic=1768&st=225 (http://forums.eqdkp.com/index.php?showtopic=1768&st=225)

.. anyways, i'm just interested as to how you got overlib working :( .. and if so, does it work anywhere on your site?
Title: Re: iframe in article
Post by: gerrymo on November 13, 2005, 08:10:20 PM
This topic might help. http://www.tinyportal.net/smf/index.php?topic=1349.0

It can definately work. Check here http://www.tinyportal.net/smf/index.php?topic=1092.0
Title: Re: iframe in article
Post by: Leviathan on November 14, 2005, 12:12:13 PM
Scotte44, it works on my test site (http://www.zonewarriors.com/testforum/index.php?page=4). That is what your looking for, right?

Just insert the iframe line as PHP code (so with the echo command) in a PHP article, go to the TPAdmin menu manager and add a new article item, activate it and it should show up as a link in the menubox block (assuming you have one). That is how I do it and worked for me so far!
Title: Re: iframe in article
Post by: scotte44 on November 14, 2005, 02:01:45 PM
Im an idiot, didnt try using a php article, just regular. Worked like a charm, thanks. :)
Title: Re: iframe in article
Post by: iowamf on November 14, 2005, 06:40:04 PM
A regular article works OK too though ...

I use mostly regular articles for iframes so I can have a bunch of them in one category and use the "intro" text fetaure - the PHP articles don't have the "intro" feature.
Title: Re: iframe in article
Post by: scotte44 on November 14, 2005, 07:57:35 PM
I tried the regular article, but it wouldnt display the iframe.
Title: Re: iframe in article
Post by: iowamf on November 14, 2005, 08:57:14 PM
Understood, but a PHP article is not required.

This is one of my non-PHP articles to pull up help in an iframe - its only one line of code.

<iframe src="http://mysite.com/portal/Themes/default/help/index.english.html"  width="100%" height="1800"></iframe>
Title: Re: iframe in article
Post by: scotte44 on November 14, 2005, 09:05:11 PM
I used the code you have above in a non php block and got the same result. All I get back is the exact html iframe code. The page doesnt show up.
Title: Re: iframe in article
Post by: Leviathan on November 14, 2005, 10:07:46 PM
scotte44 is right, that does NOT work (tested myself).  :coolsmiley:

iowamf, you're not pulling our leg are you  :knuppel2:

If not than you're either using a different or hacked version of TP (I'm using 0.75) or you're using php-articles and just don't know it  :idiot2:

Please enlighten us brother iowamf? ;D
Title: Re: iframe in article
Post by: iowamf on November 14, 2005, 11:17:21 PM
I bet I know what the issue is ... it's that crappy editor Bloc hates so much.

There is an issue when you use the WYSIWG editor to enter raw html into an article - especially when the article  *STARTS* with raw HTML - as in my example.  Note, the "toggle" mode of that editor doesn't work too well either - it toggles your text ;-)

Make sure you go into the General Settings of TPADMIN and turn that editor off if you want to enter raw html into an article. Where it says - Use the WYSIWYG editor?:   Make sure it says NO.
Title: Re: iframe in article
Post by: Nokonium on November 15, 2005, 01:42:58 PM
I don't use the editor and that code works fine.
Title: Re: iframe in article
Post by: Leviathan on November 15, 2005, 05:40:23 PM
Quote from: iowamf on November 14, 2005, 11:17:21 PM
I bet I know what the issue is ... it's that crappy editor Bloc hates so much.

Your absolutely right, it's the WYSIWYG editor. I turned it off and the iframe code now also works in a normal non-php article. Cheers  :)
Title: Re: iframe in article
Post by: KBkustoms on December 12, 2005, 10:07:57 AM
OK...I'm getting frustrated now. :(

And I may be wrong, but, from what I gather by reading through this thread, by using the Iframe code :
<iframe src="http://www.kbkustoms.com/2003/index.html"
height="100%" width="100%" Scrolling="yes"></iframe>

into a regular article...it "should" display the linked page (http://www.kbkustoms.com/2003/index.html) within my TP (075) enabled  forum/site (SMF 1.05)...correct??

Ive tried PHP (with and w/o the "echo" tags) and Regular articles...turned off the WYSIWYG editor...activated article, but still do not see anything (no code, no text, nothing but "no articles in this section").

I dont believe I have quite "grasped" the hierarchy or structure either...is there a good "basic guide" as to how the category/article/menu functions relate to one another?
Everytime I think I'm getting the hang of it...I run into something like this and take two steps back...so to speak. ???
THANKS and Im sure I will feel like an idiot, :idiot2: but, at this point, thats better than getting nowhere fast! ;)
Title: Re: iframe in article
Post by: gerrymo on December 12, 2005, 11:25:58 AM
height="100% needs to be changed to a fixed height. % only works for width. You need to turn off the editor before you make the new article, not after. Then try it as php, and as html and see if that works.
Title: Re: iframe in article
Post by: Ray on December 12, 2005, 09:14:29 PM
Quote from: gerrymo on December 12, 2005, 11:25:58 AM
height="100% needs to be changed to a fixed height. % only works for width. You need to turn off the editor before you make the new article, not after. Then try it as php, and as html and see if that works.

Thanks I have myself been trying to get Iframes to work
height="100% needs to be changed to a fixed height worked

thanks
Title: Re: iframe in article
Post by: KBkustoms on December 13, 2005, 01:19:23 AM
THANKS gerrymo!!!! ;D

"Ultimately" .... that did the trick!!!

On the WYSIWYG editor...trust me...I tried the Iframe code many times after I disabled the editor and before posting...sorry if I led you to another conclusion :)

As I mention above...ultimately removing the "%" in height did work...but, it took a few tries before anything changed.

So gettting frustrated again..but not ready to give up yet...lol...I created a NEW php article and inserted the corrected code .... Activated.... and BOOM!!  There it was!!!
Subsequently, I created a new reg. article, inserted the html and it worked too!!

Now why it didnt work until I created a new article...I dunno...but at least its working now!!! 
THANKS AGAIN for the info!!!
Title: Re: iframe in article
Post by: phocas on February 05, 2007, 03:18:30 AM
very cool... had to read the whole thread, but this rox.  i'm using it for my "back issues"

if anyone knows of a way to force a redirect to the new site upon someone accessing one of the old html pages ... i'm all ears... otherwise... love this little snippet

coppermine... you're next!