- 13/7/04
- 6,321
- 2
Bài này hack MOD sửa nhanh bài viết, hack xong ở bên cạnh nút thông báo nội dung xấu (và với thành viên ban quản lý là xem IP) sẽ có một nút nhỏ, nhấn vào đó sẽ popup ra một menu sửa bài rất nhanh. Đảm bảo HOT 100%
Bước 1: Mở file includes/functions_showthread.php
Tìm đoạn code sau:
Thêm vào bên dưới đoạn code này
Bước 2: Mở file showthread.php
Tìm đoạn code sau:
Thêm vào bên dưới đoạn code này
Bước 3: Trong template showthread
Tìm đoạn code sau:
Thêm vào bên trên đoạn code này
Bước 4: Trong template postbit_legacy
Tìm đoạn code sau:
Thay thế bằng đoạn code này
Bước 5: Trong template postbit
Tìm đoạn code sau:
Thêm vào bên dưới đoạn code này
Bước 6: Tạo 1 template mới showthread_quickedit với code HTML sau
Bước 7: Upload file ảnh đính kèm dưới đây lên thư mục sau /images/buttons/ (thư mục này là thư mục chứa skin mà bạn sửa template nhé)
Bước 1: Mở file includes/functions_showthread.php
Tìm đoạn code sau:
$show['reputationlink'] = iif($vboptions['reputationenable'] AND $bbuserinfo['userid'] AND $post['userid'] AND !($usergroupcache["$post[usergroupid]"]['genericoptions'] & ISBANNEDGROUP), true, false);
break;
}
Thêm vào bên dưới đoạn code này
// Quick Edit ****
if ($post['userid'] == $bbuserinfo['userid'])
{
$edittext = htmlspecialchars_uni($post['pagetext']);
eval('$quickedit = "' . fetch_template('showthread_quickedit') . '";');
}
else
{
$edittext="";
$quickedit="";
}
// End Quick Edit ****
Bước 2: Mở file showthread.php
Tìm đoạn code sau:
'showthread_quickreply',
Thêm vào bên dưới đoạn code này
'showthread_quickedit',
Bước 3: Trong template showthread
Tìm đoạn code sau:
</head>
Thêm vào bên trên đoạn code này
<script language="JavaScript">
function toggleT(_w,_h) {
if(document.getElementById) { //This for Mozilla
if (_h=='s') eval("document.getElementById(_w).style.visibility='visible';");
if (_h=='h') eval("document.getElementById(_w).style.visibility='hidden';");
}
if (document.all) { // is IE
if (_h=='s') eval("document.all."+_w+".style.visibility='visible';");
if (_h=='h') eval("document.all."+_w+".style.visibility='hidden';");
}
else { // is NS?
if (_h=='s') eval("document.layers['"+_w+"'].visibility='show';");
if (_h=='h') eval("document.layers['"+_w+"'].visibility='hide';");
}
}
</script>
Bước 4: Trong template postbit_legacy
Tìm đoạn code sau:
$post[iplogged]
Thay thế bằng đoạn code này
<if condition="$post['pmid']==""">
$quickedit
</if>
Bước 5: Trong template postbit
Tìm đoạn code sau:
<!-- / status icon and date -->
Thêm vào bên dưới đoạn code này
<if condition="$post['pmid']==""">
$quickedit
</if>
Bước 6: Tạo 1 template mới showthread_quickedit với code HTML sau
<form enctype="multipart/form-data" name="vbulletinform" style="display:inline;" action="editpost.php" method="post">
<a href="javascript:return false;" onClick="toggleT('e$post[postid]','s');return false;"><img src="$stylevar[imgdir_button]/quickedit_icon.gif" alt="Quick Edit" border="0" /></a>
<div id="e$post[postid]" style="VISIBILITY:hidden; z-index:1; position:absolute;">
<input type="hidden" name="s" value="$session[sessionhash]" />
<input type="hidden" name="do" value="updatepost" />
<input type="hidden" name="p" value="$post[postid]" />
<input type="hidden" name="posthash" value="$posthash" />
<input type="hidden" name="poststarttime" value="$poststarttime" />
<table cellpadding="0" cellspacing="0" border="0" bgcolor="#000000" width="67" align="center"><tr><td>
<table cellpadding="4" cellspacing="1" border="0" width="100%">
<tr>
<td class="tcat" colspan="2"><b><img src="$stylevar[imgdir_button]/quickedit_icon.gif"/></b></td>
</tr>
<tr>
<td class="$bgclass"nowrap><b>Tiêu đề:</b></td>
<td class="$bgclass"><input type="text" class="bginput" name="title" value="$post[title]" size="63" maxlength="85" tabindex="1"></td>
</tr>
<tr>
<td class="$bgclass" valign="top" nowrap><b>Nội dung:</b>
<p>
</td>
<td class="$bgclass">
<table cellpadding="0" cellspacing="0" border="0">
<tr valign="top">
<td><textarea name="message" class="bginput" style="width:455px; height:85px;" wrap="virtual" tabindex="1">$edittext</textarea><br>
<input type="submit" class="button" name="sbutton" accesskey="s" value="Sửa bài viết" tabindex="3" />
<input type="reset" class="button" value="Giữ nguyên" tabindex="4">
<input type="button" class="button" value="Hide" onClick="toggleT('e$post[postid]','h')">
<if condition="$bbuserinfo['signature']"> <label for="cb_signature"><input type="checkbox" name="signature" value="1" id="cb_signature" tabindex="5" checked="checked" />Hiện chữ kí</label>
</if>
</td>
</tr>
</table>
</td>
</tr>
</table>
</td></tr></table>
<br />
</div>
</form>
Bước 7: Upload file ảnh đính kèm dưới đây lên thư mục sau /images/buttons/ (thư mục này là thư mục chứa skin mà bạn sửa template nhé)