MyBB Community Forums

Full Version: Topics started under avatar?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
I am looking for something that will allow the "topics started" to be listed with "posts" when viewing a post made by someone.
My old phpbb2 forum had this when i added it as a mod.

Most of my trend posters are asking for this again to keep their work on the board separate to show what they have done.
I know its in their profile Find All Threads, but its best for me if its also displayed under the avatars with the other info as well for all to see.

Here is a pic of what i am talking about and where i would like to to be listed, under the "posts" count thats already their.
[Image: 8bthypu.jpg]

If anyone can help, that would be great.

Thanks in advance Smile
Hmm, I thought it would make more sense next to the "Find" button at the bottom of each post, nonetheless:

AdminCP -> Templates -> <select templateset> -> Expand -> Post Bit Templates -> postbit_author_user

Under:
{$lang->postbit_posts} {$post['postnum']}<br />
Add the following line:
<a href="{$mybb->settings['bburl']}/search.php?action=finduserthreads&uid={$post['uid']}">Find threads by this user</a><br />
Then save the template.
Thats great, and works well.

But what i wanted was not a "Find threads by this user" link.
I only want a "Topics" count .. just like the post count already their.

So it would be,
Posts: 1,215
Topics: 147
Group: Administrators
Joined: Nov 2007
Status: Online
Reputation: 4

This is a quick way to see their topic count just like their post count.
We have a lot of members that take pride on their number of topics started.
They like to show the number off just like their post number count.

Thanks again for this help. I hope you can help me again ZiNga Big Grin
Having a topic count is a little more tricky.

You'll have to perform a number of code edits:
1) Add a column to your users table, call it something like topiccount
2) Modify the /inc/datahandlers/post.php file so that it increments the topic count every time a thread is made
3) Modify the /inc/class_moderation.php file so that it decrements the topic count every time the thread is deleted
4) Run the query:
UPDATE mybb_users u SET topiccount = (SELECT COUNT(*) FROM mybb_threads t WHERE u.uid=t.uid)
5) Modify the postbit_author_user template to show the thread count

I may make a plugin for this if I have the time...
ok, thanks a million m8 for your time on this.
I can not do that, so i will wait until you have the time to maybe do it later.

I will check back later in this trend just in case.

Cheers Smile
I do not mean to bother you m8, but would this be possible as well to add with it?

Include a "Topics Started" column in with the members list?
Here is a pic where it would be incerted.
http://img198.imagevenue.com/img.php?ima...22_2lo.JPG

This makes it nice and easy for staff to see whats peeps have done on the board without having to view their profiles all the time.

Just a idea, but i had this on my phpbb2 board and used it a lot.

Thanks again
Sent you a PM ZiNga BuRgA,

Thanks again
Sorry, forgot about this thread.
Okay, try this:



Requires a code edit:
In /inc/class_moderation.php, FIND:
	function delete_thread($tid)
	{
		global $db, $cache, $plugins;
REPLACE WITH
	function delete_thread($tid)
	{
		global $db, $cache, $plugins, $thread;

After activating, you should probably do a recount of user's threads.
Wow, thats just fantastic. I really want to thank you for this.

I added it and can see it working, but i can not get it to update the "Recount User Thread Counts" in the admin cp.

This is the error i get.

MySQL error: 1164
The used table type doesn't support AUTO_INCREMENT columns
Query: CREATE TABLE mybb_plaza_temp (`uid` int(10) unsigned auto_increment,`numtopics` int(10) unsigned, PRIMARY KEY (uid)) TYPE=HEAP;

If we can fix this, we are off to the races [Image: 6shcunt.gif]
Hmm, I presume you have an older version of MySQL?

See if this works:
Pages: 1 2