Gossamer Forum
Home : Products : Links 2.0 : Customization :

Password Modify Help

Quote Reply
Password Modify Help
I am not a great perl programmer so I ran into a slight problem along the way with Password Modify for non-templates written by Thiago Moretti. The page is located at [link]http://www.buscabr.com/modify.html[/link]. In the directions for adding the modification he says, "2) You should now create a sub called site_html_modify_first. I wonīt put here all the code, but the essencially code is:

<form action="$build_modify_url" method="POST">
ID: <input type="text" name="ID" size="5"><br>
Password: <input type="password" name="password" size="20">
</form>

I don't exactly know what the entire code would look like in the site_html_modify_first. Has anyone done this modification and gotten it to work, if so what did they do to the site_html_modify_first. Thanks for your help.
Greg
Quote Reply
Re: Password Modify Help In reply to
Gregorio,

If you take a look at my version of the same mod (the "for templates" version) You can copy what you need from the modify_first.html template. This part is really exactly the same.

My page is at http://www.asan.com/users/phoenix/modify/

Hope it helps
Phoenix
Quote Reply
Re: Password Modify Help In reply to
Gregorio,

Hi there. If you want to link URLs in this BBS, the correct code is:
With no spaces between [ ]

Regards,

------------------
Eliot Lee
Founder and Editor
Anthro TECH, L.L.C
http://www.anthrotech.com/
info@anthrotech.com
==========================
Coconino Community College
http://www.coco.cc.az.us/
Web Technology
Coordinator
elee@coco.cc.az.us
Quote Reply
Re: Password Modify Help In reply to
Dear Phoenix,
Thanks for the reply. I visited your site, and the site_html_modify_first code reads:
Quote:
sub site_html_modify_first {
#---------------------------------------------------------
# displays the form for users to enter the ID number and
# Password for the Link they wish to modify

&html_print_headers;
print &load_template ('modify_first.html', {
%globals
});
}

