Gossamer Forum
Home : Products : Links 2.0 : Customization :

any help with tell ya friend2 please

Quote Reply
any help with tell ya friend2 please
Hello

i've tried to install Glenn's Tell Ya friend2,
but i've got a little problem :
when i didn't fill out correctly the form,
i've got the error :
fatal error: Undefined subroutine &main::site_html_tell_error called at /home/c03531/cgi-bin/links/cgi-bin/tella2.cgi line 56.


So i've changed in site_html_template :
sub site_html_deadlink_error to sub site_html_tell_error

Now it works,
but i'd like :


1) print the reason of the error
it seems to be possible, because in tella2.cgi there are the following codes :
" ($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; "

I've put error => $error in sub site_html_tell_error
but error doesn't appear.


2) propose on error page to fill out a new form,
I've pasted some codes of tell_add.html in tell_error.html, but i've got
Unknown tag : URL



Glenn, I've tried in your site to fill out a blank form (for have error message with tell ya friend2), but there was an Internal Server Error

Thanks for your help Laugh
Sorry if my questions seems stupid Tongue

Ciao

Quote Reply
Re: any help with tell ya friend2 please In reply to
Yeah sorry, I have had no time to maintain or upate my http://advdirectory.cjb.net site so some pieces may not be working.... I've taken on alot of work from my install section and add to that my uni work etc.. and I don't get time to do much else.

Anyway off the top of my head try the doing following:

In site_html_templates.pl in the sub where it mails the friend the message put the following at the top:

my $action = shift;

Thn in the tell error sub add:

my $error = shift;



'Sorry if my questions seems stupid '

No don't worry, they're not stupid. You asked a good and valid question.




Good Luck!

Glenn


http://mir.spaceports.com/~glennu/
Quote Reply
Re: any help with tell ya friend2 please In reply to
HEllo

thanks for your quickly reply glenn Laugh

Yeah sorry, I have had no time to maintain or upate my http://advdirectory.cjb.net site so some pieces may not be working.... I've taken on alot of work from my install section and add to that my uni work etc.. and I don't get time to do much else.
* oh, it doesn't matter, i just hope you are not worry about some tests that i made on your site ;o)


*In site_html_templates.pl in the sub where it mails the friend the message put the following at the top:
my $action = shift;

Thn in the tell error sub add:
my $error = shift;

1) It works, thanks !!!
But could U tell me if I put your codes in good place,
because if i send a blank form, only one error appear in the error message, not all.

# CHGT 21.09.00 Tell Ya friend 2 mod
sub site_html_tell_mail {
# --------------------------------------------------------
# This routine determines how the tell mail success page will look like.
my $action = shift;
&html_print_headers();
print &load_template ('tell_success.html', {
%in,
%globals
});
}

sub site_html_add_tell {
# --------------------------------------------------------
# This routine determines how the tell comment page looks like.
&html_print_headers();
print &load_template ('tell_add.html', {
%rec,
%globals
});
}

sub site_html_tell_error {
# --------------------------------------------------------
# This routine determines how the tell mail error page will look like.
my $error = shift;
&html_print_headers();
print &load_template ('tell_error.html', {
error => $error,
%in,
%globals
});
}
# FIN CHGT

And i've added <%error%> in tell_error.html.

2) And i've got another question ...
yesterday U told me to me to put in email section : http://www.mysite.com/cgi-bin/links/cgi-bin/info.cgi?ID=$in{'ID'} to have a link to detailed page :

So in tella2.cgi, i've replaced $in{'URL'} to http://www.mysite.com/cgi-bin/links/cgi-bin/info.cgi?ID=$in{'ID'} like this :

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: [pruple]http://www.mysite.com/cgi-bin/links/cgi-bin/info.cgi?ID=$in{'ID'}[/purple]
Description: $in{'Description'}

BUT when the 'friend' received the recommanded link,
everything is allright, except that ID number doesn't appear, like this :

Site title: iiiiii
Site URL: http://www.mysite.com/cgi-bin/links/cgi.bin/info.cgi=
Description: kiki des kisses


Sincerely,

bbbib

Thanks again Laugh

PS : No don't worry, they're not stupid. You asked a good and valid question.
thanks Tongue


Quote Reply
Re: any help with tell ya friend2 please In reply to
BUT when the 'friend' received the recommanded link,
everything is allright, except that ID number doesn't appear, like this :

Site title: iiiiii
Site URL: http://www.mysite.com/cgi-bin/links/cgi.bin/info.cgi=
Description: kiki des kisses



Yeah you'll also need to put a hidden value into the email form

<input type="hidden" name="ID" value="<%ID%>">

Good Luck!

Glenn


http://mir.spaceports.com/~glennu/
Quote Reply
Re: any help with tell ya friend2 please In reply to
Hello

it works like a charm, thanks Glenn Laugh

I don't want to abuse,
but i've still few questions :

1) Is it possible to display, if there are errors, all the error messages like :
Please enter your name as well as your email address
Please enter their name as well as your email address.

If there are 2 errors, i just can see one like :
Please enter your name as well as your email address

And if i corrected it, i'll see the second :
Please enter their name as well as your email address


U gave me the following codes :
my $action = shift;
my $error = shift;

I put them (hope in good place), and i've put <%error%>
in template error. Have I missed anything?

2) I think that my $error = shift uses to display error messages, but what is the usefulness of my $action = shift?

Thanks again Smile

Quote Reply
Re: any help with tell ya friend2 please In reply to
Hello

i've tried to install Glenn's Tell Ya friend2,
when click on submit botton the page of success don't load, but if i try to reload the email send to destinatary..
Which is the problem??
Thanks

Quote Reply
Re: any help with tell ya friend2 please In reply to
Do you get an error message if so please post the message so I can see it.

Good Luck!

Glenn


http://findarom.emusanet.com/comments3/
Quote Reply
Re: any help with tell ya friend2 please In reply to
500 error internal server....
but the script works...
i recived the mail..
thanks

Quote Reply
Re: [glennu] any help with tell ya friend2 please In reply to
hi guys .... have u tried to send a link via tella2.cgi and description of link would have " characters in description ...

tella2.cgi stops at first charatcter " found in description ... so a person gets via mail like only first line form deescription .. after sign " there is nothing ...

any idea

thanx

Gregor