Gossamer Forum
Home : Products : Links 2.0 : Customization :

Safe email for newsletter

Quote Reply
Safe email for newsletter
If possibol that a user when send the link of the site + email, the email go in automatic in the links newsletter?

Quote Reply
Re: Safe email for newsletter In reply to
Pardon??? Wink

Andy

webmaster@ace-installer.com
http://www.ace-installer.com
Quote Reply
Re: Safe email for newsletter In reply to
He wants users to automatically subscribe to his newsletter once they have submitted a link to his database.

Thomas
http://links.japanref.com
Quote Reply
Re: Safe email for newsletter In reply to
In add.cgi under
Code:
if ($status eq "ok") {
add:

Code:
my $addy = $in{'Contact Email'};
my $name = $in{'Contact Name'};
my $list = $db_email_name;
Code:
my $users_r = &get_users ($list);
${$users_r}{$addy} and &site_html_add_failure ("The email address: $email is already subscribed to the newsletter.") and return;
Code:
${$users_r}{$addy} = $name;
Code:
open (LIST, ">$list") or &cgierr ("Unable to open list: $list. Reason: $!");
if ($db_use_flock) { flock (LIST, 2) or &cgierr ("Unable to get exlusive lock! Reason: $!"); }
foreach (sort keys %{$users_r}) {
print LIST "$_$db_delim${$users_r}{$_}\n";
}
close LIST;
Mods:http://wiredon.net/gt/download.shtml
Installs:http://wiredon.net/gt/


Quote Reply
Re: Safe email for newsletter In reply to
Couldn't you just email "Link Owners" from your admin area to do this?

Quote Reply
Re: Safe email for newsletter In reply to
That's not the point. He wanted link submitters to be automatically subscribed to the newsletter, without further ado. Wink

Thomas
http://links.japanref.com
Quote Reply
Re: Safe email for newsletter In reply to
Pardon the intrussion, but what if someone submits a site and then wants to submit a new, different site with the same email address?

Will he/she be allowed to continue?

If so, why this, then? "The email address: $email is already subscribed to the newsletter.") "


Tu!


Quote Reply
Re: Safe email for newsletter In reply to
In order to respect privacy, how would we add this feature but with a checkbox?

Ie: When adding a new site to the DB the user is given the choice to subscribe or not to the updates ML via a checkbox.

ideas?

Tu!


Quote Reply
Re: Safe email for newsletter In reply to
I have try to make this customization but i get this error when i submit a link:

CGI ERROR
==========================================
Error Message : fatal error: Undefined subroutine &main::get_users called at add.cgi line 105.

Script Location : add.cgi
Perl Version : 5.006

Form Variables
-------------------------------------------

Environment Variables
-------------------------------------------
CHARSET_HTTP_METHOD : http://
CHARSET_SERVER_NAME : www.linkzone.it:80
CHARSET_SERVER_PORT : 80
CONTENT_LENGTH : 143
CONTENT_TYPE : application/x-www-form-urlencoded
DOCUMENT_ROOT : /usr/local/plesk/apache/vhosts/linkzone.it/httpdocs
GATEWAY_INTERFACE : CGI/1.1
HTTP_ACCEPT : image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, application/vnd.ms-excel, application/vnd.ms-powerpoint, application/msword, */*
HTTP_ACCEPT_ENCODING: gzip, deflate
HTTP_ACCEPT_LANGUAGE: it
HTTP_CONNECTION : Keep-Alive
HTTP_COOKIE : bblastvisit=996792888; bbuserid=4; bbpassword=7d2661cf503d22ab2a1487cf4f904045
HTTP_HOST : www.linkzone.it
HTTP_REFERER : http://www.linkzone.it/cgi-bin/links/add.cgi
HTTP_USER_AGENT : Mozilla/4.0 (compatible; MSIE 5.01; Windows NT 5.0)
PATH : /bin:/usr/bin:/usr/local/bin
QUERY_STRING :
REMOTE_ADDR : 62.98.212.52
REMOTE_PORT : 1876
REQUEST_METHOD : POST
REQUEST_URI : /cgi-bin/links/add.cgi
SCRIPT_FILENAME : /usr/local/plesk/apache/vhosts/linkzone.it/cgi-bin/links/add.cgi
SCRIPT_NAME : /cgi-bin/links/add.cgi
SERVER_ADDR : 12.105.170.67
SERVER_ADMIN : dlc2000@libero.it
SERVER_NAME : www.linkzone.it
SERVER_PORT : 80
SERVER_PROTOCOL : HTTP/1.1
SERVER_SOFTWARE : Apache/1.3.14 Ben-SSL/1.41 (Unix) mod_throttle/2.11 mod_perl/1.24_01 PHP/4.0.3pl1 FrontPage/4.0.4.3 rus/PL30.0
UNIQUE_ID : O4XyWgxpqkMAAHRCCOs



Quote Reply
Re: Safe email for newsletter In reply to
copy sub get_users from subscribe.cgi and put it at the bottom of add.cgi

Quote Reply
Re: Safe email for newsletter In reply to
...or you could require subscribe.cgi into add.cgi - whichever is easiest.

Mods:http://wiredon.net/gt/download.shtml
Installations:http://wiredon.net/gt/
Quote Reply
Re: Safe email for newsletter In reply to
Hi!

Can any1 provide a short tutorial on how to implement the "Subscribe to email updates" checkbox on the add.cgi process?

Thanks!


Quote Reply
Re: Safe email for newsletter In reply to
hi,
i have modify it and work fine, but the problem now is that when i send a msg on mailignlist i not receive any email, i have try also with my old add.cgi and is the same, any help?

regards

Quote Reply
Re: Safe email for newsletter In reply to
Which is the modifcation you've applied? The one pasted above or the one I suggested?

I'd be rather interested in the checkbox so users have a chance to decide.

any1?


Quote Reply
Re: Safe email for newsletter In reply to
Any1?

Quote Reply
Re: Safe email for newsletter In reply to
Just go into add.html and add_error.html and put a checkbox named signup and then in add.cgi above the code that Paul put up put if ($in{'signup'}) {
and then on the bottom put a bracket }
this should get you the checkbox but if theres an error i think it will still add the email in the first time if they checked it, and then when they check it on the error page it will add it again.

Quote Reply
Re: Safe email for newsletter In reply to
Hi!

I must admit I got lost ;)



Quote Reply
Re: Safe email for newsletter In reply to
Hi!

Can any1 provide a brief stepbystep mod on this, as it looks simple?

Thanks vm!