Thanks Jon,

Basically it's any of the pages on www.odi.org.uk

Our host doesn't support php so I'll look into the editplus bit.

sio



On 14 Oct 2002 at 16:47, Jon Haworth wrote:

Hi Sio,

> What is the best way to implement a text only website
> without using databases i.e. taking an existing
> graphics-heavy website and stripping out all of the
> graphics? Is it just a matter of manually creating
> html pages or is there an easier way?

There's an easier way (maybe).

You could run the pages through PHP's strip_tags()
(http://php.net/strip-tags), or through Editplus's "Strip HTML tags"
(http://editplus.com/). The PHP route is more versatile as you can tell it
to ignore certain tags (you might want to keep <b> and </b>, for example),
but you'd have to write a function and feed the files through it - shouldn't
be a big job though.

If it's really just <img> tags you want to remove, I'd write a quick script
in whatever you like that parses the files and removes them - they're pretty
easy to grab, because they're not in two parts. The pseudocode goes
something like:

1. reset "new content" variable.
2. open file at the beginning.
3. if there are less than 4 characters left in the file, go to step 6,
otherwise check next 4 characters.
4. if they're not "<img", add them to "new content" and return to step 3,
otherwise keep going.
5. keep checking characters until you find ">", then return to step 3.
6. add remaining characters to "new content" and dump it to the screen or
another file.
7. done!

If you've got a link to the site, or you can upload a sample page somewhere,
that would be really helpful.

Cheers
Jon



____ � The WDVL Discussion List from WDVL.COM � ____
To Join wdvltalk, Send An Email To: mailto:[EMAIL PROTECTED]
       Send Your Posts To: [EMAIL PROTECTED]
To change subscription settings to the wdvltalk digest version:
    http://wdvl.internet.com/WDVL/Forum/#sub

________________  http://www.wdvl.com  _______________________

You are currently subscribed to wdvltalk as: [EMAIL PROTECTED]
To unsubscribe send a blank email to %%email.unsub%%

____ � The WDVL Discussion List from WDVL.COM � ____
To Join wdvltalk, Send An Email To: mailto:[EMAIL PROTECTED]
       Send Your Posts To: [EMAIL PROTECTED]
To change subscription settings to the wdvltalk digest version:
    http://wdvl.internet.com/WDVL/Forum/#sub

________________  http://www.wdvl.com  _______________________

You are currently subscribed to wdvltalk as: [email protected]
To unsubscribe send a blank email to [EMAIL PROTECTED]

Reply via email to