添加模块代码:

查找到
'disabled' => array(
在下方添加
'CmsMenuMod-s1' => 'CMS菜单模块-风格1',

模块设置代码:

查找

——首页模块布局

在下面的));结尾处,添加下面代码。

// CMS菜单模块-风格1设置
CSF::createSection($prefix, array(
    'parent' => 'home_fields',
    'title'  => 'CMS菜单模块-风格1'.$lixui_mod,
    'icon'   => 'fa fa-th-large',
    'description' => ''.$lixui_tip,
    'fields' => array(
        //CMS菜单模块-风格1设置
        array(
            'id'         => 'is_cmsmenumods1_lixui',
            'type'       => 'switcher',
            'help'       => '有问题访问官网 WWW.LIITK.COM 或联系 QQ1576384173',
            'title'      => 'CMS菜单模块-风格1',
            'label'      => '首页CMS菜单模块-风格1设置,自适应显示',
            'default'    => true,
        ),
        //CMS菜单模块-风格1方块按钮设置
        array(
            'id'         => 'site_cmsmenumods1_lixui',
            'type'       => 'fieldset',
            'title'      => 'CMS菜单模块-风格1设置方块按钮',
            'fields'     => array(
                array(
                    'id'         => 'cms1_an_icon',
                    'type'       => 'icon',
                    'title'      => '按钮图标①',
                    'default'    => 'fa fa-desktop',
                ),
				array(
                    'id'         => 'cms1_an_text',
                    'type'       => 'text',
                    'title'      => '按钮标题①',
                    'default'    => '标题文本①',
                ),
				array(
                    'id'         => 'cms1_an_link',
                    'type'       => 'text',
                    'title'      => '按钮链接①',
                    'default'    => '#',
                ),
				array(
                    'id'         => 'cms1_an2_icon',
                    'type'       => 'icon',
                    'title'      => '按钮图标②',
                    'default'    => 'fa fa-book',
                ),
				array(
                    'id'         => 'cms1_an2_text',
                    'type'       => 'text',
                    'title'      => '按钮标题②',
                    'default'    => '标题文本②',
                ),
				array(
                    'id'         => 'cms1_an2_link',
                    'type'       => 'text',
                    'title'      => '按钮链接②',
                    'default'    => '#',
                ),
				array(
                    'id'         => 'cms1_an3_icon',
                    'type'       => 'icon',
                    'title'      => '按钮图标③',
                    'default'    => 'fa fa-comments-o',
                ),
				array(
                    'id'         => 'cms1_an3_text',
                    'type'       => 'text',
                    'title'      => '按钮标题③',
                    'default'    => '标题文本③',
                ),
				array(
                    'id'         => 'cms1_an3_link',
                    'type'       => 'text',
                    'title'      => '按钮链接③',
                    'default'    => '#',
                ),
				array(
                    'id'         => 'cms1_an4_icon',
                    'type'       => 'icon',
                    'title'      => '按钮图标④',
                    'default'    => 'fa fa-bullhorn',
                ),
				array(
                    'id'         => 'cms1_an4_text',
                    'type'       => 'text',
                    'title'      => '按钮标题④',
                    'default'    => '标题文本④',
                ),
				array(
                    'id'         => 'cms1_an4_link',
                    'type'       => 'text',
                    'title'      => '按钮链接④',
                    'default'    => '#',
                ),
				array(
                    'id'         => 'cms1_an5_icon',
                    'type'       => 'icon',
                    'title'      => '按钮图标⑤',
                    'default'    => 'fa fa-users',
                ),
				array(
                    'id'         => 'cms1_an5_text',
                    'type'       => 'text',
                    'title'      => '按钮标题⑤',
                    'default'    => '标题文本⑤',
                ),
				array(
                    'id'         => 'cms1_an5_link',
                    'type'       => 'text',
                    'title'      => '按钮链接⑤',
                    'default'    => '#',
                ),
				array(
                    'id'         => 'cms1_an6_icon',
                    'type'       => 'icon',
                    'title'      => '按钮图标⑥',
                    'default'    => 'fa fa-diamond',
                ),
				array(
                    'id'         => 'cms1_an6_text',
                    'type'       => 'text',
                    'title'      => '按钮标题⑥',
                    'default'    => '标题文本⑥',
                ),
				array(
                    'id'         => 'cms1_an6_link',
                    'type'       => 'text',
                    'title'      => '按钮链接⑥',
                    'default'    => '#',
                ),
           ),
            'dependency' => array('is_cmsmenumods1_lixui', '==', 'true'),
        ),
		//CMS菜单模块-风格1设置最新发布按钮
		array(
            'id'         => 'site_cmsmenumods1_lixui',
            'type'       => 'fieldset',
            'title'      => 'CMS菜单模块-风格1设置最新发布按钮',
            'fields'     => array(
                array(
                    'id'         => 'cms1_xfb1_text',
                    'type'       => 'text',
                    'title'      => '发布标题',
                    'default'    => '最新发布',
                ),
				array(
                    'id'         => 'cms1_xfb1_link',
                    'type'       => 'text',
                    'title'      => '标题链接',
                    'default'    => '#',
                ),
				array(
                    'id'         => 'cms1_xfb2_text',
                    'type'       => 'text',
                    'title'      => '右上角按钮',
                    'default'    => 'LIXUI',
                ),
				array(
                    'id'         => 'cms1_xfb2_link',
                    'type'       => 'text',
                    'title'      => '右上角链接',
                    'default'    => '#',
                ),
				array(
                    'id'         => 'cms1_xfb3_text',
                    'type'       => 'text',
                    'title'      => '今日更新标题',
                    'default'    => '今日发布',
                ),
				array(
                    'id'         => 'cms1_xfb3_link',
                    'type'       => 'text',
                    'title'      => '今日更新链接',
                    'default'    => '#',
                ),
				array(
                    'id'         => 'cms1_xfb3_img',
                    'type'       => 'upload',
                    'title'      => '今日更新图片地址',
                        'default'    => '/wp-content/themes/lixui-chlid/assets/images/lixui-cms1-jrfb.png',
                ),
				array(
                    'id'         => 'cms1_xfb4_text',
                    'type'       => 'text',
                    'title'      => '本周更新标题',
                    'default'    => '本周发布',
                ),
				array(
                    'id'         => 'cms1_xfb4_link',
                    'type'       => 'text',
                    'title'      => '本周更新链接',
                    'default'    => '#',
                ),
				array(
                    'id'         => 'cms1_xfb4_img',
                    'type'       => 'upload',
                    'title'      => '本周更新图片地址',
                    'default'    => '/wp-content/themes/lixui-chlid/assets/images/lixui-cms1-bzfb.png',
                ),
           ),
            'dependency' => array('is_cmsmenumods1_lixui', '==', 'true'),
        ),
		//CMS菜单模块-风格1设置图文按钮
		array(
            'id'         => 'site_cmsmenumods1_lixui',
            'type'       => 'fieldset',
            'title'      => 'CMS菜单模块-风格1设置图文按钮',
            'fields'     =>array(
                array(
                    'id'         => 'cms1_twan1_text',
                    'type'       => 'text',
                    'title'      => '顶栏标题',
                    'default'    => '标题文本',
                ),
				array(
                    'id'         => 'cms1_twan1_link',
                    'type'       => 'text',
                    'title'      => '标题链接',
                    'default'    => '#',
                ),
				array(
                    'id'         => 'cms1_twan2_text',
                    'type'       => 'text',
                    'title'      => '右上角按钮',
                    'default'    => 'LIXUI',
                ),
				array(
                    'id'         => 'cms1_twan2_link',
                    'type'       => 'text',
                    'title'      => '右上角链接',
                    'default'    => '#',
                ),
				array(
                    'id'         => 'cms1_twan3_text',
                    'type'       => 'text',
                    'title'      => '第一张图标题',
                    'default'    => '标题文本',
                ),
				array(
                    'id'         => 'cms1_twan3_link',
                    'type'       => 'text',
                    'title'      => '第一张图链接',
                    'default'    => '#',
                ),
				array(
                    'id'         => 'cms1_twan3_img',
                    'type'       => 'upload',
                    'title'      => '第一张图地址',
                    'default'    => '/wp-content/themes/lixui-chlid/assets/images/lixui-cms1-wzjs.png',
                ),
				array(
                    'id'         => 'cms1_twan4_text',
                    'type'       => 'text',
                    'title'      => '第二张图标题',
                    'default'    => '标题文本',
                ),
				array(
                    'id'         => 'cms1_twan4_link',
                    'type'       => 'text',
                    'title'      => '第二张图链接',
                    'default'    => '#',
                ),
				array(
                    'id'         => 'cms1_twan4_img',
                    'type'       => 'upload',
                    'title'      => '第二张图地址',
                    'default'    => '/wp-content/themes/lixui-chlid/assets/images/lixui-cms1-seoyh.png',
                ),
           ),
            'dependency' => array('is_cmsmenumods1_lixui', '==', 'true'),
        ),
		//CMS菜单模块-风格1设置公告资讯栏目
		array(
            'id'         => 'site_cmsmenumods1_lixui',
            'type'       => 'fieldset',
            'title'      => 'CMS菜单模块-风格1设置公告资讯栏目',
            'fields'     => array(
                array(
                    'id'         => 'cms1_ggzx1_text',
                    'type'       => 'text',
                    'title'      => '顶栏标题',
                    'default'    => '公告资讯',
                ),
				array(
                    'id'         => 'cms1_ggzx1_link',
                    'type'       => 'text',
                    'title'      => '标题链接',
                    'default'    => '#',
                ),
				array(
                    'id'         => 'cms1_ggzx2_text',
                    'type'       => 'text',
                    'title'      => '右上角按钮',
                    'default'    => 'MORE',
                ),
				array(
                    'id'         => 'cms1_ggzx2_link',
                    'type'       => 'text',
                    'title'      => '右上角链接',
                    'default'    => '#',
                ),
				array(
                    'id'         => 'cms1_ggzx3_text',
                    'type'       => 'text',
                    'title'      => '公告资讯标题①',
                    'default'    => '标题文本①',
                ),
				array(
                    'id'         => 'cms1_ggzx33_text',
                    'type'       => 'text',
                    'title'      => '公告资讯副标题①',
                    'default'    => '右边文本①',
                ),
				array(
                    'id'         => 'cms1_ggzx3_link',
                    'type'       => 'text',
                    'title'      => '资讯标题链接①',
                    'default'    => '#',
                ),
								array(
                    'id'         => 'cms1_ggzx4_text',
                    'type'       => 'text',
                    'title'      => '公告资讯标题②',
                    'default'    => '标题文本②',
                ),
				array(
                    'id'         => 'cms1_ggzx44_text',
                    'type'       => 'text',
                    'title'      => '公告资讯副标题②',
                    'default'    => '右边文本②',
                ),
				array(
                    'id'         => 'cms1_ggzx4_link',
                    'type'       => 'text',
                    'title'      => '资讯标题链接②',
                    'default'    => '#',
                ),
								array(
                    'id'         => 'cms1_ggzx5_text',
                    'type'       => 'text',
                    'title'      => '公告资讯标题③',
                    'default'    => '标题文本③',
                ),
				array(
                    'id'         => 'cms1_ggzx55_text',
                    'type'       => 'text',
                    'title'      => '公告资讯副标题③',
                    'default'    => '右边文本③',
                ),
				array(
                    'id'         => 'cms1_ggzx5_link',
                    'type'       => 'text',
                    'title'      => '资讯标题链接③',
                    'default'    => '#',
                ),
								array(
                    'id'         => 'cms1_ggzx6_text',
                    'type'       => 'text',
                    'title'      => '公告资讯标题④',
                    'default'    => '标题文本④',
                ),
				array(
                    'id'         => 'cms1_ggzx66_text',
                    'type'       => 'text',
                    'title'      => '公告资讯副标题④',
                    'default'    => '右边文本④',
                ),
				array(
                    'id'         => 'cms1_ggzx6_link',
                    'type'       => 'text',
                    'title'      => '资讯标题链接④',
                    'default'    => '#',
                ),
           ),
            'dependency' => array('is_cmsmenumods1_lixui', '==', 'true'),
        ),
        
    ),
));