One line in the script seems like it would only apply to templates, this line is:
Quote:
print &load_template ('modify_first.html', {

Would this line need to be changed in order to have this code work?
Thanks for the help,
-Greg
Quote Reply
Re: Password Modify Help In reply to
Does anyone know?
Quote Reply
Re: Password Modify Help In reply to
This is the sub-routine that I created. It works just fine. It's the actual form I can't get to modify. =(

Code:
sub site_html_modify_first {
# --------------------------------------------------------

&html_print_headers;
print qq~
<$dtd>
<html>

<head>
<title>$site_title: Modify Listing.</title>
<$css>
</head>

<$site_body>
<$font_normal>

$site_menu

<$p><$large color=red><b>MODIFY LISTING</b></font><br></p>

<form action="$build_modify_url" method="POST">
<$p>Please enter your RECORD ID and PASSWORD.<br>
Make sure it is identical to the information in the database:</p>

<div align=center><center>
<table border="0" cellspacing="0" cellpadding="0">
<tr><th align=center><$font_normal>ID: <input name="ID" value="$in{'ID'}" size="5">
Password: <input type="password" name="Password" value="$in{'Password'}" size="10"></font></th></tr>
<tr><td align=center><br> <input type="SUBMIT" value="Get My Listing!"></td></tr>
</table>
</div></center>

</form>

<p> </p>
$site_search
<p> </p>

$site_footer

</font>
</body>
</html>
~;

}

I've got one more modification to try. If it works, I'll be sure to let you know. =)

Yolanda
Quote Reply
Re: Password Modify Help In reply to
Thanks for the help. If you do happen to get this to work please post the modifications. Thanks again.
-Greg
Quote Reply
Re: Password Modify Help In reply to
Did you install this by using non-templates?
Quote Reply
Re: Password Modify Help In reply to
Sorry, I didn't realize that there were two versions...I installed the Templates version by Phoenix Amon.

Sheldon
Quote Reply
Re: Password Modify Help In reply to
YoLond,
It works fine for me now. The problem was that in the sub site_html_modify_first { you needed the value="$in{'Password'}" to be value="$in{'password'}" meaning that the p must be lowercase. Once that is done the script works fine. Thanks for making the sub site_html_modify_first. Good luck.
-Greg
Quote Reply
Re: Password Modify Help In reply to
I'm sorry if this has already been covered somewhere but I haven't been able to find it. I've installed this mod and it works great, although there is one thing that doesn't seem right. I don't know if it's in the way I installed it, or the way links builds the category select field, but after entering your password and it calls up the link info, it doesn't give you a select field to change the category with. Did I install something worng? or is that just the way it works? If it is the latter, can someone try to help me to fix it so the category can be changed?
Thank you,
Sheldon

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

<-------------------------->
webmaster@gottabounce.com
www.gottabounce.com
Quote Reply
Re: Password Modify Help In reply to
Sheldon,

Did you ever get an answer to your problem? I am having the same rough go of it on jsut the <%Category%> portion of it... everything else works fine.
Quote Reply
Re: Password Modify Help In reply to
No, I haven't gotten an answer yet. I've been trying to figure it out myself, but haven't been able to do that yet either. If you find out anything let m know.

Sheldon

------------------
webmaster@gottabounce.com
www.gottabounce.com

Quote Reply
Re: Password Modify Help In reply to
Sheldon: And visa-versa...
Quote Reply
Re: Password Modify Help In reply to
I too would lke some help for at http://www.asan.com/users/phoenix/modify/
- The &build_select_field in site_html_templates.pl does not seem to work for me. It inserts only the value from the links.db field into modify.html, but does not build the category selection fields from links.def ?
Quote Reply
Re: Password Modify Help In reply to
OK, I finally figured out why the Mod is not passing the Category variable. You need to change Modify.html as follows:
Code:
Replace: <%Category%>

With: <INPUT TYPE="HIDDEN" NAME="Category" VALUE="<%Category%>"><%Category%>
No more "Category undefined" errors... But this is the lesser of the problems. I still have the problem that the Modify is *not modifying* the original record, but rather *Adding* a new duplicate record. I can't believe nobody else has run across this. Is anybody else out there using Password Modify for templates successfully?
Quote Reply
Re: Password Modify Help In reply to
Hi oldmoney

I already had the hidden field for categoy, but it's still not building the category field,
If you find anyone sucessfully using this mod I'd love to know also.
Regards
Colm
Quote Reply
Re: Password Modify Help In reply to
Bobsie pointed out in another thread that it appears that modify.cgi or
site_html_templates is pointing to the wrong subroutine (namely,
site_html_add_failure). This appears to be the case since the entire
modify script is being bypassed (no admin email confirming change,
adds new record rather than modifying original). I scoured the
code last night, but for the life of me can't figure out where the
problem lies.
Quote Reply
Re: Password Modify Help In reply to
Boy, do I feel stupid!?! All the problems were of my own making since I
blythely assumed that I could copy my existing add_error.html template
and make a few changes for my modify.html template. Wrong! There are four
things I might point out to those who are having trouble like I did...

1) make sure your modify template actually points to modify.cgi! I never changed
this (as Bobsie suspected) and scoured over modify.cgi and site_html_templates
in vain.
2) there is a new hidden field in the modify template...
Code:
<INPUT TYPE="Hidden" NAME="ID" VALUE="<%ID%>">
3) I kept going back and forth making changes to site_html_templates that
I messed up my original changes. Follow Phoenix's directions TO THE
LETTER... e.g. category => $category.
Note the lower case. In the template
file, it should also be lower case, as in <%category%>. Every other template
is uppercase except this one.

Well, now to catch up on other modifications... sorry to have bothered too many people with this error of my own making.

[This message has been edited by oldmoney (edited August 26, 1999).]
Quote Reply
Re: Password Modify Help In reply to
Thanks oldmoney
Your "bothering" lead to my enlightenment!
Regards
Colm
Quote Reply
Re: Password Modify Help In reply to
Hi everyone,

I am getting 'Unkown Tag: password' when I try to add new link, although Modify Site works fine. I only added one more field to the templates, the same one as in modify.html.

Any thoughts?