FRIHOSTFORUMSFAQTOSBLOGSDIRECTORY
You are invited to Log in or Register a Frihost Account!

Remote display of text

 


ChrisCh
Hey, I was wondering if there was a HTML/similar code to enable the remote display of text... If you have no idea of what im talking about then take this as an example:

Page content... bla bla bla

(FOOTER)

I would want to put a code in the footer of all pages to show text from a seperate text file, so that I can easily update copyright information etc. (Ive tried doing this using iFrames and images but it doesn't quite work the way I want it to).

I think there is an <ISML> tag but i did a search on here and on google and I couldn't find anything useful! Does anyone know how to do such a thing?
wumingsden
ChrisCh wrote:
Hey, I was wondering if there was a HTML/similar code to enable the remote display of text... If you have no idea of what im talking about then take this as an example:

Page content... bla bla bla

(FOOTER)

I would want to put a code in the footer of all pages to show text from a seperate text file, so that I can easily update copyright information etc. (Ive tried doing this using iFrames and images but it doesn't quite work the way I want it to).

I think there is an <ISML> tag but i did a search on here and on google and I couldn't find anything useful! Does anyone know how to do such a thing?


In my opinion the best way is to change all .html extensions to php and use the following code wherever you want the copyright to appear...

Code:
<?PHP
include("copyright.php");
?>


Then create a copyright.php file with all the code that you wish.

I personally use this method for my header, footer, and navigation menu which is really helpful due to the fact that i only have to change one file
riv
wumingsden wrote:
ChrisCh wrote:
Hey, I was wondering if there was a HTML/similar code to enable the remote display of text... If you have no idea of what im talking about then take this as an example:

Page content... bla bla bla

(FOOTER)

I would want to put a code in the footer of all pages to show text from a seperate text file, so that I can easily update copyright information etc. (Ive tried doing this using iFrames and images but it doesn't quite work the way I want it to).

I think there is an <ISML> tag but i did a search on here and on google and I couldn't find anything useful! Does anyone know how to do such a thing?


In my opinion the best way is to change all .html extensions to php and use the following code wherever you want the copyright to appear...

Code:
<?PHP
include("copyright.php");
?>


Then create a copyright.php file with all the code that you wish.

I personally use this method for my header, footer, and navigation menu which is really helpful due to the fact that i only have to change one file


I would suggest using require() instead, so the code will stop the page from loading if it can't load the file.

Another option is to use a lightweight CMS that doesn't put kiddie gloves on everything, such as [url=textpattern.com]TextPattern[/url], which I highly reccommend.
sonam
I am using include_once() PHP function.

Quote:
I would suggest using require() instead, so the code will stop the page from loading if it can't load the file.


Actualy I don't like require function. I think it is better if is partial content come out then nothing. In that case user can easy to reload my page.

Sonam
ChrisCh
Thanks everyone for that Smile I've finally gotten around to incorporating it on my site and its working beautifully!
wumingsden
ChrisCh wrote:
Thanks everyone for that Smile I've finally gotten around to incorporating it on my site and its working beautifully!


Glad that everything works out great Very Happy

-locked-
This topic is locked: you cannot edit posts or make replies.    Frihost Forum Index -> Scripting -> Html, CSS and Javascript

FRIHOST HOME | FAQ | TOS | ABOUT US | CONTACT US | SITE MAP
© 2005-2007 Frihost, forums powered by phpBB.