Gossamer Forum
Home : Products : Gossamer Links : Discussions :

Custom field restrictions !

Quote Reply
Custom field restrictions !
Hi

I have just added a new field to the links table called is Sponsored..

how do i prevent my editors from being able to change or set this field?
Regards
KaTaBd

Users plug In - Multi Search And Remote Search plug in - WebRing plug in - Muslims Directory
Quote Reply
Re: [katabd] Custom field restrictions ! In reply to
Hi KaTaBd,

Yes, actually we cannot customize Editors'form. You can see our discussion about this at : http://www.gossamer-threads.com/...;;page=unread#unread

I still have this problem, and I wonder how can I develop this feature alone as I don't develop in Perl unfortunately.

If somebody would have an idea, I would take it...

Regards,

Gautier.
Quote Reply
Re: [Gautier] Custom field restrictions ! In reply to
OK, here is a brute force method.

Edit admin/Links/Browser.pm, search for 'hide', you will find it in a few subroutines, like 'link_add_form', 'link_modify_form', etc

You can add column names as follows:
Code:
hide => [qw/ID isNew isChanged isPopular Status Date_Checked Timestmp isSponsored whatever/],

Warning: this will hide the fields not only for editors, but also in the browser in your admin panel. The fields will still be visible in your admin panel in the "Database" section.

Warning 2: When you upgrade, you have to repeat what you did.

Ivan
-----
Iyengar Yoga Resources / GT Plugins
Quote Reply
Re: [katabd] Custom field restrictions ! In reply to
I have found the best way to combat this problem is to move all of my custom fields, especially advertising onens, into their own seperate tables. This way only the admin can see them.


http://www.iuni.com/...tware/web/index.html
Links Plugins
Quote Reply
Re: [yogi] Custom field restrictions ! In reply to
Thanks Yogi and Ian

I will try both ways and I sure one of them should work..
Regards
KaTaBd

Users plug In - Multi Search And Remote Search plug in - WebRing plug in - Muslims Directory
Quote Reply
Re: [Ian] Custom field restrictions ! In reply to
I like this method best, since even during builds, it's only an extra query or a join, but you have much better control over it.

Allow Links to run as it likes, but put your own information in your own tables Links_extra, Users_extra, etc.


PUGDOG� Enterprises, Inc.

The best way to contact me is to NOT use Email.
Please leave a PM here.
Quote Reply
Re: [pugdog] Custom field restrictions ! In reply to
Exactly... I have been slowly learning, but I am begining to migrate all the tables in my plug-ins to their own. The job I am working on at the moment, is almost totally stand alone... no GT tables except a join or two. In fact, it would'nt need to be a plug-in if it were'nt so easy for a customer to install using the plug-in system (which is great). This way, I have managed to avoid using hooks for the most part, and the actions take place on my own forms with my own database tables!


http://www.iuni.com/...tware/web/index.html
Links Plugins

Last edited by:

Ian: Jul 7, 2002, 7:33 AM