Hi, can it really be right that it is not possible to hide topics/posts in the search function, if a forum is hidden or private forum ?
I only found this about it:
http://forums.webwiz.net/forum_posts.asp?TID=18945&KWplease help...
Also I found this in a readme file from a old mod (version 7 I think, not sure who did it):
I've seen quite a few people mentioning the fact that you see all topics in the active topics page, even those in forums you may not access. Personally I found that a greater problem then some speed loss with an extra permission check. So I made a little mod One requirement for this to work correctly is that you must set the permissions for all groups. Only grouppermissions will be looked at. Not at userpermissions or passworded forums. This was to make the performance impact not to big
Installing: just copy active_topics.asp and search.asp in your forum directory, or apply the changes if you have already modified versions of those files.
The following changes are made in active_topics.asp:
On line 261 add the following after directly topic , " & strDbTable & "Permissions " Insert after line 262 the following line: strSQL = strSQL & "AND (" & strDbTable & "Forum.Forum_ID = " & strDbTable & "Permissions.Forum_ID AND " & strDbTable & "Permissions.Group_ID = " & intGroupID & " AND " & strDbTable & "Permissions.[Read] = TRUE )"
Sorry for the SQL users but this is Access only.
And the same mod for search.asp
On line 196 add between topic and WHERE , " & strDbTable & "Permissions On line 224 add directly after topic , " & strDbTable & "Permissions " On line 264 add directly after thread.topic_ID , " & strDbTable & "Permissions " Insert at line 272 the following line: strSQLResultsQuery = strSQLResultsQuery & "AND (" & strDbTable & "Topic.Forum_ID = " & strDbTable & "Permissions.Forum_ID AND " & strDbTable & "Permissions.Group_ID = " & intGroupID & " AND " & strDbTable & "Permissions.[Read] = TRUE )"
This one might actually alos work for SQL since this query hasn't got a stored procedure version afaik.
|