当前位置: 首页 > news >正文

科技信息期刊网站seo计划书

科技信息期刊,网站seo计划书,html5浅蓝色网站设计公司dede模板,域名已注册怎样建设网站本篇文章实现了为 Typecho 博客文章评论添加显示 UserAgent#xff08;UA#xff09;的功能本功能可替代 UserAgent 插件#xff0c;更美观、简洁且好看 效果显示 大概就是这样了#xff0c;实际效果请看我的评论#xff01; 目前可以识别的操作系统以及浏览器 食用方…本篇文章实现了为 Typecho 博客文章评论添加显示 UserAgentUA的功能本功能可替代 UserAgent 插件更美观、简洁且好看 效果显示 大概就是这样了实际效果请看我的评论 目前可以识别的操作系统以及浏览器 食用方法 这里以 Mirages主题为例其他主题操作方法类似。 首先 将下面这段 css 全部加入到 Mirages/css/7.10.0/Mirages.min.css 末尾。 .ua-icon{display:inline-block;width:1pc;height:1pc;background-size:cover;background-repeat:no-repeat;vertical-align:text-top}.icon-360{background-image:url(https://img.jichun29.cn/img/20200226125429.png)}.icon-android{background-image:url(https://img.jichun29.cn/img/20200226125423.png);height:19px}.icon-apple{background-image:url(https://img.jichun29.cn/img/20200226125422.png)}.icon-baidu{background-image:url(https://img.jichun29.cn/img/20200226125424.png)}.icon-chrome{background-image:url(https://img.jichun29.cn/img/20200226125427.png)}.icon-edge{background-image:url(https://img.jichun29.cn/img/20200226125425.png)}.icon-firefox{background-image:url(https://img.jichun29.cn/img/20200226125426.png)}.icon-google{background-image:url(https://img.jichun29.cn/img/20200226125428.png)}.icon-ie{background-image:url(https://img.jichun29.cn/img/20200226125431.png)}.icon-liebao{background-image:url(https://img.jichun29.cn/img/20200226125430.png)}.icon-linux{background-image:url(https://img.jichun29.cn/img/20200226125433.png)}.icon-mac{background-image:url(https://img.jichun29.cn/img/20200226125432.png)}.icon-opera{background-image:url(https://img.jichun29.cn/img/20200226125434.png)}.icon-qq{background-image:url(https://img.jichun29.cn/img/20200226125435.png)}.icon-quark{background-image:url(https://img.jichun29.cn/img/20200226125437.png)}.icon-safari{background-image:url(https://img.jichun29.cn/img/20200226125438.png)}.icon-ubuntu{background-image:url(https://img.jichun29.cn/img/20200226125436.png)}.icon-uc{background-image:url(https://img.jichun29.cn/img/20200226125439.png)}.icon-win1{background-image:url(https://img.jichun29.cn/img/20200226125440.png)}.icon-win2{background-image:url(https://img.jichun29.cn/img/20200226125421.png)}也可后台加入自定义 css 或是直接在 header.php 中引入 然后 找到 Mirages/functions.php将下面代码完整复制加到 functions.php 文件的最末尾 // 获取浏览器信息function getBrowser($agent){if (preg_match(/MSIE\s([^\s|;])/i, $agent, $regs)) {$outputer i classua-icon icon-ie/inbsp;nbsp;Internet Explore;} else if (preg_match(/FireFox\/([^\s])/i, $agent, $regs)) {$str1 explode(Firefox/, $regs[0]);$FireFox_vern explode(., $str1[1]);$outputer i classua-icon icon-firefox/inbsp;nbsp;FireFox;} else if (preg_match(/Maxthon([\d]*)\/([^\s])/i, $agent, $regs)) {$str1 explode(Maxthon/, $agent);$Maxthon_vern explode(., $str1[1]);$outputer i classua-icon icon-edge/inbsp;nbsp;MicroSoft Edge;} else if (preg_match(#360([a-zA-Z0-9.])#i, $agent, $regs)) {$outputer i classua-icon icon-360/inbsp;nbsp;360极速浏览器;} else if (preg_match(/Edge([\d]*)\/([^\s])/i, $agent, $regs)) {$str1 explode(Edge/, $regs[0]);$Edge_vern explode(., $str1[1]);$outputer i classua-icon icon-edge/inbsp;nbsp;MicroSoft Edge;} else if (preg_match(/UC/i, $agent)) {$str1 explode(rowser/, $agent);$UCBrowser_vern explode(., $str1[1]);$outputer i classua-icon icon-uc/inbsp;nbsp;UC浏览器;} else if (preg_match(/QQ/i, $agent, $regs)||preg_match(/QQBrowser\/([^\s])/i, $agent, $regs)) {$str1 explode(rowser/, $agent);$QQ_vern explode(., $str1[1]);$outputer i class ua-icon icon-qq/inbsp;nbsp;QQ浏览器;} else if (preg_match(/UBrowser/i, $agent, $regs)) {$str1 explode(rowser/, $agent);$UCBrowser_vern explode(., $str1[1]);$outputer i classua-icon icon-uc/inbsp;nbsp;UC浏览器;} else if (preg_match(/Opera[\s|\/]([^\s])/i, $agent, $regs)) {$outputer i class ua-icon icon-opera/inbsp;nbsp;Opera;} else if (preg_match(/Chrome([\d]*)\/([^\s])/i, $agent, $regs)) {$str1 explode(Chrome/, $agent);$chrome_vern explode(., $str1[1]);$outputer i classua-icon icon-chrome/inbsp;nbsp;Google Chrome;} else if (preg_match(/safari\/([^\s])/i, $agent, $regs)) {$str1 explode(Version/, $agent);$safari_vern explode(., $str1[1]);$outputer i classua-icon icon-safari/inbsp;nbsp;Safari;} else{$outputer i classua-icon icon-chrome/inbsp;nbsp;Google Chrome;}echo $outputer;}// 获取操作系统信息function getOs($agent){$os false;if (preg_match(/win/i, $agent)) {if (preg_match(/nt 6.0/i, $agent)) {$os nbsp;nbsp;i class ua-icon icon-win1/inbsp;nbsp;Windows Vistanbsp;/nbsp;;} else if (preg_match(/nt 6.1/i, $agent)) {$os nbsp;nbsp;i class ua-icon icon-win1/inbsp;nbsp;Windows 7nbsp;/nbsp;;} else if (preg_match(/nt 6.2/i, $agent)) {$os nbsp;nbsp;i classua-icon icon-win2/inbsp;nbsp;Windows 8nbsp;/nbsp;;} else if(preg_match(/nt 6.3/i, $agent)) {$os nbsp;nbsp;i class ua-icon icon-win2/inbsp;nbsp;Windows 8.1nbsp;/nbsp;;} else if(preg_match(/nt 5.1/i, $agent)) {$os nbsp;nbsp;i classua-icon icon-win1/inbsp;nbsp;Windows XPnbsp;/nbsp;;} else if (preg_match(/nt 10.0/i, $agent)) {$os nbsp;nbsp;i classua-icon icon-win2/inbsp;nbsp;Windows 10nbsp;/nbsp;;} else{$os nbsp;nbsp;i classua-icon icon-win2/inbsp;nbsp;Windows X64nbsp;/nbsp;;}} else if (preg_match(/android/i, $agent)) {if (preg_match(/android 9/i, $agent)) {$os nbsp;nbsp;i classua-icon icon-android/inbsp;nbsp;Android Pienbsp;/nbsp;;}else if (preg_match(/android 8/i, $agent)) {$os nbsp;nbsp;i classua-icon icon-android/inbsp;nbsp;Android Oreonbsp;/nbsp;;}else{$os nbsp;nbsp;i classua-icon icon-android/inbsp;nbsp;Androidnbsp;/nbsp;;}}else if (preg_match(/ubuntu/i, $agent)) {$os nbsp;nbsp;i classua-icon icon-ubuntu/inbsp;nbsp;Ubuntunbsp;/nbsp;;} else if (preg_match(/linux/i, $agent)) {$os nbsp;nbsp;i class ua-icon icon-linux/inbsp;nbsp;Linuxnbsp;/nbsp;;} else if (preg_match(/iPhone/i, $agent)) {$os nbsp;nbsp;i classua-icon icon-apple/inbsp;nbsp;iPhonenbsp;/nbsp;;} else if (preg_match(/mac/i, $agent)) {$os nbsp;nbsp;i classua-icon icon-mac/inbsp;nbsp;MacOSnbsp;/nbsp;;}else if (preg_match(/fusion/i, $agent)) {$os nbsp;nbsp;i classua-icon icon-android/inbsp;nbsp;Androidnbsp;/nbsp;;} else {$os nbsp;nbsp;i classua-icon icon-linux/inbsp;nbsp;Linuxnbsp;/nbsp;;}echo $os;}最后 在 Mirages/lib/comments.php 中找到合适位置添加以下代码 span classcomment-ua?php getOs($comments-agent); ??php getBrowser($comments-agent); ?/span如果修改完都显示 Linux 的话需要将上面的 $comments 替换成 $this 即可注意代码缩进 修改完后刷新浏览器缓存现在你的评论 UA 已经变得很漂亮啦
http://www.pierceye.com/news/78754/

