Gossamer Forum
Home : Products : Links 2.0 : Customization :

Modify/Password Mods Errors !!

Quote Reply
Modify/Password Mods Errors !!
I have installed the modify_first+password mods on my Links2, and had to face the following problems:

-error when trying to modify link: 'link not found'
==> fixed by browsing through threads.
had to add hidden ID input tags

-error when trying to modify link after that one was changed: 'category cannot be left blank'
==> fixed, Catergory to category, thanx to Eliot again.

Now, I have the following errors remaining, for which I am having a hard time finding info about in threads.

I think it also might be a CAPS problem, but duno where...

My errors:

-when user arrives in modify.html after modify_first, 'description' is not printed.


I have:

in modify.html
-------------
<tr>
<td align="right" valign="top">
<font color=white>Description:</td>
<td>
<textarea class="sexyblue" wrap="virtual" name="Description" value="<%Description%>" rows="3" cols="42">
</text-area>
</td>
</tr>

------------


in links.def
-------------
# Database Definition: LINKS
# --------------------------------------------------------
# Definition of your database file.
%db_def = (
ID => [0, 'numer', 5, 8, 1, '', ''],
Title => [1, 'alpha', 40, 75, 1, '', ''],
URL => [2, 'alpha', 40, 75, 1, 'http://', '^http|news|mailto|ftp'],
Date => [3, 'date', 15, 15, 1, \&get_date, ''],
Category => [4, 'alpha', 0, 150, 1, '', ''],
Description => [5, 'alpha', '40x3', 500, 0, '', ''],
'Contact Name' => [6, 'alpha', 40, 75, 1, '', ''],
'Contact Email' => [7, 'alpha', 40, 75, 1, '', '.+@.+\..+'],
Hits => [8, 'numer', 10, 10, 1, '0', '\d+'],
isNew => [9, 'alpha', 0, 5, 0, 'No', ''],
isPopular => [10, 'alpha', 0, 5, 0, 'No', ''],
Rating => [11, 'numer', 10, 10, 1, 0, '^[\d\.]+$'],
Votes => [12, 'numer', 10, 10, 1, 0, '^\d+$'],
ReceiveMail => [13, 'alpha', 10, 10, 1, 'Yes', 'No|Yes'],
Password => [20, 'alpha', 10, 10, 1, '', '']

);

# Database file to use -- defined in links.cfg.
$db_file_name = $db_links_name;
# Counter file to use -- defined in links.cfg.
$db_id_file_name = $db_links_id_file_name;
# The column name for the database key.
$db_key = 'ID';
# Database delimeter.
$db_delim = '|';
# Title used in admin output.
$html_title = 'Links Database';
$html_object = 'Link';

# Field Number of some important fields. The number is from %db_def above
# where the first field equals 0.
$db_category = 4; $db_modified = 3; $db_url = 2;
$db_hits = 8; $db_isnew = 9; $db_ispop = 10;
$db_contact_name = 6; $db_contact_email = 7; $db_title = 1;
$db_votes = 12; $db_rating = 11; $db_mail = 13; $db_password = 20;

-------------------




-my other error is with the password mod, when user asks for info to be emailed,
he receives this:


----------
You have requested your login info to -:hibrid:- for yello@www.com.
Resource ID: 12
URL : http://www.nk.com
Email : yello@www.com
password : 12

----------

notice pass=id ??????"('&"@|#|é"'é§(&^???


I have the following for my password.cgi :
-----------------
#***********************************************************
# Use the info in links.def to find the values you want.
# These are the default values. If you have added fields, then
# make sure that you define it by $db_newfield = 14; and then
# to get the value, you can call it by $data[$db_newfield]
#
# $db_category = 4; $db_modified = 3; $db_url = 2;
# $db_hits = 8; $db_isnew = 9; $db_ispop = 10;
# $db_contact_name = 6; $db_contact_email = 7; $db_title = 1;
# $db_votes = 12; $db_rating = 11; $db_mail = 13; $db_newfield = 20;
#**********************************************************

