↓↓xuống cuối trang↓↓
Chào mừng bạn đến với wap DinhLoi.XtGem.Com | Chúc bạn có 1 năm mới vui vẻ tốt lành hạnh phúc! Hãy giới thiệu website này cho bạn bè nhé!img
DinhLoi.XtGem.Com =>> CaFe9x.Gq
Bạn đến từ quốc gia:



Hôm nay ngày
25.02.25/23:49
img- Hi. Xin chào! Mozilla/5.0
logo
.
HOMECHÁTTruyệnFORUM
logo

Chatbox|Admin nhận làm wap/web, giá cả thương lượng... Thông tin admin tại mỗi bài viết.
Home · Bang hội ·
* Đăng Nhập hoặc Đăng Kí
để sử dụng hết chức năng của diễn đàn.
Hi, Khách!
HomeBang hội » Wapmaster » JohnCMS » Hướng Dẫn Thêm Theme Mod Web JohnCMS
Xuống dưới » Hướng Dẫn Thêm Theme Mod Web JohnCMS
avatar by Pham_loi Pham_loi
Chức vụ:
08:39:55, 05-05-2016

TUT hướng dẫn thêm mod web đầu đủ cho wap JohnCMS 4.4 by MHaTinh.Com
Do anh em phàn nàn tớ share theme mà không hướng dẫn nên hôm nay làm cái tut hướng dẫn đầy đủ luôn
+Di chuyển hai files head.php và end.php ở thư mục vào thư mục pages

+Mở file incfiles/classes/core.php
Tìm
'wapskin' => self::$system_set['skindef',
Copy code

Thêm vào dưới
'webskin' => self::$system_set['webskindef',
Copy code


+Mở file users/includes/profile/settings.php
Tìm
echo '<p><h3>Wap ' . $lng['design_template' . '</h3><select name="wapskin">';
        foreach (glob('../theme/*/style.css') as $val) {
            $dir = explode('/', dirname($val));
            $theme = array_pop($dir);
            if (file_exists("../theme/$theme/.web"))continue;
            echo '<option' . (core::$user_set['wapskin' == $theme ? ' selected="selected">' : '>') . $theme . '</option>';
        }
        echo '</select></p>';

Copy code

Thêm vào dưới
echo '<p><h3>Web ' . $lng['design_template' . '</h3><select name="webskin">';
        foreach (glob('../theme/*/style.css') as $val) {
            $dir = explode('/', dirname($val));
            $theme = array_pop($dir);
            if (file_exists("../theme/$theme/.wap"))continue;
            echo '<option' . (core::$user_set['webskin' == $theme ? ' selected="selected">' : '>') . $theme . '</option>';
        }
        echo '</select></p>';

Copy code


+Mở file panel/includes/settings.php
Tìm dòng
if (isset($_POST['submit')) {
Copy code

Thêm vào dưới
mysql_query("UPDATE `cms_settings` SET `val`='" . functions::check($_POST['webskindef') . "' WHERE `key` = 'webskindef'");
Copy code

Tìm dòng
echo '<p><h3>' . $lng['design_template' . '</h3>*<select name="skindef">';
$dir = opendir('../theme');
while ($skindef = readdir($dir)) {
    if (($skindef != '.') && ($skindef != '..') && ($skindef != '.svn')) {
        $skindef = str_replace('.css', '', $skindef);
        echo '<option' . ($set['skindef' == $skindef ? ' selected="selected">' : '>') . $skindef . '</option>';
    }
}
closedir($dir);
echo '</select>' .
    '</p><p><input type="submit" name="submit" value="' . $lng['save' . '"/></p></div></form>' .
    '<div class="phdr">*</div>' .
    '<p><a href="index.php">' . $lng['admin_panel' . '</a></p>';

Copy code

Thay thế bằng

echo '<h3>Theme wap </h3>*<select name="skindef">';
$dir = opendir('../theme');
while ($themes = readdir($dir)) {
    if (($themes != '.') && ($themes != '..') && ($themes != '.svn')) {
        $themes = str_replace('.css', '', $themes);
        if (file_exists("../theme/$themes/.web"))continue;
        echo '<option' . ($set['skindef' == $themes ? ' selected="selected">' : '>') . $themes . '</option>';
    }
}
closedir($dir);
echo '</select><br />';

// Them theme web
echo '<h3>Theme wap</h3>*<select name="webskindef">';
$dir = opendir('../theme');
while ($themes = readdir($dir)) {
    if (($themes != '.') && ($themes != '..') && ($themes != '.svn')) {
        $themes = str_replace('.css', '', $themes);
        if (file_exists("../theme/$themes/.wap"))continue;
        echo '<option' . ($set['webskindef' == $themes ? ' selected="selected">' : '>') . $themes . '</option>';
    }
}

closedir($dir);
echo '</select><br />';
echo '<p><input type="submit" name="submit" value="' . $lng['save' . '"/></p></div></form>' .
    '<div class="phdr">*</div>' .
    '<p><a href="index.php">' . $lng['admin_panel' . '</a></p>';

Copy code


+Upload hai files head.php vào end.php vào thư mục incfiles
+Upload thư mục mhatinh vào thư mục theme ở wap bạn
+Chạy đường dẫn http://domain/install.php để cập nhật data
+Đường đẫn theme web của bạn là http://domain/tmod.php?mod=mhatinh


Link Download: http://mhatinh.com/forum/index.php?act=file&id=34

Like: 0
Lên trên  Tổng số: 1







Trực Tuyến: Khách: 1
Diễn đàn teen Việt Nam
CopyRight 2014
Tag:
Bạn đến từ:
Share: img img img img img

Thanks To:XtGem
Liên kết:U-ON

Polaroid