GoFuckYourself.com - Adult Webmaster Forum

GoFuckYourself.com - Adult Webmaster Forum (https://gfy.com/index.php)
-   Fucking Around & Business Discussion (https://gfy.com/forumdisplay.php?f=26)
-   -   I want to add the same picture to everyone of my pages on html, is there a tool? (https://gfy.com/showthread.php?t=688707)

scottybuzz 12-20-2006 06:38 PM

I want to add the same picture to everyone of my pages on html, is there a tool?
 
Say I want to add a link or picture at the bottom of each of my html pages but dont want to manually do it for each one, is there a tool that can go through them all automatically and add it please?

SmokeyTheBear 12-20-2006 06:40 PM

yup that can be done.

DjSap 12-20-2006 06:40 PM

run a full dir find and replace, replacing </body> with <img tag here></body>

psili 12-20-2006 06:42 PM

You have an HTML editor with a nice search and replace function plus a bunch of pages all with the same markup where you want the replace to happen? If so, just do a search on the place where you want the picture to be and replace it with the text you searched for plus the new image markup in place.

Otherwise, there's other options, I'm sure, but the above's just what initially came to mind.

HighSociety 12-20-2006 06:48 PM

good question, thanks for the info

SmokeyTheBear 12-20-2006 06:48 PM

save this as htaccess

Code:

AddHandler headered .htm
AddHandler headered .html
Action headered http://yoursite.com/wrap/wrap.php

then save this as wrap.php

Code:

<?php
$footer = "footer.html";
$file = $_SERVER["PATH_TRANSLATED"];
readfile($file);
readfile($footer);
?>

then place whatever html you want added to every html file in a file called footer.html

scottybuzz 12-20-2006 06:48 PM

ive got about 3 hundred pages.

how do i "run a full dir " please?

scottybuzz 12-20-2006 06:49 PM

Quote:

Originally Posted by SmokeyTheBear (Post 11561400)
save this as htaccess

Code:

AddHandler headered .htm
AddHandler headered .html
Action headered http://yoursite.com/wrap/wrap.php

then save this as wrap.php

Code:

<?php
$footer = "footer.html";
$file = $_SERVER["PATH_TRANSLATED"];
readfile($file);
readfile($footer);
?>

then place whatever html you want added to every html file in a file called footer.html



thankyou thankyou very much, indeed a true help.
p.s. i like the way this has been done using ht.access

Dvae 12-20-2006 06:49 PM

Quote:

Originally Posted by scottybuzz (Post 11561354)
Say I want to add a link or picture at the bottom of each of my html pages but dont want to manually do it for each one, is there a tool that can go through them all automatically and add it please?


Why not use SSI?

SmokeyTheBear 12-20-2006 06:49 PM

ps the above doesnt actually alter the files it just adds whatever is in footer.html onto the end of every file.. but would work the same way..

DjSap 12-20-2006 06:50 PM

Quote:

Originally Posted by scottybuzz (Post 11561403)
ive got about 3 hundred pages.

how do i "run a full dir " please?

use dreamweaver of watever you have, when choosing find and replace you have the option of running it in a whole directory, so you choose the directory where your html files are.

SmokeyTheBear 12-20-2006 06:51 PM

also you will want to place the htaccess in every top directory you want the changes to take place

psili 12-20-2006 06:55 PM

That's a pretty trick solution. I dig how you hack stuff together. I'm just curious, does [somepage].html with "footer.html" inserted into the bottom of it now have an "</html>" tag followed by more html markup?

Yea, yea, yea, I know it really doesn't matter in the end, but was just curious. On a side note, since you're the fire bear, can you get rid of the snow in colorado for me?

Quote:

Originally Posted by SmokeyTheBear (Post 11561400)
save this as htaccess

Code:

AddHandler headered .htm
AddHandler headered .html
Action headered http://yoursite.com/wrap/wrap.php

then save this as wrap.php

Code:

<?php
$footer = "footer.html";
$file = $_SERVER["PATH_TRANSLATED"];
readfile($file);
readfile($footer);
?>

then place whatever html you want added to every html file in a file called footer.html


SmokeyTheBear 12-20-2006 07:07 PM

Quote:

Originally Posted by psili (Post 11561430)
That's a pretty trick solution. I dig how you hack stuff together. I'm just curious, does [somepage].html with "footer.html" inserted into the bottom of it now have an "</html>" tag followed by more html markup?

Yea, yea, yea, I know it really doesn't matter in the end, but was just curious. On a side note, since you're the fire bear, can you get rid of the snow in colorado for me?

yes it would but you could do this i think

<?php
$footer = "footer.html";
$file = $_SERVER["PATH_TRANSLATED"];
$rep = file_get_contents($file);
$rep = str_replace("</html","",$rep);
echo $rep;
readfile($footer);
?>

psili 12-20-2006 07:09 PM

Quote:

Originally Posted by SmokeyTheBear (Post 11561457)
yes it would but you could do this i think

<?php
$footer = "footer.html";
$file = $_SERVER["PATH_TRANSLATED"];
$rep = file_get_contents($file);
$rep = str_replace("</html","",$rep);
echo $rep;
readfile($footer);
?>

Whuddabout the snow man!
Whuddabout the snow!

BTW - how do you get so much time to hack around with shit? I need free time for that. :)

latinasojourn 12-20-2006 08:20 PM

http://www.ksware.com/mu.html

spacedog 12-20-2006 08:26 PM

Smokey always comes up with the coolest shit :thumbsup

OzMan 12-20-2006 08:36 PM

pretty fuckin' nifty solution..very useful...

chalk another one up for that bear dude :thumbsup


All times are GMT -7. The time now is 04:19 PM.

Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
©2000-, AI Media Network Inc123