Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#16 2012-08-28 21:46:19

ruud
Developer Emeritus
From: a galaxy far far away
Registered: 2006-06-04
Posts: 5,068
Website

Re: More Categories please!

I wonder how you can keep offering cat1/2 functionality when switching to unlimited categories.

Might be easier to keep cat1/2, add unlimited categories (normalized), and force the user to choose which one is used on a specific site (not both) and perhaps only offer the choice for those that upgrade, not for those that do a fresh install (deprecating cat1/2). Moving from cat1/2 to unlimited cats automatically during a TXP upgrade, seems tricky. Imagine doing that on a website with thousands of articles.

@makks, how would option #3 and #4 work? #4 sounds like how keywords are done now, but how would you do #3?

Offline

#17 2012-08-28 23:05:53

Gocom
Developer Emeritus
From: Helsinki, Finland
Registered: 2006-07-14
Posts: 4,533
Website

Re: More Categories please!

Only thing I’m worried about overheat and how complex or generic (one tool fits for all) the whole meta/custom/relation thing is going to be, or whether the tables are organized, let’s say, by type.

One thing I’ve newer understood why the Textpattern table doesn’t store sections and categories using the ID, opposed to the name. Is that planned too?

Offline

#18 2012-08-29 05:31:16

makss
Plugin Author
From: Ukraine
Registered: 2008-10-21
Posts: 355

Re: More Categories please!

Functionality cat1/2 and unlimited category not intersect, so you can not restrict the user to choose.
In rss_unlimited_categories I just added the option to “hide cat1/2 in admin interface” to have fewer questions.

ruud wrote:

how would you do #3?

Create addition table, some like this:

CREATE TABLE IF NOT EXISTS `txp_article_category` (
  `article_id` int(11) NOT NULL default '0',
  `category` varchar(64) NOT NULL default '0',
  UNIQUE KEY `article_category` (`article_id`,`category`),     -- used UNIQUE KEY, not PRIMARY !
  KEY `article_id` (`article_id`),
  KEY `category` (`category`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

Table textpattern unchanged.

Last edited by makss (2012-08-29 05:41:50)


aks_cron : Cron inside Textpattern | aks_article : extended article_custom tag
aks_cache : cache for TxP | aks_dragdrop : Drag&Drop categories (article, link, image, file)

Offline

#19 2012-08-29 10:10:33

ruud
Developer Emeritus
From: a galaxy far far away
Registered: 2006-06-04
Posts: 5,068
Website

Re: More Categories please!

makss wrote:

Functionality cat1/2 and unlimited category not intersect, so you can not restrict the user to choose.
In rss_unlimited_categories I just added the option to “hide cat1/2 in admin interface” to have fewer questions.

Technically, you can make cat1/2 and unlimited cats work completely separate, but as you point out, offering both options results in questions from users, so for that reason, I think it’s better if users choose between the one or the other. Preferably with a migration option, for those that use cat1/2 without a category being specifically cat1 or cat2 and just want more than 2 categories per article. If both were offered, I’d probably write a plugin to hide one of them.

 `category` varchar(64) NOT NULL default '0',

And #2 (normalized) would have int instead of varchar, right?

Offline

#20 2012-08-29 14:33:42

makss
Plugin Author
From: Ukraine
Registered: 2008-10-21
Posts: 355

Re: More Categories please!

ruud wrote:

 `category` varchar(64) NOT NULL default '0',

And #2 (normalized) would have int instead of varchar, right?

Yes, that’s right.


aks_cron : Cron inside Textpattern | aks_article : extended article_custom tag
aks_cache : cache for TxP | aks_dragdrop : Drag&Drop categories (article, link, image, file)

Offline

Board footer

Powered by FluxBB