Log in

View Full Version : newreply hook doesnt seem to use the plugin


Keloran
10-12-2007, 08:48 AM
can anyone see anything wrong with this, because it doesnt seem to want to work


<hookname>newreply_post_complete</hookname>
<phpcode><![CDATA[
require_once(DIR . '/includes/class_core.php');
require_once(DIR . '/includes/class_bitfield_builder.php');
vB_Database::select_db();

$db->Query_write("INSERT INTO testingtable (misc) VALUES ('testing')");

$db->show_errors();
vB_Bitfield_Builder::save($db);
]]></phpcode>

Marco van Herwaarden
10-12-2007, 08:51 AM
I don't see why you need these includes, the select_db() or even the vB_Bitfield_Builder::save().

Other then that you should use $db->query_write (no capital Q).