Gossamer Forum
Home : Products : Links 2.0 : Customization :

Configuring "add links" in admin area.

Quote Reply
Configuring "add links" in admin area.
As an administrator it can be cumbersome to add your "contact name" and "contact email" when adding many new links to the database. Is there a way to automatically have this field filled when the admin is adding records? I know how to do this in the general add.html template, but I can't find where this is appropriate for the administration interface. And also along the same lines, is it possible to make values, such as "new" or "popular" a default value?
In short, is there a way to change the default values for the add link interface in the admin area?

------------------
http://www.serve.com/garden/links
http://www.serve.com/garden/aaron
http://www.serve.com/garden/board
Quote Reply
Re: Configuring "add links" in admin area. In reply to
In admin_html.pl, in sub html_add_form, there is a call:

Quote:
&html_record_form (&get_defaults);

sub html_record_form in the same script says:

Quote:
sub html_record_form {
# --------------------------------------------------------
# These are now auto generated, but can be overridden by printing
# out your form/record here.
#

So, if you want to, you can create your own add form and include your admin name and email address. However, you may need to change the call to sub html_record_form to eliminate the call to sub get_defaults and just do that in your form as well.

However, be aware that there are a total of 12 calls to sub html_record_form throughout admin_html.pl. Whatever you write will have to work with all of them.

------------------
Bob Connors
bobsie@orphanage.com
www.orphanage.com/goodstuff/


[This message has been edited by Bobsie (edited February 27, 1999).]
Quote Reply
Re: Configuring "add links" in admin area. In reply to
Hello,

I have somewhat related question. Hope to get an answer from you:

In links.def, I use -1 to hide certain fields. For example, if I don't want people to enter an url, I put -1 as the length fo the field in links.def, and the field will be hidden from view when you use add links in the admin area. But I can't hide the three fields: isNew, isPopular, ReceiveMail, with the same method.

Any suggestions?

Thanks

------------------
Jian Liu
Indiana University Libraries
Quote Reply
Re: Configuring "add links" in admin area. In reply to
I don't know of anyplace that users see those three fields. Where are you speaking of? They don't show on the add or modify forms.
Quote Reply
Re: Configuring "add links" in admin area. In reply to
Whoops, sorry, I misread your question. You weren't speaking of users seeing those fields, you said you see them in the admin area.

I just tried it out myself. I can't get any of the fields to be hidden in the admin screen. Sorry I can't help on this.

[This message has been edited by Bobsie (edited March 01, 1999).]