Audior - a powerful mp3 web recording solution.
Author: NusoftHQ
Version: 1.0.1
Author URI: http://www.nusofthq.com
Copyright (C) 2009-2014 NusoftHQ
This WordPress Plugin is distributed under the terms of the GNU General Public License.
You can redistribute it and/or modify it under the terms of the GNU General Public License
as published by the Free Software Foundation, either version 3 of the License, or any later version.
You should have received a copy of the GNU General Public License
along with this plugin. If not, see
To view this page ensure that Adobe Flash Player version '.$flashVersion.' or greater is installed.
This comment doesn\'t have audio!
'; } echo $html; } function addAudiorMetaBox() { add_meta_box('audior_comments_box', __('Audio Comment'), 'audiorCommentsAdminBox', 'comment', 'normal'); } function showAudiorPlayer($text) { global $wpdb; $uploadDir = wp_upload_dir(); $uploadsPath = $uploadDir['basedir'] . '/audio-comments/'; $filesPath = $uploadDir['baseurl'] . '/audio-comments/'; $audioComment = $wpdb->get_row("SELECT * FROM " . $wpdb->prefix . "audior_comments WHERE comment_id =" . get_comment_ID()); if (file_exists($uploadsPath . $audioComment->file) && $audioComment->file != '') { $html .= ''; } return $text . $html; } function saveAudior($commentId, $status) { global $current_user; global $wpdb; global $blog_id; get_currentuserinfo(); $uploadDir = wp_upload_dir(); $uploadsPath = $uploadDir['basedir'] . '/audio-comments/'; if (file_exists($uploadsPath . $_POST['audior-file']) && $_POST['audior-file'] != '') { $insert = "INSERT INTO " . $wpdb->prefix . "audior_comments (comment_id, comment_post_id, user_id, file, date) VALUES ('" . $commentId . "', '" . esc_sql($_POST['comment_post_ID']) . "', '".$current_user->ID."', '" . esc_sql($_POST['audior-file']) . "', '" . time() . "')"; $results = $wpdb->query($insert); } } function audior($commentField) { //define vars $flashVersion = '12.0.0.44'; //get wordpress and user info global $current_user; global $wpdb; global $blog_id; get_currentuserinfo(); $pluginPath = plugin_dir_url(__FILE__); $uploadDir = wp_upload_dir(); $_SESSION['audior-upload-path'] = $uploadDir['basedir'] . '/audio-comments/'; $audiorSettings = $wpdb->get_results( "SELECT * FROM " . $wpdb->prefix . "audior_settings LIMIT 1 "); $_SESSION['audior-settings'] = $audiorSettings[0]; $uniqID = uniqid(); $licenseKey= $audiorSettings[0]->license_key; //detect user role if (($current_user->ID != NULL) && ($current_user->ID != "") && ($current_user->ID > 0)) { if ($current_user->roles[0] != "") { $userRole = $current_user->roles[0]; } else { $userRole = "networkuser"; } } else { $userRole = "visitors"; } //select user role permissions $query = "SELECT * FROM " . $wpdb->prefix . "audior_permissions WHERE user_role = '".$userRole."'"; $userPermissions = $wpdb->get_results($query); $_SESSION['audior-permissions'] = $userPermissions[0]; //this user role can't post audio comments if ($userPermissions[0]->enable_audior == 0) { return $commentField; } //check if audior exists if (!file_exists(dirname(__FILE__) . '/audior/Audior.swf')) { return $commentField . 'For the plugin to work, you need the Audior files to be copied to the plugin directory! You can buy it from audior.ec or review the Documentation!
To view this page ensure that Adobe Flash Player version '.$flashVersion.' or greater is installed.
For the plugin to work, you need the Audior files to be copied to the plugin directory! You can buy it from audior.ec or review the Documentation!