Thử test trên Chrome của máy vi tính xem, mik test ok mà
Code post xong đăng được 1 2 bài lại không báo vào tường nhà nữa là sao... an
Thử test trên Chrome của máy vi tính xem, mik test ok mà
Code post xong đăng được 1 2 bài lại không báo vào tường nhà nữa là sao... an
Muốn đưa số like và cmt vao bo trí ảnh mới theo uid thi sao an
Thai an cho mjnh code dang anh truc tjep ra shutbox giong wap kemsua.tk dc ko
[url=]Code đăng hình trực tiếp ra sb[/url] đây nhé
Thai an cho mjnh code dang anh truc tjep ra shutbox giong wap kemsua.tk dc ko
Ô 1 shoutbox
<script src="/files/1020011/jquery.min.js"></script> <button onclick="document.querySelector('#input_frm').click();return false;" id="up_info"><b>Upload ảnh vào album của bạn</b></button><input style="visibility: collapse; width: 0px;display:none" type="file" onchange="upload(this.files[0])" id="input_frm"> <style> input, textarea, select, button { background: #fff; border: 1px solid #d8d8d8; color: #686868; margin: 1px; padding: 4px; border-radius: 3px; } .title a:link{color:white} .title a:hover{color:#f00} body { background-color: #fff ; color: #000; margin: 0 auto; padding: 0; max-width: 800px; } body, td, input, textarea { font-family: Arial,Tahoma,sans-serif; font-size: small; } .body { background-color: #EBEBEC; padding: 4px; border: 1px solid #DEDEE0; box-shadow: 0 0 10px #343434; } * { word-wrap: break-word; } * { box-sizing: border-box; } .title { background-color: #009688; border: 1px solid; border-color: #009688; padding: 5px; color: #fff; margin-top: 4px; text-align: left; } .menu, .topmenu, .noti { background: #fff; -moz-border: 1px solid; border: 1px solid; -moz-border-color: #DCDBDB #CACACA; border-color: #DCDBDB #CACACA; border-top: none; padding: 6px; color: #00796B; margin-top: 0; } a:link, a:visited { color: #00796B; text-decoration: none; } </style> <script type="text/javascript"> function upload(file) { if (!file || !file.type.match(/image.*/)) return; document.querySelector("#up_info").innerHTML='Đang upload ảnh..'; var fd = new FormData(); fd.append("image", file); var xhr = new XMLHttpRequest()||new ActiveXObject("Microsoft.XMLHTTP")||new ActiveXObject("Msxml2.XMLHTTP"); xhr.open("POST", "http://uploads.im/api?upload"); xhr.onload = function() { document.querySelector("#up_info").innerHTML='Đã upload thành công^^'; var link = JSON.parse(xhr.responseText); var slink='[scimg]'+((link.data.thumb_url).replace('/t/','/d/'))+'[/scimg]'; var http = new XMLHttpRequest()||new ActiveXObject("Microsoft.XMLHTTP")||new ActiveXObject("Msxml2.XMLHTTP"); var url = "main.php?[ses]&id=ch_topic_h&uid={{form_url|split('&uid=')[1][0:6]}}"; var params = "text="+slink; http.open("POST", url, true); http.setRequestHeader("Content-type", "application/x-www-form-urlencoded"); http.onreadystatechange = function() { if(http.readyState == 4 && http.status == 200) { window.location.href=window.location.href; } } http.send(params); } xhr.send(fd); } </script> <div class="shoutbox"> {% if loged %} <form action="{{form_url}}" method="post"> <textarea rows="3" cols="20" name="text" style="width:auto"></textarea><br/> <input type="submit" value="Thêm tin nhắn"/></form> {% else %} Bạn phải đăng nhập để đăng tin nhắn {% endif %} <div class="shoutbox_message">{{message_list}}</div> {{paging_def}} </div>
Muốn đưa số like và cmt vao bo trí ảnh mới theo uid thi sao an
Trong thư viện ảnh à?
An làm đc cái theo dỏi giống giống như fb hăm ^^
Trong thư viện ảnh à?
Ua...:16:
Ua...:16:
Thêm cái shoutbox vào Header Thư viện ảnh rồi lấy data xuống xử lý.