Forum Replies Created

Viewing 15 replies - 16 through 30 (of 57 total)
  • Plugin Author GabSoftware

    (@gabsoftware)

    Thanks! I’ll try to integrate it in the next release 🙂

    Plugin Author GabSoftware

    (@gabsoftware)

    Hi,

    Sorry for that.

    Maybe the IP-to-country database is outdated. I will update it in the next release. I can’t give an ETA though.

    All the best,

    Gabriel

    Plugin Author GabSoftware

    (@gabsoftware)

    Hi there!

    You will always have different numbers between Counterize and Google Analytics because Counterize filters different bots than Google Analytics and for various other reasons. However it’s not normal that Counterize itself displays different numbers for the same information.

    So, firstly, what is your Counterize version?

    Then, could you tell me how did you get the Unique views on the bottom of your page? Did you write any PHP code?

    Also, could you make a copy of the table in the “Traffic” page of Counterize and paste it here?

    Thank you for using Counterize 🙂

    Thread Starter GabSoftware

    (@gabsoftware)

    I do not have the issue anymore. Thanks!

    Thread Starter GabSoftware

    (@gabsoftware)

    The author hasn’t updated the plugin with the fixes in the new version. I have to modify everything by hand again.

    Thanks! 🙂

    Hi Christine,

    Why does this post appear in the “See what others are saying” section of the Counterize plugin?

    Please move it if possible 🙂

    Best,
    Gabriel

    Thread Starter GabSoftware

    (@gabsoftware)

    Changed the following lines in bad-behavior-wordpress-admin.php:

    line 57:
    $r = ( isset( $_SESSION['httpbl'] ) && isset( $_SESSION['httpbl'][$ip] ) ? $_SESSION['httpbl'][$ip] : false );

    lines 107~113:

    $paged = 0 + ( isset( $_GET['paged'] ) ? $_GET['paged'] : 0 ); if (!$paged) $paged = 1;
    if ( isset( $_GET['key'] ) ) $where .= "AND <code>key</code> = '" . $wpdb->escape($_GET['key']) . "' ";
    if ( isset( $_GET['blocked'] ) ) $where .= "AND <code>key</code> != '00000000' ";
    else if ( isset( $_GET['permitted'] ) ) $where .= "AND <code>key</code> = '00000000' ";
    if ( isset( $_GET['ip'] ) ) $where .= "AND <code>ip</code> = '" . $wpdb->escape($_GET['ip']) . "' ";
    if ( isset( $_GET['user_agent'] ) ) $where .= "AND <code>user_agent</code> = '" . $wpdb->escape($_GET['user_agent']) . "' ";
    if ( isset( $_GET['request_method'] ) ) $where .= "AND <code>request_method</code> = '" . $wpdb->escape($_GET['request_method']) . "' ";

    lines 142~152:

    <?php if ( isset( $_GET['key'] ) ) echo "Status [<a href=\"" . remove_query_arg(array("paged", "key"), $request_uri) . "\">X</a>] "; ?>
    <?php if ( isset( $_GET['blocked'] ) ) echo "Blocked [<a href=\"" . remove_query_arg(array("paged", "blocked", "permitted"), $request_uri) . "\">X</a>] "; ?>
    <?php if ( isset( $_GET['permitted'] ) ) echo "Permitted [<a href=\"" . remove_query_arg(array("paged", "blocked", "permitted"), $request_uri) . "\">X</a>] "; ?>
    <?php if ( isset( $_GET['ip'] ) ) echo "IP [<a href=\"" . remove_query_arg(array("paged", "ip"), $request_uri) . "\">X</a>] "; ?>
    <?php if ( isset( $_GET['user_agent'] ) ) echo "User Agent [<a href=\"" . remove_query_arg(array("paged", "user_agent"), $request_uri) . "\">X</a>] "; ?>
    <?php if ( isset( $_GET['request_method'] ) ) echo "GET/POST [<a href=\"" . remove_query_arg(array("paged", "request_method"), $request_uri) . "\">X</a>] "; ?>
    <?php else: ?>
    Displaying all <strong><?php echo $totalcount; ?></strong> records<br/>
    <?php endif; ?>
    <?php if (! isset( $_GET['key'] ) && ! isset( $_GET['blocked'] ) ) { ?><a href="<?php echo add_query_arg(array("blocked" => "1", "permitted" => "0", "paged" => false), $request_uri); ?>">Show Blocked</a> <?php } ?>
    <?php if (! isset( $_GET['key'] ) && ! isset( $_GET['permitted'] ) ) { ?><a href="<?php echo add_query_arg(array("permitted" => "1", "blocked" => "0", "paged" => false), $request_uri); ?>">Show Permitted</a> <?php } ?>

    Then only after all those modifications, the warnings and notices seem to be gone 🙂

    Thread Starter GabSoftware

    (@gabsoftware)

    Fixed lot of notices generated by the bb2_options() function:

    $request_uri =  ( isset( $_SERVER["REQUEST_URI"] ) ? $_SERVER["REQUEST_URI"] : false );
    if ( ! $request_uri ) $request_uri = $_SERVER['SCRIPT_NAME'];	# IIS
    
    if ( isset( $_POST ) ) {
    	if ( isset( $_POST['display_stats'] ) ) {
    		$settings['display_stats'] = true;
    	} else {
    		$settings['display_stats'] = false;
    	}
    	if ( isset( $_POST['strict'] ) ) {
    		$settings['strict'] = true;
    	} else {
    		$settings['strict'] = false;
    	}
    	if ( isset( $_POST['verbose'] ) ) {
    		$settings['verbose'] = true;
    	} else {
    		$settings['verbose'] = false;
    	}
    	if ( isset( $_POST['logging'] ) ) {
    		if ($_POST['logging'] == 'verbose') {
    			$settings['verbose'] = true;
    			$settings['logging'] = true;
    		} else if ($_POST['logging'] == 'normal') {
    			$settings['verbose'] = false;
    			$settings['logging'] = true;
    		} else {
    			$settings['verbose'] = false;
    			$settings['logging'] = false;
    		}
    	} else {
    		$settings['verbose'] = false;
    		$settings['logging'] = false;
    	}
    	if ( isset( $_POST['httpbl_key'] ) ) {
    		$settings['httpbl_key'] = $_POST['httpbl_key'];
    	} else {
    		$settings['httpbl_key'] = '';
    	}
    	if ( isset( $_POST['httpbl_threat'] ) ) {
    		$settings['httpbl_threat'] = $_POST['httpbl_threat'];
    	} else {
    		$settings['httpbl_threat'] = '25';
    	}
    	if ( isset( $_POST['httpbl_maxage'] ) ) {
    		$settings['httpbl_maxage'] = $_POST['httpbl_maxage'];
    	} else {
    		$settings['httpbl_maxage'] = '30';
    	}
    	if ( isset( $_POST['offsite_forms'] ) ) {
    		$settings['offsite_forms'] = true;
    	} else {
    		$settings['offsite_forms'] = false;
    	}
    	if ( isset( $_POST['reverse_proxy'] ) ) {
    		$settings['reverse_proxy'] = true;
    	} else {
    		$settings['reverse_proxy'] = false;
    	}
    	if ( isset( $_POST['reverse_proxy_header'] ) ) {
    		$settings['reverse_proxy_header'] = uc_all($_POST['reverse_proxy_header']);
    	} else {
    		$settings['reverse_proxy_header'] = 'X-Forwarded-For';
    	}
    	if ( isset( $_POST['reverse_proxy_addresses'] ) ) {
    		$settings['reverse_proxy_addresses'] = preg_split("/[\s,]+/m", $_POST['reverse_proxy_addresses']);
    	} else {
    		$settings['reverse_proxy_addresses'] = array();
    	}
    	bb2_write_settings($settings);

    Basically, please use isset() to test if a variable has been set. 🙂

    Thread Starter GabSoftware

    (@gabsoftware)

    Fixed use of deprecated user levels in bad-behavior-wordpress-admin.php.

    Changed:

    line 22
    add_options_page(__("Bad Behavior"), __("Bad Behavior"), ( function_exists('current_user_can') ? 'manage_options' : 8 ), 'bb2_options', 'bb2_options');

    line 24
    add_management_page(__("Bad Behavior"), __("Bad Behavior"), ( function_exists('current_user_can') ? 'manage_options' : 8 ), 'bb2_manage', 'bb2_manage');

    Thread Starter GabSoftware

    (@gabsoftware)

    Also, warnings and notices were thrown on my blog frontend after defining in my wp-config.php:

    define( 'WP_DEBUG', TRUE );
    error_reporting( E_ALL | E_STRICT );
    ini_set('display_errors', 1);

    So I modified the file bad-behavior-wordpress.php.
    line 149:
    return ( isset( $url['path'] ) ? $url['path'] . '/' : '/' );

    line 167:
    if( ! isset( $_SESSION ) ) session_start();

    This got rid of the warnings and notices on my blog frontend.

    Thread Starter GabSoftware

    (@gabsoftware)

    Also while saving settings, I got the following:

    Notice: Undefined index: display_stats in /xxx/wp-content/plugins/bad-behavior/bad-behavior-wordpress-admin.php on line 218
    Notice: Undefined index: strict in /xxx/wp-content/plugins/bad-behavior/bad-behavior-wordpress-admin.php on line 223
    Notice: Undefined index: verbose in /xxx/wp-content/plugins/bad-behavior/bad-behavior-wordpress-admin.php on line 228
    Notice: Undefined index: offsite_forms in /xxx/wp-content/plugins/bad-behavior/bad-behavior-wordpress-admin.php on line 263
    Notice: Undefined index: reverse_proxy in /xxx/wp-content/plugins/bad-behavior/bad-behavior-wordpress-admin.php on line 268

    Actually if you comment the error_reporting( E_NONE); line in proxy.php, you will certainly get errors such as:

    Warning: fopen() [function.fopen]: URL file-access is disabled in the server configuration in /xxx/wp-content/plugins/repress/proxy.php on line 209

    Warning: fopen(http://censoredwebsite.com/) [function.fopen]: failed to open stream: no suitable wrapper could be found in /hxxx/wp-content/plugins/repress/proxy.php on line 209

    I believe that this is because url_fopen support is disabled on most shared hosting services. The plugin author should find a way to circumvent that. Maybe using sockets instead of fopen?

    Forum: Hacks
    In reply to: Collapsible comments plugin.

    Hi,

    Your theme use a custom comment list, look in your theme’s functions.php file, you should find a function “custom_theme_comment”. There you should find the comment_text() function.

    Plugin Author GabSoftware

    (@gabsoftware)

    Wow, sorry for this problem, it’s good to hear you fixed it 🙂

Viewing 15 replies - 16 through 30 (of 57 total)