boardom Forum Index boardom
b2 message board
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Multiple categories per post

 
Post new topic   Reply to topic    boardom Forum Index -> Feature requests
View previous topic :: View next topic  
Author Message
dolan



Joined: 15 May 2003
Posts: 2
Location: SF

PostPosted: Thu May 15, 2003 4:45 pm    Post subject: Multiple categories per post Reply with quote

I *really* think it would be wise to change the relationship of post -> category from 1:1 to 1:many. Often times when I post I'm covering a subject that spans categories, such as "photos" and "travel".

I realize this would mean changing the datamodel on the backend, but it really would only involve adding an extra table, assuming synthetic keys are created for each post (which it looks like there are) and for each category (again, they seem to be there). The table would simply list the category-post relationships and the SQL would have to be mildly changed to accomodate the extra table. The "post" object would have to change the datatype of the category from whatever it currently is to an array/hash of that, and the selects (for selecting a category) would have to change to multiple-selects or checkboxes.

That said, I've written similar code in a number of Java apps I've developed. I have no real knowledge of PHP, but assuming b2 was designed to scale in the first place (which I assume it was), this shouldn't be a huge change. One could rather easily even develop a migration script for current data.

If you have any questions or want to discuss this further please email me at dhalbrook(at)hotmail(dot)com.

Thanks,
Dolan
Back to top
View user's profile Send private message Visit poster's website
fplanque



Joined: 22 Dec 2002
Posts: 53
Location: Montpellier, South of France

PostPosted: Sun May 18, 2003 12:38 am    Post subject: b2 evolution supporting multiple categories per post Reply with quote

Hi Dolan,

I soooooo agree with you... that I have actually implemented it a few weeks ago into my b2 evolution! Very Happy
(Even better, I have multiple blogs too! Razz )

I am looking for beta testers before releasing the whole thing into open source.

Quick feature list available here:
http://fplanque.net/Blog/devblog?m=200305#180

-François.
Back to top
View user's profile Send private message Visit poster's website
dolan



Joined: 15 May 2003
Posts: 2
Location: SF

PostPosted: Mon May 19, 2003 4:38 pm    Post subject: Cool .. just a follow-up question. Reply with quote

Francois,

Your dev blog looks great .. nice to know we're not re-inventing the wheel too often. En tout cas, j'ai besoin d'utiliser mon francais de temps en temps, et lire qqch ecrit en ce langue m'aide beaucoup.

I was wondering about data migration -- do you have some sort of diagram of the table changes you've made? I'd love to beta test your version, but I just want to be sure I don't end up losing anything current.

The assumption is that you have a similar table to the one I discussed in my first post, with foreign keys from category and post, as well as maybe something which says which is the main category?

BTW, I might pick up a book on PHP one of these days, so I'll offer now to help as much as I'm able.

Thanks,
Dolan
Back to top
View user's profile Send private message Visit poster's website
fplanque



Joined: 22 Dec 2002
Posts: 53
Location: Montpellier, South of France

PostPosted: Mon May 19, 2003 9:53 pm    Post subject: multicats & migration Reply with quote

Dolan,

Merci pour les compliments Smile

Sure I am planning a migration path from b2 databases to b2evolution. The idea will be to apply a script that will create the new tables and colums and also populate them according to existing data. For instance, all existing posts will be placed in one single category: their existing one

Regarding the datamodel, it's just as you can imagine it:
-table postcats linking posts and cats together by their respective keys
-the old post-category still used as being the main category

I get in touch with you via e-mail for beta testing.

-François.
Back to top
View user's profile Send private message Visit poster's website
Candle



Joined: 23 Dec 2002
Posts: 547

PostPosted: Wed May 21, 2003 9:41 pm    Post subject: ...... Reply with quote

I really like this B2Evolution , can't wait till it is out of beta ..
Lot's of good stuff going into it .
_________________
My Game Forum
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    boardom Forum Index -> Feature requests All times are GMT + 1 Hour
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB 2 © 2001, 2002 phpBB Group