PDA

View Full Version : Private forum post title showing in user search


mauisun
09-13-2003, 01:52 PM
I have a private forum that is locked but viewable on the main board. when a member who has not been given access to it tries to enter it they just get the usual screen with no posts. but if looking at the main board you can see the name of the last poster in that forum, if yo click on their name it brings up their user info, and in the "last post" column it gives the title of the thread they posted to in the private forum. sure, if you try to follow the thread it does not let you, but it does show the title of the thread itself, that is what I want to get rid of.
IO have fully private administrative forums that registered members can't even see, so they can't see recent posts in there either, but this thing about having a locked forum that members can't get inot, but they have a way to see at least the title of the posts in that forum bother me.
Is there some way, short of making the forum compltely unseen, to get rid of the title of the thread last posted to in that forum? I have tried to figure this out a few times over the last few years but still have no real answer for it. i would appreciate any help at all that I can get with this issue. I am running 2.3.0 and have staff members and registered members for the most part so pretty straight forward.
......mauisun

Logician
09-14-2003, 11:25 AM
If you deny access to the forum for certain usergroups, they won't see the last thread info either. I guess you are aware of that?

mauisun
09-14-2003, 01:10 PM
thanks for taking the time to answer Logician. I can easily turn off "view forum" so they can't see posts in members threads in last post by, but unfortunately that also makes the entire forum disappear. i want people to be qable to see the name of the forum in my forums lineup. just not access it until permissions are set to allow them to access it. which is fine, and how it works right now. but, if you look to the right of the forum you will see the "last post by" and who posted in that forum last. if you click on that persons name it shows their posts titles. yes you can't follow the post into a closed forum but you can still see the title of the post itself which is the problem.
you can't see this posts title in the view new posts drop down link, just if you follow the last post by link and check their recent posts.
the problem I have with this is I have a couple of forums that are adult in nature and the title of some of the threads are, basically, adult in nature and language.
I tried a hack on here that is supposed to set last post by to never if a certain group is viewing the forums, but unfortunately it sets it to never for every single forum not just the one I want to stop the last post by listing for.
any thoughts on how to either get rid of the "last post by" name listed for the particular forum, or a set of forums? or how to keep folks from clicking on the last post by name and seeing the title of their posted thread in that forum?
my chief problem here is the groups I want to deny the ability to follow the last post by thread title is the entire registered group. thanks for taking the tiem to look at this. obviously it is a security issue with the board software since the actual post title is not in the view new posts list itself. just the actual members info where it shows their most recent posts.
.......mauisun

Logician
09-14-2003, 07:11 PM
Edit index.php, find:


if ($forum['lastpost']>0) {
$forum['lastpostdate']=vbdate($dateformat,$forum['lastpost']);
$forum['lastposttime']=vbdate($timeformat,$forum['lastpost']);
eval("\$forum['lastpostinfo'] = \"".gettemplate('forumhome_lastpostby')."\";");
} else {
$forum['lastpostinfo']='Never';
}


After that add:

if (($bbuserinfo[usergroupid]=='2' OR $bbuserinfo[usergroupid]=='1') AND ($forum['forumid']==X))
{
$forum['lastpostinfo']='No Peaking';
}

Replace X with your forumid. This hack will make last post disappear if user is from usergroup 2 (registered users) or 1 (guests).

corsacrazy
09-14-2003, 07:44 PM
i will try this aswell perfect mod there sorry 4stealing your thread , thanks

bur how would i make this applicable to 2 usergroups ? ie admin and my other group ?

Logician
09-14-2003, 07:48 PM
i will try this aswell perfect mod there sorry 4stealing your thread , thanks


bur how would i make this applicable to 2 usergroups ? ie admin and my other group ?
This already applies to 2 usergroups: Guests and registered members.

Why would you want the thread title be invisible to the admins?

corsacrazy
09-14-2003, 07:55 PM
This already applies to 2 usergroups: Guests and registered members.

Why would you want the thread title be invisible to the admins?
i was lookin at it backwards sorry i only wanted it visable to admins and the other group but this does that as you hav said

Logician
09-14-2003, 08:09 PM
i was lookin at it backwards sorry i only wanted it visable to admins and the other group but this does that as you hav said

if (($bbuserinfo[usergroupid]!='6' AND $bbuserinfo[usergroupid]!='Y') AND ($forum['forumid']==X))
{
$forum['lastpostinfo']='No Peaking';
}

Replace Y with your other usergroup's id and X with the forum..

mauisun
09-14-2003, 08:11 PM
works like a charm for me too bro. I have 12 forums to add to the list. I also have 7 user groups. can you tell me what numbers are for each user group or where I can find that info in the control panel? is 0 the user group for admins and mods, the 1 for guest and 2 for registered? 3,4,5 etc would be for the next ser groups down the line?. also, one las tthing. to add more then one forum do I add

($forum['forumid']==X) a space over from the current one but withing the ending ) to look like what I made below?
I think would probably be what would cover multiple forums. just need to know what my user groups are I guess.
I, for oone, definitely appreciate your help on this code, thanks bro
.....mauisun

if (($bbuserinfo[usergroupid]=='2' OR $bbuserinfo[usergroupid]=='1') AND ($forum['forumid']==X) AND ($forum['forumid']==X))
{
$forum['lastpostinfo']='No Peaking';
}

corsacrazy
09-14-2003, 08:15 PM
if (($bbuserinfo[usergroupid]!='6' AND $bbuserinfo[usergroupid]!='Y') AND ($forum['forumid']==X))
{
$forum['lastpostinfo']='No Peaking';
}

Replace Y with your other usergroup's id and X with the forum..
your the man

Logician
09-14-2003, 08:21 PM
works like a charm for me too bro. I have 12 forums to add to the list. I also have 7 user groups. can you tell me what numbers are for each user group or where I can find that info in the control panel? is 0 the user group for admins and mods, the 1 for guest and 2 for registered? 3,4,5 etc would be for the next ser groups down the line?. also, one las tthing. to add more then one forum do I add

($forum['forumid']==X) a space over from the current one but withing the ending ) to look like what I made below?
I think would probably be what would cover multiple forums. just need to know what my user groups are I guess.
I, for oone, definitely appreciate your help on this code, thanks bro
.....mauisun

if (($bbuserinfo[usergroupid]=='2' OR $bbuserinfo[usergroupid]=='1') AND ($forum['forumid']==X) AND ($forum['forumid']==X))
{
$forum['lastpostinfo']='No Peaking';
}

1- To learn usergroupids, right click the usergroup name in usergroup lists and choose to "open in new browser window". Then in the new window check address bar and you'll see the usergroup id for that usergroup

2- try this code:

$banforumids=array('X','Y','Z');
$banusergroupids=array('A','B','C');
if ( in_array($bbuserinfo[usergroupid],$banusergroupids) AND in_array($forum['forumid'],$banforumids) )
{
$forum['lastpostinfo']='No Peaking';
}

mauisun
09-14-2003, 10:36 PM
the new one works like a charm. only twitch I am getting is sub forums. I have forum number 9 and in it is 3 subforums. posting is shut off to these sub forums. in those subforums I have 5 forums each. forum 1 in each of the 3 subforums has to be turned off as in no peaking. if I make the main forum9 no peaking it works fine. but if I go to forum39 which is subforum1, forum1, and try to turn it off it is still there. I know this is a bit convoluted but it works great on my board. but can't get no peaking to work in this subforum. any ideas? thanks
....mauisun

Logician
09-15-2003, 08:12 AM
I am not sure I understand what you mean but if you enter all your forumids that you mentioned above to the $banforumids line, the problem should be solved.