Kunena 7.0.4 Released

The Kunena team has announce the arrival of Kunena 7.0.4 [K 7.0.4] in stable which is now available for download as a native Joomla extension for J! 5.4.x/6.0.x. This version addresses most of the issues that were discovered in K 6.2 / K 6.3 / K 6.4 and issues discovered during the last development stages of K 7.0

Topics that are moved into this category are generally considered to be closed. Users may want to add additional information but these topics should not be resurrected in order to discuss new problems or unrelated matters.

Question Invisible forum, yet still accessible if linked to?

More
16 years 4 months ago #35637 by PGNX
Hi there, I was wondering if there was a way I could make certain categories of the forum invisible to any non-administrators, yet they can still access and post in it if they are linked to it?
I know this sounds strange, If there would be some coding involved that's no problem for me.
Thanks in advance

Please Log in or Create an account to join the conversation.

More
16 years 4 months ago #35701 by Matias
Yes, it is possible to hack this, maybe fairly easily.

In listcat.php there's a loop going through sections and another for categories. You need to add

if (...) continue;

into there to skip all the forums you want to. If you have hidden subcategories, you need to modify other files, too, so I recommend hiding only root section. Then task should be fairly easy..

listcat.php 154 into something like this:

if (in_array($cat->id, $allow_forum) && ($kunena_is_moderator || $cat->id=$catid || $cat->id!=123))

Hides one main section.. You can still have forums in it and list them etc.. It also obeys normal ACL rules.

Please Log in or Create an account to join the conversation.

More
16 years 4 months ago #35723 by PGNX
Thank you very much. I wont be able to test this until January 1st as I've used up my monthly bandwidth but it looks like it'll work.
I assume where id!=123 i replace 123 with the id of the category I wish to hide?
Thanks again.

Please Log in or Create an account to join the conversation.

More
16 years 4 months ago #36053 by PGNX
I've tried inserting the code you gave me into listcat.php line 154. My current code looks like this:

<!-- F: Cat list Top -->


<?php
if (count($categories[0]) > 0)
{
foreach ($categories[0] as $cat)
{
$obj_fb_cat = new jbCategory($kunena_db, $cat->id);

$is_Mod = fb_has_moderator_permission($kunena_db, $obj_fb_cat, $kunena_my->id, $is_admin);

if (in_array($cat->id, $allow_forum) && ($kunena_is_moderator || $cat->id=$catid || $cat->id!=7))
{
?>
<!-- B: List Cat -->
<div class="<?php echo $boardclass; ?>_bt_cvr1" id="fb_block<?php echo $cat->id ; ?>">
<div class="<?php echo $boardclass; ?>_bt_cvr2">
<div class="<?php echo $boardclass; ?>_bt_cvr3">
<div class="<?php echo $boardclass; ?>_bt_cvr4">
<div class="<?php echo $boardclass; ?>_bt_cvr5">

Unfortunately it doesn't appear to be working and it's a little hard to describe what's happening but it's basically only showing two forums (as opposed to just hiding one category) and showing them multiple times in the wrong categories.
I'm not sure how I can explain it further but i'll try respond to any questions promptly.

Please Log in or Create an account to join the conversation.

More
16 years 3 months ago #36259 by Matias
Oops, typo :)

if (in_array($cat->id, $allow_forum) && ($kunena_is_moderator || $cat->id==$catid || $cat->id!=7))

Missed one = in $cat->id==$catid

So you need to have permission for that category and one of the following:
1) be a moderator
2) be in that category
3) not category 7

Please Log in or Create an account to join the conversation.

More
16 years 3 months ago #36717 by PGNX

Please Log in or Create an account to join the conversation.

Time to create page: 0.239 seconds