Topic: how to link to categories?
I would like to link to categories,
f.e. english, french, ...
So that I can show some users online 1 categorie in their language.
Is there a link to a categorie?
You are not logged in. Please login or register.
PunBB Forums → PunBB 1.3 troubleshooting → how to link to categories?
I would like to link to categories,
f.e. english, french, ...
So that I can show some users online 1 categorie in their language.
Is there a link to a categorie?
If I understand you correctly, you want to show certain categories depending on user's language in the profile?
Thanks for your quick reply !
Maybe that's also a possibility, but no.
I just want to have a direct link to a category.
And when I link to that, It only shows that category (not the others). (in phpBB there's a possibility like that, but I don't like phpbb)
That way I can give english users on my site the link to the english categorie.
And french users the link to the french categorie.
idea: how can I put a bookmark by a categorie? That would help a bit...
In the current version of PunBB there are no links to categories. But it is a nice idea, and we will implement it in future releases of PunBB.
You can create a page with categories by yourself. It will not so hard. As a base for this page you can get the file "<FORUM_ROOT>index.php". To get forums of some specific category you can use this query:
// Print the categories and forums
$query = array(
'SELECT' => 'c.id AS cid, c.cat_name, f.id AS fid, f.forum_name, f.forum_desc, f.redirect_url, f.moderators, f.num_topics, f.num_posts, f.last_post, f.last_post_id, f.last_poster',
'FROM' => 'categories AS c',
'JOINS' => array(
array(
'INNER JOIN' => 'forums AS f',
'ON' => 'c.id=f.cat_id'
),
array(
'LEFT JOIN' => 'forum_perms AS fp',
'ON' => '(fp.forum_id=f.id AND fp.group_id='.$forum_user['g_id'].')'
)
),
'WHERE' => 'fp.read_forum IS NULL OR fp.read_forum=1 AND c.id = '.$cat_id,
'ORDER BY' => 'c.disp_position, c.id, f.disp_position'
);
$cat_id in this peace of code is the category id.
It's not so clear what to do :-/
Should I paste this code in the index.php?
You can replace query at lines 68-83 of "<FORUM_ROOT>/index.php" with this one.
PunBB Forums → PunBB 1.3 troubleshooting → how to link to categories?
Powered by PunBB, supported by Informer Technologies, Inc.