Gossamer Forum
Home : Products : Links 2.0 : Customization :

Just a thought ...about emailadd.cgi

Quote Reply
Just a thought ...about emailadd.cgi
Hi!

i have tried several "email friend" mods and they all seems to have a "bug".

Everything works ok and when u email friend a site in email description stops at character "

part of mail ...
Code:
Hi, gregor! This might be of interest to you:

Site title: Password 1.1
Site URL: http://www.websnail.org/scripts/password.shtml
Description: An updated version of the Password 1.0 MOD for emailing password information to those who've lost it. Recommended for use with

Sincerely,

there should be description like

Code:
An updated version of the Password 1.0 MOD for emailing password information to those who've lost it. Recommended for use with "Password Modify for Templates" MOD

any idea how to solve this probelm ..

thanx

i found this problem with three different email mods ..

Gregor
Quote Reply
Re: [sc2utp] Just a thought ...about emailadd.cgi In reply to
Mmm...what is the code for this script? Fromt he sound of the problem, the script should not work at all. In effect the script thinks that the " in the string is the end of that variable. So what it then does is disregard the rest of it. I can't see why it would stop and only pass part of the string. Maybe if we looked at the code we could see the problem Wink

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [AndyNewby] Just a thought ...about emailadd.cgi In reply to
Hi!

here is tella2.cgi

Code:
#!/usr/local/bin/perl
# -------------
# Links
# -------------
# Links Manager
#
# File: linkdead.cgi
# Notifies the webmaster of a deadlink
# Author: Glenn Utteridge
# Based on and designed to be used with
#Links 2 by: Alex Krohn
# Email: alex@gossamer-threads.com
# Web: http://www.gossamer-threads.com/
# Version: 2.0
#
# (c) 1998 Gossamer Threads Inc.
#
# This script is not freeware! Please read the README for full details
# on registration and terms of use.
# =====================================================================
#
#
# Setup:
# Make sure the require statement below points to the config file.
eval {
($0 =~ m,(.*)/[^/]+,) && unshift (@INC, "$1"); # Get the script location: UNIX /
($0 =~ m,(.*)\\[^\\]+,) && unshift (@INC, "$1"); # Get the script location: Windows \

require "admin/links.cfg"; # Change this to full path to links.cfg if you have problems.
require "$db_lib_path/db_utils.pl";
require "$db_lib_path/links.def";
$build_use_templates ?
require "$db_lib_path/site_html_templates.pl" :
require "$db_lib_path/site_html.pl";
};
if ($@) {
print "Content-type: text/plain\n\n";
print "Error including libraries: $@\n";
print "Make sure they exist, permissions are set properly, and paths are set correctly.";
exit;
}

# ========================================================

eval { &main; }; # Trap any fatal errors so the program hopefully
if ($@) { &cgierr("fatal error: $@"); } # never produces that nasty 500 server error page.
exit; # There are only two exit calls in the script, here and in in &cgierr.

sub main {
#-------------------------------------------------------------------
# Main Routine

my (%in) = &parse_form;


($in{'yemail'} =~ /.+@.+\..+/) or &site_html_tell_error ("The email address: '$in{'yemail'}' doesn't look like a real email
address.") and return;
($in{'yname'} =~ /[A-Za-z]+/) or &site_html_tell_error ("Please enter your name as well as your email address.")
and return;
($in{'tname'} =~ /[A-Za-z]+/) or &site_html_tell_error ("Please enter their name as well as your email address.")
and return;
($in{'temail'} =~ /.+@.+\..+/) or &site_html_tell_error ("The email address: '$in{'yemail'}' doesn't look like a real email
address.") and return;

my $to = $in{'temail'};
my $from = $in{'yemail'};
my $subject = "En Dober Vic ...!\n";
my $msg = qq|
Hi $in{'tname'}!

---------------------------------------------
$in{'Title'}
---------------------------------------------

... da ne omenim njihove ogromne baze vicev ... oglej si jih!

lp, $in{'yname'}
|;

# Then mail it away!
require "$db_lib_path/Mailer.pm";
my $mailer = new Mailer ( { smtp => $db_smtp_server,
sendmail => $db_mail_path,
from => $from,
subject => $subject,
to => $to,
msg => $msg,
log => $db_mailer_log
} ) or return;
$mailer->send or return;
&site_html_tell_mail;
# Writes the message to a logfile


# Set date variable to today's date.
$date = &get_date;

# Write the information to a logfile

open (VAL, ">>tella2.txt") or &cgierr("error in add_record. unable to open validate file: comments.db. Reason: $!");
flock(VAL, 2) unless (!$db_use_flock);
print VAL "$in{'ID'}|$date|$in{'Title'}|$in{'yname'}|$in{'yemail'}|$in{'temail'}|$in{'tname'}|\n";
close VAL; # automatically removes file lock
}

in this code i have removed Description since it is not working OK.

original code from zip file is this one
Code:
#!/usr/bin/perl
# -------------
# Links
# -------------
# Links Manager
#
# File: linkdead.cgi
# Notifies the webmaster of a deadlink
# Author: Glenn Utteridge
# Based on and designed to be used with
#Links 2 by: Alex Krohn
# Email: alex@gossamer-threads.com
# Web: http://www.gossamer-threads.com/
# Version: 2.0
#
# (c) 1998 Gossamer Threads Inc.
#
# This script is not freeware! Please read the README for full details
# on registration and terms of use.
# =====================================================================
#
#
# Setup:
# Make sure the require statement below points to the config file.
eval {
($0 =~ m,(.*)/[^/]+,) && unshift (@INC, "$1"); # Get the script location: UNIX /
($0 =~ m,(.*)\\[^\\]+,) && unshift (@INC, "$1"); # Get the script location: Windows \

require "links.cfg"; # Change this to full path to links.cfg if you have problems.
require "$db_lib_path/db_utils.pl";
require "$db_lib_path/links.def";
$build_use_templates ?
require "$db_lib_path/site_html_templates.pl" :
require "$db_lib_path/site_html.pl";
};
if ($@) {
print "Content-type: text/plain\n\n";
print "Error including libraries: $@\n";
print "Make sure they exist, permissions are set properly, and paths are set correctly.";
exit;
}

# ========================================================

eval { &main; }; # Trap any fatal errors so the program hopefully
if ($@) { &cgierr("fatal error: $@"); } # never produces that nasty 500 server error page.
exit; # There are only two exit calls in the script, here and in in &cgierr.

sub main {
#-------------------------------------------------------------------
# Main Routine

my (%in) = &parse_form;


($in{'yemail'} =~ /.+@.+\..+/) or &site_html_tell_error ("The email address: '$in{'yemail'}' doesn't look like a real email
address.") and return;
($in{'yname'} =~ /[A-Za-z]+/) or &site_html_tell_error ("Please enter your name as well as your email address.")
and return;
($in{'tname'} =~ /[A-Za-z]+/) or &site_html_tell_error ("Please enter their name as well as your email address.")
and return;
($in{'temail'} =~ /.+@.+\..+/) or &site_html_tell_error ("The email address: '$in{'yemail'}' doesn't look like a real email
address.") and return;

my $to = $in{'temail'};
my $from = $in{'yemail'};
my $subject = "Check this site out!\n";
my $msg = qq|
Just seen a great site you have to visit!:

Site title: $in{'Title'}
Site URL: $in{'URL'}
Description: $in{'Description'}


Sincerely,

$in{'yname'}
|;

# Then mail it away!
require "$db_lib_path/Mailer.pm";
my $mailer = new Mailer ( { smtp => $db_smtp_server,
sendmail => $db_mail_path,
from => $from,
subject => $subject,
to => $to,
msg => $msg,
log => $db_mailer_log
} ) or return;
$mailer->send or return;
&site_html_tell_mail;
# Writes the message to a logfile


# Set date variable to today's date.
$date = &get_date;

# Write the information to a logfile

open (VAL, ">>tella2.txt") or &cgierr("error in add_record. unable to open validate file: comments.db. Reason: $!");
flock(VAL, 2) unless (!$db_use_flock);
print VAL "$in{'ID'}|$date|$in{'Title'}|$in{'yname'}|$in{'yemail'}|$in{'temail'}|$in{'tname'}|\n";
close VAL; # automatically removes file lock
}

i found this mod in resources

tanx

Gregor
Quote Reply
Re: [AndyNewby] Just a thought ...about emailadd.cgi In reply to
Hi Andy!

did u had any time to take a look at my problem?

thanx in advance

Gregor
Quote Reply
Re: [sc2utp] Just a thought ...about emailadd.cgi In reply to
No, sorry I didn't. I'm just re-writing my recommend mod, maybe you want to try that. I'll let you know when its done by replying to this post.

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [AndyNewby] Just a thought ...about emailadd.cgi In reply to
thanks i think that recomend mod will do just fine :)

bye

Gregor
Quote Reply
Re: [sc2utp] Just a thought ...about emailadd.cgi In reply to
Hi, finally got it done. Sorry for the delay. I was just trying to get theeasier mods out of the way first Tongue You can download it from the followingpage;

http://www.ace-installer.com/...Pages&file=links

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [AndyNewby] Just a thought ...about emailadd.cgi In reply to
Hi!

a looked at demo .. is it possible to include tags like <%Title%> or <%Description%>

oh yes link for downlaoding is not working.

bye

Gregor
Quote Reply
Re: [sc2utp] Just a thought ...about emailadd.cgi In reply to
Ah, sorry about that. It should work now :p

Ok, basically in link.html you add something like;

<a href="http://www.yoursite.com/acereferer.php?id=<%ID%>&title=<%Title%>&description=<%Description%>&$url=<%URL%>">Refer</a>

And then when the re-build is done the URL, Description, title and ID are all sent to the PHP script.

Hope you like it Smile

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [AndyNewby] Just a thought ...about emailadd.cgi In reply to
ol

i'm going to try it right away

i'll post results :)

Gregor
Quote Reply
Re: [AndyNewby] Just a thought ...about emailadd.cgi In reply to
hmm .. when i click on Refer Program i get "Page cannot be displayed ... i was hoping at least for internal server error not Page cannot be displayed :)

any idea

Gregor
Quote Reply
Re: [sc2utp] Just a thought ...about emailadd.cgi In reply to
Erm, what do you have in link.html ??? It sounds like you have pointed it to the wrong URL, as the script is not able to create page not found errors Wink

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [AndyNewby] Just a thought ...about emailadd.cgi In reply to
hi!
sorry script IS working just referalurl2 was not set correctly ... i have received mails ... now i'm going to try it with links2.0 tags..

Gregor
Quote Reply
Re: [sc2utp] Just a thought ...about emailadd.cgi In reply to
Well, I'm going to bed now. Gotta get up early for collage tomorrow, so I'llhave a look and reply to your posts then Wink

Night...lol

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!