You are missing our premiere tool bar navigation system! Register and use it for FREE!

NukeCops  
•  Home •  Downloads •  Gallery •  Your Account •  Forums • 
Readme First
- Readme First! -

Read and follow the rules, otherwise your posts will be closed
Modules
· Home
· FAQ
· Buy a Theme
· Advertising
· AvantGo
· Bookmarks
· Columbia
· Community
· Donations
· Downloads
· Feedback
· Forums
· PHP-Nuke HOWTO
· Private Messages
· Search
· Statistics
· Stories Archive
· Submit News
· Surveys
· Theme Gallery
· Top
· Topics
· Your Account
Who's Online
There are currently, 47 guest(s) and 0 member(s) that are online.

You are Anonymous user. You can register for free by clicking here
Nuke Cops :: View topic - Center Forums recognize user access to Private Forums [ ]
 Forum FAQ  •  Search  •   •  Memberlist  •  Usergroups   •  Register  •  Profile •    •  Log in to check your private messages  •  Log in

 
Post new topic  Reply to topicprinter-friendly view
View previous topic Log in to check your private messages View next topic
Author Message
PunchDrunk
Nuke Soldier
Nuke Soldier


Joined: Mar 03, 2004
Posts: 29


PostPosted: Wed Apr 28, 2004 5:49 pm Reply with quoteBack to top

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.
Find all posts by PunchDrunkView user's profileSend private message
IACOJ
Major
Major


Joined: Jan 15, 2003
Posts: 1269

Location: USA

PostPosted: Wed Apr 28, 2004 7:03 pm Reply with quoteBack to top

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.

_________________
http://castlecops.com
<b>Microsoft MVP Windows-Security 2005</b> <img src="http://castlecops.com/zx/Paul/mvp.gif">
Find all posts by IACOJView user's profileSend private message
foxyfemfem
Support Staff
Support Staff


Joined: Jan 23, 2003
Posts: 668

Location: USA

PostPosted: Wed Apr 28, 2004 7:10 pm Reply with quoteBack to top

Okay,

Let me see if I get this right.

PunchDrunk wrote:
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.
Find all posts by foxyfemfemView user's profileSend private message
Alexuus
Nuke Soldier
Nuke Soldier


Joined: Nov 13, 2003
Posts: 23


PostPosted: Thu Apr 29, 2004 5:32 am Reply with quoteBack to top

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
Find all posts by AlexuusView user's profileSend private message
foxyfemfem
Support Staff
Support Staff


Joined: Jan 23, 2003
Posts: 668

Location: USA

PostPosted: Thu Apr 29, 2004 5:41 am Reply with quoteBack to top

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.
Find all posts by foxyfemfemView user's profileSend private message
PunchDrunk
Nuke Soldier
Nuke Soldier


Joined: Mar 03, 2004
Posts: 29


PostPosted: Thu Apr 29, 2004 6:07 am Reply with quoteBack to top

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
Find all posts by PunchDrunkView user's profileSend private message
IACOJ
Major
Major


Joined: Jan 15, 2003
Posts: 1269

Location: USA

PostPosted: Thu Apr 29, 2004 10:10 am Reply with quoteBack to top

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.

_________________
http://castlecops.com
<b>Microsoft MVP Windows-Security 2005</b> <img src="http://castlecops.com/zx/Paul/mvp.gif">
Find all posts by IACOJView user's profileSend private message
chatserv
General
General


Joined: Jan 12, 2003
Posts: 3128

Location: Puerto Rico

PostPosted: Thu Apr 29, 2004 10:31 am Reply with quoteBack to top

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
Find all posts by chatservView user's profileSend private messageVisit poster's website
mikem
Theme Guru
Theme Guru


Joined: Jan 13, 2003
Posts: 1582

Location: Corn fields of Indiana

PostPosted: Thu Apr 29, 2004 11:01 am Reply with quoteBack to top

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.

mikem

_________________
Getting Started | My Projects
Find all posts by mikemView user's profileSend private message
PunchDrunk
Nuke Soldier
Nuke Soldier


Joined: Mar 03, 2004
Posts: 29


PostPosted: Thu Apr 29, 2004 11:41 am Reply with quoteBack to top

Thanks for the help.

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.
Find all posts by PunchDrunkView user's profileSend private message
PunchDrunk
Nuke Soldier
Nuke Soldier


Joined: Mar 03, 2004
Posts: 29


PostPosted: Fri Apr 30, 2004 6:53 am Reply with quoteBack to top

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.

