PDA

View Full Version : [PLUGIN problem]forum_data_start


grog6
10-02-2005, 11:44 AM
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 :

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, 07:31 PM
UP pliz

Andreas
10-07-2005, 09: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, 02:21 PM
Thanks Kirby :)