vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 General Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=111)
-   -   [PLUGIN problem]forum_data_start (https://vborg.vbsupport.ru/showthread.php?t=97367)

grog6 10-02-2005 10:44 AM

[PLUGIN problem]forum_data_start
 
Hi here,

I have a problem with the hack I created for vb3.5 (the only one for now :devious: )

Well, in my admincp, in forums part, I have a code that create a function when saving a forum

I've placed this code in the forumdata_start (hook location)

and this is the code that causes the problem :

PHP Code:

require_once(DIR '/includes/functions_create_threads.php');

update_newthreads_options($forum[forumid], $POST[usernewthread]); 

There is no problem with this code in the admincp, it works well, but the problem is that on the board, when you use the quick reply (with AJAX mode especially), your answer is posted once, but, the page loads again (whereas it shouldn't with the AJAX mode) and a second post is created :ermm:

If I turn off this plugin, it works

What's the problem ? Why do forumdata_start is used when we reply ? This is what I don't understand

grog6 10-07-2005 06:31 PM

UP pliz

Andreas 10-07-2005 08:00 PM

Forum Data (lastpost, posts, thrhreads.) etc. needs to be updated when you make a post, so the Datamanager gets called :)
If you just want to Code to run when in ACP, wrap it in if (VB_AREA == 'AdminCP') or better yet use forumadmin_update_save

grog6 10-08-2005 01:21 PM

Thanks Kirby :)


All times are GMT. The time now is 10:34 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.02653 seconds
  • Memory Usage 1,709KB
  • 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
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (4)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