相关文章:

  • 网站实名认证功能怎么做国外招工信息最新招聘信息
  • 安徽省建设厅网站证书查询企业馆设计公司
  • 上网建站推广新兴县建设局网站
  • 通许画册设计网站桌面百度
  • 无锡网站建设推荐智勇个人可以备案几个网站
  • 零基础网站建设教学服务腾讯域名
  • dw可以做视频网站么西安小程序搭建
  • 网站建设开发报价方案模板.net建设网站步骤详解
  • 学校网站平台建设网站小图标怎么做的
  • 自助建站平台设计器想建个网站什么代码都是自己写
  • 做网站时需要注意什么wordpress meta key
  • 北京网站建设浩森宇特沈阳妇科医生哪个好
  • 一级a做爰片免费网站 新闻整站采集wordpress
  • 芜湖网站优化公司必应搜索引擎入口官网
  • 教学网站前台模板天津谷歌优化公司
  • 自助房申请网站暗网网站
  • 开封市建设局网站西安活动策划执行公司
  • php网站qq互联为外国企业做中文网站建设
  • 中国建设银行福州招聘信息网站wordpress禁用字体
  • 搬瓦工如何搭建做网站株洲seo优化哪家便宜
  • 百度云自助建站wordpress随机文章代码
  • 江苏网站建设方案代码源
  • 交互式网站定义藁城专业网站建设
  • 学完js了可以做哪些网站红色大气网站模板
  • 有没有可以做兼职的网站吗网站建设的代理
  • wordpress建站费用宁波高端建站
  • 手机版网站开发教学竞价推广sem
  • 邯郸网站建设开发公司php中英双语农业公司网站源码
  • 滴滴优惠券网站怎么做自适应网页设计尺寸
  • 东莞网站SEO优化托管如何建立自己的网页