Tom's Guide | Tom's Hardware | Tom's Games
![]() |
![]() |
![]() |
There are several organizations that want to have the content of http://www.cancereducation.com/cancersyspagesnb/a/mmrf/mm0204/index.cfm?rid=36 on their website. They would like to be able to change the "Multiple Myeloma Research Foundation" logo to their logo. Currently, cancereducation is making different pages for everyone, and changes have to be done many times. What makes this difficult for me is that they want their logo to remain as the user browses the entire site. In order to included these pages directly on their site I was hoping to do some sort of perl/PHP include and then just direct the image to a different image. Any suggestions? I really hope this question is clearly stated.

From what I've seen of PHP so far, it works similarly to JSP. I'll tell you how'd I do this in JSP and I believe that you can do the same thing with PHP.
You would use a PHP variable to hold the image URL, then when you want to display the image, you use the variable rather than the actual URL. Again, based upon my JSP experience, this image variable bit of code my be the only PHP you have on the whole site. The rest could remain normal HTML/Javascript etc. Your filenames will change from .html to .php tho.
Now you have to figure out how to set the image variable. One way would be to manually set it when you copy a set of the pages to each website. You'd put the variable assignment in a file and include that file at the top of each webpage that has the logo. Then when you get a new 'client', you edit the file with the variable assignment before copying the pages to their site.

As I finished typing the above, I remembered an easier way that I've used before.
In the code just name the image something generic, like "logo.gif".
Then each site would just rename thier image file to "logo.gif".
Walla! Nice & easy, chucky cheesy!
One problem that you'll have to deal with tho, is that logos are not all the same size. And sometimes it's not easy to shrink, expand, etc a logo to fit a predetermined space.
On the link you provided, I see two copies of the logo. The lower one probably isn't a problem, because if it was replaced by another image that was twice as big in both height and width, it would just slide the text down farther. Not a big deal.
But the log at the upper right could be a problem because putting a bigger logo there will mess up the formatting.
Maybe that logo can be removed.

![]() |
parse path from referer's...
|
Web Page size
|

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.
| Ads by Google |