server side include ability?

For requests for help from CG administrators, Wranglers, and experienced CG members. Please read the FAQ before posting. Also look at CG Wiki for tutorials and how-tos written by other CG webtoonists.
Post Reply
Russ
Regular Poster
Posts: 414
Joined: Fri Jan 01, 1999 4:00 pm
Location: Austin
Contact:

Post by Russ »

Could there be a generalized<P>***include(filename.html)***<P>keentag or some such to let us do even more automation and avoidance of cut and paste through all our files? E.g. probably a lot of us would like a standard header (with our comic banner and the ad banner) and footer (with copyright notice, keenspace blurb, etc.) on each our pages. It would be nice to have those in a single file that all our pages can include, so changes can be done in just one place. Thus for example our daily and index template files plus all our other html files could have<P>***include(myheader.html)*** near the top<P>and<P>***include(myfooter.html)*** near the bottom.<P>myfooter.html might say <P>All my stuff copyright 2000 Joe Blow.<P>Then a year from now I change it to say:<P>All my stuff copyright 2000-2001 Joe Blow.<P>and don't have to redo it in all my files.<P>
Or is there some existing facility that would permit this sort of thing?<P>thanks,<P>russ
<A HREF="http://www.kofightclub.com" TARGET=_blank>www.kofightclub.com</A>

BoxJam
Cartoon Hero
Posts: 1700
Joined: Fri Jan 01, 1999 4:00 pm
Location: USA
Contact:

Post by BoxJam »

Wow - cool tag!<P>Thanks for the info!

User avatar
John T
Regular Poster
Posts: 960
Joined: Fri Jan 01, 1999 4:00 pm
Location: Phoenix, AZ
Contact:

Post by John T »

Neato!<P>------------------
John Troutman
The SporkMan Chronicles
<A HREF="http://www.sporkman.com" TARGET=_blank>http://www.sporkman.com</A>

User avatar
Gav
Blue-haired 'Spot Geek
Blue-haired 'Spot Geek
Posts: 115
Joined: Fri Jan 01, 1999 4:00 pm
Location: Berkeley, CA, USA
Contact:

Post by Gav »

This does already exist, but was left out of the Taglossary:<P>***include filename***<P>...where you replace "filename" with the name of the file you wish to include. Place that file into your webpages directory.<P>------------------
Lates...
Darren "Gav" Bleuel
(Traveling)<P>(<A HREF="http://www.nukees.com/" TARGET=_blank>Nukees</A>)

Russ
Regular Poster
Posts: 414
Joined: Fri Jan 01, 1999 4:00 pm
Location: Austin
Contact:

Post by Russ »

Has anyone had any luck getting the ***include filename*** tag to work? I was trying it last night and finally gave up.<P>I'm wondering if the syntax is not quite as described (do we need quote marks, is the .html extension needed or not, etc etc.)<P>I had a file in my webpages directory called test.html.<P>Another file says ***include test.html***<P>Update. No update occurs, as if this keentag was causing an error. Remove the tag, change something else, updates occur fine.<P>Tried various variations till I got sick of it, like ***include(test.html)***, ***include "test.html"***<P>russ

Keenspace Nate
Newbie
Posts: 14
Joined: Fri Jan 01, 1999 4:00 pm
Location: El Cerrito, CA USA
Contact:

Post by Keenspace Nate »

Try it now. We had the option turned off in the configuration file for our scripts.<P>The syntax is<P>***include filename***<P>the filename should have the appropriate extension. So an example using test.html would be <P>***include test.html***<P>Also, if you change your included file, you might have to update your site twice to see the effect (since the test file has to be copied to your main director before it can be included). If you update only once, the included file will be the older version that has already been copied into your public_html directory in an earlier update.<P>TIP: You can have the updater update your site twice (back to back) by submitting the update request more than once.<P>Later,
Nate<P>------------------
Nate
nate@keenspot.com
nate@keenspace.com

Tirdun
Regular Poster
Posts: 684
Joined: Fri Jan 01, 1999 4:00 pm
Location: MD, USA
Contact:

Post by Tirdun »

WOO-HOO!<P>Excellent, Kudos, vaya con dios, and all that. It worked perfectly... <P>Of course, now I'm thinking about rewriting a bunch of pages to use -include-... rats. <P>Oh well, thanks :-)<P>Tirdun

Tirdun
Regular Poster
Posts: 684
Joined: Fri Jan 01, 1999 4:00 pm
Location: MD, USA
Contact:

Post by Tirdun »

I'm just about as thrilled with this thing as I can get. I cannot begin to tell you all how much this adds to an already excellent service. All my pages are now clean and tidy, using the ***include*** for all the structure, meaning that across the board changes are a snap!

User avatar
Screwball McGoo [gDC]
Cartoon Hero
Posts: 1449
Joined: Fri Jan 01, 1999 4:00 pm
Contact:

Post by Screwball McGoo [gDC] »

Exactly which folder does the file go in? I've tried workspace. I've tried websites. I've tried public_html.

Tirdun
Regular Poster
Posts: 684
Joined: Fri Jan 01, 1999 4:00 pm
Location: MD, USA
Contact:

Post by Tirdun »

I have all mine in the workspace/webpages directory. You have to update twice (once copies the file to the /public directory and the other updates your index - I think). Otherwise, as long as I've had the file names correct, it's worked perfectly.<P>------------------
Brian West
aka Tirdun
tirdun at yahoo dot com
farawaystars.keenspace.com
- There is no spoon - The Matrix -

Post Reply