vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   Modification Graveyard (https://vborg.vbsupport.ru/forumdisplay.php?f=224)
-   -   Miscellaneous Hacks - Threads Started by User in Postbit and Profile (https://vborg.vbsupport.ru/showthread.php?t=115136)

Boofo 05-08-2006 10:00 PM

Threads Started by User in Postbit and Profile
 
vB3.5.4 Threads Started by User in Postbit and Profile
Version 1.0.1
(By Andreas, Boofo, Hambil and Paul M.)

What does this product do?
This product counts the threads started by a user and displays it in the postbit and the profile. It will also display the threads per day in the profile. The thread count is automatically updated hourly via cron job. New threads are added to the count in real time. No extra queries are run in the postbit or profile when getting the thread count, only when the cron job runs. This product has been tested on a live board with over 15,000 users and 40,000 threads and ran unnoticeably in the background in 0.3 seconds during the cron job update. This product only counts valid threads (not moderated or soft-deleted threads).

NOTE: This Hack requires at least mySQL 4.0.4

Version Information:
Version 1.0.0 --Initial release
Version 1.0.1 --No longer counts threads in forums that have the "Count Posts Made in this Forum Towards User Post Counts" option set to No. Also made the posts and threads counts in the postbit clickable search links like in the profile.

NOTE: You must redo the postbit template edit to get the clickable links.

Credits:
Thanks goes out to Andreas for the original version of this product. Thanks also goes out to Paul M for coming up with the way to update the thread count without adding a query to every post, and to Hambil for coming up with the way to not count threads in forums where the "Count Posts Made in this Forum Towards User Post Counts" option is set to No. Thanks guys! ;)

Details
---------
1 Product XML (4 Plugins, 2 Phrases)

Atakan KOC 05-09-2006 11:00 AM

Thanks BooFo

Boofo 05-09-2006 11:01 AM

You are very welcome, sir. ;)

Developer 05-09-2006 11:53 AM

I know there was another hack doing the same in member's profile
But this is great ;) realy and nice ideas in coding
thnx, Sir :)

Boofo 05-09-2006 12:14 PM

Quote:

Originally Posted by Developer
I know there was another hack doing the same in member's profile
But this is great ;) realy and nice ideas in coding
thnx, Sir :)

The reason I released this is because the other hack you mentioned adds a query for each post on the page. ;)

I can't take the credit for all of this, Andreas and Paul M. were the reasons it turned out as well as it did. ;)

You might want to click the install button as I plan on adding a few things to this soon. ;)

Developer 05-09-2006 12:19 PM

Yeah ur hack is more powerful ;)
i was plan to click install once i realy instal it when i've time ;)
anyway waiting for the update
*/me clicks INSTALL

Talisman 05-09-2006 12:26 PM

Very nice, Boofo. Thanks for releasing this. ;)

FLMom 05-09-2006 01:29 PM

Thanks Bob! Will be installing this later today!

Boofo 05-09-2006 01:40 PM

You 2 ladies AND Developer are very welcome. ;)

Developer 05-09-2006 02:08 PM

>>>>>><<<<<

Boofo 05-09-2006 02:10 PM

Quote:

Originally Posted by Developer
3 :|

It sure took you long enough to catch that. I'm disappointed. :cross-eyed:

I will change it now. ;)

Stop 05-09-2006 02:13 PM

reserved

Boofo 05-09-2006 02:15 PM

Quote:

Originally Posted by Stop
reserved

For what?

Stop 05-09-2006 02:33 PM

Quote:

Originally Posted by Boofo
For what?

dont know, maybe I wanted to try it first or maybe I wanted to say this when posting at the first post, but I always can't catch it.

But does it work in postbit_legacy ?

The Free Bird 05-09-2006 02:37 PM

Thanks Boofo

Boofo 05-09-2006 02:43 PM

Quote:

Originally Posted by Stop
dont know, maybe I wanted to try it first or maybe I wanted to say this when posting at the first post, but I always can't catch it.

But does it work in postbit_legacy ?

Yes, it works fine in there but as I don't use the posbit_legacy, I didn't include the code for that. But it should be basically the same thing I would think. ;)

You guys might want to click install for this as I am planning on adding some more to it soon. ;)

Stop 05-09-2006 02:50 PM

Here's my posbit_legacy
I can't find the code.

Any idea Sir. ?

xStylezx 05-09-2006 02:53 PM

