Gossamer Forum
Home : Products : Gossamer Links : Discussions :

User able to add categories!!

Quote Reply
User able to add categories!!
Greetings,
What modification do I need to make to allow the user (not editor) when logged in, to be able to add categories to database?
Quote Reply
Re: [Mark2] User able to add categories!! In reply to
Not sure it is possible. You could add a 'sugest category' option to the 'add' form, and then let them suggest a category they would like to see/be listed in.

Just an idea Angelic

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: [Andy] User able to add categories!! In reply to
Well! thank you, but this would not help me as I am looking for a real-time system, so when a user logs in, he/she has to add a category if it does not exist, then he/she can add the link inside it.
Can anyone suggust a solution!!!
I know that the form is located here:

http://somedomain.com/...=add_form&keyid=

but you will be required to enter the ADMIN passwrod which I do not want to give it out. Therefore, can this option be added to the user to allow him/her to add categories as well as links.

Thanks in advance
Mark

Last edited by:

Mark2: Sep 26, 2002, 10:58 AM
Quote Reply
Re: [Mark2] User able to add categories!! In reply to
It would probably be possible via a plugin, but I doubt many people would want/need it, so I would imagine it would need to be a custom mod...

Cheers

Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Quote Reply
Re: User able to add categories!! In reply to
Shouldn't this feature be already included in LINKS SQL which can be activated/deactivated by admin!!? Specially where you have many LINKS SQL scripts are used in Intranet and closed communities... any hint!! maybe suggustions...?????
Quote Reply
Re: [Mark2] User able to add categories!! In reply to
Adding a category is fairly easy.

It's a matter of adding a record to the database. Depending on where it's added, you might have to repair tables to get counts and such right.

The problem is that categories are the basic structure of the system, so giving that to "the masses" is not something people would generally want to do -- even on an intranet.

It's by far better to have one or a few people in charge of overall structure (categories) and let others just add links. Your system could quickly get out of control.

If you insist on going this route, you'd want to basically have a new add form that runs addcategory.cgi rather than add.cgi, and inserts the record into the category table.

As a suggestion, you'd want to run it the way you would to force a user to add a link in the current directory only. ie: you can only add a new category as a subcategory you are in. This would get rid of the problem of trying to fetch the correct FatherID.


PUGDOG� Enterprises, Inc.

The best way to contact me is to NOT use Email.
Please leave a PM here.
Quote Reply
Re: [pugdog] User able to add categories!! In reply to
Thank you much for your attention,

What I am trying to do is to have a REAL-TIME system that and to base all my database on a ctegories so I have more flexability and multi-level input using links/reviews for each category.

Basically all links that are related will be under the same category. Also, I want to give the regular user the power to add (NOT to delete or modify) subcategories under the the ONLY CATEGORY that I have.

So, here is what I am trying to do:



Code:
/* ******************************************************************** */
/* */
/* the perpose of this plugin is to fool the user to think that the */
/* the category is already exist, and he/she would never be able to */
/* tell wheather the category needs to be created or already created. */
/* */
/* NOTES: */
/* 1 - no admin/editor validation of links/category is needed. */
/* 2 - all existing and new categories will be placed under one main */
/* category called "records" as I will only have one main category, */
/* and all the rest of categories will be located under it */
/* (e.g. records>homes, records>hotels ...etc.). */
/* */
/* ******************************************************************** */


1 - user logs in;

2 - from "records" category menu bar, user clicks on "ADD LINK";

IMPORTANT NOTE:
ADD LINK FORM will have also ADD CATEGORY FORM embbedded in it.
In other word, both forms are in one form (ADD CATEGORY+ADD LINK).


3 - user fills out the entire form (with a new/existing category name,
description, related categories,... and with the new link name, contact
information...etc.) and submits the form for auto-processing.


/* --------------------------------------------------------------------- */
/* LinksSQL - Check if the submitted CATEGORY NAME already exist or not. */
/* --------------------------------------------------------------------- */

if (CATEGORY NAME ALREADY EXISTS in categories database) then
{
- new LINK will be added UNDER the NEWLLY SUBMITTED CATEGORY name;
- The new CATEGORY PAGE will then be displayed automatically,
instead of add-success page (maybe redirection using javascript).
}


if (CATEGORY NAME DOES NOT EXIST in categories database) then
{
- CATEGORY NAME will be created (e.g. records/schools).
- LINK will be added into this category.
- The new CATEGORY PAGE will then be displayed automatically,
instead of add-success page (maybe redirection using javascript).


}

/* ********************************************************** */

There is already a plugin that checks for a duplicate link
(duplicate_check) that can be modified to check for a duplicate
category instead, or I think LINKS SQL already checks for duplicate
category names! and does not let you add a duplicate category name.
Any suggution will be trully appreciated.

Note: I can not find a file called AddCategory as suggusted.
Can you please let direct me where to start from...

best regards..
Mark

Last edited by:

Mark2: Sep 26, 2002, 9:20 PM
Quote Reply
Re: [Mark2] User able to add categories!! In reply to
Code:
If the above algorithm is not possible, then can it be done this way and how (no idea),



1 - user logs in;

2 - from "records" category menu bar, user clicks on "ADD CATEGORY";

3 - user fills out the Add Category form and submit it.

if (CATEGORY EXISTS) then
{
- Page appears with
Add Links hyperlink in it to allows user to add links to the EXISTING CATEGORY.
}


if (CATEGORY DOES NOT EXIST) then
{
-
CATEGORY NAME will be created.
- Page appears with Add Links hyperlink in it to allows user to add links to the NEWLY CREATED CATEGORY.
}




Any help will be greatly appreciated.
Mark