Viewing 5 replies - 1 through 5 (of 5 total)
  • Thread Starter jwalk

    (@jwalk)

    The tabs do work fine on the settings page, just not on the “view” page.

    Thread Starter jwalk

    (@jwalk)

    fix it by changing line 142 of
    wp-slimstat/view/index.php from

    echo '" href="'.$_SERVER['PHP_SELF'].'?

    to

    echo '" href="'.$admin_page_url.'?

    works for me too Version 2.5.3, wp-slimstat/view/index.php:
    (bad link when removing filter)
    line 65:
    <a href='{$admin_page_url}?page=wp-slimstat&slimpanel=$current_panel$get_filter_to_use$get_orderby$get_direction$url_filter_removed'><img src='$wp_slimstat_view->plugin_url/images/cancel.gif' alt='" . __('x','wp-slimstat-view')."'/></a>;

    (bad link on tabs)
    line 204:
    echo '" href="'.$admin_page_url.'?page=wp-slimstat&slimpanel='.($a_panel_id+1) . $wp_slimstat_view->filters_query.'&direction='.$wp_slimstat_view->direction.'">'.$a_panel_name.'</a>';

    would be nice to include these in next release, though I dont know if it works in one site config.
    alain

    version 2.6:
    bad links on tabs was fixed ok,
    remains bad link when removing filter (line 65)
    and I think some others $_SERVER[‘PHP_SELF’] ?
    alain

    In fact, problems are when multisites are like:
    https://www.mydomain.tld/site1
    https://www.mydomain.tld/site2

    In this case, links used to:
    – set a filter from form
    – remove a filter or all filters
    – set a filter from click
    – reverse filter from form
    are links to main site.

    To correct this, I change $_SERVER[‘PHP_SELF’] to $admin_url in these lines (v2.6 view/index.php):

    65 (removing filters):
    <a href='{$admin_page_url}?page=wp-slimstat&slimpanel=$current_panel$get_filter_to_use$get_orderby$get_direction$url_filter_removed'><img src='$wp_slimstat_view->plugin_url/images/cancel.gif' alt='" . __('x','wp-slimstat-view')."'/></a>;
    160 (click to filter)
    document.location.href = '<?php echo $admin_url ?>?page=wp-slimstat'+window.chart_data[item.seriesIndex][item.datapoint[0]][2];
    
    201: (set filter by form)
    <form action="<?php echo $admin_url ?>" method="get" name="setslimstatfilters" onsubmit="if (this.year.value == '<?php _e('Year','wp-slimstat-view') ?>') this.year.value = ''">
    
    268: (reverse filter)
    <?php if ($current_panel != 5): ?><a>?page=wp-slimstat&slimpanel=<?php echo $current_panel ?>&direction=<?php echo $reverse.$wp_slimstat_view->filters_query; ?>"><?php _e('Reverse','wp-slimstat-view') ?></a><?php endif; ?>
    
    272: (remove filters)
    <p class="current-filters"><?php if(count($wp_slimstat_view->filters_parsed) > 1): ?><a>?page=wp-slimstat&slimpanel=<?php echo $current_panel ?>'><img src='<?php echo $wp_slimstat_view->plugin_url ?>/images/cancel.gif'/></a> <?php endif; echo substr($filters_list, 0, -2) ?></p>
    

    expects this may help in further versions…

    alain

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘[Plugin: WP SlimStat] Multisite tab links broken’ is closed to new replies.