Camen Design Forum

categories.txt mod?

append delete brod

I've written a fairly basic categories mod which works like just liked locked.txt sticky.txt etc.. I'm having some troubles making it universal/drag n drop install but in real terms it works quite well. I'll append this with a link once its tested and working properly.

Has anyone got another way? below is the way my markup works.

categories.txt

%
Cars
:Ford
:Holden
:Jaguar

Fruits
:Banana
:Apple
:Tangerine
%

Reply RSS

Replies

append delete #1. Ben

How does this fit into the forum system? Are Ford, Holden, Jaguar, &c just thread titles that you want to group together?

Maybe a fork to link to would be more useful, so it is clear what categories.txt is for.

append delete #2. brod

Well thats just about it, I wanted different sections / categories and Ford, Jaguar, Holden etc.. are just sub-forums which are then displayed in the order above with a header for each eg Cars. It's just a way to organise the current forums, sub-forums.

append delete #3. Ben

I see. That sounds a sensible feature. I am inclined to suggest that if you are categorising forums that much, though, you may need forum software better designed for larger sites.

In terms of doing it on NNF, I wonder... would a reasonable mental model be that categories are just sub-forums of the forum of their category name?

Eg.

%
Cars
    Ford
    Holden
    Jaguar
%

Where each of those are folders. You wouldn't be able to post threads in Cars, since it's just a containing folder, so the admin would lock it. If the script found a locked folder with sub-folders, but no files, would that be enough information for it to act in the manner you describe?

Does it make more sense to add another text file to edit, or can functionality be added within the existing frameworks that the user has to deal with?

append delete #4. Kroc

@Ben has the right kind of idea; but perhaps we can make it even easier. What if a special prefix was understood as being a category name?
i.e.

% DIR
/cars!Ford/
/cars!Holden/
/cars!Jaguar/
/Off-Topic/
%
append delete #5. Ben

I didn't even think of building something into the directory names. I like that.

The directories would be grouped together in file managers too, which I think is important, and which the proposed categories.txt solution didn't seem to do.

@brod - what do you think to this? Is there something you prefer about the separate text file solution, or is this a reasonable alternative?

append delete #6. brod

I was originally going to go down the idea of Bens first suggestion but out of laziness went with my as it was quicker for me to setup and get working.. I think kroc's method would be the most understandable and bug free with spelling mistakes, white space etc. I've spent the last hour trying to get that way to work and have a pretty solid mod, it's not working in root and the code is kind of messy so I wouldn't recommend it for a pull/merge but yeah, that's a good way to do it.

As for moving to a more feature-rich software, I'd prefer to just mod NNF heavily - I really dislike the code behind all the forum softwares I've found making it hard to stomp out bugs. But you're totally right in the sense that a different software would suit my needs quick and easy.

append delete #7. chandra

this is awesome

Reply

(Leave this as-is, it’s a trap!)

There is no need to “register”, just enter the same name + password of your choice every time.

Pro tip: Use markup to add links, quotes and more.

Your friendly neighbourhood moderators: Kroc, Impressed, Martijn