Changeset 379604
- Timestamp:
- 05/01/2011 10:00:24 PM (15 years ago)
- Location:
- mblog/trunk
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
mblog/trunk/mblog.js
r375977 r379604 5 5 $.ajax({ 6 6 type:"POST", 7 url:'wp-content/plugins/ MBlog/BProc.php',7 url:'wp-content/plugins/mblog/BProc.php', 8 8 data:'m=0&msg=0&u=0&a=0', 9 9 dataType: 'json', … … 23 23 var uname = Get_Cookie('user'); 24 24 var avatar = Get_Cookie('avatar'); 25 alert(uname); 26 alert(avatar); 25 27 avatar = avatar.replaceAll('+',' '); 26 28 avatar = avatar.replaceAll('&','&'); … … 30 32 $.ajax({ 31 33 type:"POST", 32 url:'wp-content/plugins/ MBlog/BProc.php',34 url:'wp-content/plugins/mblog/BProc.php', 33 35 data:'m=1&msg='+msg+'&u='+uname+'&a='+avatar, 34 36 dataType: 'text', -
mblog/trunk/mblog.php
r375977 r379604 11 11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. 12 12 */ 13 13 error_reporting(E_ALL ^ E_NOTICE); 14 14 add_action('wp_head','mblog_css'); 15 add_action('init','init_scripts'); 15 16 add_action('widgets_init', 'load_mblog'); 16 add_action('init','init_scripts');17 17 add_action('admin_head','admin_css'); 18 18 add_action('admin_menu','mblog_settings'); … … 26 26 wp_die( __('You do not have sufficient permissions to access this page.') ); 27 27 } 28 $fname = plugins_url().'/ MBlog/wall.txt';28 $fname = plugins_url().'/mblog/wall.txt'; 29 29 $wall = file_get_contents($fname); 30 30 $records = explode("|",$wall); … … 48 48 if (!is_admin()){ 49 49 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); 52 52 } 53 53 } … … 77 77 overflow:hidden; 78 78 } 79 #mblog-input{ 80 min-width:150px; 81 margin:3px; 82 } 79 83 .mblog-entry{ 80 84 height:70px; … … 97 101 98 102 function mblog(){ 103 if ($is_user){ 104 105 } 99 106 /* Widget settings. */ 100 107 $widget_ops = array( 'classname' => 'mblog-wdg', 'description' => 'Microblog/chat widget' ); … … 111 118 if ($show || $is_user){ 112 119 //Microblog window 113 echo'<div id="mblog-window"></div>';120 114 121 //Post form 115 122 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 121 136 echo '<form method="post" action="" onsubmit="processInp(); return false;"> 122 137 <input type="text" name="msg" maxlength="200" id="mblog-input" /><br /> -
mblog/trunk/readme.txt
r376282 r379604 5 5 Requires at least: 2.8 6 6 Tested up to: 3.1.1 7 Stable tag: 1.1 67 Stable tag: 1.1 8 8 9 A personal microblog for blog authors, that is in a form of widget.9 A chatroom for blog authors 10 10 11 11 == Description == … … 16 16 == Installation == 17 17 18 1. Upload all the filesto the `/wp-content/plugins/` directory18 1. Upload `simple-weather.php` to the `/wp-content/plugins/` directory 19 19 2. Activate the plugin through the 'Plugins' menu in WordPress 20 20 3. Place widget on page, using 'Widgets' menu in WordPress … … 24 24 25 25 1. 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.