dedecms has a mobile version. The installation method for the mobile version is: 1. Move the DATA to the security settings outside the root directory and modify the "/m/index.php" code; 2. In "Update Homepage HTML" , change "Select Home Page Template" to "default/index_m.htm"; 3. Change the URL of "Graphic and Text Information" on the home page to a mobile link; 4. Set the mobile site to be accessible through the second-level domain name.
The operating environment of this tutorial: Windows 10 system, Dedecms V5.7SP1 version, Dell G3 computer.
Does dedecms have a mobile version?
have.
DedeCMS mobile site installation and usage tutorial
How to use the DedeCMS mobile site:
一, Two ways to install Dedecms mobile site:
(1) Download the new version and install it directly. Dedecms version: V5.7SP1 official version (2015-06-18) This version contains all the features of the old version No mobile site functionality.
(2) Upgrade the old version (only for adding mobile site functions), download the latest version (note that the website encoding must be consistent with the original site), copy the following files in the compressed package to the corresponding directory of the original site:
Note: If the original site has a non-default template, for example, a column template is /templets/defaultst_default_news.htm, you can copy /templets/defaultst_default_m.htm and rename it to list_default_news_m.htm. That is: the PC website template must have a corresponding mobile website template, and the file name of the latter is "_m" after the file name of the former.
The installation or upgrade of dedecms is completed. At this time, you should be able to create a mobile website. However, some problems were found during the use of the mobile site function provided by the dedecms20150618 version, which needs to be modified before it can be used normally, so there are The following steps to modify dedecms are as follows...
2. Modify Dedecms
(1) If the original site has security settings that move DATA outside the root directory, it needs to be modified. /m/index.php code:
if(!file_exists(dirname(__FILE__).'/../data/common.inc.php')) { header('Location:install/index.php'); exit(); }
Change /../data/common.inc.php to /../../data/common.inc.php, or directly change the above 5 Lines of code deleted.
(2) The mobile site homepage will automatically generate a homepage static file when it is accessed for the first time. The premise is that the /m/ directory needs to be set with writable permissions, otherwise it will not be updated normally. Later, to update the static files on the homepage, you need to log in to the background to update manually: in "Update Homepage HTML", change "Select Homepage Template" to "default/index_m.htm" and change "Homepage Location" to "../m/index.html" ”, and then generate the homepage static file.
Note: This version is known as "automatically generate HTML version", but the default mobile site template has a dynamic homepage of Link needs to be replaced with static link form.
※If you find it troublesome to use static pages and want to set the homepage to dynamic browsing, you can modify /m/index.php and replace the code above
$row['showmod']= isset($row['showmod'])? $row['showmod'] : 0; if ($row['showmod'] == 1) { $pv->SaveToHtml(dirname(__FILE__).'/index.html'); include(dirname(__FILE__).'/index.html'); exit(); } else { $pv->Display(); exit(); }
with one line: $pv->Display();
3. The URL in the "Graphic and Text Information" section of the home page is a PC link, and changed to a mobile link:
Search template/templets/default/index_m.htm All in are replaced with
4. The general header contains a search box. The search will jump to the PC search page. It is recommended to delete:
Delete the following code in /templets/default/header_m.htm:
<form class="am-topbar-form am-topbar-leftam-form-inline am-topbar-right"role="search"action="{dede:global.cfg_cmsurl/}/plus/search.php"> <input type="hidden" name="mobile"value="1" /> <input type="hidden" name="kwtype"value="0" /> <div class="am-form-group"> <input name="q" type="text"class="am-form-field am-input-sm" placeholder="输入关键词"> </div> <button type="submit" class="am-btnam-btn-default am-btn-sm">搜索 </button> </form>
5. The mobile site uses the second-level directory by default, and can also use the second-level domain name, so we need to set the mobile site to be accessible through the second-level domain name, resolve the second-level domain name to the server ip where the website is located, and set it on the server/space Bind the second-level domain name to the /m/ directory.
After successfully setting the second-level domain name, you will find that the pictures cannot be displayed when browsing the website through the second-level domain name because the picture path is wrong - the picture path is "/uploads/x/y.jpg" The relative root directory path format is displayed normally on the PC site page because the directory exists under the PC site domain name, and the secondary domain name is bound to the secondary directory, which does not exist, so accessing the image will return a 404 error. There are many solutions to this problem. Here are a few ideas (example PC station: www.dede58.com; mobile station: m.dede58.com):
(1) Set dedecms to use absolute paths
After entering the management background, click "System"->"Basic System Parameters"->"Core Settings", select "(Yes/No) supports multi-site, enable attachments, column connections, arclist content Enable absolute URLs:" (default "No") is set to "Yes".
(2) Modify the template path
Add:
<basehref="http://www.dede58.com" />
to
in all mobile templates and then change in the code“<a href="list.php” 改为完整路径 “<a href="http://m.dede58.com/list.php” “<a href="viewphp” 改为完整路径 “<a href=http://m.dede58.com/view.php
(3)URL 重写
将对http://m.dede58.com/uploads/的访问重写至http://www.dede58.com/uploads/,apache环境下,在/m/目录中的.htaccess(如无则需新建)中增加以下代码即可:
RewriteEngineon RewriteCond %{http_host} ^m.dede58.com [NC] RewriteRule ^uploads/(.*)$ http://www.dede58.com/uploads/$1 [L]
iis环境下类似规则。
另:需将根目录下的/images/defaultpic.gif(缩略图默认图片)复制到/m/目录下,否则列表页中如存在无缩略图的文章,对应缩略图位置会无法正常显示图片。
至此,移动站架设基本成型。
推荐学习:dedecms教程
The above is the detailed content of Does dedecms have a mobile version?. For more information, please follow other related articles on the PHP Chinese website!

