Is there a way to NOT require putting a name and email when I am adding links within the admin script? It is annoying to have to do this during admin stuff.
Apr 8, 2002, 9:53 PM
Enthusiast (809 posts)
Apr 8, 2002, 9:53 PM
Post #2 of 12
Views: 5962
Yes, a little code hack.
In the db_utils.pl, sub build_html_record_form,
Add the two following line beneath the foreach loop
($field eq 'Contact Name' and $rec{$field} eq '') and ($rec{$field} ='tandat');
($field eq 'Contact Email' and $rec{$field} eq '') and ($rec{$field} ='tandat@atlas.com');
Hope this helps
Cheers,
Dat
Programming and creating plugins and templates
Blog
In the db_utils.pl, sub build_html_record_form,
Add the two following line beneath the foreach loop
($field eq 'Contact Name' and $rec{$field} eq '') and ($rec{$field} ='tandat');
($field eq 'Contact Email' and $rec{$field} eq '') and ($rec{$field} ='tandat@atlas.com');
Hope this helps
Cheers,
Dat
Programming and creating plugins and templates
Blog
Apr 9, 2002, 1:14 AM
Enthusiast (809 posts)
Apr 9, 2002, 1:14 AM
Post #4 of 12
Views: 5887
hi,
>Mmm why not just change 1 to 0 in links.def
This will cause these empty fields when a user add a link in the add.cgi. Is that right?
Cheers,
Dat
Programming and creating plugins and templates
Blog
>Mmm why not just change 1 to 0 in links.def
This will cause these empty fields when a user add a link in the add.cgi. Is that right?

Cheers,
Dat
Programming and creating plugins and templates
Blog
Apr 9, 2002, 1:46 AM
Enthusiast (809 posts)
Apr 9, 2002, 1:46 AM
Post #6 of 12
Views: 5919
That's right. If he asked just in add link not in admin, I would tell him that or something else
Cheers,
Dat
Programming and creating plugins and templates
Blog
Cheers,
Dat
Programming and creating plugins and templates
Blog
Apr 9, 2002, 2:33 AM
Enthusiast (809 posts)
Apr 9, 2002, 2:33 AM
Post #8 of 12
Views: 5891
I don't know how to explain to you. To do your way will let the user does not input his/her name and email in the add link page
Cheers,
Dat
Programming and creating plugins and templates
Blog
Cheers,
Dat
Programming and creating plugins and templates
Blog
Apr 9, 2002, 3:23 AM
Veteran (19537 posts)
Apr 9, 2002, 3:23 AM
Post #9 of 12
Views: 5867
So then that doesn't make sense as if users are forced to enter their name and email and then the administrator is just going to delete them before adding the record, what is the point in forcing it to be entered in the first place?
Maybe I just don't understand the qn.
Maybe I just don't understand the qn.
Apr 9, 2002, 6:13 AM
Novice (11 posts)
Apr 9, 2002, 6:13 AM
Post #10 of 12
Views: 5863
Oh, my! :) I am the admin. What I want is NOT to have to enter my name and email every time I add a link to the database *from the admin script*. I do want(but can live with not having this) *users* to enter names and emails when adding links. That is why the hack of the script given to me. Unfortunately, I don't know Perl(or have a real sense of what a 'loop' is) so I am not sure I can do the hack.
Apr 9, 2002, 6:47 AM
Veteran (1220 posts)
Apr 9, 2002, 6:47 AM
Post #11 of 12
Views: 5841
Virginia,
what you would like to achieve is actually quite easy (if I got you right).
Change these two fields in links.def as follows:
'Contact Name' => [6, 'alpha', 40, 75, 1, 'CONTACT NAME', ''],
'Contact Email' => [7, 'alpha', 40, 75, 1, 'CONTACT EMAIL', '.+@.+\..+'],
In your admin panel the two fields will now display the values in capital letters (see above), change them to whatever you like. Webmasters however who submit their links can still enter their names and email addresses.
what you would like to achieve is actually quite easy (if I got you right).

Change these two fields in links.def as follows:
'Contact Name' => [6, 'alpha', 40, 75, 1, 'CONTACT NAME', ''],
'Contact Email' => [7, 'alpha', 40, 75, 1, 'CONTACT EMAIL', '.+@.+\..+'],
In your admin panel the two fields will now display the values in capital letters (see above), change them to whatever you like. Webmasters however who submit their links can still enter their names and email addresses.