open (MAIL_RECIP, "|$MAIL_PROGRAM");

print MAIL_RECIP "To: $email\n";
print MAIL_RECIP "From: $admin\n";
print MAIL_RECIP "Subject: Password Request\n";

print MAIL_RECIP "You have requested your login info to -:hibrid:- for $email.\n";

print MAIL_RECIP "Resource ID: $data[0]\n";
print MAIL_RECIP "URL : $data[$db_url]\n";
print MAIL_RECIP "Email : $data[$db_contact_email]\n";
print MAIL_RECIP "password : $data[$db_newfield]\n";


close(MAIL_RECIP);

} # end of foreach

-----------------------



If anyone has any suggestions, it would be great,Tongue

Thanks in advance,
Aymeric.

Quote Reply
Re: Modify/Password Mods Errors !! In reply to
So it really looks tremendously boring to read....

Anyone? please. I am really stuck.
Thanxx;
Aymeric.


Quote Reply
Re: Modify/Password Mods Errors !! In reply to
anyone? please...

Quote Reply
Re: Modify/Password Mods Errors !! In reply to
Nothing wrong with the MODIFICATION, but your HTML FORM Codes.

HTML 102:

When you want to print values from a previous form in TEXT BOXES, you would use the following codes:

Code:

<textarea name="HTMLTutorialsHelp" cols="40" rows="10"><%HTMLTutorialsHelp%></textarea>


So, taking this example into account, the following codes:

Code:

<textarea class="sexyblue" wrap="virtual" name="Description" value="<%Description%>" rows="3" cols="42">
</text-area>


should be the following:

Code:

<textarea class="sexyblue" wrap="virtual" name="Description" rows="3" cols="42"><%Description%>
</textarea>


See the problem now??

Regards,

Eliot Lee
Quote Reply
Re: Modify/Password Mods Errors !! In reply to
Thanks once again Eliot, I will change that. It is weird that it works fine for my other values, but whatever.

I will look through my code again to see if I can do anything for the password!

Thanks,
Aymeric.

Quote Reply
Re: Modify/Password Mods Errors !! In reply to
I don't know if you've found a fix for the password part yet but if you haven't, where you have

print MAIL_RECIP "password : $data[$db_newfield]\n";

Shouldn't $data[$db_newfield] be $data[$db_password]. After all, you never stated what db_newfield was so that doesn't exist at all. Hope that helps! :>

Jon | netchitecture@home.com
http://www.netchitecture.f2s.com/
Quote Reply
Re: Modify/Password Mods Errors !! In reply to
I have done that, thanks very much.
I still get an error though, even though it is better than before:

I have:

print MAIL_RECIP "Password : $data[$db_password]\n";

and instead of printing the password, it now prints nothing (rather than the ID, which is a little better).

Anyone have any ideas?
Thanks in advance,
Aymeric.


Quote Reply
Re: Modify/Password Mods Errors !! In reply to
You must have the old version of password.cgi. There is an updated version that fixes that problem. It can be downloaded from Hostglobal at http://www.hostglobal.com/scripts/password.html . Hope that helps! :>

Jon | netchitecture@home.com
http://www.netchitecture.f2s.com/
Quote Reply
Re: Modify/Password Mods Errors !! In reply to
Will try that, thanks a lot.

Quote Reply
Re: Modify/Password Mods Errors !! In reply to
The version I have is the exact same one, and it still prints nothing for the password. The email is sent and everything, but the password field appears as :

Password:

???

Here is what I have in Links.def:


=========================================================================================

