Thread Rating:
  • 2 Vote(s) - 3 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[For 1.6] Thread Count Pro
#1
Description

This plugins shows a thread count in the member page and in the post bit.

Unlike others plugins, this one saves the thread count on the users table. This method has a few advantages:
  • You can show the thread count in any place you want (even on externals applications)
  • It dosn't require extra database querys to count the threads made by each user (Using others plugins, showing a thread with 10 posts would make 10 extra querys <<-- Total waste of resources).

The only extra query this plugin make is when a new thread is created/deleted.

To developers

Because it's a field in the users table, you can access the field value like the normal post count:
  • $mybb->user['threadnum'] - Always. Shows the logged user thread count.
  • $memprofile['threadnum'] - On the profile page. Tt's the count belogning to the user profile
  • $post['threadnum'] - On the showthread. It's the count belogning to the current post author

Release Data

Download @ MyBB Mods Site
Last version: 1.1 - 01/04/2011 (DD/MM/YYYY)

Installation

Upload the contents inside the "Upload" folder to your MyBB root installation.
Go to "ACP -> Configuration -> Plugins" and Install the plugin
Go to "ACP -> Tools & Maintenance -> Recount & Rebuild" and rebuild the threads count (Option: Recount User Threads Count)

Enjoy.

Updating

Upload the new files. You don't even need to deactivate it Smile

Templates Changes

Quote:This plugin makes 2 templates changes automatically. If it didn't work on your theme, you can modify them manually:

=== member_profile ===

Find:
Quote:<tr>
<td class="trow1"><strong>{$lang->total_posts}</strong></td>
<td class="trow1">{$memprofile['postnum']} ({$lang->ppd_percent_total})<br /><span class="smalltext">(<a href="search.php?action=finduserthreads&amp;uid={$uid}">{$lang->find_threads}</a> &mdash; <a href="search.php?action=finduser&amp;uid={$uid}">{$lang->find_posts}</a>)</span></td>
</tr>

Replace with:
Quote:<tr>
<td class="trow1"><strong>{$lang->total_posts}</strong></td>
<td class="trow1">{$memprofile['postnum']} ({$lang->ppd_percent_total})<br /><span class="smalltext">(<a href="search.php?action=finduser&amp;uid={$uid}">{$lang->find_posts}</a>)</span></td>
</tr>
<!-- CountThreads -->
<tr>
<td class="trow1"><strong>{$lang->total_threads}</strong></td>
<td class="trow1">{$memprofile[\'threadnum\']} ({$lang->threads_statistics})<br /><span class="smalltext">(<a href="search.php?action=finduserthreads&amp;uid={$uid}">{$lang->find_threads}</a>)</span></td>
</tr>
<!-- /CountThreads -->

=== postbit_author_user ===

Find:
Quote:{$lang->postbit_posts} {$post['postnum']}<br />

Replace with:
Quote:{$lang->postbit_posts} {$post['postnum']}<br /><!-- CountThreads -->{$lang->postbit_threads} {$post['threadnum']}<br /><!-- /CountThreads -->

Documentation

There is no documentation. If you need any help, post here and I will do my best to help you.
Reply
#2
Sweet plugin, honestly might be more useful for developers than users ;P

Much appreciated! +rep Big Grin
My Plugins: [1.8]|[1.6]

** Selling custom plugin that enables Bitcoin payments. PM me if interested in purchasing! **
Reply
#3
You say it makes 3 template changes, but only listed 2?
Reply
#4
(02-16-2011, 09:52 PM)FooFighter Wrote: You say it makes 3 template changes, but only listed 2?

Oh, yes..
The plugin makes 2 changes in member_profile:
  • It adds the thread count and
  • it deletes the "Search Threads" link from the Post count

In this thread, both changes are together. Just a typo. "Fixed".
Reply
#5
Ok, I may use this, just a quick question...is there a way to integrate a "Thread Rating" like we have our default "Post Rating" with the posting titles?

And also how about a rating that averages your posts and threads together, so it would be (average# = post#/thread#)

So in our post bits and profile pages we could have 3 separate ranks/titles...

Post rank/title (this, all our forums have)
Thread rank/title
Average rank/title

Is this possible?



Also, I meanour rank/titles...not the "rank this post type rank" but our actual post bit and profile ranks/titles.
Reply
#6
(02-17-2011, 12:07 AM)FooFighter Wrote: Ok, I may use this, just a quick question...is there a way to integrate a "Thread Rating" like we have our default "Post Rating" with the posting titles?

And also how about a rating that averages your posts and threads together, so it would be (average# = post#/thread#)

So in our post bits and profile pages we could have 3 separate ranks/titles...

Post rank/title (this, all our forums have)
Thread rank/title
Average rank/title

Is this possible?



Also, I meanour rank/titles...not the "rank this post type rank" but our actual post bit and profile ranks/titles.

I didn't fully understand your first question.
Do you want to add the thread count (plus the average) to the postbit?
If yes, this plugins already adds the threadcoun by default.

I could add an average thread/posts. I'll think about it Smile
Reply
#7
It only starts counting as soon as you install the plugin, is there a way to get the threads posted before installation.
Thanks,
Matt
[Image: signaturelike.png]
Reply
#8
(02-17-2011, 12:48 AM)Matt G Wrote: It only starts counting as soon as you install the plugin, is there a way to get the threads posted before installation.

See the installation instructions: Smile
Me Wrote:Installation

Upload the contents inside the "Upload" folder to your MyBB root installation.
Go to "ACP -> Configuration -> Plugins" and Install the plugin
Go to "ACP -> Tools & Maintenance -> Recount & Rebuild" and rebuild the threads count (Option: Recount User Threads Count)
Reply
#9
(02-17-2011, 12:51 AM)Aquilez Wrote:
(02-17-2011, 12:48 AM)Matt G Wrote: It only starts counting as soon as you install the plugin, is there a way to get the threads posted before installation.

See the installation instructions: Smile
Me Wrote:Installation

Upload the contents inside the "Upload" folder to your MyBB root installation.
Go to "ACP -> Configuration -> Plugins" and Install the plugin
Go to "ACP -> Tools & Maintenance -> Recount & Rebuild" and rebuild the threads count (Option: Recount User Threads Count)

Okay, sorry had not seen that. Thanks though.
Thanks,
Matt
[Image: signaturelike.png]
Reply
#10
(02-17-2011, 12:52 AM)Matt G Wrote:
(02-17-2011, 12:51 AM)Aquilez Wrote:
(02-17-2011, 12:48 AM)Matt G Wrote: It only starts counting as soon as you install the plugin, is there a way to get the threads posted before installation.

See the installation instructions: Smile
Me Wrote:Installation

Upload the contents inside the "Upload" folder to your MyBB root installation.
Go to "ACP -> Configuration -> Plugins" and Install the plugin
Go to "ACP -> Tools & Maintenance -> Recount & Rebuild" and rebuild the threads count (Option: Recount User Threads Count)

Okay, sorry had not seen that. Thanks though.

No problem Smile
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)