Code:

/* Write Table to Screen */
$content  = "<table width=\"100%\" border=\"$border\"  cellspacing=\"$cellspacing\" bordercolor=\"$bgcolor2\" bgcolor=\"$bgcolor1\">";

$content .= "<tr><td width=\"100%\" height=\"28\" colspan=\"6\" align=\"center\" bgcolor=$bgcolor2 $table_top><b>Categories</b></td></tr>";

$content .= "<tr><td width=\"100%\" height=\"21\" colspan=\"6\" align=\"left\" bgcolor=$bgcolor1>";

$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 .= "&nbsp&nbsp&nbsp&nbsp<a href=\"modules.php?name=Forums&file=viewforum&f=$forum_id\">$forum_title</a>";
   }
}
$content .= "</td></tr>";

$content .= "<tr><td width=\"100%\" height=\"28\" colspan=\"6\" align=\"center\"
bgcolor=$bgcolor2 $table_top><b>Lastest Posts</b></td></tr>";

$content .= "<tr bgcolor=$bgcolor5><td>&nbsp;&nbsp;</td><td align=\"center\">"._BBFORUM_NEWTOPICS."</td><td align=\"center\">"._BBFORUM_POSTER."</td><td align=\"center\">"._BBFORUM_VIEWS."</td><td align=\"center\">"._BBFORUM_REPLIES."</td><td align=\"center\">"._BBFORUM_LASTPOSTER."</td></tr>";
$content .= "$Topic_Buffer";
$content .= "<tr><td align=\"center\" colspan=\"6\">"._BBFORUM_TOTTOPICS."<b>$Amount_Of_Topics</b>&nbsp;<b>|</b>&nbsp;"._BBFORUM_TOTPOSTS."<b>$Amount_Of_Posts</b>&nbsp;<b>|</b>&nbsp;"._BBFORUM_TOTVIEWS."<b>$Amount_Of_Topic_Views</b>&nbsp;<b>|</b>&nbsp;"._BBFORUM_TOTREPLIES."<b>$Amount_Of_Topic_Replies</b>&nbsp;<b>|</b>&nbsp;<a href=\"modules.php?name=Members_List\">"._BBFORUM_TOTMEMBERS."</a>&nbsp;<b>$Amount_Of_Members</b></center></td></tr>";
$content .= "<tr><td align=\"center\" colspan=\"6\">[ <a href=\"modules.php?name=Forums\">"._BBFORUM_FORUM."</a> ]&nbsp;&nbsp;&nbsp;[ <a href=\"modules.php?op=modload&name=Forums&file=search\">"._BBFORUM_SEARCH."</a> ]</center></td></tr>";
$content .= $table_bottom;
$content .= "</table>";

?>

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.
Code:

$content .= "<tr><td width=\"100%\" height=\"28\" colspan=\"6\" align=\"center\" bgcolor=$bgcolor2 $table_top><b>Categories</b></td></tr>";

$content .= "<tr><td width=\"100%\" height=\"21\" colspan=\"6\" align=\"left\" bgcolor=$bgcolor1>";

$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 .= "&nbsp&nbsp&nbsp&nbsp<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
Find all posts by PunchDrunkView user's profileSend private message
PunchDrunk
Nuke Soldier
Nuke Soldier


Joined: Mar 03, 2004
Posts: 29


PostPosted: Sat May 01, 2004 6:45 am Reply with quoteBack to top

Just thought I would say that the change I described above fixed it perfectly. I am happy.
Find all posts by PunchDrunkView user's profileSend private message
Divvy
Lieutenant
Lieutenant


Joined: Jul 25, 2004
Posts: 213


PostPosted: Mon Dec 24, 2007 4:18 pm Reply with quoteBack to top

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();
}
   
global $prefix, $dbi, $sitename, $admin;

$HideViewReadOnly = 0;
          
$Last_New_Topics  = 5;
$show = "  <tr>
    <td height=\"28\" colspan=\"6\" align=\"center\" class=\"catbottom\" background=\"modules/Forums/templates/arkanian/images/cellpic3.gif\">&nbsp;</td>
  </tr>
</table></td>
        </tr>
      </table></td>
  </tr>
</table><br>";

