Gossamer Forum
Home : Products : Gossamer Links : Discussions :

Hide a Category???

(Page 1 of 2)
> >
Quote Reply
Hide a Category???
Hi

Just a crazy thought, but can one "hide" a directory? I mean, it would get built and all, but not show up anywhere to the casual viewer of the site? Playing with DMOZ, I have seen them do it. They have a category called "Adult" which the casual viewer cannot see. But if you KNOW it is there, and put in the code by hand, you can view it!

Just a crazy thought!

dk

Quote Reply
Re: Hide a Category??? In reply to
I would like this as well. Also of interest include:

way of importing dmoz.com categories and not making them visible until you have edited them to how you want.

A way for each editor to have categories that are hidden, much like dmoz.com so that they can play around and test and store links in there.

http://www.ASciFi.com/ - The Science Fiction Portal
Quote Reply
Re: Hide a Category??? In reply to
I agree, it would be a nice little feature to have, the ability to hide a specific category or the whole subtree from the category you selected to hide.

just my 2 cents.


-
Eric Geiler
Links SQL User
Quote Reply
Re: Hide a Category??? In reply to
I have not looked at the NG script that much, but the logic you could apply is the following:

1) Add a field called isBuild in the Category.def file and also in the Category table.

2) Then add some conditional statements based on this field in the build_category_pages routine in the np;h-build.cgi file that checks this field before building it.

Again...the logic may work...but I don't know yet how to actually implement it without checking the codes more.

Regards,

Eliot Lee
Quote Reply
Re: Hide a Category??? In reply to
I would probably suggest, depending on what is in the category, making it a
dynamic only type category, so that someone would have to log in to be shown the items.

You can build the site, and either show those categories (or just pull the top-level category out of the build), or keep them totally hidden unless someone has the URL. You can "build" those pages, but make them accessible only to the web-server (chmod the directory to exclude public-access).

Then, only serve the pages dynamically, and the script will only serve the pages to the authorized/logged-in user. If someone clicks on the link, all they'll get is the "log on" prompt unless they are logged in.

You can then post an area like "Click for Adult" which is a link to page.cgi, which serves that category _if_ the are authorized.\



PUGDOG«
PUGDOG« Enterprises, Inc.
FAQ: http://postcards.com/FAQ


Quote Reply
Re: Hide a Category??? In reply to
Pugdog:

