Gossamer Forum
Home : Products : Links 2.0 : Discussions :

changing auto-email subject line????

(Page 1 of 2)
> >
Quote Reply
changing auto-email subject line????
I have 2 1/2 questions?
!. and 1 1/2:
I have tried a couple of search scripts and an according mess is in my online files and folders.
There are 5 files that i know i haven't created myself but am not sure if they are part of Links and if they are auto-created by the script or if i need to save a backup of them:
finto
hash
hashwords
sitewords
word_ind
-----------------
2.
I would like to change the subject line of the auto email messages as well as the sender.
In which file can i do this?
-----------------------
That's already all, hope for autorized info, thanks.

Quote Reply
Re: changing auto-email subject line???? In reply to
1. By default Links will not create this 5 files, if you installed additional mods see which mod saves this 5 files.
2. You can change this info in add.cgi, modify.cgi, ... under sub send_email as follow:

sub send_email {

my $to = $db_admin_email;
my $from = $in{$db_cols[$db_contact_email]};
my $subject = "Addition to Database: $in{'Title'}\n";

Regards,

Nuno Duque
--------------------
Macau Search Engine
inmacau.com
Quote Reply
Re: changing auto-email subject line???? In reply to
thanks for the useful info, but i am afraid there is a misunderstanding.
I just checked those 2 files (in my script called add.pl and modify.pl)
and what i see in there is the text that is used in the emails sent TO THE ADMINISTRATOR,
ergo to myself. That ext is okay as is, what i want to chenge is the SUBJECT line -as well as the
Sender (instead of "me@hallo.com" "Rudolf Megert" f.ex.)- in the emails that Links sends out automatically after i clicked in the admin. on either "delete" or "validate" a new submission!
So, this thing i guess needs to be changed in some other file, but which?????

Quote Reply
Re: changing auto-email subject line???? In reply to
I already know what you're looking for.
In admin_html.pl find the following and feel free to change your subjet line.

##########################################################
## Email Messages ##
##########################################################

sub html_validate_email {
my $subject = "Your link has been added!";

sub html_modify_email {
my $subject = "Your link has been modified!";

sub html_reject_email {
my $subject = "Your link has been rejected.";


Regards,

Nuno Duque
--------------------
Macau Search Engine
inmacau.com
Quote Reply
Re: changing auto-email subject line???? In reply to
Great info, thanks a lot!
It brings up one more question though:
I was already busy in that file in another matter, but i did so far overlook any cgi parts in it,
i am not very familiar with so i don't want to mock around with something i don't understand, (but changing these email linesis easy). What i did in there was putting a little Java script at the end of each and every </HTML> tag i found in there.
I haven't had the curage yet to put it place (ergo overwrite the original) but maybe you have some experience if this small scripts that look like this:
<SCRIPT LANGUAGE="JavaScript">




</SCRIPT>
would actually interfer with the rest of this file or not?

Quote Reply
Re: oh and i forgot,??? In reply to
what about the email adress, is it at all somewhere possible to use a name instead of the actual email adress in those submission confirmation emails?
Rudolf

Quote Reply
Re: changing auto-email subject line???? In reply to
and then there are 2 more real silly beginners question:
1.
After i edited the admin_html.pl file, (which is to big for direct editing in the WS_FTP with notepad)
what CHMOD do i have to use?
2.
Is that admin_html.pl really the file that "creates" the looks of the admin interface, or is that actually another one, or even 3 different ones for each frame?
Thanks for an answer.
Rudolf the white nosed beginner.

Quote Reply
Re: changing auto-email subject line???? In reply to
Actually nothing will interfer with the rest of this file.


Regards,

Nuno Duque
--------------------
Macau Search Engine
inmacau.com
Quote Reply
Re: oh and i forgot,??? In reply to
Sure.

A better way to do this is putting a email address path in links.cfg, so you can call it by any file.

1. In links.cfg find the following. Actually I have four but will be more.
# Email address of the administrator. BE SURE TO SET!
$db_admin_email = 'info@inmacau.com';
$db_deadlink_email = 'deadlink@inmacau.com';
$db_webmaster_email = 'webmaster@inmacau.com';
$db_nduque_email = 'nduque@inmacau.com';

2. At the end of each cgi file you'll find the following under sub send_email routine and make the changes, if you want to be sure if it's there an email path change $db_admin_email or &cgierr("Admin Email Address Not Defined in config file!"); to $db_whateveryouset_email or &cgierr("Admin Email Address Not Defined in config file!");
like this.

sub send_email {
# --------------------------------------------------------
# Check to make sure that there is an admin email address defined.
change this from:
$db_admin_email or &cgierr("Admin Email Address Not Defined in config file!");

to:
$db_webmaster_email or &cgierr("Webmaster Email Address Not Defined in config file!");

and change this from:
my $to = $db_admin_email;

to:
my $to = $db_whateveryouset_email;

That's all,

Regards,

Nuno Duque
--------------------
Macau Search Engine
inmacau.com
Quote Reply
Re: changing auto-email subject line???? In reply to
1. The admin_html.pl is CHMOD 644 by default.

2. Yes, the admin_html.pl creates the look of the admin interface, see in the admin_html.pl and you'll find the <frame> codes, but make changes carefully and make a backup before you make changes in files.

Regards,

Nuno Duque
--------------------
Macau Search Engine
inmacau.com
Quote Reply
Re: very good info again, thanks In reply to
the CHMOD for all cgi files (and i assume that means also the pl files) in the Readme file is told to be 755 and that is the automatic amount virtualave CHMODS cgi files, are you sure i would have to CHMOD manually to 644?
The second issue with the email settings i didn't understand, not because you didn't explain it well, just because i am not yet deep enough in it to understand these cross script functions where something you change in one file changes something in another file that will change something in another, viewable file eventually. That part i have to learn first.

Quote Reply
Re: very good info again, thanks In reply to
1. If you read the following below you'll know why the admin_html.pl is set to CHMOD 644.

CHMOD 644 is the permission set for basic files, such as HTML files or any other type of file that does not have to be executed. The user has read and write permission (6), and the group and other have just read permission(4).

CHMOD 755 is the permission set to be used for executable files, such as programs. The user has all permissions(7), and the group and other have read and execute permission(5).

2. I'll make you understand more easily as follow:

2.1 In link.cfg you'll find the following below, this line will set the variable $db_admin_email to you@yourdomain.com , so in all off your files you can call you@yourdomain.com by putting the variable $db_admin_email.
If you want to add another email variable just add ti below $db_admin_email = 'you@yourdomain.com'; as follow:

# Email address of the administrator. BE SURE TO SET!
$db_admin_email = 'you@yourdomain.com';
$db_webmaster_email = 'webmaster@yourdomain.com';

2.2 At the end of the cgi files that have send email function like add.cgi, modify.cgi & nph-email.cgi, you can find a sub send_email routine as follow:

sub send_email {
# --------------------------------------------------------
# Check to make sure that there is an admin email address defined.
$db_admin_email or &cgierr("Admin Email Address Not Defined in config file!");
###### This line is to make sure if there is an webmaster email address defined. ######
###### add the text below this line ######
$db_webmaster_email or &cgierr("Webmaster Email Address Not Defined in config file!");
###### add the text above this line ######

Now you can change the variable in any cgi file.

Find this in the sub send_email and change the following:

Overwrite $db_admin_email with the email variable you set in links.cfg, in this case $db_webmaster_email

change the following line from:
my $to = $db_admin_email;

to:
my $to = $db_webmaster_email;

Finish!
Hope you understand this, if you don't understand this, read more times and if you really don't understand this after reading it many time do the following:

In the cgi file you want to change find my $to = $db_admin_email; under sub send_email and make the changes as follow:

change the following line from:
my $to = $db_admin_email;

to:
my $to = webmaster@yourdomain.com;

Go and play with this.

Regards,

Nuno Duque
--------------------
Macau Search Engine
inmacau.com
Quote Reply
Re: very good info again, thanks In reply to
thanks for that thourough explanation, i'll try that.
Now i have a much more interesting question:
I JUST FOUND OUT THAT MY SCRIPT RETURNS ONLY SEARCH RESULTS OF TITLES AND DESCRIBTION!!!
Even if i use that extra search function where i can click on "search by keywords", it does not find the keywords i know i have put in a particular website listet in my database!
Is that a matter of some settings some where?

And to make sure i got that now 100% right about the CHMOD factor for admin_html.pl:
It looks like if i upload it in ASCII to my cgi-bin/admin/whatever spot i don't actually need to CHMOD it at all
because 644 is default anyway?
And if my server would automatically CHMOD it 755 it would still work anyway?

Rudolf

Quote Reply
Re: very good info again, thanks In reply to
1.
Search function by default will search fields in order by title, URL, Category and Description.
You can see which fields will be searched in links.def

In links.def find the following:

# Field names you want to allow visitors to search on:
@search_fields = (1,2,5,6);

As you can see 1 for title, 2 for URL, 5 for category and 6 for description, so if you add a new field called keywords with the field number set as 7 you need to add it in the search field like this:

# Field names you want to allow visitors to search on:
@search_fields = (1,2,5,6,7);

2.
You just need to set this permissions:

chmod 755 on all .cgi files (if you use .pl files just chmod the files that need to be executed like add.pl, modify.pl, jump.pl, rate.pl, search.pl, subscribe.pl, admin.pl, nph-build.pl, nph-email.pl, nph-verify.pl)
chmod 666 on all filed in the data directory
chmod 666 on all your template files (if using the online editor)
chmod 777 on the hits directory
chmod 777 on the ratings directory
chmod 777 on the directory where Links pages will be created

Change the permission if they're not correct.


Regards,

Nuno Duque
--------------------
Macau Search Engine
inmacau.com
Quote Reply
Re: very good info again, thanks In reply to
Good go get info from someone who obviousely knows this script well, thanks again, now i'll be set for a while with things to do but hope i can get back to you later on because i know already that there is one more important question.
P.S. i just tried inmacau.com, no reaction???

Quote Reply
yes, there is already that question! In reply to
Once i am done with the design and functionality of links, i will face the biggest task (i think).
I will have to transfer somehow the 500 or so links i have already gathered on my old manual system into the links admin!!!
So far it looks to me as if i could only list one at the time which is an endless job of course.
So, i was wondering if there is anything known to "beat the system" )so to speak) and somehow directly "bulk" the entire list of links for each category or subcategory somewhere directly into a particular file which keeps all links for that particular category/subcategory?
I thought i can put them into those "index.html" files that are in each of the category/subcategory folders, but maybe there is another file for this?

Rudolf


Quote Reply
Re: very good info again, thanks In reply to
Subject: Re: very good info again, thanks

Impossible!

Go there http://inmacau.com and http://www.searchmacau.com.

searchmacau.com = inmacau.com



Regards,

Nuno Duque
--------------------
Macau Search Engine
inmacau.com
Quote Reply
Re: yes, there is already that question! In reply to
Try the bulkload http://www.gossamer-threads.com/...rces/jump.cgi?ID=211.

Regards,

Nuno Duque
--------------------
Macau Search Engine
inmacau.com
Quote Reply
got your site and one more question In reply to
i see that you still have it original, the "Top" at the beginning of each category/subcategory
(example: Top > Food and Beverage > Restaurants).
Apparently this seems to be the only thing within the online (in admin) template editor that can not be
changed in the "category" template.
All it says is: <%title_linked%>.
Do you know where the heckaroo i could change this "Top" into "Useroo"?????
Useroo by the way is my search Engine if you'd like to have a glimpse.
http://useroo.virtualave.net
P.S.
the top image (Macau Search Engine) in each of your pages is broken.

Quote Reply
Re: got your site and one more question In reply to
1. In nph-build.cgi find the following sub routine

sub build_linked_title {
# --------------------------------------------------------
# Returns a string of the current category broken up
# by section, with each part linked to the respective section.

my $input = shift;
my (@dirs, $dir, $output, $path, $last);

@dirs = split (/\//, $input);
$last = &build_clean(pop @dirs);

$output = qq| <A HREF="$build_root_url/">Top</A> |;
foreach $dir (@dirs) {
$path .= "/$dir";
$dir = &build_clean ($dir);
$output .= qq| <A HREF="$build_root_url$path/">$dir</A> |;
}
$output .= " $last";

return $output;
}

2. I didn't upload the images yet because I'm hardcoding my links.

Regards,

Nuno Duque
--------------------
Macau Search Engine
inmacau.com
Quote Reply
yep, works, thanks once more. In reply to
One thing i saw in your CATEGORY/SUBCATEGORY list is that you do not use a single category first before the subcategories start as i do
Example:
ART
ART/fine_art
ART/graphics
i tried it your way (which makes a lot more sense to me anyway)
first and something didn't work (but maybe i had just forgotten to click on "Build All")
Can i still go and delete those useless main categories (in which there will never be anything anyway)?
If i do so, wont that delete the category folders (in which all the subcategopry folders are installed)?
Rudolf

Quote Reply
search results line up??? In reply to
As i thought i've seen the script lists each new submission to a Category AT THE TOP of the existing list.
I would prefer to have each new addition to any category listet AT THE BOTTOM of the already existing list.
Can i arange that somewhere in a particular file???
Rudolf

Quote Reply
@search_fields = (1,2,5,6,7); =no change In reply to
i've just done this little change in links.def
@search_fields = (1,2,5,6,7);
instead of the original @search_fields = (1,2,5);
that i had in there.
Did not forget to click on "Build All" - yet when i do a search on "Italy"
(where i know i do not yet have a title or describtion or URL that would match this term in the database, but one site that has that term in the "keywords") there is still the "ERROR, no matching records" page coming up.
Do i need to make somewhere else additional changes for this, or is one keyword that matches simply not enough?
Rudolf

Quote Reply
Re: yep, works, thanks once more. In reply to
I'm using the Links Non-english Mod, http://www.gossamer-threads.com/...urces/jump.cgi?ID=28.
This mod will let you type non-english characters (including spaces) in the category name.
Try it.

Regards,

Nuno Duque
--------------------
Macau Search Engine
inmacau.com
Quote Reply
Re: search results line up??? In reply to
I don't know why do you think like this way, because people surfing your search engine will never see the new submissions once they choose a category, so if they need to go to the bottom to see the new submissions may be they will say good bye to your search engine.

Regards,

Nuno Duque
--------------------
Macau Search Engine
inmacau.com
> >