View Full Version : [SOLVED] update forum and thread counters
omardealo
07-12-2014, 09:27 PM
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
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
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
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
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
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
build_forum_counters($forumid);
build_thread_counters($threaddm);
build_forum_counters($threadinfo['forumid']);
omardealo
07-13-2014, 06:49 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
build_forum_counters($forumid);
build_thread_counters($threaddm);
build_forum_counters($threadinfo['forumid']);
thnx for your help , it's working .. but This file must be called functions_databuild.php
require_once(DIR . '/includes/functions_databuild.php');
build_forum_counters($forumid);
build_thread_counters($threaddm);
build_forum_counters($threadinfo['forumid']);
this code not update all counters , number of posts of threads not update on forumdisplay ?
Thank you all :up:
Simon Lloyd , ozzy47 , Lynne
--------------- Added 1405282445 at 1405282445 ---------------
okay i found it , for update number of posts and thread info
build_thread_counters($threadid);
Simon Lloyd
07-13-2014, 07:20 PM
As mentioned do be careful when running those lines as you have the potential to lock up your forum for a while.
omardealo
07-13-2014, 08:24 PM
As mentioned do be careful when running those lines as you have the potential to lock up your forum for a while.
okay i will take care when i use it , if i want update Specified forum or Specified thread , how can i do that ?
Thanks again
Simon Lloyd
07-13-2014, 08:34 PM
just set the variable as the figure you need
$forumid = xx
where xx would be that particular forum, the same for each other variable.
omardealo
07-14-2014, 01:05 AM
just set the variable as the figure you need
$forumid = xx
where xx would be that particular forum, the same for each other variable.
Nice , You Mean like that ?
require_once(DIR . '/includes/functions_databuild.php');
build_forum_counters($forumid = xx);
build_thread_counters($threadid = xx);
Thank you Brother :up:
Simon Lloyd
07-14-2014, 05:04 PM
I've never tried it like thatrequire_once(DIR . '/includes/functions_databuild.php');
$forumid = xx;
$threadid = xx;
build_forum_counters($forumid);
build_thread_counters($threadid);
omardealo
07-14-2014, 06:32 PM
I've never tried it like thatrequire_once(DIR . '/includes/functions_databuild.php');
$forumid = xx;
$threadid = xx;
build_forum_counters($forumid);
build_thread_counters($threadid);
Well I'm going to test both :up:
Zachery
07-14-2014, 06:54 PM
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 .
If you approve these items via the frontend/modcp, it does this for you.
ozzy47
07-14-2014, 07:38 PM
If you approve these items via the frontend/modcp, it does this for you.
I already said this was part of the default software, but the OP must be doing something else as he said that was not a option.
omardealo
07-14-2014, 10:18 PM
If you approve these items via the frontend/modcp, it does this for you.
I already said this was part of the default software, but the OP must be doing something else as he said that was not a option.
I understand that, but this is a new property to a moderator instead of entering the Control Panel [modcp] , and i make on plugin "notifications System" for new posts/thread , moderators will see it on notifications_list .. This will be the quickest to accept or reject posts
Zachery
07-14-2014, 11:02 PM
There is already a list of posts that need to be moderated in the frontend...
Simon Lloyd
07-14-2014, 11:19 PM
There is already a list of posts that need to be moderated in the frontend...
....and in their usercp :)
omardealo
07-24-2014, 01:54 AM
There is already a list of posts that need to be moderated in the frontend...
....and in their usercp :)
okay , But there is no alerts for moderators , that there are posts need to be approved
Simon Lloyd
07-24-2014, 06:27 AM
There are mods already created for that.
omardealo
07-25-2014, 05:13 PM
There are mods already created for that.
realy :cool: i don't know that , Sorry and thnx bro
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.