View Full Version : I need a better way to do this
jlknauff
10-22-2004, 12:47 PM
On my site, each page has an image that says "free stuff" that links to a thread in my phpBB forum. I plan to keep changing the contests every month or so-does anyone know of a better way to go about that than going through the whole site and relinking the image on each page? I thought about just taking them to the section rather than the post but IMO it will lower the number of people that actually click through to the thread.
If there's not a better way to do it, is there a program that will go through all of my html files and do a find & replace without me having to open and change each one manually? (Kinda the way photoshop does batch jobs on all images in a directory)
rizla
10-22-2004, 01:17 PM
I'm not sure that I undestood the first part but for a sweep search and replace in
many files I use TextPad (they offer an evaluation possibility on textpad.com)
dilligaf
10-22-2004, 01:34 PM
Just use an includes file on all your pages and have the file be simply the image and link. Then when you reload the file it'll change everywhere.
jlknauff
11-06-2004, 07:34 AM
How do I do that?
dilligaf
11-06-2004, 09:45 AM
Create a ducument calling for an image without the standard <html><body> stuff, just the call for the image with the link
<a href="myforumthread.php"><img src="Images/free_stuff.jpg" alt="my description" width="100" height="100"></a> and save it as specials.htm or whatever.
then in each document that the link is displayed use <!--#include file="specials.htm"-->
Then when the thread changes just change the link in specials.htm and reload it.
jlknauff
11-11-2004, 07:32 AM
[QUOTE=rizla]I'm not sure that I undestood the first part but for a sweep search and replace in
many files I use TextPad (they offer an evaluation possibility on textpad.com)[/QUOTE]
I took a look at their site and they had something else even better for that-it's great tool! :D
Atomical
11-12-2004, 05:34 PM
That's so simple you should just implement it yourself. Put your img_src crap into a file, example1.
Then where you want to include your image or whatever
<? readfile('example1'); ?>
You could also use include(), however parsing the file with php would be unneccessary and a security risk. This could be further simplified by the fact that your ad is probably in the header or footer template. You can change your html files to php files too.
vBulletin v3.0.3, Copyright ©2000-2013, Jelsoft Enterprises Ltd.