分类 Seacms 下的文章

SeaCMS支持斜杠分隔符

编辑 /include/common.func.php 文件第1386行,找到

function getKeywordsList($key,$span){
    if($key=='')return $key;
    $keyWordsStr="";
    $keystr=str_replace(",",",",$key);
    if (strpos($keystr,",")>0){$keyWordsArray=explode(",",$keystr);}else{$keyWordsArray=explode(" ",$keystr);}
    for($kli=0;$kli<count($keyWordsArray);$kli++){
        $keyWordsStr.="<a href='/".$GLOBALS['cfg_cmspath']."search.php?searchword=".urlencode($keyWordsArray[$kli])."'>".$keyWordsArray[$kli]."</a>".$span;
    }
    return $keyWordsStr;
}

function getJqList($key,$span){
    if($key=='')return $key;
    $keyWordsStr="";
    $keystr=str_replace(",",",",$key);
    if (strpos($keystr,",")>0){$keyWordsArray=explode(",",$keystr);}else{$keyWordsArray=explode(" ",$keystr);}
    for($kli=0;$kli<count($keyWordsArray);$kli++){
        $keyWordsStr.="<a href='/".$GLOBALS['cfg_cmspath']."search.php?searchtype=5&jq=".urlencode($keyWordsArray[$kli])."'>".$keyWordsArray[$kli]."</a>".$span;
    }
    return $keyWordsStr;
}

- 阅读剩余部分 -

给SeaCMS增加一个相似名称+同导演+同演员三个条件同时存在的标签

在内容页调用相关影片时,常用的标签有
rel=r 像似名称影片
rel=d 同导演影片
rel=y 同演员影片
这三个标签在一个循环内只能单独使用,当使用rel=r调用相似名称影片的数量非常少时,可能无法填满预留位置,严重影响页面美观。

解决方法:增加一个支持相似名字+同导演+同演员三个条件同时存在的标签

编辑 /include/main.class.php 文件第1254行

$rel_r = substr($zrel['0'] - > v_name, 0, 9);
unset($zrel);
switch ($vrel) {
case "d":
    foreach($rel_d as $value) {
        $d_str. = "'%".$value."%'#";
    }
    $d_str = rtrim($d_str, "#");
    $d_str = str_replace("#", " or m.v_director like ", $d_str);
    $whereRel = " and m.v_director like $d_str ";
    break;
case "y":
    foreach($rel_y as $value) {
        $y_str. = "'%".$value."%'#";
    }
    $y_str = rtrim($y_str, "#");
    $y_str = str_replace("#", " or m.v_actor like ", $y_str);
    $whereRel = " and m.v_actor like $y_str ";
    break;
case "r":
    $whereRel = " and m.v_name like '%$rel_r%'";
    break;

下方插入

    case "l":
    foreach($rel_d as $value) {
        $d_str. = "'%".$value."%'#";
    }
    $d_str = rtrim($d_str, "#");
    $d_str = str_replace("#", " or m.v_director like ", $d_str);
    foreach($rel_y as $value) {
        $y_str. = "'%".$value."%'#";
    }
    $y_str = rtrim($y_str, "#");
    $y_str = str_replace("#", " or m.v_actor like ", $y_str);
    $whereRel=" and (m.v_name like '%$rel_r%' or (m.v_director like $d_str) or (m.v_actor like $y_str) )";
    break;

SeaCMS地图页按首字母调用时0-9内容不显示的解决方法

编辑 /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="";

SeaCMS播放页if判断无效的解决方法

常用判断(用于显示当前播放来源):

{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版中无效。

- 阅读剩余部分 -

SeaCMS自定义地图页模板文件和生成静态文件名

编辑 /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;

修改为

function makeAllmovie($by='video')
{
    global $mainClassObj;
    switch ($by){
        case 'video':
            $templatePath="/templets/".$GLOBALS['cfg_df_style']."/".$GLOBALS['cfg_df_html']."/self_all.html";
        break;

编辑 /include/mkhtml.func.php 文件第71行,找到:

case 'video':
    $allmoviename=sea_ROOT."/allmovie".getfileSuffix();
    createTextFile($content,$allmoviename);
    return "地图页生成完毕 <a target='_blank' href='../allmovie".getfileSuffix()."'><font color=red>浏览地图页</font></a><br>";
break;

修改为:
编辑 /include/mkhtml.func.php 文件第71行,找到:

case 'video':
    $allmoviename=sea_ROOT."/all".getfileSuffix();
    createTextFile($content,$allmoviename);
    return "地图页生成完毕 <a target='_blank' href='../all".getfileSuffix()."'><font color=red>浏览地图页</font></a><br>";
break;

更新缓存并重新生成即可