$Count_Topics = 0;
$Topic_Buffer = "";
$result = sql_query( "SELECT t.topic_id, f.forum_name, f.forum_id, t.topic_last_post_id, t.topic_title, t.topic_poster, t.topic_views, t.topic_replies, t.topic_moved_id FROM ".$prefix."_bbtopics t, ".$prefix."_bbforums f where t.forum_id=f.forum_id ORDER BY topic_last_post_id DESC", $dbi );
while( list( $topic_id, $forum_name, $forum_id, $topic_last_post_id, $topic_title, $topic_poster, $topic_views, $topic_replies, $topic_moved_id ) = sql_fetch_row( $result, $dbi ) )

{
   $skip_display = 0;
   if( $HideViewReadOnly == 1 )
   {
      $result1 = sql_query( "SELECT auth_view, auth_read FROM ".$prefix."_bbforums where forum_id = '$forum_id'", $dbi );
      list( $auth_view, $auth_read ) = sql_fetch_row( $result1, $dbi );
      if( ( $auth_view != 0 ) or ( $auth_read != 0 ) ) { $skip_display = 1; }
   }

   if( $topic_moved_id != 0 )
   {
     // Shadow Topic !!
      $skip_display = 1;
   }
   
   if( $skip_display == 0 )
   {
     $Count_Topics += 1;

$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);

                         $viewlast .="  <tr>
    <td height=\"34\" bgcolor=\"#0D0E0E\" class=\"row1\"><img src=\"modules/Forums/templates/arkanian/images/folder_new.gif\" border=\"0\" /></td>
    <td width=\"100%\" bgcolor=\"#272727\" class=\"row1\">&nbsp;<b>$forum_name</b><br>&nbsp;&nbsp;<a href=\"modules.php?name=Forums&file=viewtopic&t=$topic_id#$topic_last_post_id\">$topic_title</a></td>
    <td align=\"center\" bgcolor=\"#303030\" class=\"row2\">$topic_replies</td>
    <td align=\"center\" bgcolor=\"#303030\" class=\"row2\">$topic_views</td>
    <td align=\"center\" nowrap bgcolor=\"#414141\" class=\"row3\"><font size=\"-2\"><i>&nbsp;&nbsp;$post_time&nbsp;</i></font><br>
      <a href=\"modules.php?name=Forums&file=profile&mode=viewprofile&u=$user_id\">$username</a>&nbsp;<a href=\"modules.php?name=Forums&file=viewtopic&p=$topic_last_post_id#$topic_last_post_id\"><img src=\"modules/Forums/templates/arkanian/images/icon_latest_reply.gif\" border=\"0\" alt=\"Last Post\"></a></td>
  </tr>";
}
   
   if( $Last_New_Topics == $Count_Topics ) { break 1; }
   
}

    $content .= "<table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"1\">
  <tr>
    <td><table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"1\">
        <tr>
          <td bgcolor=\"#010101\"><table width=\"100%\" border=\"0\" cellpadding=\"2\" cellspacing=\"1\">
  <tr>
    <th height=\"28\" colspan=\"2\" align=\"center\" nowrap class=\"thcornerl\"><font color=\"#D77700\"><strong>Forum/Topic</strong></font></th>
    <th width=\"25\" align=\"center\" nowrap class=\"thtop\"><font color=\"#D77700\"><strong>&nbsp;Posts&nbsp;</strong></font></th>
    <th width=\"50\" align=\"center\" nowrap class=\"thtop\"><font color=\"#D77700\"><strong>&nbsp;Views&nbsp;</strong></font></th>
    <th align=\"center\" nowrap class=\"thcornerr\"><font color=\"#D77700\"><strong>&nbsp;Último Post&nbsp;</strong></font></th>
  </tr><br>";
    $content .= "$viewlast";

 $content .= "$show";

?>
Find all posts by DivvyView user's profileSend private message
Display posts from previous:      
Post new topic  Reply to topicprinter-friendly view
View previous topic Log in to check your private messages View next topic
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



Powered by phpBB © 2001, 2005 phpBB Group

Ported by Nuke Cops © 2003 www.nukecops.com
:: FI Theme :: PHP-Nuke theme by coldblooded (www.nukemods.com) ::
Powered by · TOGETHER TEAM srl ITALY http://www.togetherteam.it · DONDELEO E-COMMERCE http://www.DonDeLeo.com
Web site engine's code is Copyright © 2002 by PHP-Nuke. All Rights Reserved. PHP-Nuke is Free Software released under the GNU/GPL license.
Page Generation: 0.439 Seconds - 250 pages served in past 5 minutes. Nuke Cops Founded by Paul Laudanski (Zhen-Xjell)
:: FI Theme :: PHP-Nuke theme by coldblooded (www.nukemods.com) ::