View Single Post
  #2  

Category Management

From Pligg the Category Management control panel allows you to quickly add new categories for stories to your site (ie: science, technology, sports, etc.)
Category names may contain spaces, dashes and slashes, but not apostrophes.

Changing the order of categories


As of Pligg version 'beta 9' you can change the order of categories by ´drag & drop´ in the Category Manager control panel. To move a category to another position you can drop it on one of the grey boxes above or below a category.
When you drop a category on an existing category, it becomes a subcategory in the hierarchy.

Deleted 'all'


When you accidentally deleted the 'all' category, Pligg won't function correctly and you won't be able to restore it through the Category Management control panel. You can restore the category at the database level, by issuing the following SQL statements to MySQL:

Code:
 mysql> INSERT INTO pligg_categories VALUES (0, 'en', 0, 0, 'all', 'all', 0, 0, 2, 0, '000000');
Query OK, 1 row affected (0.00 sec)
mysql> UPDATE pligg_categories SET category__auto_id = 0 WHERE category_name = 'all' LIMIT 1;
Query OK, 1 row affected (0.00 sec)
Rows matched: 1  Changed: 1  Warnings: 0
mysql> commit;
Query OK, 0 rows affected (0.00 sec)
Note that you may need to change these statements:
  • when you choose another tablename prefix than 'pligg_' during installation
  • when your database language is something other than 'en'

When you move your DB


The categories all disappear in other circumstances. Apparently this occurs after you move your database, because of an AUTO-INCREMENT setting which throws off the value 0 for the ID of the root category.
The quick fix -- which is even simpler than what is described above -- is to change the category__auto_id to 0 for the category_name 'all' in the pligg_categories table/ This can be done with the UPDATE shown above, or through graphical MySQL browsing/editing tools such as HeidiSQL or the MySQL management console provided by many hosting services.


Contributors: Yankidank
Created by Yankidank, 09-03-2007 at 04:23 PM
Last edited by Yankidank, 09-12-2007 at 08:26 PM
1 Comments , 1335 Views