mrapi
Forum Replies Created
-
k.thanks
Forum: Plugins
In reply to: [Responsive Lightbox & Gallery] Gallery not workingI have the same problem as 1.:no matter what number of columns I select, the gallery will always end up using a 4-column layout
- This reply was modified 6 years, 5 months ago by mrapi.
Forum: Fixing WordPress
In reply to: WP_DEBUG=true but no message is shownHi,no plugin for debug/monitor
in debug.log writes only fatal errors like this
<?php echo($qry->current_post(')==0 ? 'active':''); ?>
error there: current_post(‘)
thanks.- This reply was modified 8 years, 4 months ago by mrapi.
Forum: Fixing WordPress
In reply to: WP_DEBUG=true but no message is shownHi,thanks for the answer
my problem is not to understand what is wrong,I want WordPress to notify me by a error message in case of using a filed name like a method,just like a simple PHP script does
thanksForum: Themes and Templates
In reply to: [Vantage] Image display problem after upgrading to v1.3.4I’ve made same css comparation and found
v1.2.3
.full-container .msDefaultImage{ height: auto; }
and in v.1.3.4
.full-container .msDefaultImage{ height: 420; }
I’ve put in my child theme style old value and seems to work now
Forum: Themes and Templates
In reply to: [Vantage] Image display problem after upgrading to v1.3.4Any fix?we’re using theme from almost 2 years(there is a child theme) and always update it when change and works but this time update breaks images,take a look there
https://i.imgur.com/FhR0QzR.pngthanks
Forum: Themes and Templates
In reply to: [Vantage] Image display problem after upgrading to v1.3.4Hi,there is theme slider
Yes,I’ve rolled back to v1.2.3 to get fixed.thanks!
Forum: Themes and Templates
In reply to: [Vantage] Image display problem after upgrading to v1.3.4Please ..some help here,update breaks our site display ??
Forum: Hacks
In reply to: Visits on the site counted twiceI’ve tested all 3 alternatives:
with link for chrome I could see the cookie
with firebug I only see 2 items ?? :
https://img191.imageshack.us/img191/3518/ri8g.jpgwith LiveHTTPHeaders,lots of data,I’ve found it :
POST /wordpress/wp-admin/admin-ajax.php HTTP/1.1
User-Agent: Mozilla/5.0 (Windows NT 5.1; rv:26.0) Gecko/20100101 Firefox/26.0
Accept: */*
Accept-Language: en-US,en;q=0.5
Accept-Encoding: gzip, deflate
Content-Type: application/x-www-form-urlencoded; charset=UTF-8
X-Requested-With: XMLHttpRequest
Content-Length: 26
Cookie: exps_visited=1; fc=fcVal=2019808097268502242; _ga=GA1.2.2017174040.1382182233
DNT: 1
Connection: keep-alive
Pragma: no-cache
Cache-Control: no-cache
action=fn_visit_AddtoCount
HTTP/1.1 200 OK
Server: ngx_openresty
Date: Mon, 16 Dec 2013 18:03:08 GMT
Content-Type: text/html; charset=UTF-8
Content-Length: 0
Connection: keep-alive
X-Robots-Tag: noindex
X-Content-Type-Options: nosniff
Expires: Wed, 11 Jan 1984 05:00:00 GMT
Cache-Control: no-cache, must-revalidate, max-age=0
Pragma: no-cache
X-Frame-Options: SAMEORIGIN
———————————————————-thanks!
Forum: Hacks
In reply to: Visits on the site counted twiceThanks, plugins_url() function it is ok.
One question: I’ve tried to see cookie created on first visit (exps_visited) so with Chrome – right click on the page – Inspect element – Resources – Cookies …
but is not listed there although is seem to work,visits on the page are counted once for current browser session.
How can I see the cookie?
Thanks.Forum: Hacks
In reply to: Visits on the site counted twiceon localhost seems to work:
I need just one opinion about the code:php file :
<?php /* Plugin Name: Drew's Browser Detector Plugin Plugin URI: https://www.falkonproductions.com/browserDetector/ Description: This plugin will store the user agents for later parsing and display Author: Drew Falkman Version: 1.0 Author URI: https://www.falkonproductions.com/ */ function bdetector_activate() { global $wpdb; $table_name = $wpdb->prefix . 'bdetector'; // will return NULL if there isn't one if ( $wpdb->get_var("SHOW TABLES LIKE '" . $table_name."'") != $table_name ) { $sql = 'CREATE TABLE ' . $table_name . '( id INTEGER(10) UNSIGNED AUTO_INCREMENT, hit_date TIMESTAMP DEFAULT CURRENT_TIMESTAMP, user_agent VARCHAR (255), PRIMARY KEY (id) )'; require_once(ABSPATH . 'wp-admin/includes/upgrade.php'); dbDelta($sql); add_option('bdetector_database_version','1.0'); } } register_activation_hook(__FILE__,'bdetector_activate'); add_action('wp_enqueue_scripts', function() { wp_enqueue_script('ajax-script_cvisit','/wp-content/plugins/browser_detector/js/count_visits.js', array('jquery'), '1.0', true); wp_localize_script( 'ajax-script_cvisit', 'ajax_object_cv', array( 'ajax_url' => admin_url( 'admin-ajax.php' )) ); }); function fn_visit_AddtoCount() { if (!isset($_COOKIE['exps_visited'])) { setcookie('exps_visited',1); global $wpdb; $table_name = $wpdb->prefix . 'bdetector'; $wpdb->insert($table_name,array('user_agent'=>$_SERVER['REMOTE_ADDR'], 'hit_date'=>current_time( 'mysql' ) ), array('%s','%s') ); } die(); } add_action('wp_ajax_fn_visit_AddtoCount', 'fn_visit_AddtoCount'); add_action('wp_ajax_nopriv_fn_visit_AddtoCount', 'fn_visit_AddtoCount');
js file :
var $j = jQuery.noConflict(); $j(document).ready( function() { $j.ajax( { type:"POST", url: ajax_object_cv.ajax_url, data: { action: 'fn_visit_AddtoCount' }, success:function(response) { // alert('Got this from the server: ' + response); } }); } );
also it is possible to use a function to get plugin directory instead of using this:
/wp-content/plugins/browser_detector’…… ?thanks
Forum: Hacks
In reply to: Visits on the site counted twiceNow I’ve got one idea: I’ll try to use jQuery+cookie creation/detection then with ajax will send data to server
Forum: Hacks
In reply to: Visits on the site counted twiceHi bcworks.
31.22.4.26 is a part of the problem,also there seems to be lots of other IPs part of the problem,as in imagehttps://imageshack.us/a/img802/4458/ph3c.jpg
https://imageshack.us/a/img801/448/fm9t.jpg
thanksForum: Hacks
In reply to: Visits on the site counted twiceHi Jesin,indeed good points of debugging,tested but the same,
I give up,I will use this plugin as it is,lot of time wasted also for you,
thanksForum: Hacks
In reply to: Visits on the site counted twiceI’ve replaced wp_footer with init:
//add_action('wp_footer','bdetector_insert_useragent'); add_action('init','bdetector_insert_useragent');
nothing changed,also the same thing with JavaScript disabled
??thanks.