给SeaCMS增加一个相似名称+同导演+同演员三个条件同时存在的标签
在内容页调用相关影片时,常用的标签有
rel=r 像似名称影片
rel=d 同导演影片
rel=y 同演员影片
这三个标签在一个循环内只能单独使用,当使用rel=r
调用相似名称影片的数量非常少时,可能无法填满预留位置,严重影响页面美观。
解决方法:增加一个支持相似名字+同导演+同演员三个条件同时存在的标签
编辑 /include/main.class.php
文件第1254行
在内容页调用相关影片时,常用的标签有
rel=r 像似名称影片
rel=d 同导演影片
rel=y 同演员影片
这三个标签在一个循环内只能单独使用,当使用rel=r
调用相似名称影片的数量非常少时,可能无法填满预留位置,严重影响页面美观。
解决方法:增加一个支持相似名字+同导演+同演员三个条件同时存在的标签
编辑 /include/main.class.php
文件第1254行
编辑 /include/main.class.php
文件第1294行,将
if(!empty($vletter)) $whereLetter=" and m.v_letter ='".strtoupper($vletter)."' "; else $whereLetter="";
修改为
if(!empty($vletter))if(strlen($vletter)>1){$whereLetter=" and m.v_letter between '0' and '9'";}else{$whereLetter=" and m.v_letter ='".strtoupper($vletter)."' ";} else $whereLetter="";
常用判断(用于显示当前播放来源):
{playpage:playlist}<dd id="[playlist:ename]"{if:'{playpage:from}'<>'[playlist:from]'} style="display: none;"{else} style="display: block;"{end if}><p>资源来自<strong>[playlist:from]</strong>,[playlist:intro]</p><ul>[playlist:link]</ul></dd>{/playpage:playlist}
{playpage:playlist}{if:{playpage:from}==[playlist:from]}'#[playlist:ename]'{end if}{/playpage:playlist}
但上面的判断在最新版本,即6.46版中无效。
编辑 /include/mkhtml.func.php
文件第43行,找到:
function makeAllmovie($by='video')
{
global $mainClassObj;
switch ($by){
case 'video':
$templatePath="/templets/".$GLOBALS['cfg_df_style']."/".$GLOBALS['cfg_df_html']."/map.html";
break;
修改为
文件位置: /include/common.func.php
第3274行开始为拼音生成函数
字符过滤:
$s = str_replace('字符','',$s);
注意符号的半角和全角(即英文符号和中文符号)的不同。
字符替换:
$s = str_replace('字符','替换后的字符',$s);
首字母和全屏转换:
$isfirst = true //表示首字母
$isfirst = false //表示全拼
增加或修改某个文字的拼音:
丁:ding|
格式为:文字:拼音
注意用 | 分割开