Gossamer Forum
Home : Products : Links 2.0 : Customization :

Links v2 Mod - Comment Field

Quote Reply
Links v2 Mod - Comment Field
A comment field mod is up at http://www.online-sweepstakes.com/...s-mods/comments.html .

This 'mini-mod' only involves a few lines of code, but it is a useful modification to your add url and/or modify url forms. In case you're wondering, it does not involve adding another field to the links database. If you use templates, you'll have to make a few minor adjustments with the mod because it uses site_html.pl. I'll add the template code sometime tommorrow. Any problems, let me know.

Brent
Quote Reply
Re: Links v2 Mod - Comment Field In reply to
Thanks for writing that up loopy. I took what you had and modified it to work with templates and it worked great. I used it to add another temporary field for me as well. It was the last necessary piece of the puzzle I needed before I could start using Links.

Cheers!

Quote Reply
Re: Links v2 Mod - Comment Field In reply to
Hello. I'm using templates. Could you post how you did the comment field with templates please? Thanks.
Quote Reply
Re: Links v2 Mod - Comment Field In reply to
Hi,
just add a field in the add, add error, modify, modify error (if you want the comment field in the modify form also)
called Comments. in the error pages you will have to use <%Comments%>. just follow alex's method in the templates. in the sucess page you just follow the format that alex is using. you will also have to follow the format that alex is using when you add Comments to add.cgi

bye for now
Quote Reply
Re: Links v2 Mod - Comment Field In reply to
If I get this error, and I have replaced the code with what it seems to be for templates, what am I missing?

Error:
Unkown Tag: Comments

I have modified three templates, add, add_error, add_success and also add.cgi ...

What else do I have to modify?

Thanks in advance,
elms
Quote Reply
Re: Links v2 Mod - Comment Field In reply to
Found out that in the add.html where the value is set to:

value="<%Comments%>"

replace with:

value=""

This way it loads the add form without trying to insert the variable "Comments" when it has not been keyed in by the user.

Loopy - if this is the case for templates, is this working with the value set in site_html.pl:

value="$in{'Comments'}"

Works great now...Cool idea loopy...

Thanks,
elms