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, 148 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 - Forum Secure Block [ ]
 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
Kilim
Lieutenant
Lieutenant


Joined: Jul 01, 2003
Posts: 183


PostPosted: Mon Mar 29, 2004 4:29 pm Reply with quoteBack to top

I found that this would be a great block to have but there are some minor issues with it.

1st: it is missing the smileys.php that should have been included in the block folder.
Code:
<?php
function parseEmoticons ($text) {

    $emoticons = array();
    $emoticons[] = array(":)", "<img src='modules/Forums/images/smiles/icon_smile.gif' alt='' align='absmiddle' BORDER=0>");
    $emoticons[] = array(":D", "<img src='modules/Forums/images/smiles/icon_biggrin.gif' alt='' align='absmiddle' BORDER=0>");
    $emoticons[] = array(":(", "<img src='modules/Forums/images/smiles/icon_sad.gif' alt='' align='absmiddle' BORDER=0>");
    $emoticons[] = array("Shocked", "<img src='modules/Forums/images/smiles/icon_eek.gif' alt='' align='absmiddle' BORDER=0>");
    $emoticons[] = array(":?", "<img src='modules/Forums/images/smiles/icon_confused.gif' alt='' align='absmiddle' BORDER=0>");
    $emoticons[] = array("8)", "<img src='modules/Forums/images/smiles/icon_cool.gif' alt='' align='absmiddle' BORDER=0>");
    $emoticons[] = array(":lol:", "<img src='modules/Forums/images/smiles/icon_lol.gif' alt='' align='absmiddle' BORDER=0>");
    $emoticons[] = array(":x", "<img src='modules/Forums/images/smiles/icon_mad.gif' alt='' align='absmiddle' BORDER=0>");
    $emoticons[] = array(":P", "<img src='modules/Forums/images/smiles/icon_razz.gif' alt='' align='absmiddle' BORDER=0>");
    $emoticons[] = array(":oops:", "<img src='modules/Forums/images/smiles/icon_redface.gif' alt='' align='absmiddle' BORDER=0>");
    $emoticons[] = array(":cry:", "<img src='modules/Forums/images/smiles/icon_cry.gif' alt='' align='absmiddle' BORDER=0>");
    $emoticons[] = array(":evil:", "<img src='modules/Forums/images/smiles/icon_evil.gif' alt='' align='absmiddle' BORDER=0>");
    $emoticons[] = array(":twisted:", "<img src='modules/Forums/images/smiles/icon_twisted.gif' alt='' align='absmiddle' BORDER=0>");
    $emoticons[] = array(":roll:", "<img src='modules/Forums/images/smiles/icon_twisted.gif' alt='' align='absmiddle' BORDER=0>");
    $emoticons[] = array(":wink:", "<img src='modules/Forums/images/smiles/icon_wink.gif' alt='' align='absmiddle' BORDER=0>");
    $emoticons[] = array(":!", "<img src='modules/Forums/images/smiles/icon_exclaim.gif' alt='' align='absmiddle' BORDER=0>");
    $emoticons[] = array(":?", "<img src='modules/Forums/images/smiles/icon_question.gif' alt='' align='absmiddle' BORDER=0>");
    $emoticons[] = array(":idea:", "<img src='modules/Forums/images/smiles/icon_idea.gif' alt='' align='absmiddle' BORDER=0>");
    $emoticons[] = array(":arrow:", "<img src='modules/Forums/images/smiles/icon_arrow.gif' alt='' align='absmiddle' BORDER=0>");
    $emoticons[] = array(":o", "<img src='modules/Forums/images/smiles/icon_surprised.gif' alt='' align='absmiddle' BORDER=0>");
    foreach ($emoticons as $emoticon) {
       $text = str_replace($emoticon[0],$emoticon[1],$text);
    }
    return $text;
}

?>



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?
Find all posts by KilimView user's profileSend private message
Kilim
Lieutenant
Lieutenant


Joined: Jul 01, 2003
Posts: 183


PostPosted: Mon Mar 29, 2004 4:43 pm Reply with quoteBack to top

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;


$content = "<A name= \"scrollingCode\"></A>";
$content .="<MARQUEE behavior= \"scroll\" align= \"center\" direction= \"up\" height=\"220\" scrollamount= \"2\" scrolldelay= \"20\" onmouseover='this.stop()' onmouseout='this.start()'>";
$content .="<center> <STYLE=\"text-decoration: none\"><font color=\"#666666\"><b>Last 20 Forum Messages</b></center>";



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


while(list($topic_id, $topic_last_post_id, $topic_title, $forum_name, $forum_id) = $db->sql_fetchrow($result1, $db)) {

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


   list($topic_id, $poster_id, $post_time)=$db->sql_fetchrow($result2, $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&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=\"modules.php?name=Forums&file=profile&mode=viewprofile&u=$user_id\"STYLE=\"text-decoration: none\"> $username </a> in <a href=\"modules.php?name=Forums&amp;file=viewforum&amp;f=$forum_id\">$forum_name</a> on $post_time</i></font><br><br>";
       $count = $count + 1;
        }

}


$content .= "<br><center>[ <a href=\"modules.php?name=Forums\"STYLE=\"text-decoration: none\">$sitename ]</center>";


?>
Find all posts by KilimView user's profileSend private message
Sfolivier
Nuke Soldier
Nuke Soldier


Joined: Mar 30, 2004
Posts: 15


PostPosted: Mon Mar 29, 2004 11:47 pm Reply with quoteBack to top

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.
Find all posts by SfolivierView user's profileSend private message
Kilim
Lieutenant
Lieutenant


Joined: Jul 01, 2003
Posts: 183


PostPosted: Wed Mar 31, 2004 1:33 pm Reply with quoteBack to top

Any1 else have any idea how to make this block work properly?
Find all posts by KilimView user's profileSend private message
Viper
Lieutenant
Lieutenant


Joined: May 04, 2003
Posts: 282

Location: Louisville, KY USA

PostPosted: Wed Mar 31, 2004 1:48 pm Reply with quoteBack to top

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, Wink

Good luck, and I hope this helps.

Viper

<---Edited--->
oops, Embarassed
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!
Image
Find all posts by ViperView user's profileSend private messageVisit poster's website
Kilim
Lieutenant
Lieutenant


Joined: Jul 01, 2003
Posts: 183


PostPosted: Wed Mar 31, 2004 7:45 pm Reply with quoteBack to top

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.
Find all posts by KilimView user's profileSend private message
Kilim
Lieutenant
Lieutenant


Joined: Jul 01, 2003
Posts: 183


PostPosted: Wed Apr 07, 2004 9:27 pm Reply with quoteBack to top

ANy1 else have any idea why ALL users can see posts in the block even though they are NOT in that usergroup?

_________________
Image
Find all posts by KilimView user's profileSend private message
CodEZ
Nuke Cadet
Nuke Cadet


Joined: Jan 14, 2004
Posts: 5


PostPosted: Mon Apr 19, 2004 9:42 pm Reply with quoteBack to top

ya if someone figures it out... or finds a block that does work... please post it here Smile

edit:

when in doubt... codezwiz

http://www.codezwiz.com/modules.php?name=Downloads&d_op=getit&lid=188#dl
Find all posts by CodEZView user's profileSend private message
Kilim
Lieutenant
Lieutenant


Joined: Jul 01, 2003
Posts: 183


PostPosted: Tue Apr 20, 2004 8:38 pm Reply with quoteBack to top

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)

_________________
Image
Find all posts by KilimView user's profileSend private message
CodEZ
Nuke Cadet
Nuke Cadet


Joined: Jan 14, 2004
Posts: 5


PostPosted: Wed Apr 21, 2004 1:02 am Reply with quoteBack to top

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


Joined: Apr 12, 2004
Posts: 32


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

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.
Find all posts by MadchatthewView user's profileSend private messageVisit poster's website
CodEZ
Nuke Cadet
Nuke Cadet


Joined: Jan 14, 2004
Posts: 5


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

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


Joined: Apr 12, 2004
Posts: 32


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

Cool thanks...I will check that out...somehow I missed the earlier reply...thanks again.
Find all posts by MadchatthewView 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 - TUTTISU E-COMMERCE http://www.tuttisu.it
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.659 Seconds - 166 pages served in past 5 minutes. Nuke Cops Founded by Paul Laudanski (Zhen-Xjell)
:: FI Theme :: PHP-Nuke theme by coldblooded (www.nukemods.com) ::