模块文件代码:

CmsMenuMod-s1.php,自行创建然后上传至ripro/parts/home-mode目录下。

<?php /*CMS菜单模块-风格1*/
$site_cmsmenumods1_lixui = _cao('site_cmsmenumods1_lixui');
if (is_array($site_cmsmenumods1_lixui)  && _cao('is_cmsmenumods1_lixui') ) : ?>
<div class="home-first-screen"><div class="container">
<div class="parts row">

<div class="col-sm-6 col-md-3 part-first">
<div class="home-first-part home-menus">
<ul>
<li>
<a href="<?php echo $site_cmsmenumods1_lixui['cms1_an_link']; ?>" target="_blank">
<i class="fa <?php echo $site_cmsmenumods1_lixui['cms1_an_icon']; ?> icoid1"></i>
<span><?php echo $site_cmsmenumods1_lixui['cms1_an_text']; ?></span></a>
</li> 

<li>
<a href="<?php echo $site_cmsmenumods1_lixui['cms1_an2_link']; ?>" target="_blank">
<i class="fa <?php echo $site_cmsmenumods1_lixui['cms1_an2_icon']; ?> icoid1"></i>
<span><?php echo $site_cmsmenumods1_lixui['cms1_an2_text']; ?></span></a>
</li>

<li>
<a href="<?php echo $site_cmsmenumods1_lixui['cms1_an3_link']; ?>" target="_blank">
<i class="fa <?php echo $site_cmsmenumods1_lixui['cms1_an3_icon']; ?> icoid1"></i>
<span><?php echo $site_cmsmenumods1_lixui['cms1_an3_text']; ?></span></a>
</li>

<li>
<a href="<?php echo $site_cmsmenumods1_lixui['cms1_an4_link']; ?>" target="_blank">
<i class="fa <?php echo $site_cmsmenumods1_lixui['cms1_an4_icon']; ?> icoid1"></i>
<span><?php echo $site_cmsmenumods1_lixui['cms1_an4_text']; ?></span></a>
</li>

<li>
<a href="<?php echo $site_cmsmenumods1_lixui['cms1_an5_link']; ?>" target="_blank">
<i class="fa <?php echo $site_cmsmenumods1_lixui['cms1_an5_icon']; ?> icoid1"></i>
<span><?php echo $site_cmsmenumods1_lixui['cms1_an5_text']; ?></span></a>
</li>

<li>
<a href="<?php echo $site_cmsmenumods1_lixui['cms1_an6_link']; ?>" target="_blank">
<i class="fa <?php echo $site_cmsmenumods1_lixui['cms1_an6_icon']; ?> icoid1"></i>
<span><?php echo $site_cmsmenumods1_lixui['cms1_an6_text']; ?></span></a>
</li>

</ul>
</div>
</div>

<div class="col-sm-6 col-md-3">
<div class="home-first-part home-topics">
<h2 class="hf-title"><strong><a href="<?php echo $site_cmsmenumods1_lixui['cms1_xfb1_link']; ?>"><?php echo $site_cmsmenumods1_lixui['cms1_xfb1_text']; ?></a></strong><a href="<?php echo $site_cmsmenumods1_lixui['cms1_xfb2_link']; ?>" target="_blank" class="more"><?php echo $site_cmsmenumods1_lixui['cms1_xfb2_text']; ?></a></h2>
<div class="items">
<div class="row">
<div class="col-xs-6">
<a href="<?php echo $site_cmsmenumods1_lixui['cms1_xfb3_link']; ?>"><span class="thumb" style="background-image:url(<?php echo $site_cmsmenumods1_lixui['cms1_xfb3_img']; ?>)"><img src="<?php echo $site_cmsmenumods1_lixui['cms1_xfb3_img']; ?>" alt="<?php echo $site_cmsmenumods1_lixui['cms1_xfb3_text']; ?>"></span><strong class="title"><?php echo $site_cmsmenumods1_lixui['cms1_xfb3_text']; ?><?php echo WeeklyUpdate();?>&nbsp;</strong></a>
</div>
<div class="col-xs-6">
<a href="<?php echo $site_cmsmenumods1_lixui['cms1_xfb4_link']; ?>"><span class="thumb" style="background-image:url(<?php echo $site_cmsmenumods1_lixui['cms1_xfb4_img']; ?>)"><img src="<?php echo $site_cmsmenumods1_lixui['cms1_xfb4_img']; ?>" alt="<?php echo $site_cmsmenumods1_lixui['cms1_xfb4_text']; ?>"></span><strong class="title"><?php echo $site_cmsmenumods1_lixui['cms1_xfb4_text']; ?><?php echo get_week_post_count(); ?>&nbsp;</strong></a>
</div>
</div>
</div>
</div>
</div>

<div class="col-sm-6 col-md-3">
<div class="home-first-part home-subjects">
<h2 class="hf-title"><strong><a href="<?php echo $site_cmsmenumods1_lixui['cms1_twan1_link']; ?>"><?php echo $site_cmsmenumods1_lixui['cms1_twan1_text']; ?></a></strong><a href="<?php echo $site_cmsmenumods1_lixui['cms1_twan2_link']; ?>" target="_blank" class="more"><?php echo $site_cmsmenumods1_lixui['cms1_twan2_text']; ?></a></h2>
<div class="items">
<div class="row">
<div class="col-xs-6">
<a href="<?php echo $site_cmsmenumods1_lixui['cms1_twan3_link']; ?>" target="_blank"><span class="thumb" style="background-image:url(<?php echo $site_cmsmenumods1_lixui['cms1_twan3_img']; ?>)"><img src="<?php echo $site_cmsmenumods1_lixui['cms1_twan3_img']; ?>" alt="<?php echo $site_cmsmenumods1_lixui['cms1_twan3_text']; ?>"></span><strong class="title"><?php echo $site_cmsmenumods1_lixui['cms1_twan3_text']; ?></strong></a>
</div>
<div class="col-xs-6">
<a href="<?php echo $site_cmsmenumods1_lixui['cms1_twan4_link']; ?>" target="_blank"><span class="thumb" style="background-image:url(<?php echo $site_cmsmenumods1_lixui['cms1_twan4_img']; ?>)"><img src="<?php echo $site_cmsmenumods1_lixui['cms1_twan4_img']; ?>" alt="<?php echo $site_cmsmenumods1_lixui['cms1_twan4_text']; ?>"></span><strong class="title"><?php echo $site_cmsmenumods1_lixui['cms1_twan4_text']; ?></strong></a>
</div>

