Refer A Friend hack?

Goog
Goog's picture

Joined: 2002-08-16
Posts: 9
Posted: Fri, 2002-08-16 22:04

In the contributed code section, there's a refer a friend hack that sounds really cool. The link to the source code is this:
<!-- BBCode Start --><A HREF="http://gallery.menalto.com/local/downloads/refer_a_friend/mailto.phps" TARGET="_blank">refer a friend</A><!-- BBCode End -->

It says to read the readme.txt file, but I can't find that file anywhere... and I have no idea how to install this hack?

Any ideas, anyone installed it before? Thanks..

 
vallimar

Joined: 2002-08-15
Posts: 487
Posted: Sat, 2002-08-17 05:29

Look at the refer a friend pop-up page in the Contrib section.
The readme is linked right there. There is also a gzipped download
there which probably contains the readme as well.

I think you just got confused and/or missed the appropriate links.

 
glabrec

Joined: 2003-01-20
Posts: 3
Posted: Tue, 2003-01-21 07:48

I would also like to know if anyone has successfully installed this script. There is no readme and I can't figure out how it works. I was hoping there would be a link on each photo page that you could click if you wanted to email the page to a friend. I thought a popup would come up to let you enter the email address.

 
ppmnt
ppmnt's picture

Joined: 2003-01-12
Posts: 238
Posted: Sun, 2003-02-02 03:59

Do you guys still need help with this? I've got it working, check out <!-- BBCode Start --><A HREF="http://www.discobug.com/gallery/" TARGET="_blank">-> my gallery <-</A><!-- BBCode End --> and look at any album or photo, the link is on the upper right under the logo.

All you need to do is place mailto.php in your gallery directory and modify the variables at the top of the script (site_name etc).

Then go modify view_photo.php and find the javascript section. This section looks like this:
<!-- BBCode Start --><TABLE BORDER=0 ALIGN=CENTER WIDTH=85%><TR><TD><font class="pn-sub">Code:</font><HR></TD></TR><TR><TD><FONT class="pn-sub"><PRE>
<script language="javascript1.2">
// <!--
...
function ...{
}
...
// -->
</script>
</TD></TR></TABLE><!-- BBCode End -->

Somewhere in this section (just not in the middle of an existing function), paste the following:

<!-- BBCode Start --><TABLE BORDER=0 ALIGN=CENTER WIDTH=85%><TR><TD><font class="pn-sub">Code:</font><HR></TD></TR><TR><TD><FONT class="pn-sub"><PRE>
function openform(url) {
var url = url + "?url=" + escape(document.location.href)
var NS = (document.layers) ? true : false;
var IE = (document.all) ? true : false;

// mailto pop-up add-on
if(NS) {
window.open(url,"","scrollbars=no,menubar=no,personalbar=no,width=500,height=310,screenX=220,screenY=0");
} else if(IE) {
window.open(url,"","scrollbars=no,menubar=no,personalbar=no,width=500,height=280,left=220,top=0");
}
}
</TD></TR></TABLE><!-- BBCode End -->

Do the same for view_album.php if you also want to display the link on the album pages.

Then use photo.header (and album.header) in the html_wrap directory to include the link on the page:
<!-- BBCode Start --><TABLE BORDER=0 ALIGN=CENTER WIDTH=85%><TR><TD><font class="pn-sub">Code:</font><HR></TD></TR><TR><TD><FONT class="pn-sub"><PRE>
<a href="javascript:openform('http://www.mydomain.com/gallery/mailto.php');">recommend</a> this page to a friend
</TD></TR></TABLE><!-- BBCode End -->

Hope this helps!
~Eva

 
jeremy
jeremy's picture

Joined: 2003-02-15
Posts: 49
Posted: Sun, 2003-03-09 15:32

does this script send the webmaster a copy of what was sent(email addresses)? Doesn't look life it from the script just not sure.<!-- BBCode Start --><A HREF="http://www.chicagobachelor.com" TARGET="_blank">ChicagoBachelor.com</A><!-- BBCode End -->

 
joan
joan's picture

Joined: 2002-10-21
Posts: 3473
Posted: Mon, 2003-03-10 08:32

Just change this line<!-- BBCode Start --><TABLE BORDER=0 ALIGN=CENTER WIDTH=85%><TR><TD><font class="pn-sub">Code:</font><HR></TD></TR><TR><TD><FONT class="pn-sub"><PRE>$add="From: $site_name <$your_email>nReply-To: $from_emailnDate: $daten"; </TD></TR></TABLE><!-- BBCode End --> to something like this <!-- BBCode Start --><TABLE BORDER=0 ALIGN=CENTER WIDTH=85%><TR><TD><font class="pn-sub">Code:</font><HR></TD></TR><TR><TD><FONT class="pn-sub"><PRE> $add="From: $site_namen<$your_email>nReply-To: $from_emailnDate: $datenCc:

"; </TD></TR></TABLE><!-- BBCode End -->

Of course, you'll need to test it.