Support » Plugin: WP-Logs » [Plugin: WP-Logs] Does not seem to work

  • Not working for me on 3.2.1 WordPress, either on my target site or a clean WordPress install on Bitnami. Can anyone help?

    When the plugin is activated, WordPress shows me the error:

    The plugin generated 2287 characters of unexpected output during activation.

    No dashboard page is show, and the following code appears above the WordPress site and dashboard:

    trackEvent('WP-Logs', $data['event'], $data['user_id'], $data['text']); $post = array( 'post_type' => 'EventLog', 'post_content' => $data['text'], 'post_title' => $data['event'], 'post_status' => 'publish', 'post_author' => ($data['user_id'] != '' ? $data['user_id'] : 1) //if no user id given, post from admin account ); $post_id = wp_insert_post($post); if ($data['notifo'] && function_exists('notifo_message')) { notifo_message($data['event'],$data['text'],get_permalink($post_id)); } //remove things that wont be in metadata unset($data['text'],$data['event'],$data['user_id']); //save everything else as metadata foreach ($data as $item => $value) { update_post_meta($post_id,'log_'.$item,$value); } } } } ?> __('Logs'), 'public' => true, 'show_ui' => true, 'exclude_from_search' => true, 'show_in_nav_menus' => false, 'supports' => array( 'title', 'editor', 'tags' ), 'menu_position' => 5 ) ); //remove the 'Add New' link global $submenu; unset($submenu['edit.php?post_type=EventLog'][10]); } function EventLog_edit_columns($columns){ $columns = array( "cb" => "", "title" => "Title", "timestamp" => "Timestamp", "user" => "User" ); return $columns; } function EventLog_custom_columns($column){ global $post; $custom = get_post_custom($post->ID); switch ($column) { case "timestamp": print date('m-d-Y h:i:a',strtotime($post->post_date)); break; case "user": $user = get_userdata($post->post_author); print $user->ID . ' (' . $user->user_login . ')'; break; } } ?>

Viewing 2 replies - 1 through 2 (of 2 total)
  • The same mistake on my instalation

    This plugin uses PHP short tags. To make it work on your server, you’ll need to either edit the plugin so it uses full PHP start tags or configure your server to use short tags.

    To edit the plugin, open the EventLog.admin.php and EventLog.class.php files. At the top of each file, replace the <? with <?php and save.

    Alternately, you can edit the .htaccess file in the heart of your WordPress install and add this line: php_flag short_open_tags on

    And lastly, you can edit your server’s php.ini file and turn on the short_open_tags feature globally.

    After doing one of the above, the plugin should active & work fine.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘[Plugin: WP-Logs] Does not seem to work’ is closed to new replies.