</div>
</div>
</div>
</div>
<div class="col-sm-6 col-md-3">
<div class="home-first-part home-course">
<h2 class="hf-title"><strong><a href="<?php echo $site_cmsmenumods1_lixui['cms1_ggzx1_link']; ?>" target="_blank"><?php echo $site_cmsmenumods1_lixui['cms1_ggzx1_text']; ?></a></strong><a href="<?php echo $site_cmsmenumods1_lixui['cms1_ggzx2_link']; ?>" target="_blank" class="more"><?php echo $site_cmsmenumods1_lixui['cms1_ggzx2_text']; ?></a></h2>
<div class="courses">
<div class="course-items">
<ul>
<li><a href="<?php echo $site_cmsmenumods1_lixui['cms1_ggzx3_link']; ?>" target="_blank"><strong><?php echo $site_cmsmenumods1_lixui['cms1_ggzx3_text']; ?></strong><span><?php echo $site_cmsmenumods1_lixui['cms1_ggzx33_text']; ?></span></a></li>
<li><a href="<?php echo $site_cmsmenumods1_lixui['cms1_ggzx4_link']; ?>" target="_blank"><strong><?php echo $site_cmsmenumods1_lixui['cms1_ggzx4_text']; ?></strong><span><?php echo $site_cmsmenumods1_lixui['cms1_ggzx44_text']; ?></span></a></li>
<li><a href="<?php echo $site_cmsmenumods1_lixui['cms1_ggzx5_link']; ?>" target="_blank"><strong><?php echo $site_cmsmenumods1_lixui['cms1_ggzx5_text']; ?></strong><span><?php echo $site_cmsmenumods1_lixui['cms1_ggzx55_text']; ?></span></a></li>
<li><a href="<?php echo $site_cmsmenumods1_lixui['cms1_ggzx6_link']; ?>" target="_blank"><strong><?php echo $site_cmsmenumods1_lixui['cms1_ggzx6_text']; ?></strong><span><?php echo $site_cmsmenumods1_lixui['cms1_ggzx66_text']; ?></span></a></li>

</ul>
</div></div></div></div></div></div></div>
<?php endif; ?>

CSS:

/* 首页CMS菜单模块-风格1开始 */
/*1*/
.home-first-screen .home-course li strong {
	font-weight: 400
}
.home-first-screen .home-course li span {
	position: absolute;
	right: 0;
	top: 0;
	font-size: 12px;
	display: inline-block;
	padding: 0 10px;
	line-height: 20px;
	background: #fbedd8;
	border-radius: 3px;
	color: #e2b46d;
}
.home-first-screen .home-menus ul {
	margin: 0;
	list-style: none;
	overflow: hidden;
	padding-left: 0px;
}
.home-first-screen .home-menus li {
	float: left;
	width: 33.33333333%;
	text-align: center
}
.home-first-screen .home-menus a {
	display: block;
	text-align: center;

发表评论

后才能评论