Gossamer Forum
Home : Products : Links 2.0 : Discussions :

Category Question

Quote Reply
Category Question
Hello,

I need to show all the months in one year as a sub category. The problem I have is that it alphabetizes them. I have been using differnet templates for different categories.

How would I set it up so that the months don't display alphabetized?

------------------
James L. Murray
VirtueTech, Inc.
www.virtuetech.com
Quote Reply
Re: Category Question In reply to
I wonder what would happen if you add a comment before each of your months

Quote:
<!-- a -->January
<!-- b -->February

This works for sorting categories in UBB.

[This message has been edited by t_dog (edited July 27, 1999).]
Quote Reply
Re: Category Question In reply to
Abosolutely Brilliant!

Thank you.

Smile Smile Smile Smile Smile Smile Smile

------------------
James L. Murray
VirtueTech, Inc.
www.virtuetech.com
Quote Reply
Re: Category Question In reply to
It worked at first, but now it doesn't. I get an error when I try to build the pages. It built before though. Weird.

Any suggestions.

Here is the error:
Code:
CGI ERROR==========================================
Error Message : Invalid characters in category name: /Events/Tournaments/Calendar/January. Must contain only letters, numbers, _, / and -.
Script Location : nph-build.cgiPerl Version : 5.00502

------------------
James L. Murray
VirtueTech, Inc.
www.virtuetech.com
Quote Reply
Re: Category Question In reply to
Maybe if you try using the & lt; & gt; html codes (without the spaces of course)? I've noted that this works in the link descriptions, but haven't tried it in the categories.
Quote Reply
Re: Category Question In reply to
It is the ' ! ' character that is giving me the problem I think.

I'm so mad, because it worked at first. No, all of a sudden, it doesn't.


I need to find out a way to sort these correctly.

------------------
James L. Murray
VirtueTech, Inc.
www.virtuetech.com
Quote Reply
Re: Category Question In reply to
What about changing the allowed characters in the build routine (or whereever it does the checks)??

I've thought about it, but never did it, since I'd like to be able to add '?' and '!' to the names.

Quote Reply
Re: Category Question In reply to
Thats a good idea, It is just a question of where you do it. I'm going to find out. I'll post if I do.

Smile

------------------
James L. Murray
VirtueTech, Inc.
www.virtuetech.com
Quote Reply
Re: Category Question In reply to
Got it! Smile

I did some searching around the forum and found a thread that Bobsie answered that was pertaining to using the ' + ' symbol in the category. If you change the following code to allow these symbols:
Code:
! < >

It will work. Just follow the code below and place the symbols you need to add the comment infront of the category so that you can sort it in any order you want. Smile

Bobsie's Code:
Code:
Are you using links v2 or v1? If v2, try this.
1. Load nph-build.cgi into your editor.

2. Go to sub build_check_dir at the bottom of the script.

3. Change my $chrs = quotemeta ("/_-"); to read my $chrs = quotemeta ("+/_-");

4. Load category.def into your editor.

5. In the variable, %db_def, on the Name field, change ^[\w\d/_-] to read ^[\w\d+/_-].

You should now be able to use the plus sign in the category name. However, be aware, that the plus sign will also be used in the directory name for that category.

I hope this helps.

Reference these threads:
http://www.gossamer-threads.com/...um2/HTML/001025.html
http://www.gossamer-threads.com/...um3/HTML/001103.html




------------------
James L. Murray
VirtueTech, Inc.
www.virtuetech.com
Quote Reply
Re: Category Question In reply to
I tested the use of
<!--a-->January
<!-- b -->February

the categories were sorted in the proper order based on the hidden prefix. However, when links were submitted under them, they would not show up.

To test it, I modified the same links to put them under a "standard" category (no hidden prefix) and they would display properly.

Bob
Quote Reply
Re: Category Question In reply to
This seems like a good workaround, but now all the category names have to have the hidden HTML in them - YUCK!

I.e.,
<!--1-->Monday/<!--2-->February/<!--1-->Ace

etc.

Is there a way of sorting on another field?

Cheers
Quote Reply
Re: Category Question In reply to
 
Quote:
Is there a way of sorting on another field?


I can't wait to have the answer to that question. I'm trying to sort categories too.


Lancier
happyrobot.com