This is the community forum. For a developer response use the Client Area.
Follow us on Facebook, Twitter and YouTube!

Problem with table prefixes
#11

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. Undecided

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;
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
Reply


Possibly Related Threads…
Thread / Author Replies Views Last Post
Last Post by Steven
23-Nov-2017, 08:09 PM
Last Post by Steven
08-Jun-2015, 06:22 PM
Last Post by kooler
27-Aug-2013, 02:02 PM
Last Post by Steven
20-Jul-2013, 01:22 PM
Last Post by Steven
19-Mar-2013, 02:37 PM
Last Post by Steven
02-Jul-2012, 08:19 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)