Very nice,ill be installing this later today

Boofo 05-09-2006 03:00 PM

Quote:

Originally Posted by Stop
Here's my posbit_legacy
I can't find the code.

Well, no wonder you can't find this:

HTML Code:

$vbphrase[posts]: $post[posts]
in there. You have a very heavily modified postbit_legacy template. You need to just add the code where you want it to show then. The code I posted above I got from doing a Show Default for the template. That will tell you where it should be at in an unmodified template. ;)

Stop 05-09-2006 03:31 PM

Thanks Sir. so much for your efforts. I think I'm getting better in my 2nd week installing and dealing with hacks.
Waiting for the next versions.
Here's before and after. :banana:

Boofo 05-09-2006 03:33 PM

The after picture shows the Moderator Statistcs. :surprised:

Stop 05-09-2006 03:36 PM

dumb me, fixed it :D

Boofo 05-09-2006 04:16 PM

Quote:

Originally Posted by Stop
dumb me, fixed it :D

That looks really good! ;)

FLMom 05-09-2006 04:57 PM

Got mine up and running too Boofo, thanks again!

Boofo 05-09-2006 04:59 PM

You're very welcome, young lady. ;)

MagicMouse 05-09-2006 05:38 PM

Thanks it's very usefull.

TTG 05-09-2006 10:11 PM

Thanks Bob .. always knew you'd be useful one day .. https://vborg.vbsupport.ru/external/2006/05/25.gif .. https://vborg.vbsupport.ru/external/2006/05/26.gif

Clicked install

Boofo 05-09-2006 10:18 PM

Don't get too used to it. My usefulness comes in spurts, and not very often at that. ;)

By the way, I like those post icons. Wanna share, buddy? ;)

4number8 05-09-2006 11:38 PM

Nice one Boofo, thanks alot :)

Boofo 05-10-2006 09:34 AM

You're very welcome, sir. ;)

Oblivion Knight 05-10-2006 09:51 AM

Awesome, very nice work guys.. :)

Installed.

Boofo 05-10-2006 10:05 AM

Thank you, sir, Enjoy! ;)

davidw 05-10-2006 12:42 PM

As requested on posting my information, here's an sql error I've received.
Code:

Database error in vBulletin 3.5.4:
 
 Invalid SQL:
 CREATE TEMPORARY TABLE vb_userthreads (userid INT(10) UNSIGNED NOT NULL DEFAULT '0',
 threads INT(10) UNSIGNED NOT NULL DEFAULT '0');
 
 MySQL Error  : Access denied for user 'xxxxx'@'localhost' to database
 'xxxxxxx_xxx_-_xxxxxxx'
 Error Number : 1044
 Date        : Tuesday, May 9th 2006 @ 03:59:20 PM

I'm using PHP 4.3.9 and MySQL 4.1.10a

davidw 05-10-2006 12:46 PM

Fixed it - had to add "create temporary table" privileges/permissions to MySQL - then FLUSH the priviledges/permissions.

Boofo 05-10-2006 01:37 PM

Glad you got it sorted, sir. ;)

I figured it was a permissions thing for MySQL. Nice to be right every now and then. ;)

Snake 05-10-2006 07:05 PM

Awesome! Finally, you have made this hack for the vB v3.5.x series. Thanks a ton Boofo! :)

tormodg 05-13-2006 09:12 AM

Very nice, thank you.

*installs

Boofo 05-13-2006 09:22 AM

Quote:

Originally Posted by The Free Bird
Thanks Boofo

You're welcome and you are going to miss a very important update in the next day or two. ;)

TCattitude 05-13-2006 08:01 PM

A question:
What is the difference of this mod with this one:
https://vborg.vbsupport.ru/showthrea...ght=post+count
...from Andreas. Obviously, without taking care of the point you write about, Boofo, in the post #4 of that thread. Hm?.

Boofo 05-13-2006 10:01 PM

Quote:

Originally Posted by TCattitude
A question:
What is the difference of this mod with this one:
https://vborg.vbsupport.ru/showthrea...ght=post+count
...from Andreas. Obviously, without taking care of the point you write about, Boofo, in the post #4 of that thread. Hm?.

This is just an expansion of that with the added things from the first post here, which now account for moderated and deleted threads.


All times are GMT. The time now is 06:47 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.01475 seconds
  • Memory Usage 1,792KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_code_printable
  • (1)bbcode_html_printable
  • (9)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (40)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete