Demo: http://tienviet.locninh.us ( Mục cuối cùng: Thử nghiệm mã nguồn)
Các bạn là theo các bước sau:
Bước 1:
- Tải file đính kèm, giải nén được thư mục : /tintuconline
- Úp load thư mục vừa giải nén ở trên vào thư mục: /themes/theme_cua_ban/
Ví dụ : Bạn định dùng trong theme: nv_green thì đường dẫn sẽ là : /themes/nv_green/tintuconline/
Bước 2: : Đưa Slide vào theme.php
- Cách 1: Mở theme.php và chèn đoạn mã sau đây vào nơi mà bạn muốn hiển thị slide: ( Dùng cho bạn thông thạo code)
- Mã: Chọn tất cả
global $ThemeSel; // Phòng trừ có bạn vẫn dùng beta2
OpenTable();
if (file_exists("".INCLUDE_PATH."themes/$ThemeSel/tintuconline/index.php")) {
include("".INCLUDE_PATH."themes/$ThemeSel/tintuconline/index.php");
}
CloseTable();
- Cách 2: Mở theme.php và tìm đến đoạn:( Dùng cho bạn yếu code)
- Mã: Chọn tất cả
function themenewsst($title,$image,$hometext, $story_link) {
OpenTable();
echo "<table width=\"100%\" cellpadding=\"0\" cellspacing=\"0\"><tr><td valign=\"top\" style=\"text-align: justify\">";
echo "<p class=storytitle style=\"margin-top: 0px; margin-bottom: 5px\">$title</p>";
echo "$image<span class=indexhometext>$hometext</span> $story_link";
echo "</td></tr></table>";
CloseTable();
echo "<br>";
}
Thay thế toàn bộ đoạn đó bằng:
- Mã: Chọn tất cả
function themenewsst() {
global $ThemeSel;
OpenTable();
if (file_exists("".INCLUDE_PATH."themes/$ThemeSel/tintuconline/index.php")) {
include("".INCLUDE_PATH."themes/$ThemeSel/tintuconline/index.php");
}
CloseTable();
}
Bước 3:
- Mở file /includes/functions/mainfile.php
- Xuống dưới cùng của file, bổ sung đoạn mã sau đây lên phía trên dấu ?>
- Mã: Chọn tất cả
function at_clean60($string,$num=60) {
$len = strlen($string);
if($len > $num) {
if(ord(substr($string,$num,1)) == 32) {
$string = substr($string,0,$num) . '...';
} else {
$string = at_clean60($string,$num-1);
} }
return $string;}