For my purposes, I would just like a place to "stash" 1/2 finnished "links". (As you may know, I have a database of cartoon information, not links to URL's...)

In any case, I may have some info, such as director and writer, but not a release date.... so I would want to note what I have while researching for further info. For my purposes, static or dynamic would work fine... but why waste the space on a build, so dynamic is cool.

dave

Quote Reply
Re: Hide a Category??? In reply to
If you want something like a "preview" area, You might be able to edit the "Validated" field, and add a third option: "Maybe" to the Yes/No options.

I had asked alex about using that field with other options, so hopefully the build process looks for a "Yes" and the "Validate" process looks for a "No" and you can add routines that would look for "Maybe". <G>

You could do something like select [fields] from Links where Validate='Maybe'
and build a page of just clickable links+title (and whatever other information you'd want). then use a copy of the detailed.cgi I posted (did I post the NG update??) and have those links link to that. It will show you all the data you have pending, but only be available to an "admin" user.

That might be the best way.

It would actually be the simplest, as long as you weren't trying to put the links into subcategories as well.

If you were, then modifying the routine to build the category "invisibly" and access it dynamically from a hidden URL might be better.

To make it invisible, it might be as simple as pulling the "invisible_cat_name" at the top of the menu out of the nph-build routines by just skipping it, and leave it in the page.cgi routines and call your site dynamically.

In Links, it seems if you don't have a top level category, the ones below it are not built, so where it tries to build the category, and follow the sub categories, just add something like:

($cat='name_to_skip') && next;

The pages won't get built, and the name shouldn't show up on the top level (I had to make another change higher up for that, I think, in the 1.1x version -- oh, in build_home as well) and you'll be able to find them via page.cgi since you didn't modify that one.

Alex could probably tell you which way would work best. I'm not at that level of understanding yet at all.



PUGDOG«
PUGDOG« Enterprises, Inc.
FAQ: http://postcards.com/FAQ


Quote Reply
Re: Hide a Category??? In reply to
Hi!

Would you need to hide the links in that category as well? I can add a flag to the category table easy enough to display whether it is shown in the category listing, but hiding the category from search results would be more difficult. Hiding any links in any subcategories would be even more overhead.

Cheers,

Alex

--
Gossamer Threads Inc.
Quote Reply
Re: Hide a Category??? In reply to
Alex,

A link is only added to the search results if it's "validated" right?

In that respect, hiding the links from a "search" shouldn't be any different then the un-validated links not showing up. I would hope search-ni.cgi would not look at links that were not validated either.

Hiding the search categories from the search engine would be a bit trickier, but you can give it a really obscure name, and the odds of it showing up would be nil.



PUGDOG«
PUGDOG« Enterprises, Inc.
FAQ: http://postcards.com/FAQ


Quote Reply
Re: [Alex] Hide a Category??? In reply to
Hi Alex,

I use dynamic pages 2.05.

in my case I want to have the category hidden for a while, because I need to add new records and the category should not be visible before I┤m finished with editing.

I think a validate field in the category-table would be a nice future.

Michael

--
Michael Skaide

http://www.cycle24.de

Quote Reply
Re: [Michael Skaide] Hide a Category??? In reply to
Hello Micheal!

Nice suggestion of yours!

But instead of Validate, I would suggest "Active and Inactive" Categories.

BTW, This would be really a nice feature to add.

This feature helps especially to stop users adding to the main category tree. That means that the main category could be blocked for use.

It could be blocked by a symbol @Category so that it will not appear in the listings.

What I found as an idea is that if there is a Category_Supress sub_routine that helps into supressing the categories, that would be excellent and would cover many possibilities above, for e.g.

If in the add links function one could enter a variable to supress one or many main category tree.┤The advantage is that it would therefore not produce a big list of categories and with the new programming of Links SQL it would be possible.





Quote Reply
Re: [carfac] Hide a Category??? In reply to
Hi,

This is not that simple unfortunately. How would you want:

- The total link count (does it include hidden totals?)
- The search results (can you search on hidden categories?)
- The new/cool listing

Let me know what you think,

Cheers,

Alex
--
Gossamer Threads Inc.
Quote Reply
Re: [Alex] Hide a Category??? In reply to
Hi Alex,

in my case I just need to hide the category for 1 or 2 days.

1) Total link count (I can live with wrong totals)
2) Search Result (I set the new links to Not Validated during work)
2a) I have only main-categories, no subcategories, so for me it
would be ok not search on the hidden category.
3) New/Cool (Records of the hidden category are set to -Not Validated- till
the category goes online)

I can live with an easy solution, other users maybe not.

Michael

--
Michael Skaide

http://www.cycle24.de

Quote Reply
Re: [Alex] Hide a Category??? In reply to
In Reply To:
This is not that simple unfortunately. How would you want:
- The total link count (does it include hidden totals?)
- The search results (can you search on hidden categories?)
- The new/cool listing
Alex

Hello Alex!

Easy to suggest and difficult to implement, I see it. Just to add my ideas in this interesting discussion. May be others think it different, but this are my thoughts.

The admin could decide a Main or even a Sub-Category as "Open for submission" and only then a links submission area would thereby offering advantage as:

a) Allow a surfer to submit a link under full control and choice by the admin.
b) Only the respective category (Main or Sub) would be then presented
c)Main_Category_Only submission would then open and reduce the list of category listings.

For instance, if the user would like to submit a link in software/Perl/xx subject, I see no reason why the pop-up should produce a big or entire listing of 500 main and sub-categories as a block. The unwanted subcategories (or even their sub_sub_categories) needs to be cut-off in the first step, IF ONE WANTS.

Hence, if atleast there is a choice of the main category tree in the submission area, then it would cut the production of a sub_category listing of other categories. Currently if the admin has 5,000 categories in the database, then there is NO WAY to work with the submission area or even in the admin area. So one branch of a tree could grow into a heavy one resulting into an unbalance.

With the current architecture as compared to the earlier one, it should be "theoritically" possible to do so. This is also because, now with the new sub_routines it is possible to move links from one sub_category to anathor sub_category. Hence if there are too many links then it could allow the admin to better classify the respective sub_categories from the begining.

