I have the Center Forums block, which I downloaded here from NukeCops.
I really like the block, but would it be possible to change it so that viewers only see the forums they have access to. I have a Private, Hidden forum, but it is displayed to all users. I do not think the content of this hidden forum is being displayed in the center block section, which is a must, but the forum itself is listed at the top with the others under "Private Forums."
Any information about a different, more configurable block would be appreciated.
Thanks.
IACOJ Major
Joined: Jan 15, 2003
Posts: 1269
Location: USA
Posted:
Wed Apr 28, 2004 7:03 pm
Which center block did you download, can you provide the link, so we can fix the block?
I thought all of the ones here were fixed so they only showed to people who have access.
I have a Private, Hidden forum, but it is displayed to all users. I do not think the content of this hidden forum is being displayed in the center block section, which is a must
A private "hidden" forum that is displayed to all users? Why make it private "hidden" if everybody can see it?
I think you should remove the "private hidden" status from the forum if you want everybody to see it. Correct me if I'm wrong.
_________________ If you shoot for the moon and miss, you'll still be amongst the stars.
Alexuus Nuke Soldier
Joined: Nov 13, 2003
Posts: 23
Posted:
Thu Apr 29, 2004 5:32 am
I think PunchDrunk is asking if the block can have a "forum access check" the same way that the forum itself has.
Which means, if you HAVE been authorized to view the "private forum", the posts would show in the block... if you DO NOT have authorization, they don't.
_________________ Alexuus
foxyfemfem Support Staff
Joined: Jan 23, 2003
Posts: 668
Location: USA
Posted:
Thu Apr 29, 2004 5:41 am
Oh okay,
If a user is logged in and have access to "hidden" forum then the post(s) in said forum should be displayed. If the user is not logged in then the "hidden" forum post(s) are not displayed. Got it?
_________________ If you shoot for the moon and miss, you'll still be amongst the stars.
PunchDrunk Nuke Soldier
Joined: Mar 03, 2004
Posts: 29
Posted:
Thu Apr 29, 2004 6:07 am
Well, I apologize, but I think I mislead you. I went back to try to find the block in the nukecops download section, but I cannot find it. So, I think I may have gotten the block from nukeresources.com. At the bottom of the page if you follow that link, "Center Block for php-nuke Forums". Strangely, I cant get that download link to work right now, although I thought I downloaded it last night. Perhaps I should post for support there.
It lists the various forums at the top as 'Categories', and there you can see a Private forum category. However, I have tested it and in the lower section it is not actually showing posts to that forum. So, it is working right half the time. I would just prefer if it didn't list Private forums in the Categories section, especially ones that are hidden. But even if I cant get it fixed I might keep it.
Sorry for the confusion, and thanks for the help and a useful site.
Last edited by PunchDrunk on Sat May 01, 2004 6:46 am; edited 1 time in total
IACOJ Major
Joined: Jan 15, 2003
Posts: 1269
Location: USA
Posted:
Thu Apr 29, 2004 10:10 am
CS is on both sites, I'll ask him to take a look. I know there are several forum blocks. I'm sure that it wont take any time at all to fix the block up. If you want you can post the code to it.
I am not the author of all files offered at NR so i would need a download link to the specific block to either attempt to correct the problem or point you to the author's website.
_________________ Feed a man a fish and you feed him for a day. Teach a man to fish and you feed him for a lifetime.
ScriptHeaven | NukeResources
mikem Theme Guru
Joined: Jan 13, 2003
Posts: 1582
Location: Corn fields of Indiana
Posted:
Thu Apr 29, 2004 11:01 am
The blocks he is referring to can be found in most of the nukemods theme packs.
I do not know if what the author of this post asks is possible. Well, maybe possible, but...
You basically would need the Recent posts block to query the user permission fields etc. and display accordingly for the users that are logged in.
Easier said than done.
No Recent posts Forum block does this yet.
I can get the block to ignore certain Forum categories or forums altogether, but to have the block not display the posts according to the users permissions set in the forums is another story.
I have come across several Center forum blocks at different Nuke support sites. They may all be the same, but I will try some additional ones tonight. There is one from Codezwiz I found that I have not tried.
However, I would say that the current block works almost well enough. I do not think it shows posts to the Hidden forum. I made a test post, which you can actually see in the scrolling forums on the right side. So while I dont know anything, it seems to me that the hard stuff is working. The only problem is that it lists the Hidden forum at the top, which sort of defeats the purpose of a Hidden forum. If I just changed it to a Private (but visible) forum, then it would be working right.
I just want the Hidden Forums category removed from the Category List. Actually, I dont really like the style of the Category Section, so I would be happy if that whole section was removed, and only the posts were visible. Because I think it is filtering the posts correctly, that would also solve the problem.
Thanks again, and I will post if I find a block I like better. Perhaps I should take a crack at mucking around with the code of the Block.
PunchDrunk Nuke Soldier
Joined: Mar 03, 2004
Posts: 29
Posted:
Fri Apr 30, 2004 6:53 am
The Block from Codezwiz was identical to what I am using.
But I have a question about altering the block code itself. There is a section that looks like this.
I assume, based on the first line, that this section is actually writing the info to the screen. So, if I cut out the section referring to the categories, will it then only display the posts. Specifically, how about cutting out this section.
$cat = sql_query("SELECT * FROM ".$prefix."_bbcategories", $dbi);
while ($cat_row = sql_fetch_row($cat)) {
$cat_id = $cat_row[0];
$cat_title = $cat_row[1];
$content .= "<br><b><a href=\"modules.php?name=Forums&file=index&c=$cat_id\">$cat_title</a></b><br>";
$forum = sql_query("SELECT * FROM ".$prefix."_bbforums where cat_id='$cat_id'" , $dbi);
while ($forum_row = sql_fetch_row($forum)) {
$forum_id = $forum_row[0];
$forum_title = $forum_row[2];
$for_count ++;
$content .= "    <a href=\"modules.php?name=Forums&file=viewforum&f=$forum_id\">$forum_title</a>";
There is another content line above that which I might should include. I thought I would ask before I started changing things.
Thanks
PunchDrunk Nuke Soldier
Joined: Mar 03, 2004
Posts: 29
Posted:
Sat May 01, 2004 6:45 am
Just thought I would say that the change I described above fixed it perfectly. I am happy.
Divvy Lieutenant
Joined: Jul 25, 2004
Posts: 209
Posted:
Mon Dec 24, 2007 4:18 pm
I have the same problem! Can someone help me please?
Heres my block code:
Code:
<?php
########################################################################
# PHP-Nuke Block: fiblack Center Forum Block v.2 #
# Made for PHP-Nuke 6.5 and up #
# #
# Made by mikem http://www.nukecops.com #
########################################################################
# This block is made only to match the phpib2 Theme pack #
# This program is free software. You can redistribute it and/or modify #
# it under the terms of the GNU General Public License as published by #
# the Free Software Foundation; either version 2 of the License. #
# If you modify this, let me know for fun. =) #
########################################################################
if (eregi("block-fiblack-Forum.php",$PHP_SELF)) {
Header("Location: index.php");
die();
}
$result2 = sql_query("SELECT username, user_id, user_color_gc FROM ".$prefix."_users where user_id='$topic_poster'", $dbi);
list($username, $user_id, $user_color_gc)=sql_fetch_row($result2, $dbi);
$avtor= UsernameColor($user_color_gc, $username);
$sifra=$user_id;
$result3 = sql_query("SELECT poster_id, FROM_UNIXTIME(post_time,'%m/%d/%Y às %H:%i') as post_time FROM ".$prefix."_bbposts where post_id='$topic_last_post_id'", $dbi);
list($poster_id, $post_time)=sql_fetch_row($result3, $dbi);
$result4 = sql_query("SELECT username, user_id, user_color_gc FROM ".$prefix."_users where user_id='$poster_id'", $dbi);
list($username, $user_id, $user_color_gc)=sql_fetch_row($result4, $dbi);
$username= UsernameColor($user_color_gc, $username);
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum