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, 42 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 - Last forum post block, howto show hidden [solved] [ ]
 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
thot
Nuke Soldier
Nuke Soldier


Joined: Jan 23, 2005
Posts: 17


PostPosted: Fri Nov 24, 2006 4:56 am Reply with quoteBack to top

I use the "fisubice Center Forum Block v.3" for my portal.

There are two different usergroups who cant see eachothers forum,
just for ease of use.

But what do I need to change so the forum Block DOES shows the last posts out of Hidden Topics.
So all members can see what the last topics are.

it looks a bit like this http://www.docarabia.com/Personal/221.JPG
Code:
<?php

########################################################################
# PHP-Nuke Block: fisubice Center Forum Block v.3              #
# Made for PHP-Nuke 6.5  and up.                   #
#                                                                      #
# Made by mikem http://www.nukemods.com                                #
# This block is made only to match the fisubice 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-fisubice-Forum.php",$PHP_SELF)) {
    Header("Location: index.php");
    die();
}
   
global $prefix, $db, $sitename, $admin;

$HideViewReadOnly = 1;
           
$Last_New_Topics  = 5;
$show = "  <tr>
    <td background=\"images/cellpic1.gif\" height=\"15\" colspan=\"6\" align=\"center\" class=\"cat\" background=\"images/cellpic1.gif\">&nbsp;</td>
  </tr>
</table></td>
        </tr>
      </table></td>
  </tr>
</table>";

$Count_Topics = 0;
$Topic_Buffer = "";
$result = $db->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" );
while( list( $topic_id, $forum_name, $forum_id, $topic_last_post_id, $topic_title, $topic_poster, $topic_views, $topic_replies, $topic_moved_id ) = $db->sql_fetchrow( $result ) )

{
   $skip_display = 0;
   if( $HideViewReadOnly == 1 )
   {
      $result1 = $db->sql_query( "SELECT auth_view, auth_read FROM ".$prefix."_bbforums where forum_id = '$forum_id'" );
      list( $auth_view, $auth_read ) = $db->sql_fetchrow( $result1 );
      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 = $db->sql_query("SELECT username, user_id FROM ".$prefix."_users where user_id='$topic_poster'");
list($username, $user_id)=$db->sql_fetchrow($result2);
$avtor=$username;
$sifra=$user_id;

$result3 = $db->sql_query("SELECT poster_id, FROM_UNIXTIME(post_time,'%d %M, %Y @ %T') as post_time FROM ".$prefix."_bbposts where post_id='$topic_last_post_id'");
list($poster_id, $post_time)=$db->sql_fetchrow($result3);

$result4 = $db->sql_query("SELECT username, user_id FROM ".$prefix."_users where user_id='$poster_id'");
list($username, $user_id)=$db->sql_fetchrow($result4);

                         $viewlast .="  <tr>
    <td align=\"center\" height=\"30\" width=\"30\" nowrap bgcolor=\"#EIE9F2\" class=\"row1\"><img src=\"modules/Forums/templates/subSilver/images/folder.gif\" border=\"0\" /></td>
    <td width=\"100%\" bgcolor=\"#EIE9F2\" class=\"row1\">&nbsp;<b>$forum_name</b><br>&nbsp;&nbsp;<a href=\"modules.php?name=Forums&file=viewtopic&p=$topic_last_post_id#$topic_last_post_id\">$topic_title</a></td>
    <td align=\"center\" bgcolor=\"#F4F6FB\" class=\"row2\">$topic_replies</td>
    <td align=\"center\" bgcolor=\"#EIE9F2\" class=\"row3\"><a href=\"modules.php?name=Forums&file=profile&mode=viewprofile&u=$sifra\">$avtor</a></td>
    <td align=\"center\" bgcolor=\"#F4F6FB\" class=\"row2\">$topic_views</td>
    <td align=\"center\" nowrap bgcolor=\"#EIE9F2\" 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/subSilver/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=\"0\">
        <tr>
          <td background=\"modules/Forums/templates/subSilver/images/cellpic1.gif\"><table width=\"100%\" border=\"0\" cellpadding=\"1\" cellspacing=\"1\" class=\"forumline\">
  <tr>
    <th height=\"20\" colspan=\"2\" align=\"center\" nowrap background=\"images/cellpic1.gif\" class=\"thcornerl\"><font color=\"#486386\"><strong>Forum/Topic</strong></font></th>
    <th width=\"50\" align=\"center\" nowrap background=\"images/cellpic1.gif\" class=\"thtop\"><font color=\"#486386\"><strong>&nbsp;Reacties&nbsp;</strong></font></th>
    <th width=\"100\" align=\"center\" nowrap background=\"images/cellpic1.gif\" class=\"thtop\"><font color=\"#486386\"><strong>&nbsp;Auteur&nbsp;</strong></font></th>
    <th width=\"50\" align=\"center\" nowrap background=\"images/cellpic1.gif\" class=\"thtop\"><font color=\"#486386\"><strong>&nbsp;Bekeken&nbsp;</strong></font></th>
    <th align=\"center\" nowrap background=\"images/cellpic1.gif\" class=\"thcornerr\"><font color=\"#486386\"><strong>&nbsp;Laaste Bericht&nbsp;</strong></font></th>
  </tr>";
    $content .= "$viewlast";

 $content .= "$show";

?>
Find all posts by thotView user's profileSend private message
thot
Nuke Soldier
Nuke Soldier


Joined: Jan 23, 2005
Posts: 17


PostPosted: Fri Nov 24, 2006 5:02 am Reply with quoteBack to top

I'm with Stupid Mr. Green

For ppl how wish to know,
go to the beginning of your block,
find $HideViewReadOnly
change the 1 into a 0


Quote:
$HideViewReadOnly = 1;
into
$HideViewReadOnly = 0;
Find all posts by thotView user's profileSend private message
stcloudscoots
Nuke Soldier
Nuke Soldier


Joined: Feb 03, 2006
Posts: 26


PostPosted: Fri May 11, 2007 2:38 pm Reply with quoteBack to top

Ok this is an old thread but I will post this.
If you head over to http://www.dadanuke.org/index.php there is a block in the download section called Better Universal Forums.
It only shows users the posts from forums that they have permissions for.
Find all posts by stcloudscootsView user's profileSend private messageVisit poster's website
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.202 Seconds - 156 pages served in past 5 minutes. Nuke Cops Founded by Paul Laudanski (Zhen-Xjell)
:: FI Theme :: PHP-Nuke theme by coldblooded (www.nukemods.com) ::