vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   To show in postbit number of threads a user created (https://vborg.vbsupport.ru/showthread.php?t=221966)

KrisP 08-28-2009 02:01 PM

To show in postbit number of threads a user created
 
I would like to show how many threads a user has created in some subforums - shown in postbit.

Any existing mod can accomplish this?

Lynne 08-28-2009 02:59 PM

Have you tried searching for one yet? search "postbit" in "all mods" "titles only" and you should find one.

KrisP 08-28-2009 03:20 PM

Yes, there is a mod showing number of threads in postbit: https://vborg.vbsupport.ru/showthrea...hlight=threads

but it dosent show for a specific forum, the query

Quote:

$user_theard_query = $db->query_read("SELECT COUNT(threadid) AS total FROM " . TABLE_PREFIX . "thread WHERE postuserid=$threads_posts");

- collects data from thread table, which dosent have forumid - so the query has to be ran against another table. Perhaps someone can help here ?

Lynne 08-28-2009 03:24 PM

Just add to the WHERE part "AND forumid = x"

KrisP 08-28-2009 03:27 PM

Hey, you are right, will try that one, thanks mate!

Gio~Logist 08-28-2009 06:58 PM

Yea, I definitely hope that isn't a query per post though, that would be beyond unnecessary and your server wouldn't appreciate it.

The proper way to do this would be to create a new column in the user table and +1 it when a thread is created.

Lynne 08-28-2009 07:05 PM

Quote:

Originally Posted by Gio~Logist (Post 1875967)
Yea, I definitely hope that isn't a query per post though, that would be beyond unnecessary and your server wouldn't appreciate it.

The proper way to do this would be to create a new column in the user table and +1 it when a thread is created.

Yep, that's what I do. :cool:

Gio~Logist 08-28-2009 07:17 PM

Quote:

Originally Posted by Lynne (Post 1875969)
Yep, that's what I do. :cool:

Thank god, because I don't know who would answer you if you ever had a question :p

Lynne 08-28-2009 07:50 PM

Hehe. Unfortunately, I got no answer to the last help thread I created. :D Or rather, I finally got an answer, but no resolution to the problem. lol (I usually try everything I can think of before asking for help.)


All times are GMT. The time now is 02:29 PM.

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.00959 seconds
  • Memory Usage 1,725KB
  • 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
  • (3)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (9)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
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete