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

Recent

Welcome to TinyPortal. Please login or sign up.

Members
Stats
  • Total Posts: 195,856
  • Total Topics: 21,292
  • Online today: 1,096
  • Online ever: 8,223 (February 19, 2025, 04:35:35 AM)
Users Online
  • Users: 1
  • Guests: 492
  • Total: 493
  • @rjen

Inject html file(s)

Started by fenris_w0lf, January 24, 2006, 09:57:02 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

fenris_w0lf

Hi,

I did a search but couldnt find this documented/discussed anywhere, I appologize if I'm wrong.

Say you have html file(s) on your TP server that gets updated on a regulary basis. You want to present the content of this file when the user press some link in a block in the "sidebar" and the content gets displayed in the "Content Area" / "Body" of the "Home Page".

Possible ?


fenris_w0lf

First...MAN your fast :D
Second....oj!!!! that looks NEAT!!

Now;

The code is:


<iframe
src ="/default.asp"
width="100%">
</iframe>


Two questions:

1) Its possible to replace "default.asp" with "default.html" ? (sorry I dont know the difference betw asp and html :(( )
2) Where can iframes be used within the TP framework ?

Xarcell

You can put just about anykind of file in a iframe. Anything that can be viewed by a browser anyways.

Xarcell

Also, notice the attributes you can add. Say if you wanted to have no borders, then use:



<iframe border="0"
src ="/default.asp"
width="100%">
</iframe>



There are alot of atributes you can use for it. Even no scrolling. However, you can set a Iframe width attribute to 100%, you cannot set the hieght to 100%.

There are javascripts that allow it, but only if the page is in teh same domain as the iframe.



fenris_w0lf

#5
Hey thanks Xarcell!!

Hmm...I seem to recall reading something about having to turn off some WYSIWYG editor to make this work - am I remembering correctly ? If so; where do I do this ??

And; does that mean I would also have to turn it off for regular posting ?

And; where would I find these javascripts that allows for height adjustments ? (My first two iframes will most likely be located on same domain)

Xarcell

If your using v7 of TP, then yes. I recommend you turn it off. However, if your using v8 of TP, it should work fine.

Be sure to add the  height="###" attribute to your iframe.

If you need anymore help let me know.

fenris_w0lf

Thanks again Xarcell!!

I'm using:
Powered by SMF 1.1 RC1.
Oxygen / TinyPortal v.0.75 by Bloc


Still a few unanswered questions:

* Where can iframes be used within the TP framework ?
* Will turning the WYSIWYG editor off, also affect regular posting in the forum - or just articles etc?
* You said:

QuoteHowever, you can set a Iframe width attribute to 100%, you cannot set the hieght to 100%. There are javascripts that allow it, but only if the page is in teh same domain as the iframe.

where would I find these javascripts that allows for height adjustments ?

Xarcell

You can use iframes in the theme, articles, or blocks.

WYSIWYG editor only effects what you write for articles.

http://dynamicdrive.com/dynamicindex17/iframessi2.htm

Is the page your wanting to put in a article have links in it to other pages? If not, there is a better method than iframe.

Xarcell

In an article using php, this may work:


<?php

include('the name of page.html');

?>


This website is proudly hosted on Crocweb Cloud Website Hosting.