cingcong
Forum Replies Created
-
Forum: Plugins
In reply to: [Simplest Analytics] IP Address information for session usersHello,
Yes I use the code on my site now.
I also add code part to whitelist my own PC IP addresses that often visit my own site. So only the real visitor were recorded.I also want to note that I add 2 columns in db table to accomodate the modified code.
ip 40 varchar
agent 255 varcharso far so good.
Feel free to use and adapt.
Thank you for the plugin.Forum: Plugins
In reply to: [Simplest Analytics] IP Address information for session usersmy codes:
class-public.php<?php /** * * The admin-specific functionality of the plugin. * */ class Simplest_Analytics_Public { /** The ID of this plugin */ private $simplest_analytics; /** The version of this plugin */ private $version; /** Initialize the class and set its properties. */ public function __construct($simplest_analytics, $version) { $this->simplest_analytics = $simplest_analytics; $this->version = $version; add_shortcode('tracked_video', array($this, 'simplest_analytics_tracked_video_function')); } /** * video shortcode */ public function simplest_analytics_tracked_video_function($atts) { $attribute = shortcode_atts( array( 'url' => '', 'tracking_name' => 'video tracking without name', 'width' => '', 'height' => '', ), $atts ); $url = isset($attribute["url"]) ? sanitize_text_field($attribute["url"]) : ""; $tracking_name = isset($attribute["tracking_name"]) ? sanitize_text_field($attribute["tracking_name"]) : ""; $width = isset($attribute["width"]) ? sanitize_text_field($attribute["width"]) : "100%"; $height = isset($attribute["height"]) ? sanitize_text_field($attribute["height"]) : "auto"; $randmom_id = "simplest_analytics_video_" . rand(1, 99999); ob_start(); ?> <div id="<?php echo esc_html($randmom_id) ?>"> <?php echo do_shortcode('[video src="' . esc_url($url) . '" width="' . esc_attr($width) . '" height="' . esc_attr($height) . '"]'); ?> <input type="hidden" class="simplest_analytics_video_sec_1" value=""> <input type="hidden" class="simplest_analytics_video_percent_25" value=""> <input type="hidden" class="simplest_analytics_video_percent_50" value=""> <input type="hidden" class="simplest_analytics_video_percent_75" value=""> <input type="hidden" class="simplest_analytics_video_percent_100" value=""> <input type="hidden" class="simplest_analytics_video_trackname" value="<?php echo esc_attr($tracking_name) ?>"> </div> <script> jQuery(document).ready(function ($) { $("#<?php echo esc_html($randmom_id) ?> video").on( "timeupdate", function (event) { onTrackedVideoFrame<?php echo esc_html($randmom_id) ?>(this.currentTime, this.duration, '<?php echo esc_html($randmom_id) ?>'); }); function onTrackedVideoFrame<?php echo esc_html($randmom_id) ?>(currentTime, duration, video_wrapper_id) { var percentage = Math.floor((currentTime / duration) * 100); var one_sec = $("#" + video_wrapper_id + " .simplest_analytics_video_sec_1").val(); var percent_25 = $("#" + video_wrapper_id + " .simplest_analytics_video_percent_25").val(); var percent_50 = $("#" + video_wrapper_id + " .simplest_analytics_video_percent_50").val(); var percent_75 = $("#" + video_wrapper_id + " .simplest_analytics_video_percent_75").val(); var percent_100 = $("#" + video_wrapper_id + " .simplest_analytics_video_percent_100").val(); var trackname = $("#" + video_wrapper_id + " .simplest_analytics_video_trackname").val(); if (currentTime > 1 && one_sec == '') { $("#" + video_wrapper_id + " .simplest_analytics_video_sec_1").val(currentTime); simplest_analytics_track('video:1sec', trackname); } if (percentage > 25 && percent_25 == '') { $("#" + video_wrapper_id + " .simplest_analytics_video_percent_25").val(percentage); simplest_analytics_track('video:25%', trackname); } if (percentage > 50 && percent_50 == '') { $("#" + video_wrapper_id + " .simplest_analytics_video_percent_50").val(percentage); simplest_analytics_track('video:50%', trackname); } if (percentage > 75 && percent_75 == '') { $("#" + video_wrapper_id + " .simplest_analytics_video_percent_75").val(percentage); simplest_analytics_track('video:75%', trackname); } if (percentage > 99 && percent_100 == '') { $("#" + video_wrapper_id + " .simplest_analytics_video_percent_100").val(percentage); simplest_analytics_track('video:100%', trackname); } } }); </script> <?php $video_content = ob_get_clean(); return $video_content; } /** * save tracking result in database */ public function simplest_analytics_tracking_action() { $event = isset($_GET["event"]) ? sanitize_text_field($_GET["event"]) : ''; $type = isset($_GET["type"]) ? sanitize_text_field($_GET["type"]) : ''; $current_page = isset($_SERVER['HTTP_REFERER']) ? sanitize_text_field($_SERVER['HTTP_REFERER']) : ''; $referrer = isset($_GET["ref"]) ? sanitize_text_field($_GET["ref"]) : ''; // get url parameter from current page $params = []; if (strpos($current_page, "?") > 0) { $split_current_page = explode("?", $current_page); if (isset($split_current_page[1]) && $split_current_page[1] !== "") { $split_current_page = explode("&", $split_current_page[1]); if (sizeof($split_current_page) > 0) { foreach ($split_current_page as $url_p) { $split_url_p = explode("=", $url_p); if (isset($split_url_p[0]) && isset($split_url_p[1])) { $params[$split_url_p[0]] = $split_url_p[1]; } } } } } $found_paras = []; $para_options = get_option('simplest_analytivs_url_para'); if (isset($para_options)) { foreach ($para_options as $para_option => $para_val) { if (isset($params[$para_option])) { $this_para = $params[$para_option] . '==' . date("Y-m-d-H-i"); $_SESSION["sa_" . $para_option] = $this_para; $found_paras[] = $para_val . '==' . $this_para; } else { $this_para = ""; } } } $all_url_paras = ""; if (sizeof($found_paras) > 0) { $all_url_paras = join(",", $found_paras); } $data = []; $data['track_type'] = $type; $data['website'] = $current_page; $data['referrer'] = $referrer; $data['parameters'] = $all_url_paras; $data['event_action'] = $event; $data['date_year'] = date("Y", current_time('timestamp')); $data['date_month'] = date("m", current_time('timestamp')); $data['date_week'] = date("w", current_time('timestamp')); $data['date_full'] = date("Y-m-d H:i:s", current_time('timestamp')); // untuk mendapatkan alamat IP pengguna $ip = $_SERVER['REMOTE_ADDR']; // Menangani proxy jika ada if (!empty($_SERVER['HTTP_CLIENT_IP'])) { $ip = $_SERVER['HTTP_CLIENT_IP']; } elseif (!empty($_SERVER['HTTP_X_FORWARDED_FOR'])) { $ip = $_SERVER['HTTP_X_FORWARDED_FOR']; } // Membersihkan input alamat IP $cleanedIP = filter_var($ip, FILTER_VALIDATE_IP); // Mendapatkan user agent $userAgent = $_SERVER['HTTP_USER_AGENT']; $current_ua = isset($userAgent) ? $userAgent : ''; // Membersihkan user agent $cleanedUserAgent = filter_var($current_ua, FILTER_SANITIZE_STRING); $data['ip'] = $cleanedIP; $data['agent'] = $cleanedUserAgent; simple_analytics_track_data($data); wp_die(); } /** * add js tracking code in footer */ public function tracking_in_footer() { ?> <script> function simplest_analytics_track(type, event) { if (event !== "") { var event = "&event=" + event; } var simplest_analytics_url = "<?php echo esc_url(admin_url('admin-ajax.php')) ?>?action=simplest_analytics_tracking_action&type=" + type + event + "&ref=" + document.referrer; var xhttp = new XMLHttpRequest(); xhttp.onreadystatechange = function () { if (this.readyState == 4 && this.status == 200) { // Typical action to be performed when the document is ready: //alert(xhttp.responseText); } }; xhttp.open("GET", simplest_analytics_url, true); xhttp.send(); } simplest_analytics_track('pageview', ''); document.addEventListener("DOMContentLoaded", function () { <?php $event_options = get_option('simplest_analytivs_events'); if (isset($event_options) && is_array($event_options)) { foreach ($event_options as $key => $val) { ?> var trigger_class = "<?php echo esc_html($val) ?>"; jQuery(trigger_class).bind('click', function () { simplest_analytics_track('event', '<?php echo esc_attr($key) ?>'); return true; }); <?php } } ?> }); </script> <?php } /** * add tracking when order created */ public function track_data_when_order_created($order_id) { $order = wc_get_order($order_id); $data = []; $data['track_type'] = "woocommerce"; $data['parameters'] = $order->get_total(); $data['event_action'] = "sale"; simple_analytics_track_data($data); } public function tracking_wc_ty_page() { ?> <script> var wc_simplest_analytics_url = "<?php echo esc_url(admin_url('admin-ajax.php')) ?>?action=simplest_analytics_tracking_action&type=event&event=sale&ref=" + document.referrer; var xhttp = new XMLHttpRequest(); xhttp.onreadystatechange = function () { if (this.readyState == 4 && this.status == 200) { // Typical action to be performed when the document is ready: //alert(xhttp.responseText); } }; xhttp.open("GET", wc_simplest_analytics_url, true); xhttp.send(); </script> <?php } } // class END /* * public function to track data and use in custom functions */ function simple_analytics_track_data($data) { $current_page = isset($_SERVER['HTTP_REFERER']) ? sanitize_text_field($_SERVER['HTTP_REFERER']) : ''; // get url parameter from current page $params = []; if (strpos($current_page, "?") > 0) { $split_current_page = explode("?", $current_page); if (isset($split_current_page[1]) && $split_current_page[1] !== "") { $split_current_page = explode("&", $split_current_page[1]); if (sizeof($split_current_page) > 0) { foreach ($split_current_page as $url_p) { $split_url_p = explode("=", $url_p); if (isset($split_url_p[0]) && isset($split_url_p[1])) { $params[$split_url_p[0]] = $split_url_p[1]; } } } } } $found_paras = []; $para_options = get_option('simplest_analytivs_url_para'); if (isset($para_options)) { foreach ($para_options as $para_option => $para_val) { if (isset($params[$para_option])) { $this_para = $params[$para_option] . '==' . date("Y-m-d-H-i"); $_SESSION["sa_" . $para_option] = $this_para; $found_paras[] = $para_val . '==' . $this_para; } else { $this_para = ""; } } } $all_url_paras = ""; if (sizeof($found_paras) > 0) { $all_url_paras = join(",", $found_paras); } if (!session_id()) { session_start(); } $session_id = session_id(); $insert_data = []; $insert_data['track_type'] = "pageview"; $insert_data['website'] = $current_page; $insert_data['referrer'] = ""; $insert_data['parameters'] = $all_url_paras; $insert_data['event_action'] = ""; $insert_data['session_id'] = $session_id; $insert_data['date_year'] = date("Y", current_time('timestamp')); $insert_data['date_month'] = date("m", current_time('timestamp')); $insert_data['date_week'] = date("w", current_time('timestamp')); $insert_data['date_full'] = date("Y-m-d H:i:s", current_time('timestamp')); // untuk mendapatkan alamat IP pengguna $ip = $_SERVER['REMOTE_ADDR']; // Menangani proxy jika ada if (!empty($_SERVER['HTTP_CLIENT_IP'])) { $ip = $_SERVER['HTTP_CLIENT_IP']; } elseif (!empty($_SERVER['HTTP_X_FORWARDED_FOR'])) { $ip = $_SERVER['HTTP_X_FORWARDED_FOR']; } // Membersihkan input alamat IP $cleanedIP = filter_var($ip, FILTER_VALIDATE_IP); // Mendapatkan user agent $userAgent = $_SERVER['HTTP_USER_AGENT']; $current_ua = isset($userAgent) ? $userAgent : ''; // Membersihkan user agent $cleanedUserAgent = filter_var($current_ua, FILTER_SANITIZE_STRING); $insert_data['ip'] = $cleanedIP; $insert_data['agent'] = $cleanedUserAgent; foreach ($insert_data as $key => $val) { if (isset($data[$key])) { $insert_data[$key] = sanitize_text_field($data[$key]); } } // if 'video:' in $insert_data[track_type] explo : if (strpos($insert_data['track_type'], 'video:') !== false) { try { $split_track_type = explode(":", $insert_data['track_type']); $insert_data['track_type'] = 'video'; $insert_data['parameters'] = $split_track_type[1]; } catch (Exception $e) { // do nothing } } global $wpdb; $table_name = $wpdb->prefix . 'simplest_analytics'; $wpdb->insert($table_name, $insert_data); }
and in dashoboard.php:
<?php /** * Admin Dashobord Page */ //Get the active tab from the $_GET param $default_tab = "dashboard"; $tab = isset($_GET['tab']) ? sanitize_text_field($_GET['tab']) : $default_tab; // use user timezone $timezone = get_option('timezone_string'); if ($timezone == "") { $timezone = "UTC"; } date_default_timezone_set($timezone); $today_start = date("Y-m-d"); $today_end = date("Y-m-d"); $yesterday_start = date("Y-m-d", strtotime("-1 day")); $yesterday_end = date("Y-m-d", strtotime("-1 day")); $last_7_start = date("Y-m-d", strtotime("-8 day")); $last_7_end = date("Y-m-d", strtotime("-1 day")); $last_14_start = date("Y-m-d", strtotime("-15 day")); $last_14_end = date("Y-m-d", strtotime("-1 day")); $last_30_start = date("Y-m-d", strtotime("-31 day")); $last_30_end = date("Y-m-d", strtotime("-1 day")); $last_month_start = date("Y-m-d", mktime(0, 0, 0, date("m") - 1, 1)); $last_month_end = date("Y-m-d", mktime(0, 0, 0, date("m"), 0)); $default_ago = date("Y-m-d", strtotime("-30 day")); $default_to = date("Y-m-d"); $from_date = isset($_GET["from"]) ? sanitize_text_field($_GET["from"]) : $default_ago; $to_date = isset($_GET["to"]) ? sanitize_text_field($_GET["to"]) : $default_to; $from_date_db = $from_date . ' 00:00:00'; $to_date_db = $to_date . ' 23:59:59'; global $wpdb; $table_name = $wpdb->prefix . 'simplest_analytics'; if ($from_date == "alltime") { $sql = $wpdb->prepare("SELECT * FROM $table_name"); $rows = $wpdb->get_results($sql); if (sizeof($rows) > 0) { $from_date = strtotime($rows[0]->date_full); $from_date = date('Y-m-d', $from_date); $to_date = strtotime(end($rows)->date_full); $to_date = date('Y-m-d', $to_date); } } else { $from_date_db = strtotime($from_date_db); $from_date_db = date("Y-m-d H:i:s", $from_date_db); $to_date_db = strtotime($to_date_db); $to_date_db = date("Y-m-d H:i:s", $to_date_db); $sql = $wpdb->prepare("SELECT * FROM $table_name WHERE date_full BETWEEN %s AND %s ORDER by id DESC", $from_date_db, $to_date_db); $rows = $wpdb->get_results($sql); } // get all data for the charts $all_sessions = []; $visits = 0; $tracked_events = 0; $tracked_videos = []; $sales = 0; $sales_amount = 0; $session_ids = []; $event_data = []; $video_data = []; $sales_data = []; $sales_data_ref = []; $sales_data_para = []; $daily_data = []; $daily_sales = []; $url_paras = []; $site_data = []; $ref_data = []; $home_url = get_home_url(); $home_url = str_replace("https://", "", $home_url); $home_url = str_replace("https://", "", $home_url); $home_url = str_replace("www.", "", $home_url); foreach ($rows as $row) { $all_sessions[] = $row->session_id; if ($row->parameters !== "") { $expl_paras = explode(",", $row->parameters); foreach ($expl_paras as $expl_p) { $expl_p = explode("==", $expl_p); if (sizeof($expl_p) > 2) { $url_paras[$expl_p[0] . '=' . $expl_p[1]][] = $row; } } } if ($row->track_type == "event") { if ($row->event_action !== "") { $event_data[$row->event_action][] = $row; $tracked_events++; } } else if ($row->track_type == "video") { if ($row->event_action !== "") { $video_data[$row->event_action][] = $row; $tracked_videos[] = $row->event_action; } } else if ($row->track_type == "woocommerce") { if ($row->event_action == "sale") { $date_clean = strtotime($row->date_full); $date_clean = date('Y-m-d', $date_clean); $daily_sales[$date_clean][] = $row; $sales_data[$row->event_action][] = $row; $ref = $row->referrer; $ref = str_replace("https://", "", $ref); $ref = str_replace("https://", "", $ref); $ref = str_replace("www.", "", $ref); $sales_data_para[] = $row->parameters; if (strpos($ref, "?") > 0) { $expl_referrer = explode("?", $ref); $ref = $expl_referrer[0]; } if ($ref !== "" && strpos($ref, $home_url) !== 0) { $sales_data_ref[$ref][] = $row; } else { $sales_data_ref["none"][] = $row; } $sales++; if (isset($row->parameters) && $row->parameters >= 0) { $sales_amount = $sales_amount + $row->parameters; } } } else if ($row->track_type == "pageview") { $visits++; $session_ids[] = $row->session_id; $website = $row->website; $website = str_replace("https://", "", $website); $website = str_replace("https://", "", $website); $website = str_replace("www.", "", $website); $website = str_replace($home_url, "", $website); if (strpos($website, "?") > 0) { $expl_website = explode("?", $website); $website = $expl_website[0]; } $site_data[$website][] = $row; $date_clean = strtotime($row->date_full); $date_clean = date('Y-m-d', $date_clean); $daily_data[$date_clean][] = $row; $ref = $row->referrer; $ref = str_replace("https://", "", $ref); $ref = str_replace("https://", "", $ref); $ref = str_replace("www.", "", $ref); if (strpos($ref, "?") > 0) { $expl_referrer = explode("?", $ref); $ref = $expl_referrer[0]; } if ($ref !== "" && strpos($ref, $home_url) !== 0) { $ref_data[$ref][] = $row; } } } $unique_visitors = array_unique($session_ids); $unique_visitors = sizeof($unique_visitors); ksort($daily_data); if (isset($daily_sales)) { ksort($daily_sales); } ?> <form id="daterange_form" style="display:none"> <input type="text" name="page" value="simplest-analytics" /> <input type="text" name="from" id="from_date" /> <input type="text" name="to" id="to_date" /> <input type="text" name="tab" id="form_tab" value="<?php echo esc_html($tab) ?>" /> </form> <script> function simplest_analytics_apply_custom_date() { var start = document.getElementById("from").value; var end = document.getElementById("to").value; if (start == "" || end == "") { alert("<?php echo esc_html__('Start date or end date is empty.', 'simplest-analytics') ?>") } else if (start > end) { alert("<?php echo esc_html__('End date has to be ealier than start date.', 'simplest-analytics') ?>") } else { document.getElementById("from_date").value = start; document.getElementById("to_date").value = end; document.getElementById("daterange_form").submit(); simplest_analytics_hide_ele('daterange_popup'); } } function simplest_analytics_daterange_sel(type) { if (type == "today") { var start = "<?php echo esc_html($today_start) ?>"; var end = "<?php echo esc_html($today_end) ?>"; } else if (type == "yesterday") { var start = "<?php echo esc_html($yesterday_start) ?>"; var end = "<?php echo esc_html($yesterday_end) ?>"; } else if (type == "last7") { var start = "<?php echo esc_html($last_7_start) ?>"; var end = "<?php echo esc_html($last_7_end) ?>"; } else if (type == "last14") { var start = "<?php echo esc_html($last_14_start) ?>"; var end = "<?php echo esc_html($last_14_end) ?>"; } else if (type == "last30") { var start = "<?php echo esc_html($last_30_start) ?>"; var end = "<?php echo esc_html($last_30_end) ?>"; } else if (type == "lastmonth") { var start = "<?php echo esc_html($last_month_start) ?>"; var end = "<?php echo esc_html($last_month_end) ?>"; } else if (type == "alltime") { var start = "alltime"; var end = "alltime"; } document.getElementById("from_date").value = start; document.getElementById("to_date").value = end; document.getElementById("daterange_form").submit(); simplest_analytics_hide_ele('daterange_popup'); } </script> <div class="wrap"> <div class="sa_daterange" onclick="simplest_analytics_toggle_daterange()"> <?php echo esc_html($from_date) ?> - <?php echo esc_html($to_date) ?> <span class="dashicons dashicons-arrow-down-alt2"></span> </div> <h2>Simplest Analytivs</h2> <?php $tab_para = "&from=" . $from_date . "&to=" . $to_date; ?> <nav class="nav-tab-wrapper"> <a href="?page=simplest-analytics&tab=dashboard<?php echo esc_html($tab_para) ?>" class="nav-tab <?php if ($tab === 'dashboard'): ?>nav-tab-active<?php endif; ?>"> <?php echo esc_html__('Dashboard', 'simplest-analytics') ?> </a> <?php include_once(ABSPATH . 'wp-admin/includes/plugin.php'); if (is_plugin_active('woocommerce/woocommerce.php')) { ?> <a href="?page=simplest-analytics&tab=woocommerce<?php echo esc_html($tab_para) ?>" class="nav-tab <?php if ($tab === 'woocommerce'): ?>nav-tab-active<?php endif; ?>"> Woocommerce </a> <?php } ?> <a href="?page=simplest-analytics&tab=rawdata<?php echo esc_html($tab_para) ?>" class="nav-tab <?php if ($tab === 'rawdata'): ?>nav-tab-active<?php endif; ?>"> <?php echo esc_html__('Raw Data', 'simplest-analytics') ?> </a> </nav> <div class="tab-content"> <?php switch ($tab): case 'dashboard': $tracked_videos = array_unique($tracked_videos); $tracked_videos = sizeof($tracked_videos); // tab: dashboard ?> <!-- tab: dashboard --> <div class="all_tabs" id="tab_dashboard"> <!-- top cards --> <div class="top_card"> <span class="spanblock"> <?php echo esc_html($visits) ?> </span> <label> <?php echo esc_html__('Visits', 'simplest-analytics') ?> </label> </div> <div class="top_card"> <span class="spanblock"> <?php echo esc_html($unique_visitors) ?> </span> <label> <?php echo esc_html__('Unique Visitors', 'simplest-analytics') ?> </label> </div> <div class="top_card"> <span class="spanblock"> <?php echo esc_html($tracked_events) ?> </span> <label> <?php echo esc_html__('Tracked events', 'simplest-analytics') ?> </label> </div> <div class="top_card"> <span class="spanblock"> <?php echo esc_html($tracked_videos) ?> </span> <label> <?php echo esc_html__('Tracked videos', 'simplest-analytics') ?> </label> </div> <!-- END top cards --> <!-- daily visits --> <script type="text/javascript"> google.charts.load('current', {'packages': ['corechart']}); google.charts.setOnLoadCallback(simplest_analytics_drawvisitsChart); function simplest_analytics_drawvisitsChart() { var data = google.visualization.arrayToDataTable([ ['<?php echo esc_html__('Date', 'simplest-analytics') ?>', '<?php echo esc_html__('Visits', 'simplest-analytics') ?>'], <?php if (sizeof($daily_data) == 0) { ?>['<?php echo esc_html__('no results', 'simplest-analytics') ?>', 0], <?php } else { foreach ($daily_data as $key => $val) { $visits = 0; $session_ids = []; foreach ($val as $v) { $visits++; $session_ids[] = $v->session_id; } $unique_visitors = array_unique($session_ids); $unique_visitors = sizeof($unique_visitors); ?>['<?php echo esc_html($key) ?>', <?php echo esc_html($visits) ?>], <?php } } ?> ]); var options = { title: '<?php echo esc_html__('Daily visits', 'simplest-analytics') ?>', curveType: 'function', legend: {position: 'none'}, vAxis: { format: '#', minValue: 0, } }; var chart = new google.visualization.LineChart(document.getElementById('daily_chart')); chart.draw(data, options); } </script> <div class="chart_table chart_table_3col" style="height:300px" id="daily_chart"></div> <!-- END daily visits --> <!-- daily visits --> <script type="text/javascript"> google.charts.load('current', {'packages': ['corechart']}); google.charts.setOnLoadCallback(simplest_analytics_drawChart_dvisits); function simplest_analytics_drawChart_dvisits() { var data = google.visualization.arrayToDataTable([ ['<?php echo esc_html__('Date', 'simplest-analytics') ?>', '<?php echo esc_html__('Unique visitors', 'simplest-analytics') ?>'], <?php if (sizeof($daily_data) == 0) { ?> [ '<?php echo esc_html__('no results', 'simplest-analytics') ?>', 0, ], <?php } else { foreach ($daily_data as $key => $val) { $visits = 0; $session_ids = []; foreach ($val as $v) { $visits++; $session_ids[] = $v->session_id; } $unique_visitors = array_unique($session_ids); $unique_visitors = sizeof($unique_visitors); ?> [ '<?php echo esc_html($key) ?>', <?php echo esc_html($unique_visitors) ?>, ], <?php } } ?> ]); var options = { title: '<?php echo esc_html__('Daily unique visitors', 'simplest-analytics') ?>', curveType: 'function', legend: {position: 'none'}, vAxis: { format: '#', minValue: 0, } }; var chart = new google.visualization.LineChart(document.getElementById('daily_uniques')); chart.draw(data, options); } </script> <div class="chart_table chart_table_3col" style="height:300px" id="daily_uniques"></div> <!-- END daily uniques --> <!-- top websites --> <script type="text/javascript"> google.charts.load('current', {'packages': ['table']}); google.charts.setOnLoadCallback(simplest_analytics_drawTable); function simplest_analytics_drawTable() { var data = new google.visualization.DataTable(); data.addColumn('string', '<?php echo esc_html__('Most visited sites', 'simplest-analytics') ?>'); data.addColumn('number', '<?php echo esc_html__('Visits', 'simplest-analytics') ?>'); data.addColumn('number', '<?php echo esc_html__('Unique visitors', 'simplest-analytics') ?>'); data.addRows([ <?php if (sizeof($site_data) == 0) { ?> [ '<?php echo esc_html__('no results', 'simplest-analytics') ?>', 0, 0, ], <?php } else { foreach ($site_data as $key => $val) { $visits = 0; $session_ids = []; foreach ($val as $v) { $visits++; $session_ids[] = $v->session_id; } $unique_visitors = array_unique($session_ids); $unique_visitors = sizeof($unique_visitors); ?> [ '<?php echo esc_html($key) ?>', <?php echo esc_html($visits) ?>, <?php echo esc_html($unique_visitors) ?>, ], <?php } } ?> ]); var table = new google.visualization.Table(document.getElementById('top_website_div')); table.draw(data, {showRowNumber: true, sortColumn: 1, sortAscending: false, desc: true, width: '100%', height: '100%'}); } </script> <div class="chart_table chart_table_3col" id="top_website_div"></div> <!-- END top websites --> <!-- referrer --> <script type="text/javascript"> google.charts.load('current', {'packages': ['table']}); google.charts.setOnLoadCallback(simplest_analytics_drawTable_referrer); function simplest_analytics_drawTable_referrer() { var data = new google.visualization.DataTable(); data.addColumn('string', '<?php echo esc_html__('Top external referrers', 'simplest-analytics') ?>'); data.addColumn('number', '<?php echo esc_html__('Visits', 'simplest-analytics') ?>'); data.addColumn('number', '<?php echo esc_html__('Unique visitors', 'simplest-analytics') ?>'); data.addRows([ <?php if (sizeof($ref_data) == 0) { ?> [ '<?php echo esc_html__('no results', 'simplest-analytics') ?>', 0, 0, ], <?php } else { foreach ($ref_data as $key => $val) { $visits = 0; $session_ids = []; foreach ($val as $v) { $visits++; $session_ids[] = $v->session_id; } $unique_visitors = array_unique($session_ids); $unique_visitors = sizeof($unique_visitors); ?> [ '<?php echo esc_html($key) ?>', <?php echo esc_html($visits) ?>, <?php echo esc_html($unique_visitors) ?>, ], <?php } } ?> ]); var table = new google.visualization.Table(document.getElementById('referrer_div')); table.draw(data, {showRowNumber: true, sortColumn: 1, sortAscending: false, desc: true, width: '100%', height: '100%'}); } </script> <div class="chart_table chart_table_3col" id="referrer_div"></div> <!-- END referrer --> <!-- url paras --> <script type="text/javascript"> google.charts.load('current', {'packages': ['table']}); google.charts.setOnLoadCallback(simplest_analytics_drawTable_para); function simplest_analytics_drawTable_para() { var data = new google.visualization.DataTable(); data.addColumn('string', '<?php echo esc_html__('Top URL parameters', 'simplest-analytics') ?>'); data.addColumn('string', '<?php echo esc_html__('Value', 'simplest-analytics') ?>'); data.addColumn('number', '<?php echo esc_html__('Visits', 'simplest-analytics') ?>'); data.addColumn('number', '<?php echo esc_html__('Unique visitors', 'simplest-analytics') ?>'); data.addRows([ <?php if (sizeof($url_paras) == 0) { ?> [ '<?php echo esc_html__('no results', 'simplest-analytics') ?>', '', 0, 0, ], <?php } else { foreach ($url_paras as $key => $val) { $visits = 0; $session_ids = []; foreach ($val as $v) { $visits++; $session_ids[] = $v->session_id; } $unique_visitors = array_unique($session_ids); $unique_visitors = sizeof($unique_visitors); $split_key = explode("=", $key); $key_one = isset($split_key[0]) ? $split_key[0] : ""; $key_two = isset($split_key[1]) ? $split_key[1] : ""; ?> [ '<?php echo esc_html($key_one) ?>', '<?php echo esc_html($key_two) ?>', <?php echo esc_html($visits) ?>, <?php echo esc_html($unique_visitors) ?>, ], <?php } } ?> ]); var table = new google.visualization.Table(document.getElementById('urlpara_div')); table.draw(data, {showRowNumber: true, sortColumn: 2, sortAscending: false, desc: true, width: '100%', height: '100%'}); } </script> <div class="chart_table chart_table_3col" id="urlpara_div"></div> <!-- END url paras --> <!-- events --> <script type="text/javascript"> google.charts.load('current', {'packages': ['table']}); google.charts.setOnLoadCallback(simplest_analytics_drawTable_events); function simplest_analytics_drawTable_events() { var data = new google.visualization.DataTable(); data.addColumn('string', '<?php echo esc_html__('Tracked events', 'simplest-analytics') ?>'); data.addColumn('number', '<?php echo esc_html__('Visits', 'simplest-analytics') ?>'); data.addColumn('number', '<?php echo esc_html__('Unique visitors', 'simplest-analytics') ?>'); data.addRows([ <?php if (sizeof($event_data) == 0) { ?> [ '<?php echo esc_html__('no results', 'simplest-analytics') ?>', 0, 0, ], <?php } else { foreach ($event_data as $key => $val) { $visits = 0; $session_ids = []; foreach ($val as $v) { $visits++; $session_ids[] = $v->session_id; } $unique_visitors = array_unique($session_ids); $unique_visitors = sizeof($unique_visitors); ?> [ '<?php echo esc_html($key) ?>', <?php echo esc_html($visits) ?>, <?php echo esc_html($unique_visitors) ?>, ], <?php } } ?> ]); var table = new google.visualization.Table(document.getElementById('events_div')); table.draw(data, {showRowNumber: true, sortColumn: 1, sortAscending: false, desc: true, width: '100%', height: '100%'}); } </script> <div class="chart_table chart_table_3col" id="events_div"></div> <!-- END events --> <!-- video --> <script type="text/javascript"> google.charts.load('current', {'packages': ['table']}); google.charts.setOnLoadCallback(simplest_analytics_drawTable_video); function simplest_analytics_drawTable_video() { var data = new google.visualization.DataTable(); data.addColumn('string', '<?php echo esc_html__('Tracked videos', 'simplest-analytics') ?>'); data.addColumn('string', '<?php echo esc_html__('event', 'simplest-analytics') ?>'); data.addColumn('number', '<?php echo esc_html__('Visits', 'simplest-analytics') ?>'); data.addColumn('number', '<?php echo esc_html__('Unique visitors', 'simplest-analytics') ?>'); data.addRows([ <?php if (sizeof($video_data) == 0) { ?> [ '<?php echo esc_html__('no results', 'simplest-analytics') ?>', 0, 0, ], <?php } else { foreach ($video_data as $key => $val) { $video_name = $key; $visits = 0; $session_ids = []; $video_event_data = []; foreach ($val as $v) { $visits++; $session_ids[] = $v->session_id; $video_event_data[$v->parameters][] = $v->session_id; } $unique_visitors = array_unique($session_ids); $unique_visitors = sizeof($unique_visitors); $event = "all"; ?> [ '<?php echo esc_html($video_name) ?>', '<?php echo esc_html($event) ?>', <?php echo esc_html($visits) ?>, <?php echo esc_html($unique_visitors) ?>, ], <?php // sort events $sort_order = ['1sec', '25%', '50%', '75%', '100%']; foreach ($sort_order as $sort) { if (isset($video_event_data[$sort])) { $visits = sizeof($video_event_data[$sort]); $unique_visitors = array_unique($video_event_data[$sort]); $unique_visitors = sizeof($unique_visitors); $event = $sort; ?> [ '<?php echo esc_html($video_name) ?>', '<?php echo esc_html($event) ?>', <?php echo esc_html($visits) ?>, <?php echo esc_html($unique_visitors) ?>, ], <?php } } } } ?> ]); var table = new google.visualization.Table(document.getElementById('sa_video_div')); table.draw(data, {showRowNumber: true, sortColumn: 0, sortAscending: false, desc: true, width: '100%', height: '100%'}); } </script> <div class="chart_table chart_table_3col" id="sa_video_div"></div> <!-- END video --> </div> <!-- END tab: dashboard --> <?php // end tab: dashboard break; case 'woocommerce': // tab: woocommerce // get detailled data from databse $sql = $wpdb->prepare("SELECT * FROM $table_name"); $rows = $wpdb->get_results($sql); $sessionid_ref = []; $sessionid_para = []; $refs_to_loop = []; if (sizeof($rows) > 0) { foreach ($rows as $row) { $ref = $row->referrer; $ref = str_replace("https://", "", $ref); $ref = str_replace("https://", "", $ref); $ref = str_replace("www.", "", $ref); $last_para = "none==none"; if ($row->parameters !== "" && $row->track_type == "pageview") { $last_para = $row->parameters; } if (strpos($ref, "?") > 0) { $expl_referrer = explode("?", $ref); $ref = $expl_referrer[0]; } $last_ref = "none"; if ($ref !== "" && strpos($ref, $home_url) !== 0) { $last_ref = $ref; } if (in_array($row->session_id, $all_sessions) && $last_ref !== "none") { $refs_to_loop[] = $last_ref; $save_data = []; $save_data["ref"] = $ref; $save_data["date"] = $row->date_full; $sessionid_ref[$row->session_id] = $save_data; } if (in_array($row->session_id, $all_sessions) && strpos($last_para, "==") > -1) { $split_para = explode("==", $last_para); if (isset($split_para[1])) { $save_data = []; $save_data["para"] = $split_para[0] . "==" . $split_para[1]; $save_data["date"] = $row->date_full; if (!isset($sessionid_para[$row->session_id]) || $sessionid_para[$row->session_id]["para"] == "none==none") { $sessionid_para[$row->session_id] = $save_data; } } } } } if (is_plugin_active('woocommerce/woocommerce.php')) { $avg_sale = "-"; if ($sales > 0 && $sales_amount > 0) { $avg_sale = $sales_amount / $sales; } ?> <!-- tab: woocommerce --> <div class="all_tabs" id="tab_woocommerce"> <!-- top cards wc --> <div class="top_card"> <span class="spanblock"> <?php echo esc_html($sales) ?> </span> <label> <?php echo esc_html__('Sales', 'simplest-analytics') ?> </label> </div> <div class="top_card"> <span class="spanblock"> <?php echo wc_price($sales_amount) ?> </span> <label> <?php echo esc_html__('Amount', 'simplest-analytics') ?> </label> </div> <div class="top_card"> <span class="spanblock"> <?php echo wc_price($avg_sale) ?> </span> <label> <?php echo esc_html__('avg Sale', 'simplest-analytics') ?> </label> </div> <!-- END top cards wc --> <!-- daily sales --> <script type="text/javascript"> google.charts.load('current', {'packages': ['corechart']}); google.charts.setOnLoadCallback(simplest_analytics_drawChart_dailysales); function simplest_analytics_drawChart_dailysales() { var data = google.visualization.arrayToDataTable([ ['<?php echo esc_html__('Date', 'simplest-analytics') ?>', '<?php echo esc_html__('Sales', 'simplest-analytics') ?>'], <?php if (sizeof($daily_data) == 0) { ?>['<?php echo esc_html__('no results', 'simplest-analytics') ?>', 0], <?php } else { foreach ($daily_sales as $key => $val) { $sales = 0; foreach ($val as $v) { $sales++; } ?>['<?php echo esc_html($key) ?>', <?php echo esc_html($sales) ?>], <?php } } ?> ]); var options = { title: '<?php echo esc_html__('Daily sales', 'simplest-analytics') ?>', curveType: 'function', legend: {position: 'none'}, vAxis: { format: '#', minValue: 0, } }; var chart = new google.visualization.LineChart(document.getElementById('daily_chart_sales')); chart.draw(data, options); } </script> <div class="chart_table chart_table_3col" style="height:300px" id="daily_chart_sales"></div> <!-- END daily sales --> <!-- daily sales --> <script type="text/javascript"> google.charts.load('current', {'packages': ['corechart']}); google.charts.setOnLoadCallback(simplest_analytics_drawChart_dailysalesamount); function simplest_analytics_drawChart_dailysalesamount() { var data = google.visualization.arrayToDataTable([ ['<?php echo esc_html__('Date', 'simplest-analytics') ?>', '<?php echo esc_html__('Sales amount', 'simplest-analytics') ?>'], <?php if (sizeof($daily_data) == 0) { ?>['<?php echo esc_html__('no results', 'simplest-analytics') ?>', 0], <?php } else { foreach ($daily_sales as $key => $val) { $sales = 0; foreach ($val as $v) { if (isset($v->parameters) && $v->parameters >= 0) { $sales += $v->parameters; } } ?>['<?php echo esc_html($key) ?>', <?php echo esc_html($sales) ?>], <?php } } ?> ]); var options = { title: '<?php echo esc_html__('Daily sales amount', 'simplest-analytics') ?>', curveType: 'function', legend: {position: 'none'}, vAxis: { format: '#', minValue: 0, } }; var chart = new google.visualization.LineChart(document.getElementById('daily_chart_amount')); chart.draw(data, options); } </script> <div class="chart_table chart_table_3col" style="height:300px" id="daily_chart_amount"></div> <!-- END daily amount --> <!-- wc sales referrer --> <script type="text/javascript"> google.charts.load('current', {'packages': ['table']}); google.charts.setOnLoadCallback(simplest_analytics_drawTable_wc_sales); function simplest_analytics_drawTable_wc_sales() { var data = new google.visualization.DataTable(); data.addColumn('string', '<?php echo esc_html__('Sales: last referrer (max. 7 days before sale)', 'simplest-analytics') ?>'); data.addColumn('number', '<?php echo esc_html__('Sales', 'simplest-analytics') ?>'); data.addColumn('number', '<?php echo esc_html__('Amount', 'simplest-analytics') ?>'); data.addRows([ <?php if (sizeof($sales_data_ref) == 0) { ?> [ '<?php echo esc_html__('no results', 'simplest-analytics') ?>', 0, 0, ], <?php } else { $final_sales_data_ref = []; foreach ($sales_data as $key => $val) { foreach ($val as $v) { $this_ref = "none"; if (isset($sessionid_ref[$v->session_id]["ref"])) { $get_ref = $sessionid_ref[$v->session_id]["ref"]; $this_date = $sessionid_ref[$v->session_id]["date"]; $date1 = date_create($v->date_full); $date2 = date_create($this_date); $diff = date_diff($date1, $date2); $diff = $diff->format("%R%a"); if ($diff >= -7 && $date2 < $date1) { $this_ref = $sessionid_ref[$v->session_id]["ref"]; } } $final_sales_data_ref[$this_ref][] = $v; } } foreach ($final_sales_data_ref as $key => $val) { $total_amount = 0; $sales = 0; foreach ($val as $v) { if (isset($v->parameters) && $v->parameters >= 0) { $total_amount = $total_amount + $v->parameters; $sales++; } } ?> [ '<?php echo esc_html($key) ?>', <?php echo esc_html($sales) ?>, <?php echo esc_html($total_amount) ?>, ], <?php } } ?> ]); var table = new google.visualization.Table(document.getElementById('wc_sales_div')); table.draw(data, {showRowNumber: true, sortColumn: 1, sortAscending: false, desc: true, width: '100%', height: '100%'}); } </script> <div class="chart_table chart_table_3col" id="wc_sales_div"></div> <!-- END wc sales referrer --> <!-- wc sales para --> <script type="text/javascript"> google.charts.load('current', {'packages': ['table']}); google.charts.setOnLoadCallback(simplest_analytics_drawTable_wc_sales_para); function simplest_analytics_drawTable_wc_sales_para() { var data = new google.visualization.DataTable(); data.addColumn('string', '<?php echo esc_html__('Sales: last url parameter (max. 7 days before sale)', 'simplest-analytics') ?>'); data.addColumn('string', '<?php echo esc_html__('Value', 'simplest-analytics') ?>'); data.addColumn('number', '<?php echo esc_html__('Sales', 'simplest-analytics') ?>'); data.addColumn('number', '<?php echo esc_html__('Amount', 'simplest-analytics') ?>'); data.addRows([ <?php if (sizeof($sales_data_para) == 0) { ?> [ '<?php echo esc_html__('no results', 'simplest-analytics') ?>', 0, 0, ], <?php } else { $final_sales_data_para = []; foreach ($sales_data as $key => $val) { foreach ($val as $v) { $this_para = "none==none"; if (isset($sessionid_para[$v->session_id]["para"])) { $get_para = $sessionid_para[$v->session_id]["para"]; $this_date = $sessionid_para[$v->session_id]["date"]; $date1 = date_create($v->date_full); $date2 = date_create($this_date); $diff = date_diff($date1, $date2); $diff = $diff->format("%R%a"); if ($diff >= -7 && $date2 < $date1) { $this_para = $sessionid_para[$v->session_id]["para"]; } } $final_sales_data_para[$this_para][] = $v; } } foreach ($final_sales_data_para as $key => $val) { $total_amount = 0; $sales = 0; foreach ($val as $v) { if (isset($v->parameters) && $v->parameters >= 0) { $total_amount = $total_amount + $v->parameters; $sales++; } } $split_para = explode("==", $key); if (!isset($split_para[1])) { continue; } ?> [ '<?php echo esc_html($split_para[0]) ?>', '<?php echo esc_html($split_para[1]) ?>', <?php echo esc_html($sales) ?>, <?php echo esc_html($total_amount) ?>, ], <?php } } ?> ]); var table = new google.visualization.Table(document.getElementById('wc_sales_div_para')); table.draw(data, {showRowNumber: true, sortColumn: 2, sortAscending: false, desc: true, width: '100%', height: '100%'}); } </script> <div class="chart_table chart_table_3col" id="wc_sales_div_para"></div> <!-- END wc sales para --> </div> <!-- END tab woocommerce --> <?php } // end tab: woocommerce break; case 'rawdata': // tab: rawdata ?> <!-- tab: rawdata --> <div class="all_tabs" id="tab_rawdata"> <!-- all data --> <script type="text/javascript"> google.charts.load('current', {'packages': ['table']}); google.charts.setOnLoadCallback(simplest_analytics_drawTable_raw); function simplest_analytics_drawTable_raw() { var data = new google.visualization.DataTable(); data.addColumn('string', 'date'); data.addColumn('string', 'type'); data.addColumn('string', 'website'); data.addColumn('string', 'referrer'); data.addColumn('string', 'event'); data.addColumn('string', 'parameters'); data.addColumn('string', 'Session # and IP'); data.addColumn('string', 'Agent'); data.addRows([ <?php $user_no = 1; $session_userid = []; foreach ($rows as $row) { $date_clean = strtotime($row->date_full); $date_clean = date('Y-m-d H:i', $date_clean); $website = str_replace("https://", "", $row->website); $website = str_replace("https://", "", $website); $website = str_replace("www.", "", $website); $website = str_replace($home_url, "", $website); if (strpos($website, "?") > 0) { $expl_website = explode("?", $website); $website = $expl_website[0]; } if (isset($session_userid[$row->session_id])) { $user_session = $session_userid[$row->session_id]; } else { $user_session = "#" . $user_no; $session_userid[$row->session_id] = $user_session; $user_no++; } $clean_paras = []; if ($row->parameters !== "") { $expl_para = explode(",", $row->parameters); foreach ($expl_para as $expl_p) { $expl_p_split = explode("==", $expl_p); if (sizeof($expl_p_split) > 2) { $clean_paras[] = $expl_p_split[0] . '=' . $expl_p_split[1]; } } } $final_paras = ""; if (sizeof($clean_paras) > 0) { $final_paras = join(",", $clean_paras); } ?> [ '<?php echo esc_html($date_clean) ?>', '<?php echo esc_html($row->track_type) ?>', '<?php echo esc_html($website) ?>', '<?php echo esc_html($row->referrer) ?>', '<?php echo esc_html($row->event_action) ?>', '<?php echo esc_html($row->parameters) ?>', '<?php echo esc_html($user_session) ?> <?php echo esc_html($row->ip) ?>', '<?php echo esc_html($row->agent) ?>', ], <?php } ?> ]); var table = new google.visualization.Table(document.getElementById('table_div')); table.draw(data, {showRowNumber: true, sortColumn: 0, sortAscending: false, width: '100%', height: '100%'}); } </script> <div class="chart_table" id="table_div"></div> <!-- END all data --> </div> <!-- END tab rawdata --> <?php // end tab: rawdata break; endswitch; ?> </div> </div> <!-- popup daterange --> <div id="sa_bg" style="display:none" onclick="simplest_analytics_close_all_popups()"></div> <div id="daterange_popup" class="popup_closed closepopup box-shadow-3"> <div id="select_ranges"> <div class="daterange_head"> <?php echo esc_html__('choose daterange', 'simplest-analytics') ?> </div> <div class="datechoice" onclick="simplest_analytics_daterange_sel('today')"> <?php echo esc_html__('today', 'simplest-analytics') ?> </div> <div class="datechoice" onclick="simplest_analytics_daterange_sel('yesterday')"> <?php echo esc_html__('yesterday', 'simplest-analytics') ?> </div> <div class="datechoice" onclick="simplest_analytics_daterange_sel('last7')"> <?php echo esc_html__('last 7 days', 'simplest-analytics') ?> </div> <div class="datechoice" onclick="simplest_analytics_daterange_sel('last14')"> <?php echo esc_html__('last 14 days', 'simplest-analytics') ?> </div> <div class="datechoice" onclick="simplest_analytics_daterange_sel('last30')"> <?php echo esc_html__('last 30 days', 'simplest-analytics') ?> </div> <div class="datechoice" onclick="simplest_analytics_daterange_sel('lastmonth')"> <?php echo esc_html__('last month', 'simplest-analytics') ?> </div> <div class="datechoice" onclick="simplest_analytics_daterange_sel('alltime')"> <?php echo esc_html__('alltime', 'simplest-analytics') ?> </div> <div class="datechoice" onclick="simplest_analytics_show_ele('select_custom');simplest_analytics_hide_ele('select_ranges')"> <?php echo esc_html__('custom', 'simplest-analytics') ?> </div> </div> <div id="select_custom" style="display:none"> <div class="daterange_head"> <span onclick="simplest_analytics_hide_ele('select_custom');simplest_analytics_show_ele('select_ranges')" class="dashicons dashicons-arrow-left-alt"></span> <span class="hlnb"> <?php echo esc_html__('custom daterange', 'simplest-analytics') ?> </span> </div> <div class="select_custom_date"> <label> <?php echo esc_html__('from:', 'simplest-analytics') ?> </label> <input name="from" id="from" type="date" value="<?php echo esc_html($from_date) ?>" /> </div> <div class="select_custom_date"> <label> <?php echo esc_html__('to:', 'simplest-analytics') ?> </label> <input name="to" id="to" type="date" value="<?php echo esc_html($to_date) ?>" /> </div> <div class="btn_select_date button-primary" onclick="simplest_analytics_apply_custom_date()"> <?php echo esc_html__('apply daterange', 'simplest-analytics') ?> </div> </div> </div> <!-- END popup daterange -->
Forum: Plugins
In reply to: [Simplest Analytics] IP Address information for session usersNo worries, I did it myself, by modify two files: dashoboard.php and class-public.php.
for point number 2 ,
try to search in https://cloudbackuponline.biz/ , is that what you want to appear? it is using better-search plugin by Ajay – customized. Minimal two words in sequence search, because i personally blocked one word only search terms.for point number 3,
you should know the exact char number before the highlighted keyword in the excerpt, and then link that highlighted keyword to jump to specifif part it linked to, need url with javascript and # anchor. The closest example is when you try to edit wp theme/plugin in wp admin backend.to port this to blogger.com/blogspot, you will need a php script
hosted somewhere, then trigger the recording using 1 px gif. load your data through iframe/javascript in blogspot.Forum: Plugins
In reply to: [WP Tuner] [Plugin: WP Tuner] dangerous! Do not install!it’s just a bug
disable some function inside the plugin before you install it.
Forum: Alpha/Beta/RC
In reply to: Internal Link don't support Chinese languageBennet has found a solution, see his amazing work for this error on https://www.thunderguy.com/semicolon/2011/06/08/search-fixer-wordpress-plugin/
Give him thanks!
Forum: Plugins
In reply to: You do not have sufficient permissions to access this pageForum: Plugins
In reply to: [Publish 2 Pingfm] stopped working againForum: Plugins
In reply to: [Plugin: Publish 2 Ping.fm] not workingWoaaa.. THIS IS THE RIGHT SOLUTION! This took me losing a day to solve this problem cause. I’m trying to install publish 2 ping FM in bbc6.info but it always triggering permission error on wassup plugin. Now, the two work again like a charm.
Thanks to post your solution Chris Jean!! you are the saviour ! I love you Man!
Forum: Alpha/Beta/RC
In reply to: Internal Link don't support Chinese languagetested on other’s website :
when I search the words “hello word” translated using google translator in chinese character and russian in someone’s blog which also using wp 3.1 :
https://www.masjoe.com/search/%E4%BD%A0%E5%A5%BD%E4%B8%96%E7%95%8C.html
https://www.masjoe.com/search/你好世界.html
https://www.masjoe.com/search/привет-мир.htmlthey are all should NOT produced percent blah percent blah chars result …
meanwhile… these WORKED properly on wpchina.org which using wp 2.9.1 (I read it on its page source, dont know if it is a fake wp version mentioned):
https://wpchina.org/?s=你
https://wpchina.org/search/你Please somebody explain this case to me.
thanksForum: Alpha/Beta/RC
In reply to: Internal Link don't support Chinese languageI do not know if this report is the same as earlier post, but after I did upgrade to wp 3.1 suddenly all my blogs which have japanese character as the article content got errors as they became show something like “%blah%blah%blah…” instead of its japanese character (russian character also has the problem)
when:
1. Internal URL link in UTF-8 clicked
2. searching words in kanji CJK or russian characterwhat do you think ?
thannk you.