Plugin Directory

Changeset 198281


Ignore:
Timestamp:
01/26/2010 11:51:24 AM (16 years ago)
Author:
mortay
Message:

Change "default" URL to comments RSS

File:
1 edited

Legend:

Unmodified
Added
Removed
  • meneame-comments-to-wp/trunk/meneame-comments.php

    r198274 r198281  
    3939        case "defaults":
    4040            $varValue = array(
    41                 'rss_url' => 'http://meneame.net/comments_rss2.php',
     41                'rss_url' => 'http://www.meneame.net/comments_rss2.php',
    4242                'rss_param_id' => 'id',
    4343                'rss_param_karma' => 'min_karma',
     
    177177/* Parse HTML from trackback URL */
    178178function meneame_comments__parseNEWS( $url, $post_id = 0, $approved = '' ) {
    179     global $meneame_comments__defaults;
    180179   
    181180    // Probe standar system from PHP to load Meneame content ...
     
    224223                                // If HREF Attribute contains "Meneame Comments RSS URL"
    225224                                $hrefAttValue = reset(end($hrefAtt));
    226                                 if ( strpos( $hrefAttValue, $meneame_comments__defaults['rss_url'] ) !== false ) {
     225                                if ( strpos( $hrefAttValue, meneame_comments__get_option('rss_url') ) !== false ) {
    227226                                    // Parse URL
    228227                                    $parsedURL = parse_url($hrefAttValue);
     
    231230                                   
    232231                                    // If exists ID as parameter
    233                                     if ( $parsedQuery[$meneame_comments__defaults['rss_param_id']] != '' ) {
     232                                    if ( $parsedQuery[meneame_comments__get_option('rss_param_id')] != '' ) {
    234233                                       
    235234                                        // Mount Meneame Comments URL with ID and KARMA
    236                                         $rssURL = $meneame_comments__defaults['rss_url'];
     235                                        $rssURL = meneame_comments__get_option('rss_url');
    237236                                            $rssURL .= '?';
    238                                             $rssURL .= $meneame_comments__defaults['rss_param_id'].'='.$parsedQuery[$meneame_comments__defaults['rss_param_id']];
     237                                            $rssURL .= meneame_comments__get_option('rss_param_id').'='.$parsedQuery[meneame_comments__get_option('rss_param_id')];
    239238                                            $rssURL .= '&';
    240                                             $rssURL .= $meneame_comments__defaults['rss_param_karma'].'='.$meneame_comments__defaults['rss_min_karma'];
     239                                            $rssURL .= meneame_comments__get_option('rss_param_karma').'='.meneame_comments__get_option('rss_min_karma');
    241240                                       
    242241                                        // Load RSS
     
    258257/* Download RSS Comments from Meneame */
    259258function meneame_comments__getRSS( $url, $post_id, $approved = '' ) {
    260     global $meneame_comments__defaults, $post;
     259    global $post;
    261260   
    262261    $post_id = ( $post ) ? $post->ID : $post_id;
Note: See TracChangeset for help on using the changeset viewer.