Đầu tiên bạn vào Templates & Style -> Templates -> Chọn templates bạn đang dùng -> Add Templates. Sau đó thêm lần lượt các dòng templates sau
Mã:
2. <html><head><title>{$mybb->settings['bbname']} - Gửi thông điệp yêu thương - Powered by KSP</title>{$headerinclude}</head><body>{$header}<script type="text/javascript">
var assss = Math.ceil(Math.random() * 10);
var bssss = Math.ceil(Math.random() * 10);
var cssss = assss + bssss
function DrawBotBoot()
{
document.write(""+ assss + " + " + bssss +" = ");
document.write("<input id='BotBootInput' type='text' maxlength='2' size='2'/>");
}
function ValidBotBoot(){
var dssss = document.getElementById('BotBootInput').value;
if (dssss == cssss && document.getElementById('guiden').value != '' && document.getElementById('message').value.length <= 60 && document.getElementById('taito').value != '')
{
document.getElementById('buttonx').innerHTML = '<div style="text-align:center;"><input class="button" type="submit" value="Gửi thông điệp yêu thương cho '+document.getElementById('guiden').value+'"></div>';
document.getElementById('buttonx').style.display = "block";
} else {
alert('Bạn chưa nhập đầy đủ các mục trong bảng đăng ký.\nHãy nhập lại !!! ~>.<~.\nXém tí nữa thì quên, số lượng ký tự phải ít hơn, bằng 60 nhé.^-^\nVote cho NgoiNhaIt.Net một phiếu cho cái addon "Thông điệp yêu thương này nhé."');
}
}
</script><div align="center">$error</div><form method="post" action="ksplovemessage.php?submit=1"><div id="yeuthuong" onMouseOver = "document.getElementById('yeuthuong').style.border='2px solid #63D7F3';" onMouseOut = "document.getElementById('yeuthuong').style.border='5px solid #63D7F3';"; style="-moz-border-radius:10px 10px 10px 10px;background:none repeat scroll 0 0 #FFF;border:5px solid #63D7F3;margin:auto;text-align:justify;width:950px;"><div id="titley" style="text-align:center;font-size:18px;color:#FE6A6A;"><strong><span>Bảng đăng ký thông điệp yêu thương.</span></strong></div><table style="width:100%;"><input id="taito" type="hidden" value="{$mybb->user['username']}" name="sender"/><input id="userid" type="hidden" value="{$mybb->user['uid']}" name="uid"/><tr><td style="width:30%;border-top: 1px solid #63D7F3;border-bottom: 1px solid #63D7F3;">Người nhận:</td><td style="width:70%;border-top: 1px solid #63D7F3;border-bottom: 1px solid #63D7F3;"><input class="textbox" type="text" name="to" id="guiden" size="20" style="font-weight: normal; font-style: normal; text-decoration: none;" /></td></tr><tr><td style="width:30%;border-bottom: 1px solid #63D7F3;">Nội dung<br/>Cho phép: <b><b><i><strong><u><s></b></td><td style="width:70%;border-bottom: 1px solid #63D7F3;"><textarea id="message" name="message" class="textbox" style="font-weight: normal; font-style: normal; text-decoration: none;" size="100"></textarea></td></tr><tr><td style="width:30%;">Mã xác nhận:</td><td style="width:70%;"><script type="text/javascript">DrawBotBoot();</script> <input id="Button1" type="button" class="button" value="Kiểm tra" onclick="ValidBotBoot();"/></td></tr></table><br/><div id="buttonx" style="display:none;"><a href="javascript:void(0);">123</a></div><br/></div><input type="hidden" value="{$remote}" name="remote"></form>{$footer}</body></html>
3.Tiếp theo add thêm một cái nữa có Template Name là ksplovemessage_admin với nội dung như dưới:
Mã:
4. <html><head><title>{$mybb->settings['bbname']} - Gửi thông điệp yêu thương - Admin CP - Powered by KSP</title>{$headerinclude}</head><body>{$header}
<script type="text/javascript">
var assss = Math.ceil(Math.random() * 10);
var bssss = Math.ceil(Math.random() * 10);
var cssss = assss + bssss
function DrawBotBoot()
{
document.write(""+ assss + " + " + bssss +" = ");
document.write("<input id='BotBootInput' type='text' maxlength='2' size='2'/>");
}
function ValidBotBoot(){
var dssss = document.getElementById('BotBootInput').value;
if (dssss == cssss && document.getElementById('guiden').value != '' && document.getElementById('message').value.length <= 60 && document.getElementById('taito').value != '')
{
document.getElementById('buttonx').innerHTML = '<div style="text-align:center;"><input class="button" type="submit" value="Gửi thông điệp yêu thương cho '+document.getElementById('guiden').value+'"></div>';
document.getElementById('buttonx').style.display = "block";
} else {
alert('Bạn chưa nhập đầy đủ các mục trong bảng đăng ký.\nHãy nhập lại !!! ~>.<~.\nXém tí nữa thì quên, số lượng ký tự phải ít hơn, bằng 60 nhé.^-^\nVote cho NgoiNhaIt.Net một phiếu cho cái addon "Thông điệp yêu thương này nhé."');
}
}
</script><div align="center">$error</div>{$body}{$footer}</body></html>
Tiếp theo download file đính kèm về, up lên thư mục cài đặt forum. Sau đó vào file global.php
1. Tìm: <?php...Thêm vào sau đó đoạn này
Mã:
3. include dirname(__FILE__).'/ngoinhait.net/config.php';
$ksplovemessageprono1 = '<div align="center"><table width="630" cellspacing="0" cellpadding="0" border="0" style="margin-bottom: 10px;">
<tbody><tr>
<td width="683" height="52" style="background-color: transparent; background-image: url("http://img.photo.zing.vn/file_uploads/gallery/w642h/q42008/2009/08/10/11/27511249880374.png"); background-repeat: no-repeat; background-attachment: scroll; background-position: center top; -moz-background-size: auto auto; padding-left: 50px; padding-right: 10px; -moz-background-clip: -moz-initial; -moz-background-origin: -moz-initial; -moz-background-inline-policy: -moz-initial;">
<marquee direction="left" onmouseout="this.start();" onmouseover="this.stop();">
'.file_get_contents('ksplovemessage.php?js=1').'</marquee>
</td></tr>
<tr><td><div class="smalltext"><right><a rel="nofollow" href="'.$rootsite. ' ksplovemessage.php’">Viết thông điệp yêu thương.</a></right></div></td></tr></tbody></table></div>';
Tiếp theo vào templates mà bạn đang sài chọn templates header. Tìm:
Mã:
<navigation>
Thêm vào trước đó:
Mã:
{$ksplovemessageprono1}
Giờ thì vào database thực hiện các câu lệnh SQL sau:
Mã:
CREATE TABLE IF NOT EXISTS `ksp_thongdiep` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`message` varchar(255) NOT NULL,
`tosend` varchar(255) NOT NULL,
`sender` varchar(255) NOT NULL,
`invisible` int(1) NOT NULL,
`uid` int(11) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1;
À, còn nữa, khi bạn download file ksplove.rar về, các bạn phải thay đổi thông số trong soctrangdesign.com/config.php nữa nhé
Done!!!!!!!!
Bạn tải file đính kèm bên dưới mà thực hiện nhé
+2 EXP
File được đính kèm
(3,9 KB, 6 xem)
TÐYT - MYBB.zip