dedecms增加多语言的方法:1、进入dedecms后台,创建封面栏目;2、将封面栏目“常规选项”的文件保存目录设置为cn或者en;3、将封面栏目“高级选项”的列表模板设置为“cn_index.htm”或者“en_index.htm”;4、单独调用每种语言的封面栏目和每种语言下的导航栏目即可。

织梦cms是用PHP语言写的。织梦CMS(DedeCMS)是一个PHP开源网站管理系统,作用是构建中小型网站;它采用PHP+MySQL技术开发,可同时使用于windows、linux、unix平台。

dedecms是PHP语言开发的;dedecms中文全称是织梦内容管理系统,是一个PHP开源网站管理系统;dedecms基于PHP和MySQL技术开发,可同时使用于Windows、Linux、Unix平台。

dedecms删除栏目的方法:1、登录后台管理;2、进入“栏目管理”,可以看到当前网站所有栏目;3、选择要删除的栏目;4、将鼠标悬停在栏目名称上,删除栏目;5、点击“确认”按钮以继续删除操作;6、删除成功。

织梦内容管理系统(DedeCMS) 以简单、实用、开源而闻名,是国内最知名的PHP开源网站管理系统,也是使用用户最多的PHP类CMS系统,在经历多年的发展,目前的版本无论在功能,还是在易用性方面,都有了长足的发展和进步。

火车头dedecms出现乱码解决方法:1、检查数据库编码;2、修改dedecms配置文件;3、检查浏览器编码设置;4、清理缓存和临时文件;5、寻求专业帮助。

dedecms是指织梦内容管理系统,是一个PHP开源网站管理系统,用于个人网站或中小型门户的构建;dedecms是基于PHP和MySQL技术开发,可同时使用于Windows、Linux、Unix平台。

dedecms有移动端,其移动端安装方法是:1、将DATA移到根目录外的安全设置,修改“/m/index.php”代码;2、在“更新主页HTML”中,将“选择主页模板”改为“default/index_m.htm”;3、将首页“图文资讯”的url修改为移动端链接;4、设置移动站可通过二级域名访问即可。


Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

AI Hentai Generator
Generate AI Hentai for free.

Hot Article

Hot Tools

DVWA
Damn Vulnerable Web App (DVWA) is a PHP/MySQL web application that is very vulnerable. Its main goals are to be an aid for security professionals to test their skills and tools in a legal environment, to help web developers better understand the process of securing web applications, and to help teachers/students teach/learn in a classroom environment Web application security. The goal of DVWA is to practice some of the most common web vulnerabilities through a simple and straightforward interface, with varying degrees of difficulty. Please note that this software

SublimeText3 Mac version
God-level code editing software (SublimeText3)

PhpStorm Mac version
The latest (2018.2.1) professional PHP integrated development tool

Safe Exam Browser
Safe Exam Browser is a secure browser environment for taking online exams securely. This software turns any computer into a secure workstation. It controls access to any utility and prevents students from using unauthorized resources.

Zend Studio 13.0.1
Powerful PHP integrated development environment
