Plugin Directory

Changeset 561301


Ignore:
Timestamp:
06/20/2012 07:25:27 PM (14 years ago)
Author:
gchokeen
Message:
 
Location:
wp-wiki-userprofile/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • wp-wiki-userprofile/trunk/readme.txt

    r561284 r561301  
    44Tags: widget, wiki
    55Requires at least: 2.8
    6 Tested up to: 3.4
    7 Stable tag: 1.1
     6Tested up to: 3.3.2
     7Stable tag: 1.0
    88License: GPLv2
    99
     
    1616using CURL request.
    1717
    18 = Plugin Features =
    19 
    20 * Widget Support
    21 * Shortcode support
    22 
    23 = Shortcode Usage =
    24 *`[wikiuser]`
    25 *`[wikiuser  param="editcount"]`
    26 *`[wikiuser username="xxx" param="editcount"]`
    27 
    28 
    2918
    3019== Installation ==
     
    36251. Upload the entire `wp-wiki-userprofile` folder to the `/wp-content/plugins/` directory
    37262. Activate the plugin through the 'Plugins' menu in WordPress
    38 
    39 
    4027
    4128
     
    5744== Changelog ==
    5845
    59 = 1.1 =
    60 * Shortcode support added.
    61 
    6246= 1.0 =
    6347* Initial release.
  • wp-wiki-userprofile/trunk/wp-wiki-userprofile.php

    r561284 r561301  
    44Plugin URI: http://wordpress.org/extend/plugins/wp-wiki-userprofile/
    55Description: This plugin is used to grab Wikipedia user contribution to wordpress blog.
    6 Version: 1.1
     6Version: 1.0
    77Author: Gowri Sankar Ramasamy.
    88License: GPL2
     
    6161   
    6262echo '
     63    <form method="post" action="" name="wiki-profile-form">
    6364    <div class="wrap">
    64     <form method="post" action="" name="wiki-profile-form">
    65 
    6665  <div class="icon32" id="icon-options-general"><br>
    6766  </div>
     
    8786    <input type="submit" value="Save Changes" class="button-primary" name="wiki-profile-submit">
    8887  </p>
    89 
     88</div>
    9089</form>
    91 <div class="shortcode-doc">
    92 <strong>Example Shortcode Usage</strong>
    93 <ul>
    94     <li>[wikiuser]</li>
    95     <li>[wikiuser  param="editcount"]</li>
    96     <li>[wikiuser username="xxx" param="editcount"]</li>
    97 </ul>
    98 </div>
    99 <div class="feedback-doc">
    100 <strong>Feedback</strong>
    101  <p>Feel free to contact me <a href="mailto:[email protected]?subject=Wp Wiki Userprofile">[email protected]</a>. I like to hear <a href="mailto:[email protected]?subject=Wp Wiki Userprofile Feedback">Feedback</a>, <a href="mailto:[email protected]?subject=Wp Wiki Userprofile Suggestion">Suggestion</a>, <a href="mailto:[email protected]?subject=Wp Wiki Userprofile Bug Report">Bug Report</a> or <a href="mailto:[email protected]?subject=Wp Wiki Userprofile Future request">Future request</a> from you.</p>
    102 </div>
    103 </div>
    104 
    10590   
    10691    ';
     
    174159}
    175160
    176 function get_wiki_response($wiki_username = "",$wiki_user_param=""){
     161function get_wiki_response(){
    177162    do_action('get_wiki_response');
    178163
    179 $codecocktail_wiki_username = ($wiki_username=="" ? get_option("codecocktail_wiki_username"):$wiki_username);
    180 $codecocktail_wiki_user_param = ($wiki_user_param=="" ? get_option("codecocktail_wiki_user_param"):$wiki_user_param);
    181    
     164$codecocktail_wiki_username =   get_option("codecocktail_wiki_username");
     165    $codecocktail_wiki_user_param =     get_option("codecocktail_wiki_user_param");
    182166           
    183167     $wiki_API_URL ="http://en.wikipedia.org/w/api.php?format=json&action=query&list=users&ususers=".$codecocktail_wiki_username."&usprop=".$codecocktail_wiki_user_param."";
     
    267251
    268252
    269 function get_wiki_display($wiki_username = "",$wiki_user_param=""){
    270    
    271     $array = get_wiki_response($wiki_username,$wiki_user_param);
     253function get_wiki_display(){
     254   
     255    $array = get_wiki_response();
    272256   
    273257     $wiki_reposnse = $array['query']['users'];
     
    375359add_action( 'widgets_init', create_function( '', 'register_widget( "wiki_profile_widget" );' ) );
    376360
    377     /**
    378      * short code support added.
    379      *
    380      * @version 1.1
    381      *
    382      * @param username,param.
    383      */
    384 
    385 function wikiuser_shortcode($atts) {
    386 
    387 $codecocktail_wiki_username =   get_option("codecocktail_wiki_username");
    388 $codecocktail_wiki_user_param =     get_option("codecocktail_wiki_user_param");
    389    
    390      extract(shortcode_atts(array(
    391           'username' => $codecocktail_wiki_username,
    392           'param' => $codecocktail_wiki_user_param,
    393      ), $atts));
    394      
    395      return get_wiki_display($username,$param);
    396 }
    397 add_shortcode('wikiuser', 'wikiuser_shortcode');
Note: See TracChangeset for help on using the changeset viewer.