Apache Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Try It Free
Go Back   Dev Shed ForumsSystem AdministrationApache Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
Get inside! Sample the range of functionality easily built with JMSL Library for Time Series Data Analysis, Heat Maps, Portfolio Optimization, Monte Carlo Simulation, Stock Price Charting and more. Download Now!
  #1  
Old July 3rd, 2001, 03:26 PM
zenith zenith is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: May 2001
Posts: 9 zenith User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Auto Append

Hello,

Im going to be using a real time stats program called EasyStat (easystat.net). It requires either a clip of JavaScript or an SSI on each page that I want to track. I want to track every page and Im lazy and dont want to add that piece of code to thousands of pages.

So, I was looking through the Apache site and came across mod_trailer. Is this the best way to go about appending a section of code to each page? Any suggestions or comments about what I need to accomplish?

Thanks!

Reply With Quote
  #2  
Old July 4th, 2001, 05:36 PM
freebsd freebsd is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jan 2001
Posts: 5 freebsd User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
>> Any suggestions or comments about what I need to accomplish?

You already said you came across mod_trailer and told us what you need to accomplish - "dont want to add that piece of code to thousands of pages".

Whatever module you use, you still have to alter that thousands of pages AT LEAST ONCE.

Suggestion? Start here -> http://httpd.apache.org/docs/howto/ssi.html
Then do a search at -> http://modules.apache.org/

Since you already came across mod_trailer, I don't see the points of your questions.

Reply With Quote
  #3  
Old July 5th, 2001, 12:50 AM
zenith zenith is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: May 2001
Posts: 9 zenith User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Hi FreeBSD,

Thanks for your response.

>>I don't see the points of your questions.

The point of my questions:
I am new to Apache and thought someone with more experience (such as yourself) would know of a better solution than mod_trailer. I need something that no matter what page it is, Apache would append a block of code. I want that done without having to alter all the pages.

>>Whatever module you use, you still have to alter that thousands of pages AT LEAST ONCE.

So according to you, mod_trailer (and all other modules) isn't what I was looking for.

I'm curious what free hosting sites such as freeservers use in order to automatically put those banners at the top of their customers' pages. Any ideas?

Thanks, and Happy 4th of July.

Reply With Quote
  #4  
Old July 5th, 2001, 01:27 AM
freebsd freebsd is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jan 2001
Posts: 5 freebsd User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Adding a banner is entirely a different case. In freehosting environment, you would set up an environment variable and instruct all users to add that on all of their pages (still need to be done at least once). The line to add is something like:

<!--#echo var="EMBEDDED_BANNER"-->

If users don't add this, they would get Popup banner automatically by inserting JavaScript to the bottom of the page by the server. The position to add that line is right after the <body> tag on every page, note the fixed position.

In your case, it's too late to implement that since there is no way to add multiple SSI tags (header, footer and sidebar) to the appropriate location. Note, you are not adding just a banner, what you wanted is adding multiple header, footer and sidebar (no fix position). If you started from scratch, then it's plain easy and you can pick whatever way to append header or footer when your page is first created.

>> So according to you, mod_trailer (and all other modules) isn't what I was looking for

Whatever module doesn't make any difference. To put it simple, you still have to alter ALL your pages as if they were just created. That said, you still have to add whatever SSI tags to every single pages.

I have no idea and am not interested to find out what mod_trailer is. What you wanted is not a header/footer/sidebar template to be appended to all pages. You really looking for a way to compensate your laziness by reading all the content of your pages and replace particular section with an SSI tag.

>> such as freeservers use in order to automatically put those banners

Yes. Just create a banner template, then setup an environment variable and have it called up the banner template when such env gets called.

Reply With Quote
  #5  
Old July 5th, 2001, 01:57 AM
zenith zenith is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: May 2001
Posts: 9 zenith User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Hi FreeBSD,

Thanks for the input. I just found what I really needed:
mod_layout (http://software.tangent.org/faqs/mod_layout.html)

It allows me to create an include, then through my httpd.conf I put in 3 lines of code for each of my Virtual Hosts. Those three lines read in the include, then merge it into my code right before the </body> tag. (Also has the ability to append includes after the <body> tag, or any other tag you wish to use.)

Thanks again for your help. Hopefully you can find use for this module in the future.

Reply With Quote
Reply

Viewing: Dev Shed ForumsSystem AdministrationApache Development > Auto Append


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 5 hosted by Hostway