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-13-2014 05:49 PM

Quote:

Originally Posted by Simon Lloyd (Post 2506611)
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']); 



thnx for your help , it's working .. but This file must be called functions_databuild.php

PHP Code:

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 [DATE]1405282445[/DATE] at [TIME]1405282445[/TIME] ---------------

okay i found it , for update number of posts and thread info

PHP Code:

build_thread_counters($threadid); 


Simon Lloyd 07-13-2014 06: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 07:24 PM

Quote:

Originally Posted by Simon Lloyd (Post 2506630)
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 07: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 12:05 AM

Quote:

Originally Posted by Simon Lloyd (Post 2506644)
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 ?

PHP Code:

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 04:04 PM

I've never tried it like that
PHP Code:

require_once(DIR '/includes/functions_databuild.php');
$forumid xx;
$threadid xx;
build_forum_counters($forumid); 
build_thread_counters($threadid); 


omardealo 07-14-2014 05:32 PM

Quote:

Originally Posted by Simon Lloyd (Post 2506754)
I've never tried it like that
PHP Code:

require_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 05:54 PM

Quote:

Originally Posted by omardealo (Post 2506552)
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 06:38 PM

Quote:

Originally Posted by Zachery (Post 2506768)
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 09:18 PM

Quote:

Originally Posted by Zachery (Post 2506768)
If you approve these items via the frontend/modcp, it does this for you.

Quote:

Originally Posted by ozzy47 (Post 2506773)
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


All times are GMT. The time now is 12:03 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.01881 seconds
  • Memory Usage 1,754KB
  • 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
  • (6)bbcode_php_printable
  • (8)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