Changeset 37293

Show
Ignore:
Timestamp:
04/01/08 06:32:26 (3 months ago)
Author:
alexkingorg
Message:

changes that are not thoroughly tested

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • popularity-contest/trunk/popularity-contest.php

    r26828 r37293  
    44Plugin URI: http://alexking.org/projects/wordpress 
    55Description: This will enable ranking of your posts by popularity; using the behavior of your visitors to determine each post's popularity. You set a value (or use the default value) for every post view, comment, etc. and the popularity of your posts is calculated based on those values. Once you have activated the plugin, you can configure the <a href="options-general.php?page=popularity-contest.php">Popularity Values</a> and <a href="index.php?page=popularity-contest.php">View Reports</a>. You can also use the included <a href="options-general.php?page=popularity-contest.php#akpc_template_tags">Template Tags</a> to display post popularity and lists of popular posts on your blog. 
    6 Version: 1.3b3 
     6Version: 1.3b4 
    77Author: Alex King 
    88Author URI: http://alexking.org/ 
    99*/  
    1010 
    11 // Copyright (c) 2005-2007 Alex King. All rights reserved. 
     11// Copyright (c) 2005-2008 Alex King. All rights reserved. 
    1212// 
    1313// Released under the GPL license 
     
    5555/* ------------------------------------- */ 
    5656 
    57  
    58 if (!isset($wpdb)) { 
    59       require('../../wp-blog-header.php'); 
    60       akpc_init(); 
    61 } 
    6257 
    6358load_plugin_textdomain('alexking.org'); 
     
    16561651// -- HANDLE ACTIONS 
    16571652 
     1653function akpc_request_handler() { 
    16581654if (!empty($_POST['ak_action'])) { 
    16591655      switch($_POST['ak_action']) { 
    16601656            case 'update_popularity_values':  
    1661                   akpc_init(); 
    16621657                  $akpc = new ak_popularity_contest; 
    16631658                  $akpc->get_settings(); 
     
    16691664      switch($_GET['ak_action']) { 
    16701665            case 'recount_feedback': 
    1671                   akpc_init(); 
    16721666                  $akpc = new ak_popularity_contest; 
    16731667                  $akpc->get_settings(); 
     
    17311725      } 
    17321726} 
     1727} 
    17331728 
    17341729// -- GET HOOKED 
     
    17391734} 
    17401735 
    1741 add_action('init', 'akpc_init'); 
     1736add_action('init', 'akpc_init', 1); 
     1737add_action('init', 'akpc_request_handler', 2); 
    17421738add_action('admin_menu', 'akpc_options'); 
    17431739add_action('admin_head', 'akpc_options_css');