Changeset 375977
- Timestamp:
- 04/22/2011 03:17:56 PM (15 years ago)
- Location:
- mblog/trunk
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
mblog/trunk/BProc.php
r375938 r375977 14 14 check_max($rec,$fname); 15 15 $jstring = array(); 16 if (count($records) < 5){16 if (count($records) < 6){ 17 17 foreach($records as $record){ 18 18 $info = explode(":::",$record); … … 22 22 } 23 23 else{ 24 for ($i = count($records)- 5;$i < count($records);$i++){24 for ($i = count($records)-6;$i < count($records);$i++){ 25 25 $info = explode(":::",$records[$i]); 26 26 $unit = array('Name'=>$info[0],'Msg'=>$info[1],'Avt'=>$info[2]); … … 46 46 47 47 function check_max($rec, $fname){ 48 define('max_rec',100 );48 define('max_rec',1000); 49 49 if (count($rec) > max_rec){ 50 50 shift_up($rec, $fname); … … 61 61 } 62 62 63 /*class MBlog_log{64 public $fname;65 public $content;66 public $records;67 const max_rec = 100;68 function _construct($name){69 $this->$fname = $name;70 $this->$content = file_get_contents($this->$fname);71 if (!$this->$content){72 $handle = fopen($this->$fname,w);73 fclose($handle);74 $this->$content = file_get_contents($this->$fname);75 }76 $this->$records = explode("|",$this->$content);77 setcookie("Test", $this->$records[0], time()+3600);78 }79 function read_log(){80 $jstring = array();81 if (count($this->$records) < 5){82 foreach($this->$records as $record){83 $info = explode(":::",$record);84 $unit = array('Name'=>$info[0],'Msg'=>$info[1],'Avt'=>$info[2]);85 array_push($jstring,$unit);86 }87 }88 else{89 for ($i = count($this->$records)-5;$i < count($records);$i++){90 $info = explode(":::",$records[$i]);91 $unit = array('Name'=>$info[0],'Msg'=>$info[1],'Avt'=>$info[2]);92 array_push($jstring,$unit);93 }94 }95 return $jstring;96 }97 function write_log(){98 if (count($this->$records) > $this->max_rec) $this->shift_up();99 }100 function shift_up(){101 for ($i=0; $i < count($this->$records)-1; $i++){102 $this->$records[$i] = $this->$records[$i+1];103 }104 }105 }*/106 107 63 ?> -
mblog/trunk/mblog.js
r375938 r375977 1 mblog_update(); 2 3 function mblog_update(){ 1 4 jQuery(document).ready(function($){ 2 5 $.ajax({ … … 6 9 dataType: 'json', 7 10 success: function(rsp){ 11 $("#mblog-window").html(''); 8 12 for (var i=0; i < rsp.length; i++){ 9 13 $("#mblog-window").append('<div class="mblog-entry"><span class="mblog-avt">'+rsp[i].Avt+'</span>'+'<p><span class="mblog-uname">'+rsp[i].Name+"</span>:"+rsp[i].Msg+'</p></div><div style="clear:both"></div>'); … … 12 16 }); 13 17 }); 18 } 14 19 15 20 function processInp(){ -
mblog/trunk/mblog.php
r375938 r375977 4 4 Plugin URI: http://code.google.com/p/wordpress-mblog/ 5 5 Description: The microblog widget, that allows blog authors/contributors to cooperate. Can be made invisible to unregistered users. 6 Version:0.3 6 Version:0.31 7 7 Author:Nordvind 8 8 Author URI: www.arttupeka.eu … … 121 121 echo '<form method="post" action="" onsubmit="processInp(); return false;"> 122 122 <input type="text" name="msg" maxlength="200" id="mblog-input" /><br /> 123 <input type="submit" value="Say" /> 123 <input type="submit" value="Say" /><span><input type="button" value="refresh" onclick="mblog_update()"</span> 124 124 </form>'; 125 125 } -
mblog/trunk/readme.txt
r375958 r375977 5 5 Requires at least: 2.8 6 6 Tested up to: 3.1.1 7 Stable tag: 1. 047 Stable tag: 1.11 8 8 9 A chatroom for blog authors .9 A chatroom for blog authors 10 10 11 11 == Description == 12 12 13 Puts a microblog "wall" into your blog, where authors can leave messages. Wall can be hidden from unregistered users. Intended to use in community/corporate blogs, for coordination between authors. 13 Puts a "wall" into a blog, where blog authors can chat. Wall can be hidden from unregistered users. 14 Intended to use in community/corporate blogs, for coordination between authors. 14 15 15 16 == Installation == … … 20 21 4. Specify widget settings (still in 'widgets' menu) and click 'save' button. Widget is ready to work. 21 22 22 == Frequently Asked Questions ==23 24 = Why do I possibly need this plugin? =25 26 If blog is run by a group of people, they can leave messages on the "wall", which can be handy for coordination. You can hide the wall from unregistered users.27 28 = Some authors are flooding the chat. How can I ban them from using it? =29 30 Ban list is under developement. For now the only option is to kick them from author list, sorry.31 32 23 == Screenshots == 33 24 34 25 1. Widget in work 35 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 36 33 == Changelog == 37 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.