Forum Replies Created

Viewing 15 replies - 1 through 15 (of 22 total)
  • not sure. Diffs are:

    7c7
    < Version: 1.4
    ---
    > Version: 1.5
    10c10
    < Requires WordPress 2.1 or later. Not for use with WPMU.
    ---
    > Requires WordPress 2.7 or later. Not for use with WPMU.
    15a16
    > 1.5   - Kill iframes. Use blog's role/cap system to allow local users to view reports. Thanks to Stefanos Kofopoulos for helping to debug encoding issues.
    132c133
    < 		$hook = add_submenu_page('index.php', __('Blog Stats'), __('Blog Stats'), 'manage_options', 'stats', 'stats_reports_page');
    ---
    > 		$hook = add_submenu_page('index.php', __('Blog Stats'), __('Blog Stats'), 'publish_posts', 'stats', 'stats_reports_page');
    155c156
    < 	if ( isset( $_GET['noheader'] ) )
    ---
    > 	if ( isset( $_GET['dashboard'] ) )
    158,159c159,244
    < 	$day = isset( $_GET['day'] ) && preg_match( '/^\d{4}-\d{2}-\d{2}$/', $_GET['day'] ) ? "&day=$_GET[day]" : '';
    < 	echo "<iframe id='statsreport' frameborder='0' src='https://dashboard.wordpress.com/wp-admin/index.php?page=estats&blog=$blog_id&noheader=true$day'></iframe>";
    ---
    > 	$key = stats_get_api_key();
    > 	$day = isset( $_GET['day'] ) && preg_match( '/^\d{4}-\d{2}-\d{2}$/', $_GET['day'] ) ? $_GET['day'] : false;
    > 	$q = array(
    > 		'noheader' => 'true',
    > 		'proxy' => '',
    > 		'page' => 'stats',
    > 		'key' => $key,
    > 		'day' => $day,
    > 		'blog' => $blog_id,
    > 		'charset' => get_option('blog_charset'),
    > 	);
    > 	$args = array(
    > 		'view' => array('referrers', 'postviews', 'searchterms', 'clicks', 'post', 'table'),
    > 		'numdays' => 'int',
    > 		'day' => 'date',
    > 		'unit' => array(1, 7, 31),
    > 		'summarize' => null,
    > 		'post' => 'int',
    > 		'width' => 'int',
    > 		'height' => 'int',
    > 		'data' => 'data',
    > 	);
    > 	foreach ( $args as $var => $vals ) {
    > 		if ( ! isset($_GET[$var]) )
    > 			continue;
    > 		if ( is_array($vals) ) {
    > 			if ( in_array($_GET[$var], $vals) )
    > 				$q[$var] = $_GET[$var];
    > 		} elseif ( $vals == 'int' ) {
    > 			$q[$var] = intval($_GET[$var]);
    > 		} elseif ( $vals == 'date' ) {
    > 			if ( preg_match('/^\d{4}-\d{2}-\d{2}$/', $_GET[$var]) )
    > 				$q[$var] = $_GET[$var];
    > 		} elseif ( $vals == null ) {
    > 			$q[$var] = '';
    > 		} elseif ( $vals == 'data' ) {
    > 			if ( substr($_GET[$var], 0, 9) == 'index.php' )
    > 				$q[$var] = $_GET[$var];
    > 		}
    > 	}
    > 	if ( isset( $_GET['swf'] ) ) {
    > 		$url = "https://s-ssl.wordpress.com/wp-includes/charts/ofc/open-flash-chart.swf";
    > 	} elseif ( isset( $_GET['chart'] ) ) {
    > 		if ( preg_match('/^[a-z0-9-]+$/', $_GET['chart']) )
    > 			$url = "https://dashboard.wordpress.com/wp-includes/charts/{$_GET['chart']}.php";
    > 	} else {
    > 		$url = "https://dashboard.wordpress.com/wp-admin/index.php";
    > 	}
    >
    > 	$url = add_query_arg($q, $url);
    >
    > 	$get = wp_remote_get($url, array('timeout'=>300));
    >
    > 	if ( is_wp_error($get) || empty($get['body']) ) {
    > 		$http = $_SERVER['https'] ? 'https' : 'http';
    > 		$day = $day ? "&day=$day" : '';
    > 		echo "<iframe id='statsreport' frameborder='0' src='$https://dashboard.wordpress.com/wp-admin/index.php?page=estats&blog=$blog_id&noheader=true$day'></iframe>";
    > 	} else {
    > 		echo convert_post_titles($get['body']);
    > 	}
    > 	if ( isset( $_GET['noheader'] ) )
    > 		die;
    > }
    >
    > function convert_post_titles($html) {
    > 	global $wpdb, $stats_posts;
    > 	$pattern = "<span class='post-(\d+)-link'>.*?</span>";
    > 	if ( ! preg_match_all("!$pattern!", $html, $matches) )
    > 		return $html;
    > 	$posts = get_posts(array(
    > 		'include' => implode(',', $matches[1]),
    > 		'post_type' => 'any',
    > 		'numberposts' => -1,
    > 	));
    > 	foreach ( $posts as $post )
    > 		$stats_posts[$post->ID] = $post;
    > 	$html = preg_replace_callback("!$pattern!", 'convert_post_title', $html);
    > 	return $html;
    > }
    >
    > function convert_post_title($matches) {
    > 	global $stats_posts;
    > 	$post_id = $matches[1];
    > 	if ( isset($stats_posts[$post_id]) )
    > 		return '<a href="'.get_permalink($post_id).'" target="_blank">'.get_the_title($post_id).'</a>';
    > 	return sprintf(__("Post #%d"), $post_id);
    616c701
    < 	dashStats.not( '.dashboard-widget-control' ).load('index.php?page=stats&noheader&' + args );
    ---
    > 	dashStats.not( '.dashboard-widget-control' ).load('index.php?page=stats&noheader&dashboard&' + args );
    797c882,892
    < 	$http = ( !empty( $_SERVER['HTTPS'] ) ) ? 'https' : 'http';
    ---
    > 	$q = array(
    > 		'noheader' => 'true',
    > 		'proxy' => '',
    > 		'page' => 'stats',
    > 		'blog' => $blog_id,
    > 		'key' => stats_get_api_key(),
    > 		'chart' => '',
    > 		'unit' => $options['chart'],
    > 		'width' => $_width,
    > 		'height' => $_height,
    > 	);
    799c894
    < 	$src = clean_url( "$https://dashboard.wordpress.com/wp-admin/index.php?page=estats&blog=$blog_id&noheader=true&chart&unit=$options[chart]&width=$_width&height=$_height" );
    ---
    > 	$url = 'https://dashboard.wordpress.com/wp-admin/index.php';
    801c896,907
    < 	echo "<iframe id='stats-graph' class='stats-section' frameborder='0' style='width: {$width}px; height: {$height}px; overflow: hidden' src='$src'></iframe>";
    ---
    > 	$url = add_query_arg($q, $url);
    >
    > 	$get = wp_remote_get($url, array('timeout'=>300));
    >
    >
    > 	if ( is_wp_error($get) || empty($get['body']) ) {
    > 		$http = $_SERVER['https'] ? 'https' : 'http';
    > 		$src = clean_url( "$https://dashboard.wordpress.com/wp-admin/index.php?page=estats&blog=$blog_id&noheader=true&chart&unit=$options[chart]&width=$_width&height=$_height" );
    > 		echo "<iframe id='stats-graph' class='stats-section' frameborder='0' style='width: {$width}px; height: {$height}px; overflow: hidden' src='$src'></iframe>";
    > 	} else {
    > 		echo $get['body'];
    > 	}

    Same issue here. 3.0.6 with 2.7.1 on windows. Never got the edit dropdowns to work.

    Thread Starter shaky

    (@shaky)

    I also didn’t get a mail saying there were comments in the moderation queue. Is that normal too?

    I installed on an old blog the other day. I did think it felt slower, but I haven’t timed it.

    Same issue here. No LiveSearch

    I’m getting the same error now.

    My host says:

    “Access denied with code 406. Pattern match “\\$_GET” at
    POST_PAYLOAD”

    \\$_GET is blocked due to it’s use in a recent phpBB worm. Due you know why
    that string would be in the post content?

    I’m using default Kubrick and I get the error when trying to edit the theme. Seems sidebar.php contains $_GET

    Thread Starter shaky

    (@shaky)

    Thanks.

    Done and working fine. Check below for the patch as suggested by angusman.

    https://www.shakykaiser.com/blog/archives/2005/07/17/wordpress-upgrade/

    I’m getting the same thing. Fix above didn’t work either.

    I’ve cleared out the old rules, but still getting the previous link and then the 404 error

    Forum: Fixing WordPress
    In reply to: the_content
    Thread Starter shaky

    (@shaky)

    That is all I have. Haven’t changed the default at all.

    Same here. Also not displaying post count

    Thread Starter shaky

    (@shaky)

    Anyone?

    Forum: Fixing WordPress
    In reply to: the_content
    Thread Starter shaky

    (@shaky)

    Also, that page isn’t showing the image that is in that one post.

    Forum: Fixing WordPress
    In reply to: the_content
    Thread Starter shaky

    (@shaky)

    Try here:

    https://www.shakykaiser.com/blog/archives/category/mlccc/page/2/

    Then click on the previous link

    Thanks

    Forum: Fixing WordPress
    In reply to: the_content
    Thread Starter shaky

    (@shaky)

    Actually quite like the showing of just a few, but then when it gets to the end of the posts and you click on ‘previous entries’ you get a 404 error

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