Ravens PHP Scripts: Forums
 

 

View next topic
View previous topic
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> Blocks
Author Message
mordain
Regular
Regular


Joined: Jul 08, 2006
Posts: 77

PostPosted: Tue Jul 11, 2006 8:00 am Reply with quote

Hello, all

I'm using this on my site: Only registered users can see links on this board! Get registered or login!.

I want to know If I can make the private admin forums on the site disappear. I also have private member forums, but I want those to stay on. If I need to use the forum ID to do this, how would I find out what it is?
 
View user's profile Send private message
kguske
Site Admin


Joined: Jun 04, 2004
Posts: 6383

PostPosted: Tue Jul 11, 2006 8:42 am Reply with quote

Check your forum permissions in the forum administration. You can see private forums to appear to everyone or to appear only those authorized to view them.

_________________
I google, therefore I exist...
Only registered users can see links on this board! Get registered or login!
 
View user's profile Send private message
mordain
PostPosted: Tue Jul 11, 2006 9:29 am Reply with quote

Whoops I think I might have confused you. This is all involving a recent forums block.
 
kguske
PostPosted: Tue Jul 11, 2006 9:33 am Reply with quote

I'm not sure if that block considers forums permissions, but there are some that do.
 
gregexp
The Mouse Is Extension Of Arm


Joined: Feb 21, 2006
Posts: 1497
Location: In front of a screen....HELP! lol

PostPosted: Tue Jul 11, 2006 7:52 pm Reply with quote

I'm thinking time to make a block that has an admin panel that allows you to pick which forums to display and build off that to get even more into detail.

_________________
For those who stand shall NEVER fall and those who fall shall RISE once more!! 
View user's profile Send private message Send e-mail Visit poster's website AIM Address Yahoo Messenger MSN Messenger ICQ Number
montego
Site Admin


Joined: Aug 29, 2004
Posts: 9449
Location: Arizona

PostPosted: Wed Jul 12, 2006 6:36 am Reply with quote

Actually, I just wish we had a block that would take into consideration what your logged in user can see already in the forums and display those too. I can't see how that would be too difficult to do even in Raven's Collapsing Forums block, but who has the time... unfortunately I am still "swamped".

_________________
Only registered users can see links on this board! Get registered or login!
Only registered users can see links on this board! Get registered or login! 
View user's profile Send private message Visit poster's website
mordain
PostPosted: Fri Jul 14, 2006 4:19 pm Reply with quote

Well then I guess what I'm wondering is does anyone know where I can get a scrolling forums block that takes permissions into consideration?

If not, then would I be able to make certain forums disappear off of it. It seems to me that if I knew the forum id, then I could hid it. Would that work?
 
Guardian2003
Site Admin


Joined: Aug 28, 2003
Posts: 6792
Location: Ha Noi, Viet Nam

PostPosted: Fri Jul 14, 2006 4:42 pm Reply with quote

I presume you tried changing
Code:


if(is_user($user) OR is_admin($admin)) {
   if(is_admin($admin)) {
    $showthese = "(0,1,2,3)";
   } else {
    $showthese = "(0,1)";
   }

to [code]
if(is_user($user) OR is_admin($admin)) {
if(is_admin($admin)) {
$showthese = "(0,1,2,)";
} else {
$showthese = "(0,1)";
}
/code
 
View user's profile Send private message Send e-mail
montego
PostPosted: Fri Jul 14, 2006 5:39 pm Reply with quote

Just bear in mind that nuke permissions do not necessarily translate to phpbb permissions. Private forums may have nothing to do with is_admin() for instance.
 
mordain
PostPosted: Fri Jul 14, 2006 9:07 pm Reply with quote

Guardian2003 wrote:
I presume you tried changing
Code:


if(is_user($user) OR is_admin($admin)) {
   if(is_admin($admin)) {
    $showthese = "(0,1,2,3)";
   } else {
    $showthese = "(0,1)";
   }

to
Code:


if(is_user($user) OR is_admin($admin)) {
   if(is_admin($admin)) {
    $showthese = "(0,1,2,)";
   } else {
    $showthese = "(0,1)";
   }


This killed my site. Everything on the right side disappeared. This block didnt work right anyways, the links were broken, so I switched to another block. It still wont let me post it. It says I'm attacking the site and I'm still having the same problem with permissions.
 
Guardian2003
PostPosted: Fri Jul 14, 2006 9:50 pm Reply with quote

In that case I would try Raven scrolling center block from here, that will allow you to hide specific forums based on the forum id.
 
mordain
PostPosted: Sat Jul 15, 2006 8:14 pm Reply with quote

Ok, then how would I 1) find the forum id and 2) hide them?
 
Guardian2003
PostPosted: Sat Jul 15, 2006 8:42 pm Reply with quote

Hover your mouse pointer over the forum link and it should show something like Only registered users can see links on this board! Get registered or login!
2 is the forum id in that example.

If you look in the code in Ravens block and read the comments, you can see where the forum id's are added. If you add more than one, seperate then with a comma.
 
mordain
PostPosted: Sun Jul 16, 2006 12:19 am Reply with quote

Ok well I am a complete noob at all of this so I'm not sure what to change. I didnt see any comments explaining it in the file. What should I change? (I would insert the code but it always says I'm trying to attack the site when I do.

One other question though. When I click on the link it send me to the bottom of the page that the recent post has been made on. Is there a way to sent me to the top of the page?

Sorry to put you guys through this noob nightmare.
 
Guardian2003
PostPosted: Sun Jul 16, 2006 5:04 am Reply with quote

Right at the start of the code, immediately after all the copyright text you can see this
Code:


global $user_prefix, $db, $sitename, $admin, $user, $bgcolor1, $bgcolor2, $textcolor1, $textcolor2;

$hideLinksFromGuests         = TRUE;
$hideTheseForums           = '-1';  // use a comma delimited list of forum id's to hide like '1,5,8'
$tickerWidth               = '100%';
$tickerBGColor             = "$bgcolor2";
$tickDelay                 = 4000; // in miliseconds
$hideViewReadOnly          = TRUE;
$lastNewTopics             = 25; // Number of topics to show when list is expanded
$countTopics               = 0;
$showClosedNum               = 1; // Number of messages that are visible when collapsed - NOT IMPLEMENTED YET
$showJumpBoxes               = TRUE; // Display or don't display the 2 Jump Boxes
$showTopPosters            = 2;  // 0=None, 1=Username - no avatar,  2=Username and avatar
$showTopPostersRanks       = 3;  // 0=None, 1=Admin only, 2=Moderator only, 3=Admin and Moderator, 4=All
$showTopPostersNum         = 5;  // Total number of top posters to show
$showTopPostersPerRow      = 5;  // Number to show per line
$showTickerMessage         = FALSE; // show/hide the top ticker message
$skipTopPostersUserNames   = "''"; // use a comma separated list with each name in single quotes, like 'user1','user2'. Leace the default as "''" or it will err!
$backendForumsXML          = 'backendforums.php';  //Filename of the xml script.  Assumed in root directory.

The bit we are interested in is the
Code:
$hideTheseForums           = '-1';  // use a comma delimited list of forum id's to hide like '1,5,8'

Lets assume you have three forums you want to hide and these have forums id's of 2, 5 and 9 respectively.
You would change the above variable so it reads
Code:
$hideTheseForums           = '2,5,9';  // use a comma delimited list of forum id's to hide like '1,5,8'
 
mordain
PostPosted: Sun Jul 16, 2006 8:51 am Reply with quote

Well then it looks like I found the problem. The one I got from this site says this after the copyright:

Code:
if (eregi("block-ForumsScroll.php", $_SERVER['PHP_SELF'])) {

    Header("Location: index.php");
    die();


There is never a part that has what you put.
 
Guardian2003
PostPosted: Sun Jul 16, 2006 10:31 am Reply with quote

Try this one Only registered users can see links on this board! Get registered or login!
Its the third one down in the list titled, Collapsing Recent Forums Block 2.3.0
 
mordain
PostPosted: Thu Jul 20, 2006 6:29 pm Reply with quote

Well that never worked but I think I may have found a solution to the problem. I posted it here: Only registered users can see links on this board! Get registered or login!
 
Display posts from previous:       
Post new topic   Reply to topic    Ravens PHP Scripts And Web Hosting Forum Index -> Blocks

View next topic
View previous 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
You can attach files in this forum
You can download files in this forum


Powered by phpBB © 2001-2007 phpBB Group
All times are GMT - 6 Hours
 
Forums ©