The Bravenet Effect

by Reywob(at)aol.com

 Date:  Wed, 19 Apr 2000 07:32:28 EDT
 To:  hwg-techniques(at)hwg.org
  todo: View Thread, Original
Hi Guys (and Guy-persons for the politically correct :-) )

I've been pondering this for days - see if you can come up with a solution.
I am building a site (<A HREF="http://www.narrowgauge.f2s.com">www.narrowgauge
.f2s.com</A>) that offers a postcard generator and a message board.  To make 
that site more popular and to offer a service to like-minded webmasters I am 
going to allow them to link to the message board & postcard generator.  
HOWEVER, instead of just a straight link, I want it to look like part of 
their site by using their style sheet.  See what I mean by trying these two 
links: 
<A 
HREF="http://www.narrowgauge.f2s.com/cgi-bin/postcard/index.php?datafile=http:
//www.narrowgauge.f2s.com/data.inc">http://www.narrowgauge.f2s.com/cgi-bin/pos
tcard/index.php?datafile=http://www.narrowgauge.f2s.com/data.inc</A>

<A 
HREF="http://www.narrowgauge.f2s.com/cgi-bin/postcard/index.php?datafile=http:
//members.aol.com/reywob/data.inc">http://www.narrowgauge.f2s.com/cgi-bin/post
card/index.php?datafile=http://members.aol.com/reywob/data.inc</A>

The two scripts I'm using are Phorum for the message board and  a CGI script 
for the postcard generator (from  <A 
HREF="http://www.aestheticsurgerycenter.com/scripts/">Jason's scripts</A>).

At first I thought that it would be simple.  The webmaster would upload a 
file called datafile.inc to his/her webspace.  This would contain
$css = "http://www.domain.com/mystyle.css";
$siteurl = "http://www.domain.com";
$sitename = "Name of Site";

(I enclosed the data above in <?PHP ?> tags to allow it to be read by the 
require() statement.)

Every link would have ?datafile=http://www.yourname.com/data.inc  appended to 
it.  
Now for the Problems.

PHORUM:  I modified every link to have &datafile=$datafile in it.  In the 
header.php file I added <?PHP require ("$datafile"); ?>  as I assumed that 
this would bring the variables into the script and allow them to be appended 
to the links.  However all I get is error messages now.  You can check my 
latest progress by looking at <A 
HREF="http://www.narrowgauge.f2s.com/phorum/index.php?datafile=http://members.
aol.com/reywob/data.inc">http://www.narrowgauge.f2s.com/phorum/index.php?dataf
ile=http://members.aol.com/reywob/data.inc</A>.  If it works then the 
background should be blue.

What am I doing wrong??? Does anyone have any ideas as to how I can get this 
to work?  I've totally exhausted my knowledge of programming, so I hope 
someone can tell me.


POSTCARD:  This uses HTML templates called from inside the CGI script (a 
working example can be found at <A 
HREF="http://www.narrowgauge.f2s.com/pwp/postcard/">www.narrowgauge.f2s.com/pw
p/postcard/</A>) and I thought this would be simple as I could rename the 
templates and embed PHP in them.  However, for some reason the PHP is not 
being processed - I assume being required by the CGI script fools the server.
I then thought about using cookies, but gave that up when I realised that I 
couldn't put a URL in as the value.

How can I get the values from the datafile (included using require () in the 
index.php page) into the CGI script and hence the templates???


If you think that the modifications to either of the above programs will be 
impossible, are there any other (free) programs that you could recommend?
Thanks in advance for any help you can offer.
Peter.

HWG hwg-techniques mailing list archives, maintained by Webmasters @ IWA