Gossamer Forum
Home : Products : Gossamer Links : Discussions :

Categories in admin module

Quote Reply
Categories in admin module
Hi, I have a couple of beginner questions regarding the categories list when I validate my submissions.

1. They seem to be listed at random ! How do I get then to list organized ?

2. Could I make the box larger ?

Also regarding submissions:

Could I force people to list in the deepest subcategory ? Half of my submissions list in the main categories and don't spend the time to find the deepest sub category !



Thank you, Dane

http://www.buhuu.dk




Quote Reply
Re: [dane] Categories in admin module In reply to
I don't quite understand the first two questions, but the 3rd question has a possible answer.

This has been discussed before, and different solutions proposed, but the first is to set db_gen_categories to NO in the admin. This forces people to have to move to a category to enter a link.

All automated solutions to this problem, such as forcing people to enter only in a 'leaf' node, would not work in all cases, and require an override function probably in half the situations (if you think about it, you'll understand why).

The best solution would be to block submissions to a category by a field in the category record, thus forcing a person to keep picking a lower level. You could add a field to your Category table called "Allow_Subs".

In your template, where you have Add on your menu, surround it with:

<%if Allow_Subs%>
.../add.cgi?<%ID%>=<%category%>....
<%else%>
..../page.cgi?p=error&error=You%20Must%20Pick%20%A%20SubCategory%20To%20Add%20Your%20Link
<%endif%>

This is an _example_ and probably needs tweaking, but the idea is if the category record doesn't allow submissions, if someone clicks 'add' they will get an error page telling them to pick a subcategory.

Alternatively, you could leave off the <%else%> clause, and the 'add' button wouldn't show at all if they weren't allowed to add.

This would not interfere with your ability to move files to a higher category via the admin or browser.






PUGDOG� Enterprises, Inc.

The best way to contact me is to NOT use Email.
Please leave a PM here.
Quote Reply
Re: [pugdog] Categories in admin module In reply to
Many thanks Cool. I will try that. Regarding the first 2 questions - I'm talking abount the list of categories that show in the admin module for each link to be validated.



Dane
Quote Reply
Re: [dane] Categories in admin module In reply to
I'm not sure what you still mean. The categories are shown in alphabetical order, which groups them together in a descending hierarchy.


PUGDOG� Enterprises, Inc.

The best way to contact me is to NOT use Email.
Please leave a PM here.
Quote Reply
Re: [pugdog] Categories in admin module In reply to
Before I did what you suggested. The list in the admin module was not in alphabetical order before, but just seemed to be in random order. Now it just shows the category they selected and gives no ability to change the category of the site before validating, and I was wonderling if I could change it to a selectable form field in the admin module only.



Dane
Quote Reply
Re: [dane] Categories in admin module In reply to
That's something I've been meaning to ask Alex about -- add a db_gen_cat_admin feature, to make the life of the Administrator easier. Many sites want to force category additions, but still have few enough categories that listing them all isn't an issue.

The origin of the db_gen_cat feature is clouded in two somewhat parallel wants.

1) a way to limit the download time of forms that had large lists of categories

2) a way to force users to move into a category to list a link

These two features were combined, but the off shoot is for sites of type two, the admin also was short changed on the links listing.


PUGDOG� Enterprises, Inc.

The best way to contact me is to NOT use Email.
Please leave a PM here.
Quote Reply
Re: [pugdog] Categories in admin module In reply to
ok, so I take it there is no easy way to change that Unimpressed myself.. Thank you very much for your help.
Quote Reply
Re: [dane] Categories in admin module In reply to
I just checked out something, and editing the Links::Tools.pm file, at line 435, add:

$CFG->{'db_gen_category_list'}=1;


This is in the validate_links subroutine.

You might also need to make the same change to the add, validate_changes, and other subs.

You only want to override the admin functions, not the user functions.


PUGDOG� Enterprises, Inc.

The best way to contact me is to NOT use Email.
Please leave a PM here.