vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   [SOLVED] update forum and thread counters (https://vborg.vbsupport.ru/showthread.php?t=312925)

omardealo 07-12-2014 09:27 PM

[SOLVED] update forum and thread counters
 
Hello ,

is there easy function for " update forum counters " ?

- update post counts
- update forum
- update threads

i know already those codes on admincp/misc.php , but i ask for "vBulletin function" For quick and easy to use .
if the a function to update Specified forum and Specified thread , that will be great
Thank you !

Lynne 07-12-2014 09:53 PM

They are listed in the Maintenance area of the admincp only. They can be server intensive, so they should only be run by the administrator if needed.

omardealo 07-12-2014 11:38 PM

Quote:

Originally Posted by Lynne (Post 2506543)
They are listed in the Maintenance area of the admincp only. They can be server intensive, so they should only be run by the administrator if needed.

okay i know that already , but i need to update the counters with a plugin i make it , and I'll take care about "server intensive" Of course When using the code .
if the a function to update Specified forum and Specified thread , that will be great .
thnx !

ozzy47 07-12-2014 11:54 PM

Why would you need to do this in a plugin if it already available in maintenance, is this for some sort of auto posting mod?

omardealo 07-13-2014 12:04 AM

Quote:

Originally Posted by ozzy47 (Post 2506549)
Why would you need to do this in a plugin if it already available in maintenance, is this for some sort of auto posting mod?

yes ,
i make a plugin for modrate inside forum To accept or delete the new posts, rather than access to the modcp , so when a accept some posts Do not show the latest post on the thread and section, so it needs to be updated counter every time .

ozzy47 07-13-2014 12:23 AM

Maybe I'm not understanding what it is you are trying to do, why do you need a plugin to moderate from a forum, this is already available by default, the ability to approve/unapproved posts/threads.

omardealo 07-13-2014 12:32 AM

Quote:

Originally Posted by ozzy47 (Post 2506556)
Maybe I'm not understanding what it is you are trying to do, why do you need a plugin to moderate from a forum, this is already available by default, the ability to approve/unapproved posts/threads.

okay , what i do and why i do that it's not a Important Now , Let's focus as what I want , what i need ..
becouse what are you talking about i know it already ...
what i need ?
"vBulletin function" For quick and easy to use for update forum and thread counters .
If possible , i want update counter for Specified forum and Specified thread

ozzy47 07-13-2014 12:38 AM

Quote:

Originally Posted by omardealo (Post 2506557)
okay , what i do and why i do that it's not a Important Now , Let's focus as what I want , what i need ..
becouse what are you talking about i know it already ...
what i need ?
"vBulletin function" For quick and easy to use for update forum and thread counters .
If possible , i want update counter for Specified forum and Specified thread

Yes it is important, to determine exactly what it is you are doing and why you are bypassing default functionality.

But it seems you have a bit of a attitude when people try to understand what it is you are trying to accomplish, so I guess my trying to help in this matter is over.

Maybe someone else will provide you with code for nothing.

Sorry I could not help.

omardealo 07-13-2014 12:49 AM

Quote:

Originally Posted by ozzy47 (Post 2506558)
Yes it is important, to determine exactly what it is you are doing and why you are bypassing default functionality.

But it seems you have a bit of a attitude when people try to understand what it is you are trying to accomplish, so I guess my trying to help in this matter is over.
Maybe someone else will provide you with code for nothing.
Sorry I could not help.

Maybe u are right
but it's not like that , you must know i'm not good in english
and why i do that , This question does not matter .
Otherwise , why someone make "auto posting mod" While there is a button " Add a new thread/post" in the forum ? why we make any mod ? why we use a vBulletin ?
The reason I mentioned at the top already "i make a plugin for modrate inside forum To accept or delete the new posts, rather than access to the modcp"
don't be sorry , As you like if you do not want help
Thanks anyway :up:

Simon Lloyd 07-13-2014 05:01 PM

If you are using dataman in your plugin there should be no need to call the update counters, below is the code that you'd use
PHP Code:

build_forum_counters($forumid);
build_thread_counters($threaddm);
build_forum_counters($threadinfo['forumid']); 



All times are GMT. The time now is 04:07 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.01054 seconds
  • Memory Usage 1,740KB
  • 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_php_printable
  • (5)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
  • (10)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