Gossamer Forum
Quote Reply
[UPDATED] Recommend IT
I've posted version 2.1. Should fix the problems in 2.04. Let me know if there are any problems.

PUGDOGŪ Enterprises, Inc.
FAQ:http://LinkSQL.com/FAQ
Forum:http://LinkSQL.com/forum
Quote Reply
Re: [UPDATED] Recommend IT In reply to
Have you uploaded the new version?
Admin shows 2.1 but is actually installing 2.01.00


Eraser:
Insight Eye
http://www.insighteye.com/
Quote Reply
Recommend IT In reply to
When I post a reccomend site on a form : recommend_it.cgi
say Internal Server Error
why?
Thanks in advance
Bye from Italy
Fabio

Quote Reply
Re: Recommend IT In reply to
Check your server logs... what is happening? 500 error is often headers, but without the error log message, I have no idea.

PUGDOGŪ Enterprises, Inc.
FAQ:http://LinkSQL.com/FAQ
Forum:http://LinkSQL.com/forum
Quote Reply
Re: [UPDATED] Recommend IT In reply to
yeah, 02.01 is actually 2.1



PUGDOGŪ Enterprises, Inc.
FAQ:http://LinkSQL.com/FAQ
Forum:http://LinkSQL.com/forum
Quote Reply
Re: [UPDATED] Recommend IT In reply to
I installed the Recommend_It plug-in and it mostly works fine. The one problem I can't seem to track down is the link that gets emailed has an unwanted forward slash in it: jump.cgi\?ID=239

What I want is ump.cgi?ID=239 without the forward slash. Where is it? I looked in recommend_it.cgi and Recommend.pm are there other files installed?




Quote Reply
Re: [UPDATED] Recommend IT In reply to
Pugdog:

I recall in an earlier version of this - I think it may have been for Links 2.0 (not the SQL verson), there was a mod that would also send a bcc message to the website.

I've played around with it a bit to try to put that ability into the script - but all I seem to do is get 500 errors when I do it (back to Perl basics!).

Any suggestions on how this could be implemented. I wouldn't think it would be that difficult.


Regards,


Clint.

--------------------------
http://www.AffiliatesDirectory.com - Affiliate Programs Directory
Quote Reply
Re: [UPDATED] Recommend IT In reply to
It's probably a problem in the email template:

recc_success.html (1224 bytes) Edit | Perl Check | Delete
email_recc.txt (564 bytes) Edit | Perl Check | Delete

I've fixed them both for the next release. I think it was a hold over from an "escape" of the ?

I've also changed the hard coded url to <%db_cgi_url%> as it should have been. Don't know how that escaped me!



PUGDOGŪ Enterprises, Inc.
FAQ:http://LinkSQL.com/FAQ
Forum:http://LinkSQL.com/forum
Quote Reply
Re: [UPDATED] Recommend IT In reply to
Yeah, the mailer was handled differently in the 1.x versions.

I don't know if it will work, but try changing:

Code:
GT::Mail->send (
smtp => $CFG->{db_smtp_server},
sendmail => $CFG->{db_mail_path},
to => $IN->param($recipemail),
from => $IN->param('send_email'),
subject => $subject_line,
reply => $IN->param('send_email'),
bcc => $CFG->('admin_email'),
msg => $formatted_message,
debug => $Links::DEBUG
) or Links::fatal ("Unable to send mail: $GT::Mail::error");
If the module works the way I think it should, it will pick out the required headers, and known headers to act on, and simply create headers for the tags it doesn't know.

At any rate, this shouldn't generate 500 errors.

PUGDOGŪ Enterprises, Inc.
FAQ:http://LinkSQL.com/FAQ
Forum:http://LinkSQL.com/forum
Quote Reply
Re: [UPDATED] Recommend IT In reply to
Ahhh... email_recc.html that's what I couldn't find.

Thanks, it's all fixed now!

Quote Reply
Re: [UPDATED] Recommend IT In reply to
Pugdog, I just cannot get this to work (Internal Server Error after the submit) this is using your template set, then my set - with no luck :-(

Error log says:

/usr/local/www/vhosts/edotdirectory.com/cgi-bin/db/recommend_it.cgi
Invalid method: site_html_email_recc (email_recc.html) at /usr/local/www/vhosts/edotdirectory.com/cgi-bin/db/admin/Links/SiteHTML.pm line 201.

Invalid method? - this is set to the default "post".

Eraser:
Insight Eye
http://www.insighteye.com/
Quote Reply
Re: [UPDATED] Recommend IT In reply to
Make sure you have a file email_recc.html in your default templates directory.

A change in Links 2.04 is that email_recc.txt has to be email_recc_html, since direct access to the &load_template call was deactivated.

SiteHTML.pm expects everything to end in an.html extension.

PUGDOGŪ Enterprises, Inc.
FAQ:http://LinkSQL.com/FAQ
Forum:http://LinkSQL.com/forum
Quote Reply
Re: [UPDATED] Recommend IT In reply to
Hi Pugdog:

Thanks for the suggestion. I tried it but it did generate Server 500 errors for some reason.

I suppose another way would be to define the email address as a parameter in the script. I might play with that a bit.

Regards,


Clint.

--------------------------
http://www.AffiliatesDirectory.com - Affiliate Programs Directory
Quote Reply
Re: [UPDATED] Recommend IT In reply to
Ooops: This is why you need to check the server logs.

bcc => $CFG->('admin_email'),

should be:

bcc => $CFG->{'admin_email'},

The () are probably causing a compillation error, and thus a 500 error.



PUGDOGŪ Enterprises, Inc.
FAQ:http://LinkSQL.com/FAQ
Forum:http://LinkSQL.com/forum
Quote Reply
Re: [UPDATED] Recommend IT In reply to
In Reply To:
A change in Links 2.04 is that email_recc.txt has to be email_recc_html, since direct access to the &load_template call was deactivated.
That fixed it :)

A problem though, and a consequence of using html file instead of txt I expect, is that paragraphs are not recognized but line breaks are.

So all text in the outgoing email has no space in between the blocks of sentences
making it impossible to format the email.

Using the standard html <p> tags wont work as these are sent raw in the email.

Eraser:
Insight Eye
http://www.insighteye.com/
Quote Reply
Re: [UPDATED] Recommend IT In reply to
Yeah, I noticed that too. It seems to recognize one a single return, so I put a period on a line and then hit return so that I was able to do a little formatting.

For example:

Dear Bob,
.
This is Bryan.
.
Check out this yadyayayda.......

Anyone have any better ideas?

Quote Reply
Re: [UPDATED] Recommend IT In reply to
Pugdog:

Thanks for that - that certainly was the problem. It doesn't send the mail ... but it doesn't cause any errors either!

All the best,


Clint.

--------------------------
http://www.AffiliatesDirectory.com - Affiliate Programs Directory
Quote Reply
Re: [UPDATED] Recommend IT In reply to
Ok,

I went looking for some more info on how to alter this, and according to add.cgi, change the line in the reccommend_it.cgi script to:


my $formatted_message = GT::Template->parse ('email_recc.txt', {%TAGS, %$rec}, { compress => 0, root => $CFG->{admin_root_path} . '/templates/admin' } );


Change the 'email_recc.html' back to 'email_recc.txt' for clarity.

Seems the call was more objectified, but you can still get into it.

It also seems that the "root" parameter is ignored <G>... but just in case, you might need to change that to '/templates/default'



PUGDOGŪ Enterprises, Inc.
FAQ:http://LinkSQL.com/FAQ
Forum:http://LinkSQL.com/forum