Has anyone written a mod to allow users to retrieve a stored record based on authentication in a form already filled out when they want to modify their link? Much like the admin interface modify record that retrieves the record in a form, except scaled down and customizable with options to choose which fields users can see and modify.
Oct 22, 2003, 3:23 PM
Veteran (1352 posts)
Oct 22, 2003, 3:23 PM
Post #2 of 15
Views: 6775
http://www.gossamer-threads.com/...t_reply;so=ASC;mh=25;
Read ALL of the thread...
Leonard
aka PerlFlunkie
Read ALL of the thread...
Leonard
aka PerlFlunkie
Oct 24, 2003, 12:46 PM
Novice (40 posts)
Oct 24, 2003, 12:46 PM
Post #3 of 15
Views: 6803
Thanks Leonard for the link.
I updated all the subs and added the Username and Password fields in all my add and modify forms, updated my mod.cgi, added the codes to my site_html_templates.pl file but keep getting the “Invalid username or password. Record not found” Error.
(I do have the AltCategories mod installed so the I’m not sure if I have the subs in site_html_templates.pl right).
Anyway, this tells me that the mod.cgi is working and the site_html_templates.pl is sending me to the mod_up.html page. I am making it to the check sub in mod.cgi but then I get the error. I have the Username and Password fields added in the Links.def and can retrieve a record in admin.cgi for a specific Username and Password so the record exists.
I will attach the site_html_templates.pl subs for review.
I updated all the subs and added the Username and Password fields in all my add and modify forms, updated my mod.cgi, added the codes to my site_html_templates.pl file but keep getting the “Invalid username or password. Record not found” Error.
(I do have the AltCategories mod installed so the I’m not sure if I have the subs in site_html_templates.pl right).
Anyway, this tells me that the mod.cgi is working and the site_html_templates.pl is sending me to the mod_up.html page. I am making it to the check sub in mod.cgi but then I get the error. I have the Username and Password fields added in the Links.def and can retrieve a record in admin.cgi for a specific Username and Password so the record exists.
I will attach the site_html_templates.pl subs for review.
Oct 24, 2003, 2:04 PM
Veteran (1352 posts)
Oct 24, 2003, 2:04 PM
Post #4 of 15
Views: 6773
At least it's doing something...
Do you have the altcat in field [5]?
Then this from the mod:
Username => [14, 'alpha', 40, 75, 1, '', '[\w\d]+'],
Password => [15, 'alpha', 40, 75, 1, '', '[\w\d]+']
would change to 15 and 16, respectively. Do you have something entered in the field in the db for username and password? Not just a space for it, but an entry? Also from the readme:
Then further down add:
$db_user = 14; $db_pw = 15;
or 15 and 16...
If you still have trouble, upload a copy of your links.def for us to see.
Leonard
aka PerlFlunkie
Do you have the altcat in field [5]?
Then this from the mod:
Username => [14, 'alpha', 40, 75, 1, '', '[\w\d]+'],
Password => [15, 'alpha', 40, 75, 1, '', '[\w\d]+']
would change to 15 and 16, respectively. Do you have something entered in the field in the db for username and password? Not just a space for it, but an entry? Also from the readme:
Then further down add:
$db_user = 14; $db_pw = 15;
or 15 and 16...
If you still have trouble, upload a copy of your links.def for us to see.
Leonard
aka PerlFlunkie
Oct 24, 2003, 6:47 PM
Novice (40 posts)
Oct 24, 2003, 6:47 PM
Post #5 of 15
Views: 6795
The links.def is fine, I simply changed my Invoice field to Password and another extra field to Username. I’m sure it doesn’t matter where they are in the db.
Password => [26, 'alpha', 40, 75, 1, '', '[\w\d]+'],
Username => [37, 'alpha', 40, 75, 1, '', '[\w\d]+']
$db_pw = 26;
$db_user = 37;
The problem has to be the altcat mod. I already attached the site_html_templates.pl.
Guess I could include the mod.cgi
Attached Generalmod.cgi
see if you find any problems here.
Password => [26, 'alpha', 40, 75, 1, '', '[\w\d]+'],
Username => [37, 'alpha', 40, 75, 1, '', '[\w\d]+']
$db_pw = 26;
$db_user = 37;
The problem has to be the altcat mod. I already attached the site_html_templates.pl.
Guess I could include the mod.cgi
Attached Generalmod.cgi
see if you find any problems here.
Oct 26, 2003, 12:39 PM
Veteran (1352 posts)
Oct 26, 2003, 12:39 PM
Post #9 of 15
Views: 6761
More thoughts:
is this an active site, with many links already in the db? If yes, you might try setting up a second Links, a copy of your current, working version, then add the modifyprotection mod, THEN add cats and links to test it. It's possible the fields are out of whack...
Or, make a backup uf your data files, upload new, blank ones, then build all.
Leonard
aka PerlFlunkie
is this an active site, with many links already in the db? If yes, you might try setting up a second Links, a copy of your current, working version, then add the modifyprotection mod, THEN add cats and links to test it. It's possible the fields are out of whack...
Or, make a backup uf your data files, upload new, blank ones, then build all.
Leonard
aka PerlFlunkie
Oct 28, 2003, 12:30 PM
Novice (40 posts)
Oct 28, 2003, 12:30 PM
Post #10 of 15
Views: 6723
Problem: When you click on the add.cgi or mod.cgi after updating with the password mod codes, the scripts will not execute. Yes they point to perl and have a 755 chmod, tried 777 also. Yes I made sure the code is exact dup of readme file updates. Even tried the substitute add and mod.cgi files and they won’t execute either. The problem is in the site_html_templates.pl code updates, cause when I put back the original file the scripts execute. I told you earlier that I had on the alt categories mod and that changes the code in site_html_templates.pl.
Do you have the alt cat mod on? If so can you show me your add and mod subs in site_html_templates.pl.
Thanks
Jake
Do you have the alt cat mod on? If so can you show me your add and mod subs in site_html_templates.pl.
Thanks
Jake
Oct 28, 2003, 6:32 PM
Veteran (1352 posts)
Oct 28, 2003, 6:32 PM
Post #11 of 15
Views: 6725
I see what you're after, listing any alt cats on the modify form. I have not done that, though I do have the altcat mod installed. I just have not given that option to others, it's only an admin function. I'll look over the code more, see what I see...
Leonard
aka PerlFlunkie
Leonard
aka PerlFlunkie
Oct 28, 2003, 7:29 PM
Novice (40 posts)
Oct 28, 2003, 7:29 PM
Post #12 of 15
Views: 6695
Oh that’s right, I forgot that the mod to make alt cats show on the user forms was extra. That’s what is messing things up. If I replace the altcat mod changes in site_htm_templates.pl with the routines in the zip you sent, the modify_up.html template shows but I get a Contact Name Tag error. I’m not getting that value (probably lots of values) after login, and I'm not passing Contact Name to the mod form template. I checked all the Cap issues, they seem to be right. I just wanted to see if it would work as sent. It don't on my script because of the other changes altcat mod has made. I also do not have the Username and Password in sequence, ie 15 16 in links.def. I don't see how that could matter.
I'll upload the latest files.
I'll upload the latest files.
Oct 28, 2003, 9:42 PM
Veteran (1352 posts)
Oct 28, 2003, 9:42 PM
Post #13 of 15
Views: 6689
You can add the Contact Name and whatever else you need to the globals in site_html_templates. That should stop the 'unknown tag' error. Some fields in the links.def are referred to from other files, and have the field number entered there. Changing it just in the def file would cause problems... An example:
$numlinks = $stats{"$subcat"}[0];
where the script will look to field 0 for the ID. I know, you didn't change that, but this applies to other fields, too. At least, I'm pretty sure it works that way...
Leonard
aka PerlFlunkie
$numlinks = $stats{"$subcat"}[0];
where the script will look to field 0 for the ID. I know, you didn't change that, but this applies to other fields, too. At least, I'm pretty sure it works that way...
Leonard
aka PerlFlunkie