The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
Changing $getnewpost and $getnewthread variable (exclude forums)
Hi all,
I want to change the following code in index.php: $getnewthread=$DB_site->query_first("SELECT COUNT(*) AS threads FROM thread WHERE lastpost > '$bbuserinfo[lastvisit]'"); $getnewpost=$DB_site->query_first("SELECT count(*) AS posts FROM post WHERE dateline > '$bbuserinfo[lastvisit]'"); I want to exclude two forums from these queries, how? Thank you! |
#2
|
|||
|
|||
Add this to the query:
[sql] ...AND forumid != forumid1AND forumid != forumid2 [/sql] |
#3
|
|||
|
|||
Quote:
Can you please be more specific? Must I add this to the query: AND forumid != forumid1 AND forumid != forumid2 Where 1 and 2 must be the forumid's wich are going to be excluded? Where in the query must I add this? $getnewthread=$DB_site->query_first("SELECT COUNT(*) AS threads FROM thread WHERE lastpost > '$bbuserinfo[lastvisit]'"); Thank you! |
#4
|
|||
|
|||
Can someone please answer my question since I'm puzzled how to do this.
|
#5
|
||||
|
||||
Yes, the forumid 1/2 are the forumid's that you don't want to be included, and your queries would look like this:
$getnewthread=$DB_site->query_first("SELECT COUNT(*) AS threads FROM thread WHERE lastpost > '$bbuserinfo[lastvisit] AND forumid!=forumid1 AND forumid!=forumid2 '"); $getnewpost=$DB_site->query_first("SELECT count(*) AS posts FROM post WHERE dateline > '$bbuserinfo[lastvisit] AND forumid!=forumid1 AND forumid!=forumid2 '"); |
#6
|
|||
|
|||
Quote:
Thanks a lot! Too bad none of the other members feeled the need to answer this question. |
#7
|
||||
|
||||
I don't find that in the 2.2.9 index.php. Is that an addon?
|
#8
|
|||
|
|||
Quote:
Anyways, I thought it did work but it stildoes the same as before so this isn't the way to go... |
#9
|
||||
|
||||
I think you want to do it in the search.php, anyway. This is for "Todays Active Threads".
Find: PHP Code:
PHP Code:
PHP Code:
|
#10
|
|||
|
|||
Quote:
I allready fixed this in search.php where I excluded three forums from the search and that's why I need to remove these three forums also from this query. When people click on new posts they get less new posts to see because new threads and new posts on index.php still include the three forums excluded from search.php I hope someone can come up with the solution for this. |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|