2nd: Somehow I can still see the title for forum posts that I should not be able to see.
I figured out how to fix the 1st issue but how do I fix the 2nd?
Kilim Lieutenant
Joined: Jul 01, 2003
Posts: 183
Posted:
Mon Mar 29, 2004 4:43 pm
Here is the code for the Forum Secure block:
Code:
<?php
/************************************************************************/
/* Forums Block for phpBB 2.0.0 port to PHP Nuke 6.5b6+ */
/* ==================================================== */
/* */
/* Copyright (c) 2002 by Francisco Burzi (fbc@mandrakesoft.com) */
/* http://phpnuke.org */
/* */
/* Version 1, modified by Sébastien Vaast */
/* http://membres.lycos.fr/projectpluto/ */
/* */
/* Updated by Tom Nitzschner 22/06/2002 to add the scrolling text */
/* */
/* Updated by Paul Laudanski 14 Jan 2003 */
/* NukeCops.com | ComputerCops.biz */
/* */
/* Last Edited - 14 Jan 2003 */
/* */
/* This Block shows the last 10 topics where a message was posted, */
/* along with the username of the last poster and the day and time */
/* of the post. */
/* It will also show smileys in the topic titles thanks to the */
/* smileys.php file found in Leo Tan Block Forums version */
/* (http://www.cybercomp.d2g.com). */
/* */
/* 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 (eregi("block-Forums.php", $PHP_SELF)) {
Header("Location: index.php");
die();
}
include_once ('blocks/smileys.php');
global $prefix, $db, $sitename, $user, $cookie, $group_id;
$count = 1;
$result1 = $db->sql_query("SELECT t.topic_id, t.topic_last_post_id, t.topic_title, f.forum_name, f.forum_id FROM ".$prefix."_bbtopics t, ".$prefix."_bbforums f where t.forum_id=f.forum_id ORDER BY t.topic_last_post_id DESC LIMIT 20", $db);
$content .= "<br>";
$result2 = $db->sql_query("SELECT topic_id, poster_id, FROM_UNIXTIME(post_time,'%b %d, %Y at %T') as post_time FROM ".$prefix."_bbposts where post_id='$topic_last_post_id'", $db);
$result3 = $db->sql_query("SELECT username, user_id FROM ".$prefix."_users where user_id='$poster_id'", $db);
list($username, $user_id)=$db->sql_fetchrow($result3, $db);
$topic_title=parseEmoticons($topic_title);
// Remove the comment below to add the counter
//$content .="<STYLE=\"text-decoration: none\"><font color=\"#666666\"><b>Message: $count<br></b>";
$sql = "SELECT auth_view
FROM ".$prefix."_bbauth_access
WHERE forum_id = '$forum_id' and
group_id = '$group_id' and
auth_view = 1 or
auth_mod = 1";
if( ($result5 = $db->sql_query("SELECT auth_view FROM ".$prefix."_bbauth_access WHERE forum_id = '$forum_id' and group_id = '$group_id' and ( auth_view = 0 or auth_mod = 0 )", $db)) )
{
$content .= "<img src=\"modules/Forums/templates/subSilver/images/icon_mini_message.gif\" border=\"0\" alt=\"\"><a href=\"modules.php?name=Forums&file=viewtopic&p=$topic_last_post_id#$topic_last_post_id\"STYLE=\"text-decoration: none\"><b> $topic_title </b></a><br><font color=\"#666666\"><i>Last post by <A HREF=\"modules.php?name=Forums&file=profile&mode=viewprofile&u=$user_id\"STYLE=\"text-decoration: none\"> $username </a> in <a href=\"modules.php?name=Forums&file=viewforum&f=$forum_id\">$forum_name</a> on $post_time</i></font><br><br>";
$count = $count + 1;
}
I found smiley.php on a german site before finding this thread and I eventually proceeded with installing everything. I also translated the forum block to French.
There is one thing I haven't been able to correct tho. The the right part of the block border is slightly too right. I mean the frame of the block doesn't close properly (I use the XPolive theme).
I just started with PHP-Nuke less than a week ago and I have no idea of how to correct the block width...
Any help ? Thanks.
Edit: I don't see it with IE. I just noticed it is only appearant in the latest version of Mozilla Firefox. However I didn't notice it when I browsed other website with Mozilla.
Kilim Lieutenant
Joined: Jul 01, 2003
Posts: 183
Posted:
Wed Mar 31, 2004 1:33 pm
Any1 else have any idea how to make this block work properly?
Viper Lieutenant
Joined: May 04, 2003
Posts: 282
Location: Louisville, KY USA
Posted:
Wed Mar 31, 2004 1:48 pm
Hi Kilim,
Did you upload the smiley.php file to the blocks directory? If you look at the code you posted:
Code:
if (eregi("block-Forums.php", $PHP_SELF)) {
Header("Location: index.php");
die();
}
include_once ('blocks/smileys.php');
global $prefix, $db, $sitename, $user, $cookie, $group_id;
$count = 1;
You can see where it's looking for the file,
Good luck, and I hope this helps.
Viper
<---Edited--->
oops,
Just noticed where you said you didn't have that file, so I uploaded to NukeCops, grab the file Here
_________________ Building A Better PHP-Nuke Community!
Kilim Lieutenant
Joined: Jul 01, 2003
Posts: 183
Posted:
Wed Mar 31, 2004 7:45 pm
I have uploaded the smiley.php
The issue is that even anonymous users are able to see the topic title that requires usergroup membership.
I tought this block is suppose to differentiate via usergroups.
As in if a posts is in a private forum post should not be able to be viewed by anonymous users AND users that are not members of that private group.
Kilim Lieutenant
Joined: Jul 01, 2003
Posts: 183
Posted:
Wed Apr 07, 2004 9:27 pm
ANy1 else have any idea why ALL users can see posts in the block even though they are NOT in that usergroup?
_________________
CodEZ Nuke Cadet
Joined: Jan 14, 2004
Posts: 5
Posted:
Mon Apr 19, 2004 9:42 pm
ya if someone figures it out... or finds a block that does work... please post it here
Is this just a regular scrolling forums block that you ahev in your link?
And is it suppose to have the same features that forum-secure suppose to have?
(yes I know somehow the forum-secure is not working as intended)
_________________
CodEZ Nuke Cadet
Joined: Jan 14, 2004
Posts: 5
Posted:
Wed Apr 21, 2004 1:02 am
you can see this block in action at codezwiz.com and also electriccancel.com ...
any forums designated as hidden do not show up in the scrolling block
Madchatthew Nuke Soldier
Joined: Apr 12, 2004
Posts: 32
Posted:
Thu Apr 22, 2004 8:29 am
Hello All,
I am having this same problem also with private forums showing up in the scrolling block no matter who is logged in. Anyone have a fix for this? Or perhaps a secure forum block that works the way it is supposed to? I am running phpnuke 7.0.
CodEZ Nuke Cadet
Joined: Jan 14, 2004
Posts: 5
Posted:
Thu Apr 22, 2004 10:27 am
check the link i posted a few posts up... any forum listed as HIDDEN will not show in the block... if it is just private, then it will still show
Madchatthew Nuke Soldier
Joined: Apr 12, 2004
Posts: 32
Posted:
Thu Apr 22, 2004 10:33 am
Cool thanks...I will check that out...somehow I missed the earlier reply...thanks again.
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