Home : Products : Gossamer Links : Discussions :

Products: Gossamer Links: Discussions: Re: [pugdog] User able to add categories!!: Edit Log

Here is the list of edits for this post
Re: [pugdog] User able to add categories!!
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

Edit Log: