Plugin Directory

Changeset 379604


Ignore:
Timestamp:
05/01/2011 10:00:24 PM (15 years ago)
Author:
Nordvind
Message:
 
Location:
mblog/trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • mblog/trunk/mblog.js

    r375977 r379604  
    55    $.ajax({
    66        type:"POST",
    7         url:'wp-content/plugins/MBlog/BProc.php',
     7        url:'wp-content/plugins/mblog/BProc.php',
    88        data:'m=0&msg=0&u=0&a=0',
    99        dataType: 'json',
     
    2323    var uname = Get_Cookie('user');
    2424    var avatar = Get_Cookie('avatar');
     25    alert(uname);
     26    alert(avatar);
    2527    avatar = avatar.replaceAll('+',' ');
    2628    avatar = avatar.replaceAll('&','&');
     
    3032    $.ajax({
    3133        type:"POST",
    32         url:'wp-content/plugins/MBlog/BProc.php',
     34        url:'wp-content/plugins/mblog/BProc.php',
    3335        data:'m=1&msg='+msg+'&u='+uname+'&a='+avatar,
    3436        dataType: 'text',
  • mblog/trunk/mblog.php

    r375977 r379604  
    1111 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
    1212 */
    13 
     13error_reporting(E_ALL ^ E_NOTICE);
    1414add_action('wp_head','mblog_css');
     15add_action('init','init_scripts');
    1516add_action('widgets_init', 'load_mblog');
    16 add_action('init','init_scripts');
    1717add_action('admin_head','admin_css');
    1818add_action('admin_menu','mblog_settings');
     
    2626        wp_die( __('You do not have sufficient permissions to access this page.') );
    2727    }
    28 $fname = plugins_url().'/MBlog/wall.txt';
     28$fname = plugins_url().'/mblog/wall.txt';
    2929$wall = file_get_contents($fname);
    3030$records = explode("|",$wall);
     
    4848if (!is_admin()){
    4949    wp_enqueue_script('jquery');
    50     wp_register_script('mblog',plugins_url().'/MBlog/mblog.js','jquery');
    51     wp_enqueue_script('mblog');
     50    //wp_register_script('mblog',plugins_url().'/MBlog/mblog.js');
     51    wp_enqueue_script('mblog',plugins_url().'/mblog/mblog.js',false,null);
    5252    }
    5353}
     
    7777    overflow:hidden;
    7878}
     79#mblog-input{
     80    min-width:150px;
     81    margin:3px;
     82}
    7983.mblog-entry{
    8084    height:70px;
     
    97101
    98102    function mblog(){
     103            if ($is_user){
     104
     105            }
    99106            /* Widget settings. */
    100107            $widget_ops = array( 'classname' => 'mblog-wdg', 'description' => 'Microblog/chat widget' );
     
    111118        if ($show || $is_user){
    112119            //Microblog window
    113             echo'<div id="mblog-window"></div>';
     120           
    114121            //Post form
    115122            if ($is_user){
    116             global $current_user;
    117             get_currentuserinfo();
    118             $avatar = get_avatar($current_user->ID,$size='30');
    119             setcookie("user",$current_user->display_name, time()+60);
    120             setcookie("avatar",$avatar,time()+60);
     123               
     124                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);
     135
    121136            echo '<form method="post" action="" onsubmit="processInp(); return false;">
    122137            <input type="text" name="msg" maxlength="200" id="mblog-input" /><br />
  • mblog/trunk/readme.txt

    r376282 r379604  
    55Requires at least: 2.8
    66Tested up to: 3.1.1
    7 Stable tag: 1.16
     7Stable tag: 1.1
    88
    9 A personal microblog for blog authors, that is in a form of widget.
     9A chatroom for blog authors
    1010
    1111== Description ==
     
    1616== Installation ==
    1717
    18 1. Upload all the files to the `/wp-content/plugins/` directory
     181. Upload `simple-weather.php` to the `/wp-content/plugins/` directory
    19192. Activate the plugin through the 'Plugins' menu in WordPress
    20203. Place widget on page, using 'Widgets' menu in WordPress
     
    2424
    25251. Widget in work
    26 
    27 == Frequently Asked Questions ==
    28 
    29 = Some authors are flooding the wall. How can I ban them? =
    30 
    31 Ban list for microblog is under developement. For now the only option is to kick them from author group, sorry.
    32 
    33 == Changelog ==
    34 
    35 = 0.31 =
    36 
    37 'Refresh' button added + various small fixes.
    38 
    39 == Upgrade Notice ==
    40 
    41 = 0.31 =
    42 
    43 Critical usability fixes.
Note: See TracChangeset for help on using the changeset viewer.