gopherhockey
03-09-2003, 05:29 PM
What it does
The idea behind this hack is to take a forum (or forums) and make them statistically invisible to the vb system. Users can still see the forum, read and reply, but activity does not increase post or thread counts for the users or the system itself.
Why?
I can only explain why by giving an example on my own system. In my example, the forum is an NNTP gateway (newsgroup) using the NNTP gateway hack. The forum itself can get anywhere from 0-2000+ posts/threads in a day. Users coming to my system do not wish to see these show up as new posts, new threads etc. I want to treat it as a resource (special) forum - but not let it act like the others by increasing post totals etc.
Lets take this a section at a time
The way vb works, as we all know, is that posts in a forum will trigger various affects. A few of which are:
1. Users post count increases (there is a way around this in the admin cp) No hack needed, just remember to set the forum correctly.
2. Total posts on the entire board go up (as displayed on the top of most unedited vb systems as:
Members: XX, Threads: YY, Posts: ZZ
There are also various scripts & hacks that will show this data on other pages as well, such as vbhome lite which shows it as:
YY new forum threads started
ZZ new forum posts
To not show threads for a specific forum in the total threads for a board, you can open your forum/index.php file and look for:
$countthreads=$DB_site->query_first('SELECT COUNT(*) AS threads FROM thread');
and replace it with:
$countthreads=$DB_site->query_first('SELECT COUNT(*) AS threads FROM thread WHERE forumid!=XX');
(thanks to Tigga for this solution)
This solves YY, but not ZZ (this is why I'm posting here as I don't have a solution for this part)
4. When looking at the list of all forums, you can see the total number of posts and threads for each forum just before the "Last Post" column.
Post Threads
XXX YYY
I don't know how to turn this on or off either. For my purposes, I'd just as well leave this alone - users can at least see that there are new posts or threads in this resource forum somewhere - might as well be here. For the purposes of this hack, however, it might be nice to know how to turn this on or off.
5. When a user arrives and sees that there are new posts or threads, often times they click on "view new posts" to see a list of what has been posted lately.
Problem here is that they might see hundreds of new posts from this resource forum. I want to exclude this forum from view new posts, so here is how:
(thanks to logician for this answer)
in search.php, find:
$wheresql.=" AND thread.open<>10";
and replace it with:
$wheresql.=" AND thread.open<>10 AND thread.forumid!=X";
where X is your forum id.
There are 2 insances of this to find. (one for members, one for guests)
To exclude more than one forum, simply edit the line to look like this:
$wheresql.=" AND thread.open<>10 AND thread.forumid!=01 AND thread.forumid!=02";
Excluding the forum from the search function:
To keep this resource forum from showing up when a user does a search, you can edit the forum permissions for all user groups and select "no" for the "can search" setting. This requires custom settings for this forum for all groups that you do not wish to search this forum. This is not a hack but a built-in function of vb.
So where are we now?
What have we accomplished thus far is:
1. Our forum won't show new threads to the user
3. Our forum won't increase the users post count in this forum.
3. Our forum won't add to the thread count (display) to the user.
4. Our forum won't show up when a user clicks to view new posts since they last visited.
5. Our forum won't show up when a user does a search
What I haven't been able to do?
Anything related to the post count. Post counts still increase. A user will still see hundreds or thousands of new posts since they last visited. The problem is, with all the edits above they are confused when they see XX posts since they last visited, click on view new posts since last online and get the "sorry, there are no new posts since you last visited" message.
Can anyone provide this missing link?
If so, I *think* I could post this as a semi-hack for those that wish to have this functionality.
(note: I have posted this question elsewhere on this system with no luck, so I'm trying it this way and apologize for the multiple requests)
Thanks for your time...
The idea behind this hack is to take a forum (or forums) and make them statistically invisible to the vb system. Users can still see the forum, read and reply, but activity does not increase post or thread counts for the users or the system itself.
Why?
I can only explain why by giving an example on my own system. In my example, the forum is an NNTP gateway (newsgroup) using the NNTP gateway hack. The forum itself can get anywhere from 0-2000+ posts/threads in a day. Users coming to my system do not wish to see these show up as new posts, new threads etc. I want to treat it as a resource (special) forum - but not let it act like the others by increasing post totals etc.
Lets take this a section at a time
The way vb works, as we all know, is that posts in a forum will trigger various affects. A few of which are:
1. Users post count increases (there is a way around this in the admin cp) No hack needed, just remember to set the forum correctly.
2. Total posts on the entire board go up (as displayed on the top of most unedited vb systems as:
Members: XX, Threads: YY, Posts: ZZ
There are also various scripts & hacks that will show this data on other pages as well, such as vbhome lite which shows it as:
YY new forum threads started
ZZ new forum posts
To not show threads for a specific forum in the total threads for a board, you can open your forum/index.php file and look for:
$countthreads=$DB_site->query_first('SELECT COUNT(*) AS threads FROM thread');
and replace it with:
$countthreads=$DB_site->query_first('SELECT COUNT(*) AS threads FROM thread WHERE forumid!=XX');
(thanks to Tigga for this solution)
This solves YY, but not ZZ (this is why I'm posting here as I don't have a solution for this part)
4. When looking at the list of all forums, you can see the total number of posts and threads for each forum just before the "Last Post" column.
Post Threads
XXX YYY
I don't know how to turn this on or off either. For my purposes, I'd just as well leave this alone - users can at least see that there are new posts or threads in this resource forum somewhere - might as well be here. For the purposes of this hack, however, it might be nice to know how to turn this on or off.
5. When a user arrives and sees that there are new posts or threads, often times they click on "view new posts" to see a list of what has been posted lately.
Problem here is that they might see hundreds of new posts from this resource forum. I want to exclude this forum from view new posts, so here is how:
(thanks to logician for this answer)
in search.php, find:
$wheresql.=" AND thread.open<>10";
and replace it with:
$wheresql.=" AND thread.open<>10 AND thread.forumid!=X";
where X is your forum id.
There are 2 insances of this to find. (one for members, one for guests)
To exclude more than one forum, simply edit the line to look like this:
$wheresql.=" AND thread.open<>10 AND thread.forumid!=01 AND thread.forumid!=02";
Excluding the forum from the search function:
To keep this resource forum from showing up when a user does a search, you can edit the forum permissions for all user groups and select "no" for the "can search" setting. This requires custom settings for this forum for all groups that you do not wish to search this forum. This is not a hack but a built-in function of vb.
So where are we now?
What have we accomplished thus far is:
1. Our forum won't show new threads to the user
3. Our forum won't increase the users post count in this forum.
3. Our forum won't add to the thread count (display) to the user.
4. Our forum won't show up when a user clicks to view new posts since they last visited.
5. Our forum won't show up when a user does a search
What I haven't been able to do?
Anything related to the post count. Post counts still increase. A user will still see hundreds or thousands of new posts since they last visited. The problem is, with all the edits above they are confused when they see XX posts since they last visited, click on view new posts since last online and get the "sorry, there are no new posts since you last visited" message.
Can anyone provide this missing link?
If so, I *think* I could post this as a semi-hack for those that wish to have this functionality.
(note: I have posted this question elsewhere on this system with no luck, so I'm trying it this way and apologize for the multiple requests)
Thanks for your time...