PDA

View Full Version : Vài mod căn bản cần thiết cho 4rum Vbb


Secret Hero
14-07-2005, 22:22
Chả biết trong cái topic hack mod kia mọi người post gì nhưng em mạo muội lập topic này.
Dưới đây là các mod theo tui nghĩ là cực kì cần thiết và cơ bản, ko thể thiếu cho 1 diễn đàn loại Vbb.
Lưu ý : topic dành cho mọi người tham khảo, ko khuyến khích xài Vbb vì loại 4rum này ko free :> nhưng có thể nói ko loại 4rum nào sánh nổi với Vbb về nhiều phương diện, và cả chính tui cũng đang xài :'>
Lưu ý : Mod for vbb 3.0x not for vbb 3.5 beta
Cài đặt 4rum Vbb

Xem bài hướng dẫn cài đặt của bạn yphanh2002

http://gamevn.com/forum/showthread.php?t=111723

Chỉnh sửa option 4rum trong admincp

xem bài "Tổng quan các mục trong VbOption" của bạn yphanh2002

http://gamevn.com/forum/showthread.php?t=111725

Việt hóa

Việc đầu tiên trước hết là chúng ta phải việt hóa 4rum trước đã, cách việt hóa như sau bạn download lang việt tui up ở phía dưới về rồi giải nén ra 1 file .xml

Sau đó vào admincp -> Languages & Phrases -> Download / Upload Languages -> lập đường dẫn tới file lang việt
+Ở mục Overwrite Language bạn chọn English(US) để cho file lang chép đè lên lang E cũ, chúng ta sẽ ko cần phải set default lang nữa
+Mục Title for Uploaded Language sẽ tựa đề của lang, bạn khỏi điền cũng đc, ko quan trọng.
+Ignore Language Version -> bắt buộc phải yes nha

p/s : ở dưới cũng có lang việt việt hóa toàn bộ 4rum kể cả admincp nhưng tôi chưa test, bạn có thể thử nếu thích

Cách thay skin

admincp -> Styles & Templates -> Download / Upload Styles -> lập đường dẫn tới file xml của skin
mấy mục kia tương tự như up lang
images bạn upload vào /forum hoặc /forum/images tùy theo yêu cầu của skin

ờ, cho xin 1s

mấy mod dưới đây cực kì cơ bản và cần phải có, giúp bạn làm một cái 4rum hòan hảo, nếu bạn là người ko thích màu mè thì nhiêu đây là xong 1 cái 4rum #>:) (và phải chỉnh vài thứ trong admincp như vboption, usergroup manager..) nếu muốn 4rum bạn đa dạng, phong phú hơn thì phải hack thêm mod nữa, nếu ko tìm ra mod và thắc mắc chỗ nào bạn vào đây request nhé

xin thêm giây nữa, nếu có sai sót hay thiếu sót mong các bạn chỉ dạy :D

bạn có thể tham khảo cách hack mod 4rum vbb tại cái link sau

www.lktoday.net
www.mviet.net
www.quangnamnews.org

Secret Hero
14-07-2005, 22:24
Add bộ gõ cho 4rum

Có rất nhiều lọai bộ gõ dành cho 4rum Vbb nhưng ở đây chỉ hướng dẫn cho các bạn 2 lọai thông dụng và nhanh nhất thoai :D

Cài bộ gõ viettybing cho vbb 3.0x

Hình như viettybing ko work with firefox, rất nhiều người phản ảnh như thế


Vào admincp/Style & Templates/style manager/common templates/ click Go

- Tại "header"

Đưa đoạn code này ngay bên trên nó :

<SCRIPT language=Javascript src="viettyping.js"></SCRIPT>

- Tại "headinclude"

Tìm :

<meta http-equiv="Content-Type" content="text/html; charset=$stylevar[charset]" />

Thay thế :

<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8">

Save lại

Vào Options/Vbulletin options

Tìm "Censorship options" tại "Blank ASCII Character Stripper" xoá "160 173"

Save lại

2. Thể hiện UTF-8 cho ACP :

Vào includes/adminfunctions.php

