Scroller Block showing Private Forums

  Post new topicReply to topicPrintable Version
<< View previous topic View next topic >>
Share: Del.icio.us  Digg  Google  Spurl  Blink  Furl  Y! MyWeb  
#1   Scroller Block showing Private Forums
schtefan
CZ Newbie
schtefan has been a member for over 19 year's 19 Year Member
usa.gif oregon.gif
Status: Offline
Joined: Jun 08, 2004
0.00 posts per day
Posts: 8
Points: 576
   
Hi, first time poster here icon_smile.gif. I am using a scroller block from PHP-Nuke and it works fine, but it displays the topics in our private forum. I have downloaded and installed your version with the same result. Is there somethign I should add to the code to prevent the scroller block forum from showing private forum area?
Thanks, here is the code:

if (eregi("block-ForumsScroll.php", $_SERVER['PHP_SELF'])) {
    Header("Location: index.php");
    die();
}

//include_once ('blocks/smileys.php');

global $prefix, $dbi, $sitename, $user, $cookie, $group_id;
$count = 1;
$amount = 5;
$content = "<A name= \"scrollingCode\"></A>";
$content .="<MARQUEE behavior= \"scroll\" align= \"center\" direction= \"up\" height=\"220\" scrollamount= \"2\" scrolldelay= \"25\" onmouseover='this.stop()' onmouseout='this.start()'>";
$content .="<center> <STYLE=\"text-decoration: none\"><font color=\"#666666\"><b>Last $amount Forum Messages</b></center>";
$result1 = sql_query("SELECT topic_id, topic_last_post_id, topic_title FROM ".$prefix."_bbtopics ORDER BY topic_last_post_id DESC LIMIT $amount", $dbi);
$content .= "<br>";
while(list($topic_id, $topic_last_post_id, $topic_title) = sql_fetch_row($result1, $dbi)) {
$result2 = 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'", $dbi);
list($topic_id, $poster_id, $post_time)=sql_fetch_row($result2, $dbi);

$result3 = sql_query("SELECT username, user_id FROM ".$prefix."_users where user_id='$poster_id'", $dbi);
list($username, $user_id)=sql_fetch_row($result3, $dbi);

//$topic_title = substr("$topic_title", 0,17);
//$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>";

$content .= "<img src=\"modules/Forums/templates/subSilver/images/icon_mini_message.gif\" border=\"0\"alt=\"\"><a href=\"modules.php?name=Forums&amp;file=viewtopic&amp;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=\"forum-userprofile-.html$user_id\"STYLE=\"text-decoration: none\"> $username </a> on $post_time</i></font><br><br>";
$count = $count + 1;
}
$content .= "<br><center>[ <a href=\"forums.html\"STYLE=\"text-decoration: none\">$sitename ]</center>";
//$content .= "<center><img src=\"images/banners/fatalexception-logo-88x31.gif\" border=\"0\"></center>";
$content .= "</a>";
?>



Back to top Reply with quote
#2   
Telli
Site Admin
Telli has been a member for over 20 year's 20 Year Member
Occupation: Self Employed
Age: 46
Gender: Male
Fav. Sports Team: Detroit Red Wings
Website:
Status: Offline
Joined: May 26, 2003
1.06 posts per day
Posts: 8089
Points: 494,430
   
The block available here does not show the private forums it has been tested and tested and does not show them. Please try it again.
[ Register or login to view links on this board. ]




_________________
The path of the righteous man is beset on all sides by the inequities of the selfish and the tyranny of evil men. Blessed is he, who in the name of charity and good will, shepherds the weak through the valley of darkness, for he is truly his brother's keeper and the finder of lost children. And I will strike down upon thee with great vengeance and furious anger those who would attempt to poison and destroy my brothers. And you will know my name is the Lord when I lay my vengeance upon thee. Ezekiel 25:17
Back to top Reply with quote
#3   
schtefan
CZ Newbie
schtefan has been a member for over 19 year's 19 Year Member
usa.gif oregon.gif
Status: Offline
Joined: Jun 08, 2004
0.00 posts per day
Posts: 8
Points: 576
   
I must have an abnormal forum then..lol..because it sure shows the private forum..man...I dunno anymore...
please go to [ Register or login to view links on this board. ]
Is there something I need to edit? forum ID? I dunno

Thanks guys...
NITRO



Back to top Reply with quote
#4   
Telli
Site Admin
Telli has been a member for over 20 year's 20 Year Member
Occupation: Self Employed
Age: 46
Gender: Male
Fav. Sports Team: Detroit Red Wings
Website:
Status: Offline
Joined: May 26, 2003
1.06 posts per day
Posts: 8089
Points: 494,430
   
It looks like all you did was make the Forum private. Go back to the Forum ACP and go to the Forum Permissions. Look up the Forum, then set the permissions properly. Then they wont show up in the block.




_________________
The path of the righteous man is beset on all sides by the inequities of the selfish and the tyranny of evil men. Blessed is he, who in the name of charity and good will, shepherds the weak through the valley of darkness, for he is truly his brother's keeper and the finder of lost children. And I will strike down upon thee with great vengeance and furious anger those who would attempt to poison and destroy my brothers. And you will know my name is the Lord when I lay my vengeance upon thee. Ezekiel 25:17
Back to top Reply with quote
#5   
schtefan
CZ Newbie
schtefan has been a member for over 19 year's 19 Year Member
usa.gif oregon.gif
Status: Offline
Joined: Jun 08, 2004
0.00 posts per day
Posts: 8
Points: 576
   
OK, got it now...thanks...and sorry for the newbieness icon_smile.gif
Thanks again.
NITRO



Back to top Reply with quote
#6   re: Scroller Block showing Private Forums
ncoteam
CZ Newbie
ncoteam has been a member for over 19 year's 19 Year Member
Gender: Male
Status: Offline
Joined: Feb 12, 2005
0.00 posts per day
Posts: 1
Points: 28
   
I have a self-imposed problem, but this is my requirement so any help will be greatly appreciated.

In the ACP, I have forums which are Private (but not hidden) to allow user without access to know they are there and they must request access. They can only view the title of the forum, but not see any messages or the content.

The Scrolling Block v2 allows those Private forums recent messages to be posted. I know the easy answer is to make them Private (Hidden), but that will not work for me.

Is there a way to hide those forums in ScrollerBlockv2 from 1) either those who do not have access, or 2) from everybody?

Thanks. [ Register or login to view links on this board. ] [ Register or login to view links on this board. ]



Back to top Reply with quote
Display posts from previous:      
Add To: Del.icio.us  Digg  Google  Spurl  Blink  Furl  Y! MyWeb  
<< View previous topic View next topic >>
Post new topicReply to topic

Jump to 
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
You cannot attach files in this forum
You cannot download files in this forum