Best of joomla gives you news, joomla templates, tutorials and websites about Joomla , FireBoard and FireMessage official page.
| No account yet?   |
The FireBoard forum component development is still going on. In order to get better, FireBoard will be moved from the Best of Joomla website.
During this transition period, the forum in Best of Joomla will be closed to new posts.
Welcome, Guest
Please Login or Register.    Lost Password?
FireBoard Manual Latest release discussions Download FireBoard
New Thread button still visible in locked forums. (1 viewing) (1) Guest
TOPIC: New Thread button still visible in locked forums.
#46717
New Thread button still visible in locked forums. 10 Months ago  
Hi,

I'm using Fireboard 1.0.4 Stable on a site not ready for the public. Ive setup Fireboard with some locked forums inside it, but going into these forums still displays the New Thread buttons. If you click on it, it does not work, it simply displays the message:

"The administrator has disabled public write access.
Only logged in / registered users
are allowed to contribute to the forum.

Click here to register."

This is even though I am logged in as a regular user. The same thing happens with Reply Topic buttons in Locked Threads. Anybody have a solution for this? Ive not been able to find one through searching. It is rather annoying to have these buttons visible but not usable.

Thanks in advance for any help.
CaptSkubba (User)
Fresh Boarder
Posts: 9
graphgraph
User Offline Click here to see the profile of this user
Logged Logged
 
 
#51724
Re:New Thread button still visible in locked forums. 7 Months ago  
Hi,

I noticed the same problem

I wonder how to lock forums in a way that people could only participate in open topics (to disable / lock new topic option)

Best Regards
medy (User)
Fresh Boarder
Posts: 6
graphgraph
User Offline Click here to see the profile of this user
Logged Logged
 
 
#51725
Re:New Thread button still visible in locked forum 7 Months ago  
Hi, i found some sort of solution

You can modify the code in a way, that only moderators and above see the "new thread button" - the register user won't

You can do that by modifying the
.../com_fireboard/template/default/showcat.php file

around lines 197 and 300 you will find the line
Code:

 if ((($fbConfig['pubwrite'] == 0 && $my_id != 0) || $fbConfig['pubwrite'] == 1) && ($topicLock == 0 || ($topicLock == 1 && $is_moderator)))



You can comment it out by putting the "//" at the beginning of it.
Then underneath copy-paste this
Code:

if ($is_moderator)


Final result will look something like this
Code:

 // if ((($fbConfig['pubwrite'] == 0 && $my_id != 0) || $fbConfig['pubwrite'] == 1) && ($topicLock == 0 || ($topicLock == 1 && $is_moderator)))
if ($is_moderator)
{



This code tells fireboard to show the button only if user is moderator. Don't forget to copy-paste this on both places (line 197 and line 300)

Hope it helps
Best Regards
medy (User)
Fresh Boarder
Posts: 6
graphgraph
User Offline Click here to see the profile of this user
Logged Logged
 
Last Edit: 2008/06/07 22:35 By medy.
 
 
#51786
Re:New Thread button still visible in locked forums. 7 Months ago  
Hi. I'm guessing this fix is more for your own problem than it is for mine, since now all my forums are locked for people who aren't moderators. i still want people to be able to create new topics, just not display the button to create a new topic in a locked forum.
CaptSkubba (User)
Fresh Boarder
Posts: 9
graphgraph
User Offline Click here to see the profile of this user
Logged Logged
 
Last Edit: 2008/06/09 14:44 By CaptSkubba.
 
 
#61265
Re:New Thread button still visible in locked forums. 2 Months ago  
This is still a problem in 1.0.5 RC2. I fixed it by disabling the display of the buttons if the user is not a moderator and the forum is locked.

In view.php for your template:

After:
Code:

        $database->setQuery("SELECT name,id from #__fb_categories WHERE id='$objCatInfo->parent'");
        $database->loadObject($objCatParentInfo);

add
Code:

//check if this forum is locked
$forumLocked = $objCatInfo->locked;


Replace:
Code:

                    if (($fbConfig->pubwrite == 0 && $my_id != 0) || $fbConfig->pubwrite)

with
Code:

// Do not show new thread button if forum is locked.
                    if ((($fbConfig->pubwrite == 0 && $my_id != 0) || $fbConfig->pubwrite) && ($forumLocked == 0 || ($forumLocked == 1 && $is_Moderator)))


Replace:
Code:

                    if ((($fbConfig->pubwrite == 0 && $my_id != 0) || $fbConfig->pubwrite) && ($topicLock == 0 || ($topicLock == 1 && $is_Moderator)))

with
Code:

// Do not show reply button if forum is locked.
if ((($fbConfig->pubwrite == 0 && $my_id != 0) || $fbConfig->pubwrite) && ($topicLock == 0 || ($topicLock == 1 && $is_Moderator)) && ($forumLocked == 0 || ($forumLocked == 1 && $is_Moderator)))


Repeat these last two changes also in the <!-- bottom nav --> section.

Then in showcat.php for your template:

Replace:
Code:

                if ((($fbConfig->pubwrite == 0 && $my_id != 0) || $fbConfig->pubwrite) && ($topicLock == 0 || ($topicLock == 1 && $is_Moderator)))

with
Code:

// Do not show new thread button if forum is locked.
                if ((($fbConfig->pubwrite == 0 && $my_id != 0) || $fbConfig->pubwrite) && ($topicLock == 0 || ($topicLock == 1 && $is_Moderator)) && ($forumLocked == 0 || ($forumLocked == 1 && $is_Moderator)))


Note that this change should be made in two places.

Hope this helps.
mikeprince (User)
Fresh Boarder
Posts: 15
graphgraph
User Offline Click here to see the profile of this user
Logged Logged
 
Cheers
-- Mike --
Record, share and compare with BUBO Listing at www.bubo.org/listing
 
 
#61266
Re:New Thread button still visible in locked forums. 2 Months ago  
Missed one extra change in view.php.

Just before
Code:

//user is allowed to reply/quote

replace
Code:

                                if ((($fbConfig->pubwrite == 0 && $my_id != 0) || $fbConfig->pubwrite == 1) && ($topicLock == 0 || ($topicLock == 1 && $is_Moderator)))
with
Code:

                                // Do not show reply or quote buttons if forum is locked.
                                if ((($fbConfig->pubwrite == 0 && $my_id != 0) || $fbConfig->pubwrite) && ($topicLock == 0 || ($topicLock == 1 && $is_Moderator)) && ($forumLocked == 0 || ($forumLocked == 1 && $is_Moderator)))

mikeprince (User)
Fresh Boarder
Posts: 15
graphgraph
User Offline Click here to see the profile of this user
Logged Logged
 
Cheers
-- Mike --
Record, share and compare with BUBO Listing at www.bubo.org/listing
 
 
Go to top