Hence we are then talking about better controls of a category (main or sub) for all the possibilities, either to make it "Build, Active, Open, Validated and vice-versa" status or function or parameter flags. Through such configuration controls of a category, it would then allow numerous possibilities to block it for a time being, change the respective order, etc.

In this concept, as we see the intention is to achieve better controls of a category through its property set by the admin. Hence the links count needs to remain the way as it should be. So this would apply also for search results. It can appear the same as everywhere. In principle, everything would then remain as it is other than placement of better targetting and controls for practical reasons.

If the property of a link is that it belongs to a main category, then it should appear in the searches to where it belongs. If the number of links is to be represented to the users then it should be also truely representing it.

If the property set by the admin is only for the admin interface then it may not be reflected in the user interface. If it is both, then is will appear depending on the function targetting of sub_routines designed to do the work.

Hence to achieve this it may require a Java script that produces a pop-up listing of only the main categories, and by selecting the main categories it would then offer a list of sub_categories cutting off the remaining other sub_categories.

Like in template add.html on the user side -

1 - <%Gen_Main-Cat_Tree%>
2 - <%Gen_Sub-Cat_Tree%>
3 - <%Gen_Sub-Cat_Listing%>

Like in the Admin side:

Config flags like Build, Active, Open, Validated by clicking on the boxes.

Last edited by:

rajani: Nov 14, 2001, 2:42 AM
Quote Reply
Re: [pugdog] Hide a Category??? In reply to
Hello,
Hiding categories is a feature that I need as well. Here is the problem. Last night I imported dmoz. Just as a test this morning made a quick search for dog. Multiple listings for beastiality come up instead of poodle, bloodhound, and so on... There may be certain areas of my website in which adult material is appropriate and others that are definately not. It would be nice to be able to send a hidden variable with the submit search, Like hide=1, and it would hide categories listed on some text file in the admin directory. You could have several list this way to protect different areas of your site. This would go nice with the bigwhat type script if another company like that surfaces.

Quote Reply
Re: [Alex] Hide a Category??? In reply to
Hi-

I just need to hide the categories that don't have any links in them. That allows me to build my category structure, but not create a directory that leads users to empty category pages if the links haven't yet been added to them.

Is there a relatively simple way to just exclude categories where the Number_of_Links field value = 0, from both the build and search?

I'm pretty weak in PERL, and any help with this would be greatly, greatly appreciated Unsure

-Frank
Quote Reply
Re: [Alex] Hide a Category??? In reply to
In Reply To:
This is not that simple unfortunately. How would you want:

- The total link count (does it include hidden totals?)
- The search results (can you search on hidden categories?)
- The new/cool listing

Let me know what you think,


Alex,

This _is_ a complex issue, and part of the problem, like with file uploads and images, is that everyone wants/needs different features and functionality. A lot of this has to do with the fact that Links is not being used primarily as a "links" directory, but as an expanded/enhanced system of "linking".

We had discussed over a year ago, the "flags" system, using various concepts from alpha numeric, to the built in 'bit' mapping MySQL had at the time.

I think it's about time to re-address this issue.

As you know, I do keep "overhead" issues in the back of my mind at all times, but for now, I'm only going to keep the "big" ones there,and sort of ignore little ones for this discussion. :)

I'm going to also draw on my experience managing forums on various BBS's systems I've run -- pcboard, wildcat, etc and managed Compuserve, GENie, Delphi, etc.

Most "systems" that allow uploads, have a preview or staging area. This is separate from the "validated" system Links uses, but loosely maps over it.

Most systems also allowed the creation of "hidden" directories, based on a numerical (usually) access level. One level was "admin" only, one was "editors" one was "registered users" etc.

The same system was applied to "links" (or files).

The system was adaquate at the time -- barely.

Now we have several more needs and concerns -- not the least of which is filtering material deemed inappropriate for some audiences, language filtering, or such. This is ON TOP OF a search.

To work properly, the search needs to be executed, filtered, and finalized, before any stats are returned. Links can't be removed during processing -- o r the first page of the results will have different "totals" on it than subsequent pages.

