Author |
Message |
mordain
Regular


Joined: Jul 08, 2006
Posts: 77
|
Posted:
Tue Jul 11, 2006 8:00 am |
|
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? |
|
|
|
 |
kguske
Site Admin

Joined: Jun 04, 2004
Posts: 6437
|
Posted:
Tue Jul 11, 2006 8:42 am |
|
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 search, therefore I exist...
Only registered users can see links on this board! Get registered or login! |
|
|
 |
mordain

|
Posted:
Tue Jul 11, 2006 9:29 am |
|
Whoops I think I might have confused you. This is all involving a recent forums block. |
|
|
|
 |
kguske

|
Posted:
Tue Jul 11, 2006 9:33 am |
|
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
|
Posted:
Tue Jul 11, 2006 7:52 pm |
|
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!! |
|
 |
 |
montego
Site Admin

Joined: Aug 29, 2004
Posts: 9457
Location: Arizona
|
Posted:
Wed Jul 12, 2006 6:36 am |
|
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! |
|
|
 |
mordain

|
Posted:
Fri Jul 14, 2006 4:19 pm |
|
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: 6799
Location: Ha Noi, Viet Nam
|
Posted:
Fri Jul 14, 2006 4:42 pm |
|
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 |
|
|
|
 |
montego

|
Posted:
Fri Jul 14, 2006 5:39 pm |
|
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

|
Posted:
Fri Jul 14, 2006 9:07 pm |
|
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

|
Posted:
Fri Jul 14, 2006 9:50 pm |
|
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

|
Posted:
Sat Jul 15, 2006 8:14 pm |
|
Ok, then how would I 1) find the forum id and 2) hide them? |
|
|
|
 |
Guardian2003

|
Posted:
Sat Jul 15, 2006 8:42 pm |
|
Hover your mouse pointer over the forum link and it should show something like
www.yoursite.com/whatever...&viewforum=2
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

|
Posted:
Sun Jul 16, 2006 12:19 am |
|
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

|
Posted:
Sun Jul 16, 2006 5:04 am |
|
Right at the start of the code, immediately after all the copyright text you can see thisCode:
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

|
Posted:
Sun Jul 16, 2006 8:51 am |
|
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

|
Posted:
Sun Jul 16, 2006 10:31 am |
|
|
|
 |
mordain

|
Posted:
Thu Jul 20, 2006 6:29 pm |
|
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! |
|
|
|
 |
|