Pair of Vintage Old School Fru
dien dan wapmaster,forum wapmaster
Hack Cf Mới Nhất Bmt24h

Code mod sửa thông tin file cho thành viên Wapka

Code mod sửa thông tin file cho thành viên Wapka › Xem bài viết
31/08/2015 - 06:50Xem
Với mod này. Thành viên có thể sửa thông tin file mà mình đã upload.
DEMO: http://mfvup.com
Yêu cầu. Site Download phải chạy :get-file: (Có thể tự sửa lại theo mỗi wap)
Bắt đầu
Đầu tiên tạo 1 forum2, ghi nhớ ID forum2 này. Ví dụ:NNNN
Thiết kế MIF cho forum2 này như sau:
Ô1.
Mã:
<input type="hidden" name="fileinfo" value="::msg::"/>
Copy code

Ô3
Mã:
::MESSAGES::<input type="hidden" name="fileinfo" value=""/>
<noscript/>

Copy code

Tiếp theo tạo 1 Exloader trên đầu tiên của site Download:URL http://wap.domain/forum2_theme_NNNN.xhtml?tema=:get-file:&:time-beg:YmdHis:time-end:
Part: Anh em tự dò part nhé.Tags: input Sau đó. Ở site Download trong code :filelist: chính post thêm code sau::filelist:chính là code show mọi chi tiết về file như link download, ngày upload, người upload v.v...)

Mã:
<div class="nav-row"><div class="mbox"><b>Mô tả</b><div class="mbox"><div name="dpro"><div class="info1">%var-1%</div><div class="info2" name="info2"><script language="javascript"> var info2=document.getElementsByName('fileinfo')[0].value; document.write(info2); </script></div></div> <span name="edit" class="edit">[<a onclick="document.getElementsByName('edit_form')[0].style.display='block';document.getElementsByName('edit')[0].style.display='none';" style="color:blue;cursor:pointer">Sửa</a>]</span><script language="javascript"> if(info2.length>=1) document.write('<style>.info1{display:none}</style>'); else document.write('<style>.info2{display:none}</style>'); </script><script language="javascript"> if('%var-1%'.length<1){if(info2.length<1) document.getElementsByName('dpro')[0].innerHTML="Không có mô tả nào.";} </script>

<div name="edit_form" style="display:none"><br/><center><input type="text" name="text_edit" value=":user-prvar-999999999:get-file::" class="text_edit"/> <input type="button" onclick="edit()" value="Sửa"/><br/>Sử dụng [br] để xuống dòng.</center></div>
<div name="edited" class="edited" style="display:none"><div style="border:1px solid red;padding:3px;margin:2px;background:white" align="center">Bạn đã cập nhật thông tin cho tệp tin này!<br/><a href="">Kiểm tra ngay</a></div></div></div></div></div>

Copy code

Sau đó post code này bên dưới code chính.Set visibility: A

Mã:
:filelist:d=1,x=i::<script language="javascript"> if(':user-tname:'!=='%user_upl%') document.write('<style>.edit{display:none}</style>'); </script>:::get-file: :/filelist:

<script language="javascript"> var text=document.getElementsByName("dpro")[0].innerHTML; ntext=text.replace(/\[br\]/ig,'<br/>'); document.getElementsByName("dpro")[0].innerHTML=ntext; </script>
<style>.text_edit{width:70%;margin-top:3px}</style>

Copy code


Tiếp theo post code này bên dưới code trên.Set visibility: L
Mã:
<div style="display:none">:forum-AAAAA/form/0: :eprofile-0:<b></b>@@OK:/eprofile:</div>

<img name="yes" src="" style="display:none"></img>
<img name="yes2" src="" style="display:none"></img>

<input name="edit1" value="&tema=:get-file:&text=" style="display:none"/>
<input name="edit2" value="&submit=ok" style="display:none"/>
<input name="edit3" value="&pr_var[999999999:get-file:]=" style="display:none"/>
<input name="edit4" value="&submit=ok" style="display:none"/>

:filelist:d=1,x=i::<script language="javascript"> function edit(){ var txt=document.getElementsByName("text_edit")[0].value; var
mc=document.getElementsByName("mchs")[0].value; var edit1=document.getElementsByName("edit1")[0].value; var edit2=document.getElementsByName("edit2")[0].value; var edit3=document.getElementsByName("edit3")[0].value; var edit4=document.getElementsByName("edit4")[0].value; var token=document.getElementsByName("d_token")[0].value; document.getElementsByName("edit_form")[0].style.display='none'; document.getElementsByName("edited")[0].style.display='block'; document.getElementsByName("yes")[0].src='forum2_add_NNNN.xhtml?d_token='+token+edit1+txt+edit2; document.getElementsByName("yes2")[0].src='setprofile_0.xhtml?mchs='+mc+edit3+txt+edit4;} </script>:::get-file: :/filelist:

Copy code

Trong đó AAAAA là ID forum simple nào đó. Ko có thì tạo ra. Cuối cùng là code này bên dưới nữa.Set visibility: N

Mã:
<style>.edit{display:none}</style>
Copy code

Lưu ý: Code trên có thể phải sửa lại để phù hợp với wapsite của mỗi người
[Like: 0]
Trực Tuyến
1 Khách
Chủ Đề: 149
850 Chat - 171 member - 786165 Views
Khi sao chép hoặc phát hành bất kỳ nội dung nào thuộc Diễn Đàn Wapmaster Bmt24h Vui lòng viết rõ nguồn tác giả bmt24h.
Thanks to XtGem.com — Visual mobile site building tool
C-STAT
Textlink Trần Phú Hiền
Thanks to XtGem.com — Visual mobile site building tool
C-STAT