Gossamer Forum
Home : Products : Links 2.0 : Customization :

New Auto-Newsletter MOD for Links 1.11+

Quote Reply
New Auto-Newsletter MOD for Links 1.11+
Check out this new automated newsletter MOD for Links 1.11+. This MOD sends out a list of the new links for the past 7 days on a day of the week you specify. Similiar to cgi-resources.com's newsletter. Check it out here: http://www.nozone.net/linksmods/newsletter.html



------------------
The RelayMan
simsearch.hyperart.net
mdhealyjr@adelphia.net
Quote Reply
Re: New Auto-Newsletter MOD for Links 1.11+ In reply to
I have tried to implement this nice mod but always get an unrecognized character line error.

Would you be kind enough to send me a working copy of your nph_build.cgi with this mod implemented?

Thank you

Volpi
evolpi@sti.com.br

[This message has been edited by volpi (edited March 01, 1999).]
Quote Reply
Re: New Auto-Newsletter MOD for Links 1.11+ In reply to
Could you be more specific as to the error your getting, and the version of links you're using. Thanks.



------------------
The RelayMan
simsearch.hyperart.net
mdhealyjr@adelphia.net
Quote Reply
Re: New Auto-Newsletter MOD for Links 1.11+ In reply to
There is an invalid character in the script mod.
That is what the hypermart error log points me

Links is version 1.11

[This message has been edited by volpi (edited March 01, 1999).]
Quote Reply
Re: New Auto-Newsletter MOD for Links 1.11+ In reply to
Copy what the error log says and paste it in your message so I can read it and tell you what the problem is because I don't want to post my entire nph-build.cgi, I have numerous other mods that I have created that I do not wish to share because it's my only edge against other Links run sites like my own.



------------------
The RelayMan
simsearch.hyperart.net
mdhealyjr@adelphia.net
Quote Reply
Re: New Auto-Newsletter MOD for Links 1.11+ In reply to
See, let's get things simple. I have already told you what the error log says. I didn't ask you TO POST your nph_build.cgi in this Forum. I said:"Would you be kind enough to send me a copy?"
Belive me, I do not intend to run a site with a content like yours.

Thank you anyway

Best Wishes

Eduardo Volpi
http://martial-arts.hypermart.net
Quote Reply
Re: New Auto-Newsletter MOD for Links 1.11+ In reply to
You didn't have to be so testy. I was simply trying to help you solve the problem and didn't say you would copy my site content but others may want to run the same tpe of services. Also many of my personal mods could be used for any type of Links site.

------------------
The RelayMan
simsearch.hyperart.net
mdhealyjr@adelphia.net
Quote Reply
Re: New Auto-Newsletter MOD for Links 1.11+ In reply to
>>>I didn't ask you TO POST your nph_build.cgi in this Forum. I said:"Would you be kind enough to send me a copy?"<<<

is one of the most selfish comments i have ever read. you want people to help you..but you don't want others to benefit from the help that you received. i think that's the whole concept behind the forum..u selfish u know what. personally i am not having any problems w/ his mod..but someone like you may be able to benefit from the relayman helping you.

bye
Quote Reply
Re: New Auto-Newsletter MOD for Links 1.11+ In reply to
Relayman,

Just curious if this mod works with Links 2.0? Looks like a great MOD! This is something I would love to impliment, but I am running Links 2.0.
(I know I can send out newsletters with 2.0, but I would like this to be automated.)

------------------
Brian
wwnurse.com
Quote Reply
Re: New Auto-Newsletter MOD for Links 1.11+ In reply to
As far as I concern!

Most of the folks in here are so selfish... They got their site up and running well because they got HELPED from other FOLKS... NOW we come after and confuse. they just never want to reveal whatever they have known to other but just themselves!

This Script is from Alax, And I Thank Him MILLIONS!!!!... Secondly, I thank you all who supported me and gave me ideas and tips.!

FINALLY... I DISLIKE Selfish PEOPLE! Period!

With LINKS! There will be NO Selfish PEOPLE POSTED in these forums!

Think about it... You ran into trouble and someone helped you! Of course You are so HAPPY!!! VEry HAPPY.. But ones who come after you and suffer the troubles, You just let it go... IT S NOT HUMAN KIND!...

http://www.trisoft.net/cgi-bin/search/

Take a LOOK ! any comments , Questions, and Troubles. PLeASE PLEASE let me help you!


Hope I Can Help you step by step procedures!

yaaaaaaaaaaaaaaaaaa heeeeeeeeeee

so long!
Quote Reply
Re: New Auto-Newsletter MOD for Links 1.11+ In reply to
Sorry for the lng delay of replies to this thread but I was upset at getting screamed at to send this guy my files which are crutial to my companies' unique independance and have been deemed classified by my partners. I can however release an example of where to place the mod in your nph-build.cgi:


# Print HTML Header
$use_html ?
print qq|<html><head><tittle>Links Manager: Building Pages</title></head>
<BASE TARGET="_top">
<BODY BGCOLOR=#FFFFFF><H2><TT>Building Pages</TT></H2>
<PRE>| :
print qq|Building Pages\n|;
print "Pages built on " . $date . " at " . $time . "\n";
print "--------------------------------------------------------\n\n";



----- THIS IS THE BEGINING OF THE MOD -----

###### Send Out Newsletter ########
##Configure It Here##
$list_file = "/data1/hypermart.net/simsearch/cgi-bin/newsletter/newsletter.dat";
$mailprog = '/var/qmail/bin/qmail-inject';
$sendday = 'Friday';
####

my @days = qw!Sunday Monday Tuesday Wednesday Thursday Friday Saturday!;
my $day = $days[(localtime(time))[6]];



if ($day eq $sendday) {
if (! (-e "$db_backup_path/$date.db")) {
print "Sending Newsletter..\n";

## Sending E-Mail For Newest Websites ##

# Find The New Sites And Add Them To The Email

open (DB, "<$db_file_name") or &cgierr("unable to open database: $db_file_name. Reason: $!");
@lines = <DB>;
close DB;

LINE: foreach $line (@lines) {
next LINE if ($line =~ /^#/);
next LINE if ($line =~ /^\s*$/);
chomp $line;

@fields = &split_decode ($line);

if (!$fields[$db_modified]) {
print "Warning! Bad Line (no date!): $line\n";
next LINE;
}

my (%rec) = @_;
my $days_old = &days_old($fields[$db_modified]);
if ($days_old <= 7) {

$numbersite += 1;
if ($newsites) {
$newsites .= "<bR><A href=http://www.simsearch.com/cgi-bin/SimSearch/jump.cgi?ID=$fields[$db_key]> $fields[$db_title]</a> - $fields[$db_description]<br>$fields[$db_modified] - $fields[$db_contact_name] - $fields[$db_contact_email]<br>";
} else {
$newsites = "<bR><A href=http://www.simsearch.com/cgi-bin/SimSearch/jump.cgi?ID=$fields[$db_key]> $fields[$db_title]</a> - $fields[$db_description]<br>$fields[$db_modified] - $fields[$db_contact_name] - $fields[$db_contact_email]<br>";
}

}
}

####

sub clean
{
chomp($member);
$member=~ s/^\s+//;
$member=~ s/\s+$//;
}

open(LIST,"$list_file");
@addresses=<LIST>;
close(LIST);
foreach $member(@addresses)
{
open (MAIL, "|$mailprog -t $member") &#0124; &#0124; die "Can't open $mailprog!\n";
print MAIL "From: SimSearch \<webmaster\@simsearch\.hypermart.net\>\n";
print MAIL "Subject: Weekly Newsletter\n";
print MAIL "Content-Type: text/html \n";
print MAIL "To: $member\n";
print MAIL "<html>\n";
print MAIL "<p>SimSearch's Automated Newsletter, sent out every $sendday. To Unsubscribe or Visit goto <A href=http://www.simsearch.com>http://www.simsearch.com</a> and mark unsubscribe on the newsletter. Sending you this week's newest links ($numbersite Links):</p><hr><hr><br>";
print MAIL "$newsites";
print MAIL "</html>\n";
close (MAIL);
$x++;
}

########################################


print "Done.\n\n";
}
else {
print "Newsletter already exists for today.. skipping..\n\n";
}

}
else {
print "Newsletter not sent today..<br>";
}
##############################################



------THIS IS THE END OF THE MOD!!!-----


# Back up Database..
if (! (-e "$db_backup_path/$date.db")) {
print "Backing up database to $db_backup_path/$date.db . . .\n";
use File::Copy;
copy ($db_file_name, "$db_backup_path/$date.db") or &cgierr ("unable to make backup $db_backup_path/$date.db! Reason: $!");
print "Done.\n\n";
}
else {
print "Backup Database already exists for today.. skipping..\n\n";
}





That's how the MOD appears in my nph-build.cgi file.

I'm not sure if it's Links 2.0 compatible but someone let me know please if you have gotten it to work in 2.0. Thanks.

------------------
The RelayMan
simsearch.hyperart.net
mdhealyjr@adelphia.net