Tìm code :
<meta http-equiv=\"Content-Type\" content=\"text/html; charset=$stylevar[charset]\" />

Thay thế bằng :

<meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\" />
<script type=\"text/javascript\" src=\"../viettyping.js\"></script>\n\r

Xong

Lưu ý : viettybing.js up ngang hàng với index.php


Cách add bộ gõ H.I.M (HAO Input Method) vào VB3

đa dạng hơn viettybing là có thể gõ trên các trình duyệt của Mozilla nhưng opera,Safari... thì vẫn chưa đc

Mở clientscript/vbuletin_moziwyg.js

Tìm :

}

// ################################################## ###########################
function moz_get_font_size(pointsize)

Add bên trên :

else ifMoz(e)

Mở clientscript/vbuletin_wysiwyg.js

Tìm :

htmlbox.addEventListener("keypress", moz_intercept_keys, true);

Add phía dưới :

htmlbox.addEventListener("keydown", onKeyDown, true)

Mở template header, add vào trên cùng :


<script language="javascript1.2" type="text/javascript" src="./him.js"></script>

Add H.I.M vào ACP :

Mở includes/adminfunctions.php

Tìm

echo "\r\n\r\n<!-- START CONTROL PANEL FOOTER -->\r\n";

Add bên dưới :

echo "<script src=\"path/to/him.js\"></script>\r\n";

p/s bộ gõ mviet

Secret Hero
14-07-2005, 22:32
Mod Top 5

Mở "index.php" và tìm đoạn:

// ### ALL DONE! SPIT OUT THE HTML AND LET'S GET OUTA HERE... ###

Trên đó thêm đoạn:

// ### TOP 5 STATS BY ANIMEWEBBY ###########################################
$displayrecords = "5"; // how many records should we show?
$excludedforums = "13"; // forums to be excluded from latest threads. Format "0,5,7"
$threadchars = "30"; // number of characters in thread title before '...' is added

$getstats_posters = $DB_site->query("SELECT userid, username, posts FROM " . TABLE_PREFIX . "user ORDER BY posts DESC LIMIT 0, $displayrecords");
while ($getstats_poster = $DB_site->fetch_array($getstats_posters))
{
eval('$stats_posters .= "' . fetch_template('forumhome_stats_poster') . '";');
}

$getstats_members = $DB_site->query("SELECT userid, username, posts, joindate FROM " . TABLE_PREFIX . "user ORDER BY joindate DESC LIMIT 0, $displayrecords");
while ($getstats_member = $DB_site->fetch_array($getstats_members))
{
eval('$stats_members .= "' . fetch_template('forumhome_stats_member') . '";');
}

$getstats_threads = $DB_site->query("SELECT thread.threadid, thread.title, thread.lastpost, thread.replycount, thread.lastposter, thread.views, user.userid FROM " . TABLE_PREFIX . "thread LEFT JOIN user ON (user.username=thread.lastposter) WHERE forumid NOT IN($excludedforums) ORDER BY lastpost DESC LIMIT 0, $displayrecords");
while ($getstats_thread = $DB_site->fetch_array($getstats_threads))
{
$getstats_thread[title] = unhtmlspecialchars($getstats_thread[title]);
if (strlen($getstats_thread[title]) > $threadchars)
{
$getstats_thread[titletrimmed] = substr($getstats_thread[title], 0, strrpos(substr($getstats_thread[title], 0, $threadchars), ' ')) . '...';
}
else
{
$getstats_thread[titletrimmed] = $getstats_thread[title];
}
eval('$stats_threads .= "' . fetch_template('forumhome_stats_thread') . '";');
}

Tạo new template với tên(title): forumhome_stats_member

<tr>
<td width="100%"><b><a href="member.php?u=$getstats_member[userid]">$getstats_member[username]</a></b></td>
<td align="right"><b>$getstats_member[posts]</b></td>
</tr>
Tạo tiếp new template với tên: forumhome_stats_poster
<tr>
<td width="100%"><b><a href="member.php?u=$getstats_poster[userid]">$getstats_poster[username]</a></b></td>
<td align="right"><b>$getstats_poster[posts]</b></td>
</tr>


Lại tạo tiếp new template với tên: forumhome_stats_thread

<tr>
<td><b><a href="showthread.php?$session[sessionurl]goto=newpost&t=$getstats_thread[threadid]" title="<phrase 1="$getstats_thread[title]">$vbphrase[go_first_unread_in_thread_x]</phrase>">$getstats_thread[titletrimmed]</a></b></td>
<td><b><a href="member.php?$session[sessionurl]u=$getstats_thread[userid]">$getstats_thread[lastposter]</a></b></td>
<td align="right"><b>$getstats_thread[views]</b></td> <td align="right"><b>$getstats_thread[replycount]</b>
</tr>
Mở template: FORUMHOME

Tìm:
<!-- end what's going on box -->

Lưu ý: Nếu muốn nó nằm trên như Diễn Đàn này thì các bạn tìm dòng:


$navbar


Thêm bên dưới:

<!-- top statistics box -->
<table class="tborder" cellpadding="$stylevar[cellpadding]" cellspacing="$stylevar[cellspacing]" border="0" width="100%" align="center">
<thead>
<tr>
<td class="tcat" colspan="3">
<a style="float:$stylevar[right]" href="#top" onclick="return toggle_collapse('forumhome_statistics')"><img id="collapseimg_forumhome_statistics" src="$stylevar[imgdir_button]/collapse_tcat$vbcollapse[collapseimg_forumhome_statistics].gif" alt="" border="0" /></a>
<center>Thống Kê Top 5</center></td>
</tr>
</thead>
<tbody id="collapseobj_forumhome_statistics" style="$vbcollapse[collapseobj_forumhome_statistics]">
<tr>
<td class="thead" width="23%" align="$stylevar[left]" nowrap>Thành viên tích cực</td>
<td class="thead" width="22%" align="$stylevar[left]" nowrap>Thành viên mới</td>
<td class="thead" width="55%" nowrap>Những bài mới nhất
</td>
</tr>
<tr>
<td class="alt2" width="23%" valign="top">
<table>
<tr>
<td width="100%">Thành Viên:</td>
<td align="right" nowrap>Bài:</td>
</tr>
$stats_posters
</table>
</td>
<td class="alt1" width="22%" valign="top">
<table>
<tr>
<td width="100%" nowrap>Thành Viên:</td>
<td align="right" nowrap>Bài:</td>
</tr>
$stats_members
</table>
</td>
<td class="alt2" width="55%" valign="top">
<table>
<tr>
<td width="70%" nowrap>Chủ Đề:</td>
<td width="30%" nowrap>Người Gởi:</td>
<td align="right" nowrap>Xem:</td>
<td align="right" nowrap>Trả Lời:
</tr>
$stats_threads
</table>
</td>
</tr>
<tbody>
<tr>
<td class="thead" align="center" colspan="6"><div class="smallfont"><strong><a href="showgroups.php?">Ðiều Hành Diễn Đàn</a>
</strong></div></td>
</tbody>
</table>
<br />
<br />
<!-- end top statistics box -->

Done.

Mod các thành viên online trong ngày

- Mở index.php tìm:

'forumhome_loggedinuser',


- Thêm vào bên đưới nó đoạn code :
'forumhome_todayloggedinusers',
'forumhome_todayloggedinuser',


- Tiếp theo tìm :

$show['loggedinusers'] = true;
}
else
{
$show['loggedinusers'] = false;
}


- Thêm vào bên dưới nó đoạn code :
$todayloggedinusers = "";
$numbertodayonline = 0;
$numbertodayonlineinvisible = 0;

$todayusers = $DB_site->query("SELECT userid, username, usergroupid, (" . TABLE_PREFIX . "user.options & $_USEROPTIONS[invisible]) AS invisible, lastactivity FROM " . TABLE_PREFIX . "user
WHERE lastactivity > " . mktime(0,0,0,date("m"),date("d"),date("Y")) . "
ORDER BY username");
while ($todayuser = mysql_fetch_array($todayusers)):
$userid = $todayuser[userid];
$numbertodayonline++;
$invisibleuser = '';
$lastactivetime = vbdate($timeformat, $todayuser[lastactivity]);

if ($todayuser['invisible'] and $bbuserinfo[usergroupid]!=6) {
$numbertodayonlineinvisible++;
continue;
}
if ($todayuser['invisible']) { // Invisible User but show to Admin
$invisibleuser = '*';
}

if($todayuser[usergroupid] == 6){
$username = "<b><i><a href='member.php?s=&userid=$todayuser[userid]'>$todayuser[username]</a></i></b>";
}else if($todayuser[usergroupid] == 5){
$username = "<b><a href='member.php?s=&userid=$todayuser[userid]'>$todayuser[username]</a></b>";
}else{
$username = "<a href='member.php?s=&userid=$todayuser[userid]'>$todayuser[username]</a>";
}

if (!$todayloggedinuser) {
eval('$todayloggedinuser = "' . fetch_template('forumhome_todayloggedinuser') . '";');
} else {
eval('$todayloggedinuser .= ", ' . fetch_template('forumhome_todayloggedinuser') . '";');
}
eval('$todayloggedinusers = "' . fetch_template('forumhome_todayloggedinusers') . '";');

endwhile;


- Tạo templaste có tên forumhome_todayloggedinusers với đoạn code sau :

<tr>
<td class="thead" colspan="2">Số thành viên truy cập trong ngày: $numbertodayonline </td>
</tr>
<tr valign="top">
<td class="alt2"><img src="$stylevar[imagesfolder]/icons/icon2.gif" alt="" title="(temporary button) View Who's Online" border="0" /></td>
<td class="alt1" width="100%"><span class="smallfont">
<span style="white-space: nowrap">Họ là:</span><br />
$todayloggedinuser
</span></td>
</tr>


- Tiếp theo tạo templaste có tên forumhome_todayloggedinuser với đoạn code sau :
<a href="member.php?s=$session[sessionhash]&action=getinfo&userid=$userid" title="$vbphrase[last_online]: $lastactivetime">$username</a>$invisibleuser


Cuối cùng trong template forumhome :
- Tìm :

</tbody>
<!-- end logged-in users -->


- Thêm ngay bên dưới :
$todayloggedinusers

p/s cái thống kê 4rum home, down ở phía dưới

Secret Hero
14-07-2005, 22:34
Mod Activity

+ Mở includes/functions_forumslist.php

Tìm:

get counters from the counters cache ( prepared by fetch_last_post_array() )
$forum['threadcount'] = $counters["$forum[forumid]"]['threadcount'];
$forum['replycount'] = $counters["$forum[forumid]"]['replycount'];

Thêm vào bên dưới:

//forum activity
if ($forum[threadcount]!=0) {
$nowstamp=time();
$forumactivity=intval($forum[threadcount] / $forum[replycount] * ($nowstamp+$forum[lastpost]) / ($nowstamp-$forum[lastpost]+1) / 3600);
if ($forumactivity > 68) {
$forumactivity = 68;
}
} else {
$forumactivity=0;
}


+ Mở Template: forumhome_forumbit_level2_post

Tìm :

<if condition="$show['forumdescription']"><div class="smallfont">$forum[description]</div></if>


Thêm vào bên dưới:

<table width="85%"><td noWrap>
<DIV class=smallfont ><font color=green>» Activity:</font> <IMG height=6 alt=""
src="images/b.gif" width="$forumactivity%"><IMG height=6
alt="" src="images/br.gif" width=6></DIV></td></table>

Giải nén File đi kèm up lên Host.

Mod Điều Hành Bởi

Mở forumhome_forumbit_level2_post
Tìm:

<if condition="$show['forumdescription']"><div class="smallfont">$forum[description]</div></if>
Thêm vào phía sau
[/quote]<br><font class="smallfont"><b> Điều Hành Viên : </b><a href="member.php?$session[sessionurl]u=$moderator[userid]">$forum[moderators]</a></font></br>[/quote]

Admin CP->vBulletin Options->Show all settings->Show Moderator Column :yes

Image trong mỗi forum

Trước tiên tạo một folder mới tên là forumbit trong folder images của bạn. (ví du: /images/forumbit) Đó sẽ là nơi chưa những images cho từng forum một.

Sau đó bạn tạo image cho mỗi forum và đặt tên nó thành số forumid của forum đó, ví dụ trên diễn đàn có chuyên đề "VBB" với số forumid là 18 thì image sẽ là 18.gif và upload nó lên folder /images/forumbit. (muốn biết forumid của mình là gì thì để mũi chuột trên nó và nhìn xuống status bar thì sẽ biết liền)

Mở templates "forumhome_forumbit_level2_post" tìm

<tr align="center">
<td class="alt2"><img src="$stylevar[imgdir_statusicon]/forum_$forum[statusicon].gif" alt="" border="0" /></td>
<td class="alt1Active" align="$stylevar[left]" id="f$forum[forumid]">
<div>

ở dưới thêm:

<img src="images/forumbit/$forum[forumid].gif" alt="" border="0" filter:alpha(opacity=80); -moz-opacity: 0.6;" align="left" />

vsniperu
14-07-2005, 22:47
mấy cái này có hết rồi anh SH ơi
còn ko free thì mình có thễ fix spy cũa nó mà :D

Secret Hero
14-07-2005, 22:48
BB Code
vào adminCP --> Custom BB Codes --> Add new BB Code

BBCode post nhạc:
title: tùy bạn
tag: music
Replacement: bỏ đoạn code sau vào

<object classid="clsid:6BF52A52-394A-11d3-B153-00C04F79FAA6" id="Player" width="450" height="420">
<param name="URL" value="{param}">
<param name="rate" value="1">
<param name="balance" value="0">
<param name="currentPosition" value="1">
<param name="defaultFrame" value>
<param name="playCount" value="1">
<param name="autoStart" value="-1">
<param name="currentMarker" value="0">
<param name="invokeURLs" value="-1">
<param name="baseURL" value>
<param name="volume" value="100">
<param name="mute" value="0">
<param name="uiMode" value="full">
<param name="stretchToFit" value="0">
<param name="windowlessVideo" value="0">
<param name="enabled" value="-1">
<param name="enableContextMenu" value="-1">
<param name="fullScreen" value="0">
<param name="SAMIStyle" value>
<param name="SAMILang" value>
<param name="SAMIFilename" value>
<param name="captioningID" value>
<param name="enableErrorDialogs" value="0">
<param name="_cx" value="7938">
<param name="_cy" value="6482">
</object>

Use {option} : NO

BBCode post nhạc flash:
title: tùy bạn
tag: flash
Replacement: bỏ đoạn code sau vào

<object width="315" height="253">
<param name="movie" value="{param}">
<embed src="{param}" width="315" height="253" type="application/x-shockwave-flash"></embed>
</object>

BBCode marquee

title: tùy bạn
tag: marquee
Replacement: bỏ đoạn code sau vào


<marquee>{param}</marquee>

BBCode shadow
title: tùy bạn
tag: shadow
Replacement: bỏ đoạn code sau vào

<table style="filter:shadow(color=red, direction=225)">{param}</table>

BBCode post nhạc ram hoặc rm
title: tùy bạn
tag: ram
Replacement: bỏ đoạn code sau vào

width=200 console="{option}" autostart="true" loop="true" controls="ControlPanel" type="audio/x-pn-realaudio-plugin">
</embed>

BBCode inwindow ( lướt web trong wed )
title: tùy bạn
tag: inwindow
Replacement: bỏ đoạn code sau vào

<div align=center><iframe name="cwindow" style="border:0" width=500 height=400 src="http://{param}"></iframe></div>

Secret Hero
14-07-2005, 23:19
mấy cái này có hết rồi anh SH ơi
còn ko free thì mình có thễ fix spy cũa nó mà
chắc là ko hết đâu :p, thế này sẽ giúp mọi người hơn vì topic kia lộn xộn quá, lập riêng 1 topic cho vbb mới thú vị :D
fixspy nhưng nếu có ai quá ghét u thí ko bít nó thọ ko :p

vsniperu
14-07-2005, 23:38
ùh mà sao ra yahoo sao ko noi chuyen killichen_1988 đó
:D
thôi ko bàn chuyện nữa
ông có cái rgp inferno mà mới mới ko hay có link cho tui xin đi mua cũng được

Secret Hero
15-07-2005, 00:03
mấy mod rpg tui mù tịt, ko chơi lần nào, hack mấy mod đó tổ làm chậm 4rum :|

vsniperu
15-07-2005, 00:17
hu hu ùh :(
đâu có nệng đâu cái skin load mới nặng đó
:(( ai có cái đó ko share tui đi

Constant
15-07-2005, 13:59
__ Cho hỏi bài này đã xong chưa ? Nếu xong rùi thì mình có thể move nó vào bõ tut được chứ ?

Thân chào.

Asakura Love You
15-07-2005, 15:29
hx để đó đi. thế nào cũng có ngừoi sẽ hỏi đáp =>> bao giờ thấy không có bài hướng dẫn nữa thì hãy move qua

Long Thiên Vân
25-10-2005, 08:27
Có thể cho mình mấy cái bbcode của vbb3.5 không vậy hả?
Mình cần : music, move, flash, window, chạy nhạc rm, shawdow, marquee.
Thanks nha..

shengaro
28-10-2005, 00:49
tạo new template với tên: forumhome_stats_thread

là tạo sao vậy bác bày em từng tý với có hình minh họa thì càng tốt cám ơn bác nhiều nha

vngamezone_mutd
28-10-2005, 18:50
RPG 3.0 = 60$...bỏ tìn ra mua thôi....nhìn th6ay1 hay lắm đó, bản đó good hơn 2.4 nhiều, có cả world map nữa...ai có mod tổng quan không cho tui xin đi

Kinas
02-11-2005, 11:19
Mấy bạn chỉ mình Add bộ gõ Tiếng Việt vào http://s14.invisionfree.com/kinas Tạo được Forum mà không biết cách làm tiếng việt

vsniperu
02-11-2005, 13:18
RPG 3.0 = 60$...bỏ tìn ra mua thôi....nhìn th6ay1 hay lắm đó, bản đó good hơn 2.4 nhiều, có cả world map nữa...ai có mod tổng quan không cho tui xin đi
có rồi nè bạn
2.4 cũng có world map mà bạn
:D
chỉ có 1 cái là không dám xài :))
lỡ thằng nào nhấn lộn vô update là die mình lun
:D

Kid1443
02-11-2005, 14:06
Y có rồi sao, cho kid xin đi được không vậy, đang cần mà không có ai share hết

vsniperu
02-11-2005, 15:55
ùh có gì ra yahoo tui share cho:D
--------------------------

Kid1443
03-11-2005, 11:54
hic, sau này có bao giờ thấy ông lên yahoo nữa đâu...up lên cái host nào rồi gửi link cho kid được không vậy

Asakura Love You
08-11-2005, 03:28
sniper share cho ALY cái nào. đợi mãi chẳng thấy reply gì cả. trốn việc 1 hôm mang lên cho anh em đi chứ ;))

Kid1443
08-11-2005, 13:37
ALY cần gì vậy, liên lạc với kid nè, kid giúp cho...Y!M: kid1443

Asakura Love You
08-11-2005, 18:07
đã send qua YM :D có gì share lại cho ALY cái MOD rgp inferno nhé :D, đang kiếm cái MOD nầy :D

vsniperu
09-11-2005, 07:54
lúc trước mình share thì nó nói là chỉ tổ nặng diễn đàn giờ mình để đâu mất thì nó cần pó tay thằng ALY

Asakura Love You
09-11-2005, 12:16
lúc trước mình share thì nó nói là chỉ tổ nặng diễn đàn giờ mình để đâu mất thì nó cần pó tay thằng ALY ke ke, có bao giờ 4rum của ALY có mấy cái MOD nầy đâu, chỉ lấy về ngâm cứu rồi share lên cái quangnamnews thôi :D

red_strike
02-12-2005, 13:27
Mấy anh pro post thêm mấy cái mod nào làm forum đẹp và tiện ích thêm nữa đi !

fanosy
26-04-2006, 07:45
Bạn nào biết CODE giả bộ có nhiều người online cho diễn đàn VBB ko ? Chỉ tui với