国产精品国产三级国产av丨,日本一区二区日本一区,亚洲一区二区三区品视频http://yxsw88.com/blog/Good Luck To You!J5導(dǎo)航條高亮顯示js控制on代碼http://yxsw88.com/blog/post/74.html<p>導(dǎo)航菜單實現(xiàn)高亮顯示,增加一個js判斷,菜單增加一個id調(diào)用。<br/><br/>1、頁腳增加這個判斷<br/>&nbsp; &nbsp; &nbsp; &nbsp; &lt;!-- header menu active hover --&gt;<br/>&nbsp; &nbsp; &nbsp; &nbsp; &lt;script type=&quot;text/javascript&quot;&gt; document.getElementById(&quot;{$&gt;this.genre}&quot;).className = &quot;active&quot;; &lt;/script&gt;<br/><br/>2、導(dǎo)航條li或者a標(biāo)簽加上 id=&quot;news&quot;即可。<br/><br/><br/>另外一種情況,需要把clss樣式寫進className里面,同時active改成on即可。<br/>&lt;!-- header menu active hover --&gt;<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;script type=&quot;text/javascript&quot;&gt; document.getElementById(&quot;{$&gt;this.genre}&quot;).className = &quot;headb_navboxitema on&quot;; &lt;/script&gt;</p>Fri, 10 May 2024 14:12:27 +0800J5詳情頁獲取當(dāng)前分類父分類IDhttp://yxsw88.com/blog/post/73.html<p>1、修改程序 /public/zhiwu/common/template/index.jtbc文件<br/><br/>public function detail(Request $req, Response $res)<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; //<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $fatherCategory = 0;<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $fatherCategory = $this -&gt; category -&gt; getRecordById($rsCategory, &#39;father_id&#39;) ?: $rsCategory;<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $variables = [<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &#39;category&#39; =&gt; $rsCategory,<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &#39;Fcategory&#39; =&gt; $fatherCategory,<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ];<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; //<br/>&nbsp;&nbsp;&nbsp;&nbsp; //$variables = [&#39;category&#39; =&gt; $rsCategory];屏蔽<br/><br/>2、模板調(diào)用<br/>獲取ID:{$[Fcategory]}<br/>調(diào)用分類名:{$=$render(&#39;index.category-detail&#39;, $fetch([&#39;genre&#39; =&gt; &#39;universal/category&#39;, &#39;where&#39; =&gt; [&#39;genre&#39; =&gt; &#39;{$&gt;this.genre}&#39;, &#39;id&#39; =&gt; {$[Fcategory]}]]))}</p>Fri, 12 Jan 2024 17:21:09 +0800J5列表中獲取當(dāng)前分類的父分類IDhttp://yxsw88.com/blog/post/72.html<p>以新聞模塊為例子。<br/><br/>打開/news/common/diplomat/index.php<br/><br/>找到public function list(Request $req, Response $res)函數(shù)<br/><br/>修改以下內(nèi)容:<br/><br/>在代碼<br/>$category = intval($req -&gt; get(&#39;category&#39;) ?? -1);<br/>下面添加一行<br/>$fatherCategory = 0;<br/><br/>在代碼<br/>$this -&gt; breadcrumbBuilder -&gt; batchAdd(Navigation::getBreadcrumb($this -&gt; category, $category, &#39;?type=list&amp;category=#category#&#39;));<br/>下面添加一行<br/>$fatherCategory = $this -&gt; category -&gt; getRecordById($category, &#39;father_id&#39;) ?: $category;<br/><br/>在代碼<br/>&#39;pagecount&#39; =&gt; $model -&gt; pagination -&gt; pageCount,<br/>下面添加一行<br/>&#39;father_category&#39; =&gt; $fatherCategory,<br/><br/>這樣,在前端代碼中可以使用<br/><br/>{$[father_category]}來獲取當(dāng)前分類的上級分類ID</p>Tue, 02 Jan 2024 10:33:38 +0800J5增加tag標(biāo)簽自定義URLhttp://yxsw88.com/blog/post/71.html<p>1、index.php文件detail節(jié)點<br/>$rsTag = strval($rs -&gt; tag);//增加tag<br/>模塊管理-添加字段tag,16標(biāo)簽輸入框。<br/><br/>2、tag/礦山副井井筒裝備安裝/<br/>http://www.tkrockdrill.com/tag/%E7%9F%BF%E5%B1%B1%E5%89%AF%E4%BA%95%E4%BA%95%E7%AD%92%E8%A3%85%E5%A4%87%E5%AE%89%E8%A3%85/product/<br/><br/><br/>自定義URL<br/>$slug = strval($req -&gt; get(&#39;slug&#39;));<br/><br/>manage.php文件<br/>add節(jié)點加上<br/>&nbsp;&nbsp;&nbsp; $schemaGenerator -&gt; extra -&gt; tag = [&#39;api&#39; =&gt; &#39;universal/tag/manageApi?type=list&amp;genre=&#39; . urlencode($genre)];<br/>&nbsp;&nbsp;&nbsp; $schemaGenerator -&gt; tips -&gt; slug = Jtbc::take(&#39;manage.text-tips-field-slug&#39;, &#39;lng&#39;);<br/><br/>edit節(jié)點加上<br/>搜索$data = $rs -&gt; toArray();下面加以下代碼<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $genre = $this -&gt; getParam(&#39;genre&#39;);<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $lang = $this -&gt; guard -&gt; role -&gt; getLang();<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $category = new Category($genre, $lang);<br/>搜索if (!$this -&gt; guard -&gt; role -&gt; checkPermission(&#39;publish&#39;))上面加以下代碼<br/>&nbsp;&nbsp;&nbsp; $schemaGenerator -&gt; extra -&gt; tag = [&#39;api&#39; =&gt; &#39;universal/tag/manageApi?type=list&amp;genre=&#39; . urlencode($genre)];<br/>&nbsp;&nbsp;&nbsp; $schemaGenerator -&gt; tips -&gt; slug = Jtbc::take(&#39;manage.text-tips-field-slug&#39;, &#39;lng&#39;);<br/><br/>~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~···<br/>新聞模塊增加tag標(biāo)簽文章列表<br/>找到public function list(Request $req, Response $res)節(jié)點<br/>1、搜索$page = intval($req -&gt; get(&#39;page&#39;));在上面增加以下代碼<br/>&nbsp;&nbsp;&nbsp; $tag = strval($req -&gt; get(&#39;tag&#39;));//tag增加<br/>&nbsp;&nbsp;&nbsp; $keyword = strval($req -&gt; get(&#39;keyword&#39;));//tag增加<br/>2、搜索$model -&gt; orderBy(&#39;time&#39;, &#39;desc&#39;);在上面增加以下代碼<br/>&nbsp;&nbsp;&nbsp; if (!Validation::isEmpty($tag))//tag增加開始<br/>&nbsp;&nbsp;&nbsp; {<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $model -&gt; where -&gt; tag -&gt; like(&#39;%&quot;&#39; . $tag . &#39;&quot;%&#39;);<br/>&nbsp;&nbsp;&nbsp; }<br/>&nbsp;&nbsp;&nbsp; if (!Validation::isEmpty($keyword))<br/>&nbsp;&nbsp;&nbsp; {<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $model -&gt; where(function($where) use ($keyword){<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $where -&gt; title -&gt; like(&#39;%&#39; . $keyword . &#39;%&#39;);<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $where -&gt; summary -&gt; or -&gt; like(&#39;%&#39; . $keyword . &#39;%&#39;);<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; });<br/>&nbsp;&nbsp;&nbsp; }//tag增加結(jié)束<br/>tag前端鏈接/blog/?type=list&amp;tag=網(wǎng)站設(shè)計<br/>~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~···<br/>文章所屬tag<br/>{$=$render(&#39;global.render.blog-tags&#39;, $convertToOption($jsonDecode(#tag) ?? []))}<br/>節(jié)點 [ blog-tags ]代碼<br/>&lt;a href=&quot;{$=$getActualRoute(&#39;blog&#39;)}/?type=list&amp;amp;tag={$=urlencode(#text)}&quot;&gt;{$text}&lt;/a&gt;<br/><br/>右側(cè)調(diào)用tag列表<br/>{$=$render(&#39;global.render.sidebar-tags&#39;, $fetch([&#39;genre&#39; =&gt; &#39;universal/tag&#39;, &#39;where&#39; =&gt; [&#39;genre&#39; =&gt; &#39;blog&#39;], &#39;orderBy&#39; =&gt; [[&#39;associated_count&#39;, &#39;desc&#39;]], &#39;limit&#39; =&gt; 50]))}<br/>節(jié)點 [ sidebar-tags ]代碼<br/>&lt;section&gt;<br/>&nbsp; &lt;h3&gt;{$=$take(&#39;global.communal.sidebar-tags&#39;, &#39;lng&#39;)}&lt;/h3&gt;<br/>&nbsp; &lt;div class=&quot;tags&quot;&gt;{@}&lt;a href=&quot;{$=$getActualRoute(&#39;blog&#39;)}/?type=list&amp;amp;tag={$=urlencode(#tag)}&quot;&gt;{$tag}&lt;/a&gt;{@}&lt;/div&gt;<br/>&lt;/section&gt;</p>Mon, 01 Jan 2024 20:14:01 +0800J5增加PDF附件下載功能http://yxsw88.com/blog/post/70.html<p>1、模塊管理增加att字段,選擇29附件管理器<br/>2、模板代碼<br/>&lt;table class=&quot;table table-striped m-0&quot;&gt;<br/>&lt;tbody&gt;<br/>&lt;tr&gt;<br/>&lt;th class=&quot;border-top-0&quot;&gt;<br/>&nbsp;附件下載:<br/>&lt;/th&gt;<br/>&lt;td class=&quot;border-top-0&quot;&gt;<br/>&lt;a href=&quot;{$=$htmlEncode($getValueFromJSON(#att, &#39;0-&gt;filepath&#39;))}&quot; alt=&quot;{$=$htmlEncode($getValueFromJSON(#att, &#39;0-&gt;filename&#39;))}&quot; target=&quot;_blank&quot;&gt;{$=$htmlEncode($getValueFromJSON(#att, &#39;0-&gt;filename&#39;))}<br/>&lt;/a&gt;<br/>&lt;/td&gt;<br/>&lt;td class=&quot;border-top-0&quot;&gt;<br/>&lt;a href=&quot;{$=$htmlEncode($getValueFromJSON(#att, &#39;1-&gt;filepath&#39;))}&quot; alt=&quot;{$=$htmlEncode($getValueFromJSON(#att, &#39;1-&gt;filename&#39;))}&quot; target=&quot;_blank&quot;&gt;{$=$htmlEncode($getValueFromJSON(#att, &#39;1-&gt;filename&#39;))}<br/>&lt;/a&gt;<br/>&lt;/td&gt;<br/>&lt;/tbody&gt;<br/>&lt;/table&gt;<br/>到此完工。<br/><br/><br/>下列方法無上傳附件文章id有報錯。<br/>2、模板調(diào)用{$=$render(&#39;global.render.pdf&#39;,$jsonDecode(#att))}<br/>3、pdf節(jié)點代碼如下:<br/>&lt;table class=&quot;table table-striped m-0&quot;&gt;<br/>&lt;tbody&gt;<br/>{@}&lt;tr&gt;<br/>&lt;th class=&quot;border-top-0&quot;&gt;<br/>附件下載:<br/>&lt;/th&gt;<br/>&lt;td class=&quot;border-top-0&quot;&gt;<br/>&lt;a href=&quot;{$filepath}&quot; alt=&quot;{$filename}&quot; target=&quot;_blank&quot;&gt;{$filename}<br/>&lt;/a&gt;<br/>&lt;/td&gt;<br/>&lt;/tr&gt;<br/>{@}<br/>&lt;/tbody&gt;<br/>&lt;/table&gt;</p>Mon, 01 Jan 2024 20:13:45 +0800J5偽靜態(tài)http://yxsw88.com/blog/post/69.html<p>Public/news/.rewrite的地址重寫配置:<br/><br/>&lt;?php<br/>return [<br/>&nbsp; [<br/>&nbsp;&nbsp;&nbsp; &#39;file&#39; =&gt; &#39;index.php&#39;,<br/>&nbsp;&nbsp;&nbsp; &#39;params&#39; =&gt; [&#39;type&#39; =&gt; &#39;list&#39;],<br/>&nbsp;&nbsp;&nbsp; &#39;query&#39; =&gt; [&#39;category&#39;],<br/>&nbsp;&nbsp;&nbsp; &#39;pattern&#39; =&gt; &#39;/^list-([0-9]+).html$/&#39;,<br/>&nbsp; ],<br/>&nbsp; [<br/>&nbsp;&nbsp;&nbsp; &#39;file&#39; =&gt; &#39;index.php&#39;,<br/>&nbsp;&nbsp;&nbsp; &#39;params&#39; =&gt; [&#39;type&#39; =&gt; &#39;list&#39;],<br/>&nbsp;&nbsp;&nbsp; &#39;query&#39; =&gt; [&#39;category&#39;, &#39;page&#39;],<br/>&nbsp;&nbsp;&nbsp; &#39;pattern&#39; =&gt; &#39;/^list-([0-9]+)-([0-9]+).html$/&#39;,<br/>&nbsp; ],<br/>&nbsp; [<br/>&nbsp;&nbsp;&nbsp; &#39;file&#39; =&gt; &#39;index.php&#39;,<br/>&nbsp;&nbsp;&nbsp; &#39;params&#39; =&gt; [&#39;type&#39; =&gt; &#39;detail&#39;],<br/>&nbsp;&nbsp;&nbsp; &#39;query&#39; =&gt; [&#39;id&#39;],<br/>&nbsp;&nbsp;&nbsp; &#39;pattern&#39; =&gt; &#39;/^detail-([a-z0-9-]+).html$/&#39;,<br/>&nbsp; ],<br/>];<br/><br/>上述代碼中,我們可以看到文件內(nèi)容其實是一個php文件并返回了一個數(shù)組,共有三條地址重寫規(guī)則:<br/><br/>&nbsp;&nbsp;&nbsp; 第一條匹配/news/list-數(shù)字.html這種形式的地址,其中匹配到的內(nèi)容定義為category的參數(shù)值,合并params的預(yù)設(shè)參數(shù)值,一并在index.php文件中解析。<br/>&nbsp;&nbsp;&nbsp; 第二條匹配/news/list-數(shù)字-數(shù)字.html這種形式的地址,其中匹配到的第一個內(nèi)容定義為category的參數(shù)值,第二個內(nèi)容定義為page的參數(shù)值,合并params的預(yù)設(shè)參數(shù)值,一并在index.php文件中解析。<br/>&nbsp;&nbsp;&nbsp; 第三條匹配/news/detail-字母或數(shù)字.html這種形式的地址,其中匹配到的內(nèi)容定義為slug的參數(shù)值,合并params的預(yù)設(shè)參數(shù)值,一并在index.php文件中解析。<br/><br/>所有模板鏈接都要修改。包括列表頁、內(nèi)容頁、調(diào)用模板、分頁JS文件等。<br/><br/>?type=list&amp;amp;category={$id}替換為list-{$id}.html<br/>?type=detail&amp;amp;id={$id}替換為detail-{$id}.html<br/><br/>內(nèi)容頁也可以替換成?type=detail&amp;amp;id={$id}替換為{$id}.html<br/>上面的&#39;pattern&#39; =&gt; &#39;/^detail-([a-z0-9-]+).html$/&#39;,<br/>要改成&#39;pattern&#39; =&gt; &#39;/^([a-z0-9-]+).html$/&#39;,<br/><br/>搜索鏈接偽靜態(tài)<br/>/Public/search/common/diplomat/index.php文件17行:<br/>return $this -&gt; getParam(&#39;full_host&#39;) . &#39;/&#39; . $item -&gt; un_name . &#39;/?type=detail&amp;id=&#39; . urlencode($item -&gt; id);<br/>替換為<br/>return $this -&gt; getParam(&#39;full_host&#39;) . &#39;/&#39; . $item -&gt; un_name . &#39;/&#39; . urlencode($item -&gt; id). &#39;.html&#39;;<br/><br/><br/></p>Mon, 01 Jan 2024 20:13:24 +0800J5網(wǎng)站首頁增加SEO標(biāo)題http://yxsw88.com/blog/post/68.html<p>網(wǎng)站增加首頁標(biāo)題<br/>1、/Public/common/language/communal.jtbc文件增加節(jié)點<br/>&nbsp;&nbsp;&nbsp; &lt;item&gt;<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;name&gt;&lt;![CDATA[seotitle]]&gt;&lt;/name&gt;<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;zh-cn&gt;&lt;![CDATA[實用的植物信息網(wǎng)站_專業(yè)的花卉植物圖片網(wǎng)站]]&gt;&lt;/zh-cn&gt;<br/>&nbsp;&nbsp;&nbsp; &lt;/item&gt;<br/>2、/Public/common/diplomat/index.php文件<br/>$this -&gt; addParam(&#39;meta_title&#39;, Jtbc::take(&#39;index.title&#39;, &#39;lng&#39;));<br/>替換成<br/>$this -&gt; addParam(&#39;meta_title&#39;, Jtbc::take(&#39;communal.seotitle&#39;, &#39;lng&#39;));<br/>3、/Public/dev/config/common/language/config.jtbc文件增加節(jié)點<br/>&nbsp;&nbsp;&nbsp; &lt;item&gt;<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;name&gt;&lt;![CDATA[list1-seotitle]]&gt;&lt;/name&gt;<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;zh-cn&gt;&lt;![CDATA[SEO標(biāo)題]]&gt;&lt;/zh-cn&gt;<br/>&nbsp;&nbsp;&nbsp; &lt;/item&gt;<br/>4、/Public/dev/config/common/template/manage.jtbc文件增加節(jié)點<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;item&gt;<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;label class=&quot;name&quot;&gt;&lt;span&gt;{$=$take(&#39;config.list1-seotitle&#39;, &#39;lng&#39;)}&lt;/span&gt;&lt;/label&gt;<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;div class=&quot;content&quot;&gt;&lt;input is=&quot;jtbc-input&quot; type=&quot;text&quot; role=&quot;field&quot; name=&quot;seotitle&quot; value=&quot;${$info.seotitle}&quot; spellcheck=&quot;false&quot; /&gt;&lt;/div&gt;<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;/item&gt;<br/>5、/Public/dev/config/common/diplomat/manage.php文件<br/>5.1第26行增加&#39;seotitle&#39; =&gt; Jtbc::take(&#39;global.communal.seotitle&#39;, &#39;lng&#39;),<br/>5.2第129行增加$seotitle = strval($req -&gt; post(&#39;seotitle&#39;));<br/>5.3第134行增加$codename5 = new Codename(&#39;global.communal.seotitle&#39;, &#39;lng&#39;);<br/>5.4第139行增加$wroteStatus5 = JtbcWriter::putNodeContent($codename5 -&gt; getFilepath(), &#39;lng&#39;, &#39;seotitle&#39;, $seotitle);<br/>&nbsp;</p>Mon, 01 Jan 2024 20:13:06 +0800J5模塊首頁-列表分類-文章頁面自定義TDKhttp://yxsw88.com/blog/post/67.html<p>J5模塊首頁-列表分類-文章頁面自定義TDK方法<br/>1、模塊添加字段,<br/>后臺開發(fā)維護》模塊管理》右邊的設(shè)置,在模塊設(shè)置界面,點擊右上角添加新字段按鈕<br/>添加3個字段,用來存儲自定義的TDK數(shù)據(jù)<br/>seotitle,01單行文本;seokey,01單行文本;seodesc,02多行文本。<br/>可拖動左邊箭頭調(diào)整顯示順序。<br/>2、程序處理/Public/gallery/common/diplomat/index.php文件<br/>2.1、public function __start(Request $req)節(jié)點增加<br/>&nbsp;&nbsp;&nbsp; $this -&gt; setParam(&#39;meta_title&#39;, array(Jtbc::take(&#39;global.communal.title&#39;, &#39;lng&#39;)));//增加開始<br/>&nbsp;&nbsp;&nbsp; $currentSeotitle = Jtbc::take(&#39;index.seotitle&#39;, &#39;lng&#39;);<br/>&nbsp;&nbsp;&nbsp; $currentKeywords = Jtbc::take(&#39;index.keywords&#39;, &#39;lng&#39;);<br/>&nbsp;&nbsp;&nbsp; $currentDescription = Jtbc::take(&#39;index.description&#39;, &#39;lng&#39;);<br/>&nbsp;&nbsp;&nbsp; if (!Validation::isEmpty($currentSeotitle))<br/>&nbsp;&nbsp;&nbsp; {<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $this -&gt; addParam(&#39;meta_title&#39;, $currentSeotitle);<br/>&nbsp;&nbsp;&nbsp; }<br/>&nbsp;&nbsp;&nbsp; if (!Validation::isEmpty($currentKeywords))<br/>&nbsp;&nbsp;&nbsp; {<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $this -&gt; setParam(&#39;meta_keywords&#39;, $currentKeywords);<br/>&nbsp;&nbsp;&nbsp; }<br/>&nbsp;&nbsp;&nbsp; if (!Validation::isEmpty($currentDescription))<br/>&nbsp;&nbsp;&nbsp; {<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $this -&gt; setParam(&#39;meta_description&#39;, $currentDescription);<br/>&nbsp;&nbsp;&nbsp; }//增加結(jié)束<br/>2.2、節(jié)點最后一行屏蔽掉<br/>&nbsp;&nbsp;&nbsp; //$this -&gt; setParam(&#39;category&#39;, $this -&gt; category);<br/>2.3public function list(Request $req, Response $res)節(jié)點<br/>找到$categorys = $this -&gt; category -&gt; getFatherGroupById($category, true);在下面增加以下代碼<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $categoryRs = $this -&gt; category -&gt; getRecordById($category);//增加<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $categoryRsSeotitle = strval($categoryRs -&gt; seotitle);//增加<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $categoryRsKeywords = strval($categoryRs -&gt; keywords);//增加<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $categoryRsIntro = strval($categoryRs -&gt; intro);//增加<br/>2.4找到$this -&gt; addParam(&#39;meta_title&#39;, $item[&#39;title&#39;]);}在下面增加以下代碼<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $this -&gt; setParam(&#39;meta_title&#39;, array(Jtbc::take(&#39;global.communal.title&#39;, &#39;lng&#39;)));//增加開始<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if (!Validation::isEmpty($categoryRsSeotitle))<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $this -&gt; addParam(&#39;meta_title&#39;, $categoryRsSeotitle);<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; else $this -&gt; addParam(&#39;meta_title&#39;, $item[&#39;title&#39;]);<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if (!Validation::isEmpty($categoryRsKeywords))<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $this -&gt; setParam(&#39;meta_keywords&#39;, $categoryRsKeywords);<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if (!Validation::isEmpty($categoryRsIntro))<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $this -&gt; setParam(&#39;meta_description&#39;, $categoryRsIntro);<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }//增加結(jié)束<br/>2.5修改函數(shù)public function detail(Request $req, Response $res)節(jié)點代碼<br/>找到$rsTitle = strval($rs -&gt; title);下面添加<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $rsSummary = strval($rs -&gt; summary);//增加<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $rsSeoTitle = strval($rs -&gt; seotitle);//增加<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $rsSeoKey = strval($rs -&gt; seokey);//增加<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $rsSeoDesc = strval($rs -&gt; seodesc);//增加<br/>修改代碼$this -&gt; addParam(&#39;meta_title&#39;, $rsTitle);為<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $this -&gt; setParam(&#39;meta_title&#39;, array(Jtbc::take(&#39;global.communal.title&#39;, &#39;lng&#39;)));//增加<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if (!empty($rsSeoTitle)) $this -&gt; addParam(&#39;meta_title&#39;, $rsSeoTitle);//增加<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; else $this -&gt; addParam(&#39;meta_title&#39;, $rsTitle);//增加<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if (!empty($rsSeoKey)) $this -&gt; setParam(&#39;meta_keywords&#39;, $rsSeoKey);//增加<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if (!empty($rsSeoDesc)) $this -&gt; setParam(&#39;meta_description&#39;, $rsSeoDesc);//增加<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; else if (!empty($rsSummary)) $this -&gt; setParam(&#39;meta_description&#39;, $rsSummary);//增加<br/>說明:summary字段為新聞模塊中的描述字段,如果修改的模塊沒有這個字段,請自行去除相關(guān)代碼即可。<br/>3、/Public/gallery/common/language/index.jtbc文件增加節(jié)點<br/>&nbsp;&nbsp;&nbsp; &lt;item&gt;<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;name&gt;&lt;![CDATA[seotitle]]&gt;&lt;/name&gt;<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;zh-cn&gt;&lt;![CDATA[多肉植物SEO標(biāo)題]]&gt;&lt;/zh-cn&gt;<br/>&nbsp;&nbsp;&nbsp; &lt;/item&gt;<br/>&nbsp;&nbsp;&nbsp; &lt;item&gt;<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;name&gt;&lt;![CDATA[keywords]]&gt;&lt;/name&gt;<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;zh-cn&gt;&lt;![CDATA[多肉植物關(guān)鍵詞]]&gt;&lt;/zh-cn&gt;<br/>&nbsp;&nbsp;&nbsp; &lt;/item&gt;<br/>&nbsp;&nbsp;&nbsp; &lt;item&gt;<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;name&gt;&lt;![CDATA[description]]&gt;&lt;/name&gt;<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;zh-cn&gt;&lt;![CDATA[多肉植物描述信息]]&gt;&lt;/zh-cn&gt;<br/>&nbsp;&nbsp;&nbsp; &lt;/item&gt;<br/>4、打開分類關(guān)鍵描述/Public/gallery/common/category.jtbc<br/>&nbsp;&nbsp;&nbsp; &lt;item&gt;<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;name&gt;&lt;![CDATA[has_seotitle]]&gt;&lt;/name&gt;<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;zh-cn&gt;&lt;![CDATA[true]]&gt;&lt;/zh-cn&gt;<br/>&nbsp;&nbsp;&nbsp; &lt;/item&gt;<br/>&nbsp;&nbsp;&nbsp; &lt;item&gt;<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;name&gt;&lt;![CDATA[has_keywords]]&gt;&lt;/name&gt;<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;zh-cn&gt;&lt;![CDATA[true]]&gt;&lt;/zh-cn&gt;<br/>&nbsp;&nbsp;&nbsp; &lt;/item&gt;<br/>&nbsp;&nbsp;&nbsp; &lt;item&gt;<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;name&gt;&lt;![CDATA[has_intro]]&gt;&lt;/name&gt;<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;zh-cn&gt;&lt;![CDATA[true]]&gt;&lt;/zh-cn&gt;<br/>&nbsp;&nbsp;&nbsp; &lt;/item&gt;<br/>~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~·<br/>5、/Public/universal/category/common/language/config.jtbc文件增加節(jié)點<br/>&nbsp;&nbsp;&nbsp; &lt;item&gt;<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;name&gt;&lt;![CDATA[seotitle]]&gt;&lt;/name&gt;<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &lt;zh-cn&gt;&lt;![CDATA[分類SEO標(biāo)題]]&gt;&lt;/zh-cn&gt;<br/>&nbsp;&nbsp;&nbsp; &lt;/item&gt;<br/>6、分類數(shù)據(jù)庫增加字段seotitle,類型VARCHAR,長度200,默認(rèn)NULL,排序規(guī)則utf8mb4_general_ci,注釋{&quot;required&quot;:false} <br/>7、/Public/universal/category/common/template/manage.jtbc文件<br/>add增加<br/>&lt;li if=&quot;${$property.has_seotitle}&quot;&gt;&lt;input is=&quot;jtbc-input&quot; type=&quot;text&quot; name=&quot;seotitle&quot; role=&quot;field&quot; placeholder=&quot;{$=$take(&#39;config.seotitle&#39;, &#39;lng&#39;)}&quot; /&gt;&lt;/li&gt;<br/>edit增加<br/>&lt;li if=&quot;${$property.has_seotitle}&quot;&gt;&lt;input is=&quot;jtbc-input&quot; type=&quot;text&quot; name=&quot;seotitle&quot; role=&quot;field&quot; placeholder=&quot;{$=$take(&#39;config.seotitle&#39;, &#39;lng&#39;)}&quot; value=&quot;${$data.seotitle}&quot; /&gt;&lt;/li&gt;<br/>~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~·<br/>其中5、6、7步驟一個網(wǎng)站只需要修改一次。其他步驟每個模塊重復(fù)一次操作。</p>Mon, 01 Jan 2024 20:12:46 +0800J5_11增加手機站http://yxsw88.com/blog/post/66.html<p>1、Public/common/diplomat/index.php文件<br/>&nbsp;&nbsp;&nbsp; return Jtbc::take(&#39;index.index&#39;);<br/>替換成<br/>&nbsp;&nbsp;&nbsp; return Jtbc::take($this -&gt; userAgent -&gt; isMobile()? &#39;index.index-mobile&#39;: &#39;index.index&#39;);<br/><br/>2、打開對應(yīng)的模板文件如:Public/common/template/index.jtbc增加新節(jié)點(index-mobile)模板即可。<br/><br/>3、增加手機端頭尾模板header-mobile,footer-mobile。<br/>{$=$take(&#39;global.communal.header-mobile&#39;)}<br/>{$=$take(&#39;global.communal.footer-mobile&#39;)}<br/><br/>4、關(guān)于我們模塊<br/>$renderer = new Renderer(&#39;index.detail&#39;);<br/>替換成<br/>$renderer = new Renderer($this -&gt; userAgent -&gt; isMobile()? &#39;index.detail-mobile&#39;: &#39;index.detail&#39;);<br/>增加新節(jié)點(detail-mobile)模板<br/><br/>5、產(chǎn)品服務(wù)模塊<br/>$renderer = new Renderer(&#39;index.list&#39;, $variables);<br/>替換成<br/>$renderer = new Renderer($this -&gt; userAgent -&gt; isMobile()? &#39;index.list-mobile&#39;: &#39;index.list&#39;, $variables);<br/><br/>$renderer = new Renderer(&#39;index.detail&#39;, $variables);<br/>替換成<br/>$renderer = new Renderer($this -&gt; userAgent -&gt; isMobile()? &#39;index.detail-mobile&#39;: &#39;index.detail&#39;, $variables);<br/><br/>$renderer = new Renderer(&#39;index.default&#39;, $variables);<br/>替換成<br/>$renderer = new Renderer($this -&gt; userAgent -&gt; isMobile()? &#39;index.default-mobile&#39;: &#39;index.default&#39;, $variables);<br/><br/><br/></p>Mon, 01 Jan 2024 20:12:04 +0800J5_10多語言http://yxsw88.com/blog/post/65.html<p>多語言<br/><br/>/Public/console/common/language/sel_lang.jtbc<br/>增加節(jié)點<br/><br/>不同語言不同模板<br/>Public/common/diplomat/index.php<br/>修改return Jtbc::take(&#39;index.index&#39;);這一句為:<br/>$lang = intval($this -&gt; getParam(&#39;lang&#39;));<br/>if(!empty($lang)) return Jtbc::take(&#39;index.index_&#39;.$lang);<br/>else return Jtbc::take(&#39;index.index&#39;);<br/>然后添加對應(yīng)的模板節(jié)點 index_1,默認(rèn)模板依然是index不用改。<br/><br/>切換到英文添加分類跑到中文解決方法:<br/>數(shù)據(jù)庫universal_category分類模塊的字段lang注釋{&quot;required&quot;:false,&quot;format&quot;:&quot;int&quot;}<br/>改成 {&quot;mode&quot;:&quot;manual&quot;,&quot;required&quot;:false,&quot;format&quot;:&quot;int&quot;}<br/><br/>{$=$take(&#39;index.banner-slogan&#39;, &#39;lng&#39;)}<br/>調(diào)用當(dāng)前模塊index.jtbc語言文件<br/><br/>~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~<br/>默認(rèn)語言是中文,怎么讓非當(dāng)前語言的鏈接發(fā)給客戶能自動判斷訪問<br/>現(xiàn)在是中文,發(fā)給客戶這個鏈接是英文的數(shù)據(jù),中文是沒有這個數(shù)據(jù)會報錯。<br/>/Public/product/common/diplomat/index.php文件<br/>1、第3行增加<br/>use Jtbc\Env;<br/>2、第77行$model -&gt; where -&gt; lang = $lang;前面加//屏蔽掉<br/>//$model -&gt; where -&gt; lang = $lang;<br/>3、第88行$rsTitle = strval($rs -&gt; title);上面增加以下代碼<br/>$res -&gt; cookie -&gt; set(&#39;language&#39;, Env::getLanguageByID($rs -&gt; lang));<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if($lang != $rs -&gt; lang){<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $res -&gt; cookie -&gt; set(&#39;language&#39;, Env::getLanguageByID($rs -&gt; lang));<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $res -&gt; header -&gt; set(&#39;location&#39;, &#39;./?type=detail&amp;id=&#39; . $id);<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }<br/>另外,你的多語言要注意這個文件里的語言對應(yīng)關(guān)系。/Config/Env.php<br/>~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~</p>Mon, 01 Jan 2024 20:11:45 +0800 不卡的日韩视频在线观看| 亚洲综合美腿玉足高跟鞋| 亚洲av成人一区二区在线观看| 欧美日韩一区二区三区大片在线观看 | 日韩av黄片在线免费观看| 亚洲国产欧美日韩另类| 蜜桃av免费在线一区二区| 自拍偷拍丝袜美腿亚洲欧美| 国产91欧美在线一区| 麻豆无限传媒免费在线观看| 国产精品中文久久91| 欧美熟妇激情视频在线播放| 欧美激情免费观看一区一| 国产一区二区欧美日韩在线| 岛国不卡的高清av在线| 亚洲一区二区三区影片| 国产在线精品成人av| 中文字幕人乱码中文字幕32| 九九在线可以看的视频| 国产欧美日韩精品一区二区青草 | 四虎高清成人在线观看| 在线亚洲精品国产成人av| 蜜桃传媒一区二区亚洲av| 欧美老熟女一级特黄片| 精品国产内射在线观看| 国产精品亚洲一区二区三区欲| 国产免费福利在线激情视频| 精品人妻一区二区三区在线看| 亚洲精品无限乱码久久| 久久成人做爰电影av| 欧美精品啪啪一区二区三区| 国产成人妞干网免费视频| 久久热这里只有精品网址| 青青草免费视频免费视频| 亚洲伦理在线中文幕字| 国产97最新在线视频| 欧美老汉色老汉首页优色| 蜜桃免费视频一区二区| 婷婷97欧美日本一区二区| 欧美交性又色又爽又黄麻豆| 国产一区二区三区粉嫩|