Forum Replies Created

Viewing 15 replies - 1 through 15 (of 40 total)
  • Thread Starter mrapi

    (@mrapi)

    k.thanks

    I 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.
    Thread Starter mrapi

    (@mrapi)

    Hi,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.
    Thread Starter mrapi

    (@mrapi)

    Hi,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
    thanks

    Thread Starter mrapi

    (@mrapi)

    I’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

    Thread Starter mrapi

    (@mrapi)

    Any 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.png

    thanks

    Thread Starter mrapi

    (@mrapi)

    Hi,there is theme slider
    Yes,I’ve rolled back to v1.2.3 to get fixed.

    thanks!

    Thread Starter mrapi

    (@mrapi)

    Please ..some help here,update breaks our site display ??

    Thread Starter mrapi

    (@mrapi)

    I’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.jpg

    with 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!

    Thread Starter mrapi

    (@mrapi)

    Thanks, 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.

    Thread Starter mrapi

    (@mrapi)

    on 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

    Thread Starter mrapi

    (@mrapi)

    Now I’ve got one idea: I’ll try to use jQuery+cookie creation/detection then with ajax will send data to server

    Thread Starter mrapi

    (@mrapi)

    Hi 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 image

    https://imageshack.us/a/img802/4458/ph3c.jpg
    https://imageshack.us/a/img801/448/fm9t.jpg
    thanks

    Thread Starter mrapi

    (@mrapi)

    Hi 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,
    thanks

    Thread Starter mrapi

    (@mrapi)

    I’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.

Viewing 15 replies - 1 through 15 (of 40 total)