Plugin Directory

Changeset 383035


Ignore:
Timestamp:
05/10/2011 05:56:35 AM (15 years ago)
Author:
Nordvind
Message:
 
Location:
mblog/trunk
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • mblog/trunk/BProc.php

    r375977 r383035  
    3434    $log = fopen($fname,"a+");
    3535    $text = htmlspecialchars($_POST['msg']);
     36    //avatar
     37    $new_avt = str_replace("\'","",$_COOKIE['avatar']);
     38    $new_avt = str_replace('alt=','',$new_avt);
     39   
    3640    if (filesize($fname) > 0){
    37     $ftext = '|'.$_POST['u'].':::'.$text.':::'.$_COOKIE['avatar'];
     41    $ftext = '|'.$_POST['u'].':::'.$text.':::'.$new_avt;
    3842    }
    3943    else{
    40     $ftext = $_POST['u'].':::'.$text.':::'.$_COOKIE['avatar'];
     44    $ftext = $_POST['u'].':::'.$text.':::'.$new_avt;
    4145    }
    4246    fwrite($log, $ftext);
     
    6064        file_put_contents($fname, $nrec);
    6165}
    62 
    6366?>
  • mblog/trunk/mblog.js

    r379604 r383035  
    66        type:"POST",
    77        url:'wp-content/plugins/mblog/BProc.php',
    8         data:'m=0&msg=0&u=0&a=0',
     8        data:'m=0&msg=0&u=0',
    99        dataType: 'json',
    1010        success: function(rsp){
     
    2323    var uname = Get_Cookie('user');
    2424    var avatar = Get_Cookie('avatar');
    25     alert(uname);
    26     alert(avatar);
    2725    avatar = avatar.replaceAll('+',' ');
    2826    avatar = avatar.replaceAll('&','&');
    2927   
    3028    var entries = $('.mblog-entry').length;
    31 
    3229    $.ajax({
    3330        type:"POST",
  • mblog/trunk/mblog.php

    r379604 r383035  
    44Plugin URI: http://code.google.com/p/wordpress-mblog/
    55Description: The microblog widget, that allows blog authors/contributors to cooperate. Can be made invisible to unregistered users.
    6 Version:0.31
     6Version:0.32
    77Author:Nordvind
    88Author URI: www.arttupeka.eu
     
    5151    wp_enqueue_script('mblog',plugins_url().'/mblog/mblog.js',false,null);
    5252    }
     53
    5354}
    5455
     
    9697function load_mblog(){
    9798    register_widget('mblog');
     99   
     100    global $current_user;
     101    get_currentuserinfo();
     102    $avatar = get_avatar($current_user->ID,$size='30');
     103    setcookie("user",$current_user->display_name, time()+60);
     104    setcookie("avatar",$avatar,time()+60);
     105   
     106   
     107    $new_avt = str_replace("\'","",$_COOKIE['avatar']);
     108    $new_avt = str_replace('alt=','',$new_avt);
    98109}
    99110
     
    114125    }
    115126    function widget($args,$instance){
     127
    116128        $show = isset($instance['hide_wdg']) ? false : true;
    117129        $is_user = is_user_logged_in();
     
    121133            //Post form
    122134            if ($is_user){
    123                
    124135                global $current_user;
    125                 get_currentuserinfo();
    126 
    127                 $avatar = get_avatar($current_user->ID,$size='30');
    128                 if (empty($avatar)){
    129                     echo '<p>Catch</p>';
    130                 }
    131                 else echo '<p>'.$avatar.'</p>';
    132                 echo'<div id="mblog-window">'.$current_user->ID.'</div>';
    133                 setcookie("user",$current_user->display_name, time()+60);
    134                 setcookie("avatar",$avatar,time()+60);
     136                echo'<div id="mblog-window"></div>';
    135137
    136138            echo '<form method="post" action="" onsubmit="processInp(); return false;">
     
    156158        }
    157159}
    158 
    159160?>
  • mblog/trunk/readme.txt

    r379604 r383035  
    55Requires at least: 2.8
    66Tested up to: 3.1.1
    7 Stable tag: 1.1
     7Stable tag: 1.2
    88
    99A chatroom for blog authors
     
    2424
    25251. Widget in work
     26
     27== Upgrade Notice ==
     28
     29= 0.32 =
     30
     31Avatar bug fixed, now it should display just fine.
     32
     33== Changelog ==
     34
     35= 0.32 =
     36
     37Bugs fixed.
Note: See TracChangeset for help on using the changeset viewer.