"temporary tables" and cached data are a partial solution -- but as indicated they have overhead. The specific implementation is something that needs careful design consideration.

But, what are the "features" that need to be in the system, starting with the "display" or "user" end of the system.

1) Categories need to be able to be reordered for display -- at least the top level categories. This allows non-alpha sequences and "random" ordering based on webmaster needs.

2) Categories need to be able to be hidden from both searches, and certain users. They need to have "access levels" (as such).

3) Links need to be able to be hidden from searches based on flag values -- such as validated, expired, adult,non-english, etc.

4) New/Cool pages need to be generated based on the user level of access. A non-logged in user sees only the "general" rankings page. A logged in user sees either _all_ the various ranking pages, or the ranking page that is associated with his access level -- New_Registered.html, New_Adult.html, etc.

5) BBS systems tended to use "masks" and pre-pends to create file names and access levels.

6) Dynamic sites with user log-on will benefit most from this, while static sites will benefit least. A compromise will have to be struck between what features are available in static sites and which are only available in dynamic sites. Hidden categories and links should be available in both sites, but some things may not be able to be available.

7) In 2+ years of using Links, my biggest desires have been for a "preview" area, separate from the "upload" area (the unvalidated area). My "wish list" would be for a preview area PER CATEGORY, so links could be moved from view but still retain logical organization. This would map out as a "Visible" flag on each link that is recognized by "Links" itself as a criteria for all actions -- search, display, etc. I have tried to put this functionality into the Image Upload system, which is partly why it took so long to get a working version, and why it's still pre-beta at best. I've used the same sort of logic with the logo plugin to allow "expiring" out the image.

While everyone has different needs and desires, the most common implementations of these sort of systems have included certain basic features.

1) a "preview" area (separate or similar to the "new uploads" area),
2) ability to hide/unhide files either by moving them to the preview area, or by setting a "hide" flag
3) "Access levels" to allow certain areas to be visible only to those with those access levels.

Implemenations have varied on how this is done, and the better "access" systems, used a "mask" system, rather than an increasing access system, such that an access level is granted specific access to areas unrelated to the access other access levels may have, rather than the system where "Unregistered" has access to areas 1-4, "Registered" has access to areas 1-8, and "Paid" has access to areas "1-10".

Some systems have allowed the setting and creation of Flags that can be defined to trigger (or mask) certain behaviors in addition to the above.

If a "flags" system is used, then it could be activated as necessary - or ignored. Hidden links and categories could be screened out with a system tag that was "isVisible", the same way "isValidated" is used.

The idea is to create a system that adds the maximum flexibility and functionality for the most people and situations, with the least impact on overhead for them, and for those who don't need this functionality.


PUGDOG´┐Ż Enterprises, Inc.

The best way to contact me is to NOT use Email.
Please leave a PM here.
Quote Reply
Re: [pugdog] Hide a Category??? In reply to
Has there been any progress made here since 01 2002? I need to hide a top category and it's subcats from search results, and from cool / new pages.
Quote Reply
Re: [nt6] Hide a Category??? In reply to
how about search from certern category? so just exclude all hiden category id whe do a seach.

as for what is cool and new page, i have not thinking about it before.

Please let me know if it works or not. if anyone use it.
Quote Reply
Re: [nt6] Hide a Category??? In reply to
Hi,

I just added a field to the tables called "Hide" value "Yes or No" and modified the script that a category with this value will not be displayed. This is a very primitive solution because you can realize the exist of the categories because of a corrupted category-listing.

--
Michael Skaide

http://www.cycle24.de

Quote Reply
Re: [Sir Up] Hide a Category??? In reply to
I know it can be done that way. The problem is that if your search returns something in a hidden category, then you still haven't solved the problem.

Alex, any ideas?
Quote Reply
Re: [nt6] Hide a Category??? In reply to
Its not really very easy. You would need to add a new column, and then get the search/build etc subs to check if the category is meant to be displayed, before printing it...

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: [Andy] Hide a Category??? In reply to
I would be glad to try if you can give me more information. Smile
Quote Reply
Re: [nt6] Hide a Category??? In reply to
I would love too, but it would take too long... Frown

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] Hide a Category??? In reply to
Well if anyone else is up to it, let's try ... Smile
> >