MyBB Community Forums

Full Version: Forum Team (Post count colem)
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
I was trying to add a collem for posts count on the Forum Team page.
[Image: th_27918_73453_122_585lo.JPG]
No luck getting it working. Can someone please help me with this?

Thanks Smile
Well, I can tell you how to add the column, but I can't figure out how to get the post count in there. Anyway, you'll need to change two templates. Both are in Show Forum Team Templates -> Expand

Edit first Showteam Usergroup template and change the colspan from 3 to 4. Then find
<td class="tcat"><span class="smalltext"><strong>{$lang->pm}</strong></span></td>
add below it:

<td class="tcat"><span class="smalltext"><strong>Posts</strong></span></td>

Then open Showteam Usergroup User template. Change the 80% to 70% and then find:

<td width="10%" class="{$bgcolor}">{$pmcode}</td>
add below it:
<td width="10%" class="{$bgcolor}"></td>

The variable to show post count would need to go between the td tags, but no matter what I tried I couldn't get it. You would think that {$user['postnum']} would be the obvious choice, but that didn't work. Hopefully one of these other mybb gurus will have that answer.
postnum aint 'selected' in the query; that's why it aint showing up. but the usage is correct =P

Open showteam.php
Find
$query = $db->simple_select(TABLE_PREFIX."users", "uid, username, displaygroup, usergroup, ignorelist, hideemail, receivepms", "displaygroup IN ($groups_in) OR (displaygroup='0' AND usergroup IN ($groups_in)) OR uid IN ($users_in)", array('order_by' => 'username'));

Change into
$query = $db->simple_select(TABLE_PREFIX."users", "uid, username, postnum, displaygroup, usergroup, ignorelist, hideemail, receivepms", "displaygroup IN ($groups_in) OR (displaygroup='0' AND usergroup IN ($groups_in)) OR uid IN ($users_in)", array('order_by' => 'username'));
ok, thanks to both of you for your help.
I will try this tonight and let you know how i made out.
Everything looks ok, except the post counts are still not showing.
I added you code LeX and also did a complete "Recount & Rebuild" in the acp

Am i missing something?
that last bit of code I had you add would look like the following:

<td width="10%" class="{$bgcolor}">{$user['postnum']}</td>

Maybe that will work. Please let us know.

edit: I edited to take out incorrect code.
Thanks judel, but still no luck. Maybe its something i am doing?

Thanks Smile
Yes, it's something you're doing wrong. I just applied Lex's change to showteam.php and the post count shows in my forum team page. Go back through our instructions and make sure you followed them all. To avoid any confusion, this is what your showteam_usergroup_user template should look like:

<tr>
<td width="70%" class="{$bgcolor}"><a href="member.php?action=profile&amp;uid={$user['uid']}"><strong>{$user['username']}</strong></a></td>
<td width="10%" class="{$bgcolor}">{$emailcode}</td>
<td width="10%" class="{$bgcolor}">{$pmcode}</td>
<td width="10%" class="{$bgcolor}">{$user['postnum']}</td>
</tr>

Also, I notice you said that you added Lex's code. You don't add it, you replace the old query with the new one.
ok, they are all working now except the "Moderators"
It is not working still, no collem.. so stats.. nothing!

I may still have to edit the below templates?
showteam_moderators
showteam_moderators_forum
showteam_moderators_mod


See it here
http://www.et-buzz.com/community/showteam.php

Sorry about the bad choice of words i used, but yes.. i did replace lex's code.. not add.

We are just about their, this is great Smile

Thanks
Dang, you sure do have a lot of forum staff. I don't have moderators in my staff, so I didn't include them. Yes, you would need to edit those templates. In showteam_moderators, look for

<td class="tcat"><span class="smalltext"><strong>{$lang->mod_pm}</strong></span></td>
add below
<td class="tcat"><span class="smalltext"><strong>Posts</strong></span></td>
In showteam_moderators_mod template, change the 30% to 20% and then look for:
<td width="10%" class="trow1">{$pmcode}</td>
add below
<td width="10%" class="trow2">{$user['postnum']}</td>
That should do it. Let me know.
Awesome!! Worked perfect.

Thanks so much, you guys have help make etbuzz a super board.
Pages: 1 2