·设为首页收藏本站📧邮箱修改🎁免费下载专区💎积分✅卡密📒收藏夹👽聊天室
返回列表 发布新帖

[X3.5教程] Discuz!X3.5 X3.4修改网站首页为插件或别的链接为首页的方法

843 0
发表于 2020-7-10 15:46:30 | 查看全部 阅读模式

马上注册,免费下载更多dz插件网资源。

您需要 登录 才可以下载或查看,没有账号?立即注册

×
一、电脑版的很简单,论坛有这个功能,在论坛后台界面导航实现,如图:

Discuz!X3.5 X3.4修改网站首页为插件或别的链接为首页的方法 修改,网站首页,插件,别的,链接



二、手机版的设置细节如下图所示:
Discuz!X3.5 X3.4修改网站首页为插件或别的链接为首页的方法 修改,网站首页,插件,别的,链接


【按需备用】修改文件的方法:index.php,也很简单,可以用以下方法实现,如图:
Discuz!X3.5 X3.4修改网站首页为插件或别的链接为首页的方法 修改,网站首页,插件,别的,链接


修改网站根目录下的index.php文件,直接在<?php下面的/*注释*/下面(如上图)第一行添加以下代码:


注意:以下红色代码部分为要访问的首页链接,示例的链接是积分钱包首页,可以用手机访问  www.dz-x.net ,看看效果!

也就是说以下红色链接换成你的链接!


有时发现不能访问插件首页,而是强制跳转到论坛页,可以看这个教程:Discuz3.4及以上版本 开启手机版后访问it618插件手机版自动跳转到论坛的解决方法


if(it618_is_mobile()){ //手机访问时跳转
        header("location:你想设置的插件链接");
        exit;
}

function it618_is_mobile(){
        $user_agent = $_SERVER['HTTP_USER_AGENT'];
        $mobile_agents = Array("240x320","acer","acoon","acs-","abacho","ahong","airness","alcatel","amoi","android","anywhereyougo.com","applewebkit/525","applewebkit/532","asus","audio","au-mic","avantogo","becker","benq","bilbo","bird","blackberry","blazer","bleu","cdm-","compal","coolpad","danger","dbtel","dopod","elaine","eric","etouch","fly ","fly_","fly-","go.web","goodaccess","gradiente","grundig","haier","hedy","hitachi","htc","huawei","hutchison","inno","ipad","ipaq","ipod","jbrowser","kddi","kgt","kwc","lenovo","lg ","lg2","lg3","lg4","lg5","lg7","lg8","lg9","lg-","lge-","lge9","longcos","maemo","mercator","meridian","micromax","midp","mini","mitsu","mmm","mmp","mobi","mot-","moto","nec-","netfront","newgen","nexian","nf-browser","nintendo","nitro","nokia","nook","novarra","obigo","palm","panasonic","pantech","philips","phone","pg-","playstation","pocket","pt-","qc-","qtek","rover","sagem","sama","samu","sanyo","samsung","sch-","scooter","sec-","sendo","sgh-","sharp","siemens","sie-","softbank","sony","spice","sprint","spv","symbian","tablet","talkabout","tcl-","teleca","telit","tianyu","tim-","toshiba","tsm","up.browser","utec","utstar","verykool","virgin","vk-","voda","voxtel","vx","wap","wellco","wig browser","wii","windows ce","wireless","xda","xde","zte");
        $is_mobile = false;
        foreach ($mobile_agents as $device) {
        if (stristr($user_agent, $device)) {
        $is_mobile = true;
        break;
        }
        }
        return $is_mobile;
}

我要说一句 收起回复
一花一世界,一叶一追寻。一曲一场叹,一生为一人。

回复

 懒得打字嘛,点击右侧快捷回复【查看最新发布】   【应用商城享更多资源】
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

图文热点
创宇盾启航版免费网站防御网站加速服务
投诉/建议联系

discuzaddons@vip.qq.com

未经授权禁止转载,复制和建立镜像,
如有违反,按照公告处理!!!
  • 联系QQ客服
  • 添加微信客服

联系DZ插件网微信客服|最近更新|Archiver|手机版|小黑屋|DZ插件网! ( 鄂ICP备20010621号-1 )|网站地图 知道创宇云防御

您的IP:18.191.81.46,GMT+8, 2024-11-22 02:37 , Processed in 0.231414 second(s), 78 queries , Gzip On, Redis On.

Powered by Discuz! X5.0 Licensed

© 2001-2024 Discuz! Team.

关灯 在本版发帖
扫一扫添加微信客服
QQ客服返回顶部
快速回复 返回顶部 返回列表