# Database Definition: LINKS
# --------------------------------------------------------
# Definition of your database file.
%db_def = (
ID => [0, 'numer', 5, 8, 1, '', ''],
Title => [1, 'alpha', 40, 75, 1, '', ''],
URL => [2, 'alpha', 40, 75, 1, 'http://', '^http|news|mailto|ftp'],
Date => [3, 'date', 15, 15, 1, \&get_date, ''],
Category => [4, 'alpha', 0, 150, 1, '', ''],
Description => [5, 'alpha', '40x3', 500, 0, '', ''],
'Contact Name' => [6, 'alpha', 40, 75, 1, '', ''],
'Contact Email' => [7, 'alpha', 40, 75, 1, '', '.+@.+\..+'],
Hits => [8, 'numer', 10, 10, 1, '0', '\d+'],
isNew => [9, 'alpha', 0, 5, 0, 'No', ''],
isPopular => [10, 'alpha', 0, 5, 0, 'No', ''],
Rating => [11, 'numer', 10, 10, 1, 0, '^[\d\.]+$'],
Votes => [12, 'numer', 10, 10, 1, 0, '^\d+$'],
ReceiveMail => [13, 'alpha', 10, 10, 1, 'Yes', 'No|Yes'],
Password => [20, 'alpha', 10, 10, 1, '', '']

);

# Database file to use -- defined in links.cfg.
$db_file_name = $db_links_name;
# Counter file to use -- defined in links.cfg.
$db_id_file_name = $db_links_id_file_name;
# The column name for the database key.
$db_key = 'ID';
# Database delimeter.
$db_delim = '|';
# Title used in admin output.
$html_title = 'Links Database';
$html_object = 'Link';

# Field Number of some important fields. The number is from %db_def above
# where the first field equals 0.
$db_category = 4; $db_modified = 3; $db_url = 2;
$db_hits = 8; $db_isnew = 9; $db_ispop = 10;
$db_contact_name = 6; $db_contact_email = 7; $db_title = 1;
$db_votes = 12; $db_rating = 11; $db_mail = 13;
$db_password = 20;
=========================================================================================



Here is what I have in Password.cgi:


=========================================================================================

#***********************************************************
# Use the info in links.def to find the values you want.
# These are the default values. If you have added fields, then
# make sure that you define it by $db_newfield = 14; and then
# to get the value, you can call it by $data[$db_newfield]
#
# $db_category = 4; $db_modified = 3; $db_url = 2;
# $db_hits = 8; $db_isnew = 9; $db_ispop = 10;
# $db_contact_name = 6; $db_contact_email = 7; $db_title = 1;
# $db_votes = 12; $db_rating = 11; $db_mail = 13; $db_password = 20;
#**********************************************************

open (MAIL_RECIP, "|$MAIL_PROGRAM");

print MAIL_RECIP "To: $email\n";
print MAIL_RECIP "From: $admin\n";
print MAIL_RECIP "Subject: Password Request\n";

print MAIL_RECIP "You have requested your login info to -:hibrid:- for $email.\n";

print MAIL_RECIP "Resource ID: $data[0]\n";
print MAIL_RECIP "URL : $data[$db_url]\n";
print MAIL_RECIP "Email : $data[$db_contact_email]\n";
print MAIL_RECIP "Password : $data[$db_password]\n";


close(MAIL_RECIP);

} # end of foreach

=========================================================================================


Anyone see any mistake?

Thanks a lot.
Aymeric.

Quote Reply
Re: Modify/Password Mods Errors !! In reply to
Exactly what I have in mine...Well, with one exception.

My field numbers run consecutively from 0 to the last.

You have
ReceiveMail => [13,
Password => [20,

where the next sequential number is 14 not 20. Can someone please tell me that skipping numbers is OK...!


Quote Reply
Re: Modify/Password Mods Errors !! In reply to
Whoops! Sorry, password1.1 isn't by hostglobal! Here's the one I was talking about: http://www.websnail.org/scripts/password.shtml

Jon | netchitecture@home.com
http://www.netchitecture.f2s.com/
Quote Reply
Re: Modify/Password Mods Errors !! In reply to
That's what I thought, I will try that new one.

And for the consecutive numbers, I don't think it matters, it's just a question of designation.

Thanks,
Aymeric.