🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

1 total messages Started by Will Tatam Tue, 20 Jun 2000 00:00
Image Filter
#80
Author: Will Tatam
Date: Tue, 20 Jun 2000 00:00
54 lines
2397 bytes
I can't remember whether this was mentioned here or in a php group.

Someone was asking if there was a way in which you could put a link to a
picture so that a page loaded with the image included (rather than just
seeing the image or having to write a page for each image)

This is how I solved it:

1) include the following filter in your Xitami setup
.jpg=c:\php\php.exe l:\php\jpg.php

2) save the following code at jpg.php
<html><head><title><?php echo $SCRIPT_NAME ?></title></head>
<body>
<img src="http://<?php echo $HTTP_HOST ?>:8080<?php echo $SCRIPT_NAME ?>"
><br>

<a href="javascript:history.back(1)"><b>Back</b></a>

<!-- More info -->
<?php
if(strstr($SCRIPT_NAME,"keyword")) {
?>descrition<?php } ?>

<!-- end of info-->

</body></html>

3) Have a second copy of xitami running that does not have the filter
included, and sits on a different port


The more info section demonstrates how you can then be more selective, for
example, if you have a range of images, lets say pictures by varying
artists, if you group them by artist then you could say if it contains "Joe
blogs" then write below "by Joe Blogs"

I have also used the same technique with Real Media files, so rather than
the file downloading when you click on the file name in the directory
listing you get taken to a page that constructs a link to the file on the
real media server, even detecting which browser you are using and changing
the link as appropriate for that browser


I hope this information is of use, and If you have any questions don't
hesitate to ask


Will Tatam
www.netmindz.co.uk/will
solution in action @ http://www.netmindz.co.uk/will/dip.htm then click HTTP

This is just a test setup running on my PC, so is only available when I'm on
the net (and also at a dynamic IP address, GGGRRRR !!!!
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads