PDA

View Full Version : Thêm 5 Mod mới


dep_viet3000
15-02-2009, 12:38 AM
Vì Topix của chúng ta không có cái mod nè nên
Sau đây mình up 5 cái mod cho các bạn nhé
có kèm file đính kém ở dưới đó
demo cứ vô trang mình sẽ thấy http://fxacenter.vnno1.com

Mod Tạo trang chủ
có 2 phiên bản
vBadvanced CMPS- phiên bản này dùng được
vBadvanced.Dynamics.v1.0- phiên bản này giống cái trên, nhưng các phần của nó mình phải tự túc viết, nên gọi là Dynamisc
Cài đặt
Giả sử trang bạn có thư mục như sau
http://yoursite/forum
vBadvanced CMPS
Bạn up tất cả các file trong mục forum vào forum của bạn
up load file index.php vào phần có chứa fordel forum đại loại là http://yoursite/index.php
bạn cần sửa file index.php
tìm dòng
$forumpath = '';
Thay vào giữa 1 dấu '' đường path đến forum
ví dụ của tôi là
$forumpath = '/home/vol5/vnno1.com/vnn_1648377/htdocs/forum';

Để xác định path
bạn up thư mục TimPatch vaòo hosst của bạn song song với fordel forum
không cần up file modules đâu nhé, nó là mod cho tragn chủ đó
sau đó vào theo đường dẫn
http://yoursite/TimPatch/forumpath.php
ok copy vào là ok
như cua tôi patch là
/home/vol5/vnno1.com/vnn_1648377/htdocs/timpath
bạn sủahành
/home/vol5/vnno1.com/vnn_1648377/htdocs/forum
ok

sau đó tiến hành cài đặt
vào theo đừuong dẫn
http://yoursite/forum/admincp/vbacmps_install.php

cái xong thì xóa file đó đi
Các cột của trang chủ có thể thay đổi được
ok

Tiếp cài
vBadvanced.Dynamics.v1.0

Tương tự trên có diều khác là
ta up tát cả thư mục tròn folder dynamics ra ngoài song song với folder forum
sửa đường patch trong file dyna_config.php file
tìm patch giống ở trên

cái đặt thì vào
http://yoursite.com/forum/admincp/vbadyna_install.php.

cái xong thì xóa đi
ok

mod nCode Image Resizer

mod thu hình ảnh

up load thư mục
ncode_imageresizer.js vào folder clientscript
Import "product-ncode_imageresizer.xml" cho cái này vào Plugin của bạn bằng cách
vào Plugins & Products -> Manage Products. Click on [Add/Import Product]
ok

cái xong vào VBB opiton mà tìm

MOD hình minh họa cho các SubForum
Bạn vào Forum Home Templates ---> forumhome_forumbit_level1_post

Tìm:
CODE<img src="$stylevar/forum_$forum[statusicon].gif" alt="" border="0" />

Hoặc:
CODE<img src="$stylevar[imgdir_statusicon]/forum_$forum[statusicon].gif" alt="" border="0"

id="forum_statusicon_$forum[forumid]" />

Thay bằng:

CODE<if condition="$vboptions[customimg_enabled] == 1">
<if condition="$forum[customimg] == ''">
<img src="$stylevar[imgdir_statusicon]/forum_$forum[statusicon].gif" alt="" border="0"

id="forum_statusicon_$forum[forumid]" />

<else />
<img src="$forum[customimg]" alt="" border="0" id="forum_statusicon_$forum[forumid]" />
</if>

<else />
<img src="$stylevar[imgdir_statusicon]/forum_$forum[statusicon].gif" alt="" border="0"

id="forum_statusicon_$forum[forumid]" />
</if>

Save lại

Tiếp tục:
Vào Forum Home Templates -----> forumhome_forumbit_level2_post

Tìm:

CODE<img src="$stylevar[imgdir_statusicon]/forum_$forum[statusicon].gif" alt="" border="0" />

Hoặc:
CODE<img src="$stylevar[imgdir_statusicon]/forum_$forum[statusicon].gif" alt="" border="0"

id="forum_statusicon_$forum[forumid]" />

Thay bằng:

CODE<if condition="$vboptions[customimg_enabled] == 1">
<if condition="$forum[customimg] == ''">
<img src="$stylevar[imgdir_statusicon]/forum_$forum[statusicon].gif" alt="" border="0"

id="forum_statusicon_$forum[forumid]" />

<else />
<img src="$forum[customimg]" alt="" border="0" id="forum_statusicon_$forum[forumid]" />
</if>

<else />
<img src="$stylevar[imgdir_statusicon]/forum_$forum[statusicon].gif" alt="" border="0"

id="forum_statusicon_$forum[forumid]" />
</if>



Vào vBulletin Options --> Category Icons --> Chọn Enable

Sau đó bạn vào Forum & Moderator --> Quản lý chuyên mục --> Chọn Box cần chèn logo --> kéo xuống dưới sẽ thấy dòng Enter the URL to the image you wish to use for this catagory icon --> Chèn đoạn Link IMG vào đó !

impost fiel đính kèm ở dưới vào pulgin nhé
Plugins & Products -> Manage Products. Click on [Add/Import Product]


MOD : Thread Thumbnail (Hình minh họa trước mỗi topic)

Open threadbit template
Find:

CODE<if condition="$show['threadicons']">
<td class="alt2">
<if condition="$show['threadicon']">
<img src="$thread[threadiconpath]" alt="$thread[threadicontitle]" border="0" />
<else />

</if>
</td>
</if>

Replace With:

CODE<if condition="$show['threadicons']">
<td class="alt2" align="center" valign="middle">
<if condition="$tt_displaythumbs">
<if condition="($thread['attachmentid']) AND ($thread['thumbsize'])">
<a href="showthread.php?$session[sessionurl]t=$thread[threadid]">
<img src="attachment.php?attachmentid=$thread[attachmentid]&stc=1&thumb=1" alt="" border="0" />
</a>
<else />
<img src="$stylevar[imgdir_misc]/nothumb.jpg" alt="" border="0" />
</if>
<else />
<if condition="$show['threadicon']">
<img src="$thread[threadiconpath]" alt="$thread[threadicontitle]" border="0" />
</if>
</if>
</td>
</if>

You will also need to upload an image to display if there are no image attachments here: $stylevar[imgdir_misc]/nothumb.jpg(ex: http://www.mysite.com/forums/images/misc/nothumb.jpg). I've made a simple one you can use or you can make your own. By default thumbnails are confined in a 100x100 px area, I found that it looks good to make the "no image" image about 100x83 px.

Add-ons (Optional)

UserCP option to turn the thumbnails on/off on a per user basis

Go into your admincp and click User Profile Fields->Add New User Profile Field.

Select "single selection radio buttons", click continue.

For title put "Thread Thumbnails", for description put "This will allow you to turn the thumbnails of threads on and off."

For options, enter "On" and "Off".

Skip down to Display Page and choose "Options: Thread Viewing".

In your threadbit template(assuming you already applied the template changes above):

Find:
CODE<if condition="$tt_displaythumbs">

Replace with:
CODE<if condition="($tt_displaythumbs) AND ($bbuserinfo['field5'] <> 'Off' OR $show['guest'])">


sau đó
impost fiel đính kèm ở dưới vào pulgin nhé
Plugins & Products -> Manage Products. Click on [Add/Import Product]

ok



Img demo
Skin theo skin forum
http://fxacenter.vnno1.com
[IMG]http://i62.servimg.com/u/f62/12/02/23/30/forum10.gif