• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

mysql - creating new categories

 
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello,

I am was trying to customize the front end part of the jforum project to show multiple topics divided on the basis of their categories like we have on the jforum.net under the community section.

Like on jforum.net under the communities section we have category name JForum General, Development, Help and Support, and under each category we have sub topics related to that catgory.

I also wish to do similar kind of thing, so i added the new category in the jforum_category table in mysql database. But when i re compile the code i dont see the new category on the page.

Secondly when i try to add a topic under existing category that is (category test) by making entries in the jforum_forums, i still cant see the topics.

The queries i am executing are as follows:

jforum_categories
==============
insert into jforum_categories (categories_id, title, display_order, moderated) values (2, "Windows", 1, 0);

jforum_forums
==============
INSERT INTO jforum_forums VALUES (2,1,'Windows Forum','This is a Windows forum',1,1,1,0);


Also can you tell me what does the column name display_order as well as forum_order signify in the mysql tables jforum_categories and jforum_forums respectively.

Thanks a lot for the help.

Ankit.
[originally posted on jforum.net by ankitoshniwal]
 
Migrated From Jforum.net
Ranch Hand
Posts: 17424
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
There's a lot more to making categories and forums than just adding them to those tables.

First, there are also a lot of permission settings that go along with creating a new category/forum. If you are manually doing this you will also have to set this stuff up in the jforum_roles and jforum_role_values tables. This has to be done for every group you want this forum / category to be visible to. Se the initial data sql script for an example of this.

Second, all this information is cached in memory. So, just adding it to the DB will not update the memory cache. You will need to restart the jForum application for the new stuff in the DB to appear.

FWIW, the best practice for adding forums and categories is to use the Jforum system via some HTTPClient software (e.g. apache.org's Java packages.) This will add the forums with all the desired priviledges, etc. Plus the memory cache will be updated.

display_order is the order in which you want the categories to be displayed. There is an order by display_order asc clause on the selectAll query. forum_order is the same thing, except for forums.

[originally posted on jforum.net by monroe]
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic