09-Oct-2011, 03:15 AM
Oh - so I finally found the problem! It was not that simple.
After several hours of struggling I discovered that the entire program uses global variables in a rather strange way...
If you want to use Commentics in anything more complex - or in any real-OOP script - well just don't do that.
If you want to do it, you need to declare the needed global variables in your methods. This is what I've come with:
Put this at the beginning of your method and Commentics will probably work. Of course not all variables are needed in all cases... but I just have no idea which variable is needed when.
For more info check this thread: http://www.commentics.org/forum/showthread.php?tid=130
After several hours of struggling I discovered that the entire program uses global variables in a rather strange way...
If you want to use Commentics in anything more complex - or in any real-OOP script - well just don't do that.
If you want to do it, you need to declare the needed global variables in your methods. This is what I've come with:
Code:
global $admin_button, $approve, $approve_reason, $approve_total, $attribute, $C,
$default_comment, $default_country, $default_email, $default_name, $default_notify,
$default_privacy, $default_rating, $default_terms, $default_town, $default_website,
$error, $error_message, $error_total, $ip_address, $is_admin, $mysql_table_prefix,
$page_id, $parameters, $path_to_comments_folder, $reference, $reply_id, $settings;
For more info check this thread: http://www.commentics.org/forum/showthread.php?tid=130