The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
||||
|
||||
Posting-Counter for special forums
What I need:
I want to show the total count of postings a user has made (already integrated in vb). BUT: I also want to show, how many postings a user has made in - forum 1, 2, 4, 6, 10 and in - forum 3, 5, 7, 8, 9 Is this possible? |
#2
|
||||
|
||||
where do you want to show it?
in getinfo or in every post? |
#3
|
||||
|
||||
In every post.
But if that means to much queries I would be satisfied with getinfo too |
#4
|
||||
|
||||
well in every post would mean at least hacking of a lot of files, or really increasing the ammount of queries, so i'd say we shouldn't do this
for getinfo it's nor problem: open member.php find PHP Code:
PHP Code:
|
#5
|
||||
|
||||
I think some brackets are missing (the IF is not closed). SQL-Error, if I try it like you wrote. If I add some brackets:
Code:
$forumposts = $DB_site->query_first("SELECT SUM(IF(thread.forumid IN (1, 2, 4, 6, 10), 1, 0)) as first, SUM(IF(thread.forumid IN (3, 5, 7, 8, 9), 1, 0)) as second FROM post LEFT JOIN thread USING(threadid)"); 2973 (48935/44152) First number is the whole count, second the $forumposts[first], last the $forumposts[second] Any guesses? |
#6
|
||||
|
||||
That means right now its counting all posts - but it only should count the posts of a specific user.
|
#7
|
||||
|
||||
damn, of course you're right
i had it in my mind, but forgot to write it down also... also damn brackets use this one: PHP Code:
|
#8
|
||||
|
||||
Works!
Great! Big "Thank you" for your quick help! |
#9
|
||||
|
||||
good to hear you're welcome |
Thread Tools | |
Display Modes | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|