最新发布第5页
2025-12-20
12-20
子比主题 - 网站导航矩阵小工具-汇聚访

实用子比主题 – 网站导航矩阵小工具

这是一款由子比主题仿造优设网的一款网站导航矩阵小工具,此小工具可展示许多信息同时配备可视化的小工具配置,同时因为小工具的配置项以及功能比较多,这里就不多说了直接看演示即可,另外汇聚访简单测试了一下,有些地方的布局显示可能有点问题,有喜欢的朋友自行部署吧! 演示效果: 代码部署: [hidecontent type="reply"] 定位:/wp-content/themes/zibll/func.php添加以下代码即可: if(!defined('ABSPATH'))die; CSF::createWidget('widget_huijuf_navigation',array('title'=>'汇聚访_导航矩阵','classname'=>'widget-huijuf-navigation','description'=>'站长导航矩阵展示组件,支持完全自定义配置','fields'=>array(array('type'=>'heading','content'=>'基础信息设置'),array('id'=>'title','type'=>'text','title'=>'模块标题','default'=>'站长导航矩阵'),array('id'=>'description','type'=>'textarea','title'=>'描述文字','default'=>'汇聚访・www.huijuf.com 本站致力于分享优质实用的互联网资源,内容包括有网站搭建、建站源码、美化教程、SEO优化、免费工具、素材资源、技术教程等,应有尽有!','attributes'=>array('rows'=>3)),array('type'=>'heading','content'=>'主导航项目'),array('id'=>'nav_items','type'=>'group','title'=>'导航项目','desc'=>'添加主导航项目(建议4-5个)','button_title'=>'添加导航','fields'=>array(array('id'=>'icon','type'=>'icon','title'=>'图标','button_title'=>'选择图标','default'=>'fa fa-home'),array('id'=>'title','type'=>'text','title'=>'标题','default'=>'导航标题'),array('id'=>'url','type'=>'text','title'=>'链接地址','default'=>'#')),'default'=>array(array('icon'=>'fa fa-home','title'=>'站长导航','url'=>'https://www.huijuf.com/'),array('icon'=>'fa fa-magic','title'=>'AI导航','url'=>'https://www.huijuf.com/'),array('icon'=>'fa fa-paint-brush','title'=>'色彩导航','url'=>'https://www.huijuf.com/'),array('icon'=>'fa fa-book','title'=>'图书导航','url'=>'https://www.huijuf.com/'))),array('type'=>'heading','content'=>'更多导航下拉菜单'),array('id'=>'show_more_nav','type'=>'switcher','title'=>'显示更多导航','default'=>true),array('id'=>'more_nav_title','type'=>'text','title'=>'更多导航标题','default'=>'更多导航','dependency'=>array('show_more_nav','==','true')),array('id'=>'more_nav_icon','type'=>'icon','title'=>'更多导航图标','button_title'=>'选择图标','default'=>'fa fa-th','dependency'=>array('show_more_nav','==','true')),array('id'=>'more_nav_items','type'=>'group','title'=>'更多导航项目','desc'=>'添加"更多导航"下拉菜单项目','button_title'=>'添加项目','dependency'=>array('show_more_nav','==','true'),'fields'=>array(array('id'=>'icon','type'=>'icon','title'=>'图标','button_title'=>'选择图标','default'=>'fa fa-star'),array('id'=>'title','type'=>'text','title'=>'标题','default'=>'导航标题'),array('id'=>'url','type'=>'text','title'=>'链接地址','default'=>'#')),'default'=>array(array('icon'=>'fa fa-building','title'=>'汇聚访公司','url'=>'https://www.huijuf.com/'),array('icon'=>'fa fa-shopping-cart','title'=>'电商导航','url'=>'https://www.huijuf.com/'),array('icon'=>'fa fa-file-text','title'=>'汇聚访规范','url'=>'https://www.huijuf.com/'),array('icon'=>'fa fa-image','title'=>'站长9图','url'=>'https://www.huijuf.com/'))),array('type'=>'heading','content'=>'新媒体矩阵设置'),array('id'=>'show_media','type'=>'switcher','title'=>'显示新媒体矩阵','default'=>true),array('id'=>'media_title','type'=>'text','title'=>'新媒体标题','default'=>'站长新媒体矩阵','dependency'=>array('show_media','==','true')),array('type'=>'subheading','content'=>'微信公众号','dependency'=>array('show_media','==','true')),array('id'=>'wechat_title','type'=>'text','title'=>'微信标题','default'=>'站长微信','dependency'=>array('show_media','==','true')),array('id'=>'wechat_desc','type'=>'text','title'=>'微信描述','default'=>'每天官微五分钟,一年萌新变大神','dependency'=>array('show_media','==','true')),array('id'=>'wechat_qrcode','type'=>'upload','title'=>'微信二维码','default'=>'https://www.huijuf.com/wp-content/uploads/2025/05/httpweixin.qq_.comrmpshErM_HEGrxlraVQ90Sg.png','dependency'=>array('show_media','==','true')),array('type'=>'subheading','content'=>'微博账号','dependency'=>array('show_media','==','true')),array('id'=>'weibo_title','type'=>'text','title'=>'微博标题','default'=>'站长微博','dependency'=>array('show_media','==','true')),array('id'=>'weibo_desc','type'=>'text','title'=>'微博描述','default'=>'400W粉丝!每日更新汇聚访干货','dependency'=>array('show_media','==','true')), array('id'=>'weibo_accounts','type'=>'group','title'=>'微博账号列表','button_title'=>'添加账号','dependency'=>array('show_media','==','true'),'fields'=>array(array('id'=>'name','type'=>'text','title'=>'账号名称','default'=>'微博账号'),array('id'=>'url','type'=>'text','title'=>'账号链接','default'=>'#'),array('id'=>'desc','type'=>'text','title'=>'账号描述','default'=>'账号简介')),'default'=>array(array('name'=>'站长UISDC','url'=>'https://www.huijuf.com/','desc'=>'400W粉丝!每日更新汇聚访干货'),array('name'=>'站长','url'=>'https://www.huijuf.com/','desc'=>'强烈推荐!站长官方品牌微博'),array('name'=>'汇聚访创业网','url'=>'https://www.huijuf.com/','desc'=>'官方微博,海量教程看不完'),array('name'=>'站长基础训练营','url'=>'https://www.huijuf.com/','desc'=>'零基础入门,带你成为软件高手'))),array('type'=>'subheading','content'=>'小红书','dependency'=>array('show_media','==','true')),array('id'=>'xiaohongshu_title','type'=>'text','title'=>'小红书标题','default'=>'站长小红书','dependency'=>array('show_media','==','true')),array('id'=>'xiaohongshu_desc','type'=>'text','title'=>'小红书描述','default'=>'专业汇聚访图文短内容频道','dependency'=>array('show_media','==','true')),array('id'=>'xiaohongshu_url','type'=>'text','title'=>'小红书链接','default'=>'https://www.xiaohongshu.com/','dependency'=>array('show_media','==','true')),array('type'=>'subheading','content'=>'站长社群','dependency'=>array('show_media','==','true')),array('id'=>'qun_title','type'=>'text','title'=>'社群标题','default'=>'站长社群','dependency'=>array('show_media','==','true')),array('id'=>'qun_desc','type'=>'text','title'=>'社群描述','default'=>'严格审核打造高质量交流群','dependency'=>array('show_media','==','true')),array('id'=>'qun_groups','type'=>'group','title'=>'微信群列表','button_title'=>'添加群组','dependency'=>array('show_media','==','true'),'fields'=>array(array('id'=>'name','type'=>'text','title'=>'群组名称','default'=>'交流群')),'default'=>array(array('name'=>'站长AIGC自学交流群'),array('name'=>'站长小红书个人IP交流群'),array('name'=>'站长汇聚访师交流群'),array('name'=>'站长UI汇聚访师交流群'),array('name'=>'站长交互汇聚访师交流群'),array('name'=>'站长平面品牌汇聚访师交流群'),array('name'=>'站长3D汇聚访师交流群'),array('name'=>'站长摄影剪辑爱好者交流群'))),array('id'=>'qun_qrcode','type'=>'upload','title'=>'管理员二维码','default'=>'https://www.huijuf.com/wp-content/uploads/2025/05/httpweixin.qq_.comrmpshErM_HEGrxlraVQ90Sg.png','dependency'=>array('show_media','==','true')),array('id'=>'qun_wechat','type'=>'text','title'=>'管理员微信号','default'=>'招码添加','dependency'=>array('show_media','==','true')),array('type'=>'heading','content'=>'收录数量统计'),array('id'=>'show_amount','type'=>'switcher','title'=>'显示收录数量','default'=>true),array('id'=>'amount_title','type'=>'text','title'=>'统计标题','default'=>'已收录精选文章','dependency'=>array('show_amount','==','true')),array('id'=>'site_count','type'=>'text','title'=>'收录文章数量','default'=>'','dependency'=>array('show_amount','==','true'),'desc'=>'留空则自动统计已发布文章数量'),array('id'=>'update_date','type'=>'text','title'=>'更新日期','default'=>'','dependency'=>array('show_amount','==','true'),'desc'=>'留空则自动显示当前日期'),array('id'=>'submit_url','type'=>'text','title'=>'投稿链接','default'=>'https://www.huijuf.com/','dependency'=>array('show_amount','==','true')),array('id'=>'submit_text','type'=>'text','title'=>'入驻按钮文字','default'=>'我要投稿','dependency'=>array('show_amount','==','true'))))); if(!function_exists('widget_huijuf_navigation')){function widget_huijuf_navigation($args,$instance){echo $args['before_widget'];$title=!empty($instance['title'])?$instance['title']:'站长导航矩阵';$description=!empty($instance['description'])?$instance['description']:'';$nav_items=!empty($instance['nav_items'])?$instance['nav_items']:array();$show_more_nav=isset($instance['show_more_nav'])?(bool)$instance['show_more_nav']:true;$more_nav_items=!empty($instance['more_nav_items'])?$instance['more_nav_items']:array();$show_media=isset($instance['show_media'])?(bool)$instance['show_media']:true;$show_amount=isset($instance['show_amount'])?(bool)$instance['show_amount']:true;if(current_user_can('manage_options')&&isset($_GET['debug_widget'])){echo '<pre style="background:#f0f0f0;padding:10px;margin:10px;border:1px solid #ccc;">';echo 'show_more_nav: '.var_export($show_more_nav,true)."\n";echo 'more_nav_items count: '.count($more_nav_items)."\n";echo 'more_nav_items: '.print_r($more_nav_items,true);echo...
2个月前
2025-12-14
12-14
子比主题 - 新文章轮播小工具-汇聚访

实用子比主题 – 新文章轮播小工具

这是一款适配于子比主题的新文章轮播小工具,此小工具是左一右二排列的,同时此小工具还可以自定义轮播的文章ID以及是否显示作者、日期等相关信息,同时还可以单独设置每个轮播组件的切换效果,有需要的朋友自行部署吧! 演示效果: 代码部署: [hidecontent type="reply"] 定位:/wp-content/themes/zibll/func.php添加以下代码即可: Zib_CFSwidget::create('zib_widget_new_carousel',array('title'=>'New轮播图','zib_title'=>true,'zib_affix'=>true,'zib_show'=>true,'description'=>'左侧轮播+右侧双栏,支持5种切换效果','fields'=>array(array('id'=>'height','type'=>'number','title'=>'模块高度','default'=>400,'unit'=>'px'),array('id'=>'right_width','type'=>'number','title'=>'右侧宽度','default'=>300,'unit'=>'px'),array('id'=>'left_posts','type'=>'text','title'=>'左侧文章ID','desc'=>'多个用逗号分隔,留空自动获取'),array('id'=>'right_top_posts','type'=>'text','title'=>'右上文章ID','desc'=>'多个用逗号分隔,留空自动获取'),array('id'=>'right_bottom_posts','type'=>'text','title'=>'右下文章ID','desc'=>'多个用逗号分隔,留空自动获取'),array('id'=>'left_effect','type'=>'select','title'=>'左侧切换效果','options'=>array('slide'=>'滑动','fade'=>'淡出淡入','cube'=>'3D方块','coverflow'=>'3D滑入','flip'=>'3D翻转'),'default'=>'slide'),array('id'=>'right_top_effect','type'=>'select','title'=>'右上切换效果','options'=>array('slide'=>'滑动','fade'=>'淡出淡入','cube'=>'3D方块','coverflow'=>'3D滑入','flip'=>'3D翻转'),'default'=>'fade'),array('id'=>'right_bottom_effect','type'=>'select','title'=>'右下切换效果','options'=>array('slide'=>'滑动','fade'=>'淡出淡入','cube'=>'3D方块','coverflow'=>'3D滑入','flip'=>'3D翻转'),'default'=>'fade'),array('id'=>'autoplay','type'=>'switcher','title'=>'自动播放','default'=>true),array('id'=>'interval','type'=>'number','title'=>'播放间隔(秒)','default'=>4,'dependency'=>array('autoplay','==',true)),array('id'=>'show_info','type'=>'checkbox','title'=>'显示信息','inline'=>true,'options'=>array('show_author'=>'作者','show_date'=>'日期','show_category'=>'分类','show_tags'=>'标签'),'default'=>array('show_author','show_date','show_category')),array('id'=>'text_style','type'=>'fieldset','title'=>'文字样式','inline'=>true,'fields'=>array(array('id'=>'title_length','type'=>'number','title'=>'标题字数','default'=>30),array('id'=>'excerpt_length','type'=>'number','title'=>'摘要字数','default'=>50),array('id'=>'text_shadow','type'=>'switcher','title'=>'文字阴影','default'=>true)))))); function zib_widget_new_carousel($args,$instance){if(!Zib_CFSwidget::show_class($instance))return;$cfg=array_merge(array('height'=>400,'right_width'=>300,'left_effect'=>'slide','right_top_effect'=>'fade','right_bottom_effect'=>'fade','autoplay'=>true,'interval'=>4,'show_info'=>array(),'text_style'=>array()),$instance);$show_cfg=array_flip($cfg['show_info']);$posts=array('left'=>nc_get_posts($cfg['left_posts']??'',5),'top'=>nc_get_posts($cfg['right_top_posts']??'',3),'bottom'=>nc_get_posts($cfg['right_bottom_posts']??'',3));if(!array_filter($posts))return;$id='nc-'.uniqid();$shadow=($cfg['text_style']['text_shadow']??true)?'text-shadow:1px 1px 2px rgba(0,0,0,0.8);':'';Zib_CFSwidget::echo_before($instance);echo'<div class="new-carousel-wrap" id="'.$id.'">';$areas=array('left'=>array('height'=>$cfg['height'],'class'=>'nc-left-wrap','pagination'=>true,'button'=>true,'effect'=>$cfg['left_effect'],'interval'=>$cfg['interval']*1000),'top'=>array('height'=>($cfg['height']-10)/2,'class'=>'nc-right-top-wrap','pagination'=>true,'button'=>false,'effect'=>$cfg['right_top_effect'],'interval'=>$cfg['interval']*1000+1000),'bottom'=>array('height'=>($cfg['height']-10)/2,'class'=>'nc-right-bottom-wrap','pagination'=>true,'button'=>false,'effect'=>$cfg['right_bottom_effect'],'interval'=>$cfg['interval']*1000+2000));if($posts['left']){echo'<div class="nc-left-wrap">';nc_render_slider($posts['left'],$areas['left'],$show_cfg,$cfg['text_style'],true);echo'</div>';}if($posts['top']||$posts['bottom']){echo'<div class="nc-right-wrap">';if($posts['top']){echo'<div class="nc-right-top-wrap">';nc_render_slider($posts['top'],$areas['top'],$show_cfg,$cfg['text_style'],false);echo'</div>';}if($posts['bottom']){echo'<div class="nc-right-bottom-wrap">';nc_render_slider($posts['bottom'],$areas['bottom'],$show_cfg,$cfg['text_style'],false);echo'</div>';}echo'</div>';}echo'</div><style>#'.$id.'{display:flex;gap:10px;height:'.$cfg['height'].'px;border-radius:8px;overflow:hidden}#'.$id.' .nc-left-wrap{flex:1;position:relative;border-radius:8px;overflow:hidden}#'.$id.' .nc-right-wrap{width:'.$cfg['right_width'].'px;display:flex;flex-direction:column;gap:10px}#'.$id.' .nc-right-top-wrap,#'.$id.' .nc-right-bottom-wrap{flex:1;position:relative;border-radius:8px;overflow:hidden}#'.$id.' .zib-slider{height:100%}#'.$id.' .new-swiper{height:100%;border-radius:8px;overflow:hidden}#'.$id.' .nc-right-top-wrap .swiper-pagination,#'.$id.' .nc-right-bottom-wrap .swiper-pagination{bottom:8px}#'.$id.' .nc-right-top-wrap .swiper-pagination-bullet,#'.$id.' .nc-right-bottom-wrap .swiper-pagination-bullet{width:6px;height:6px;margin:0 3px}#'.$id.' .swiper-slide::before{content:"";position:absolute;bottom:0;left:0;right:0;height:30%;background:linear-gradient(to top,rgba(0,0,0,0.5)...
2个月前