If possibol that a user when send the link of the site + email, the email go in automatic in the links newsletter?
Aug 8, 2001, 10:31 AM
Veteran / Moderator (18441 posts)
Aug 8, 2001, 10:31 AM
Post #2 of 18
Views: 5022
Aug 8, 2001, 10:36 AM
Veteran (1220 posts)
Aug 8, 2001, 10:36 AM
Post #3 of 18
Views: 5067
He wants users to automatically subscribe to his newsletter once they have submitted a link to his database.
Thomas
http://links.japanref.com
Thomas
http://links.japanref.com
Aug 8, 2001, 11:25 AM
Veteran (19537 posts)
Aug 8, 2001, 11:25 AM
Post #4 of 18
Views: 5013
In add.cgi under add:
my $name = $in{'Contact Name'};
my $list = $db_email_name;
${$users_r}{$addy} and &site_html_add_failure ("The email address: $email is already subscribed to the newsletter.") and return;
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/
Code:
if ($status eq "ok") {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;
Installs:http://wiredon.net/gt/
Aug 20, 2001, 3:19 AM
Veteran (1220 posts)
Aug 20, 2001, 3:19 AM
Post #6 of 18
Views: 4989
That's not the point. He wanted link submitters to be automatically subscribed to the newsletter, without further ado.
Thomas
http://links.japanref.com
Thomas
http://links.japanref.com
Aug 23, 2001, 2:24 PM
User (112 posts)
Aug 23, 2001, 2:24 PM
Post #9 of 18
Views: 4942
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
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
Aug 23, 2001, 3:00 PM
Veteran (19537 posts)
Aug 23, 2001, 3:00 PM
Post #11 of 18
Views: 4929
...or you could require subscribe.cgi into add.cgi - whichever is easiest.
Mods:http://wiredon.net/gt/download.shtml
Installations:http://wiredon.net/gt/
Mods:http://wiredon.net/gt/download.shtml
Installations:http://wiredon.net/gt/
Aug 29, 2001, 9:38 AM
Veteran (1311 posts)
Aug 29, 2001, 9:38 AM
Post #16 of 18
Views: 4884
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.
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.