花魁直播高品质美女在线视频互动社区 - 花魁直播官方版

 歡迎來到素材無憂網(wǎng),按 + 收藏我們
登錄 注冊 退出 找回密碼

織夢分類信息聯(lián)動地區(qū)偽靜態(tài)+apache偽靜態(tài)規(guī)則

時間: 2020-09-15 15:34 閱讀: 作者:素材無憂網(wǎng)

dedecms織夢分類信息聯(lián)動地區(qū)偽靜態(tài)+apache偽靜態(tài)規(guī)則,需要的同學可以看看,由于改動多,需要對比修改的同學可以用【Beyond Compare】軟件來修改

apache 分類信息聯(lián)動地區(qū)偽靜態(tài)規(guī)則

RewriteRule ^category/list-(-[0-9]+)-([0-9]+)-([0-9]+)-([0-9]+)\.html$ /plus/list.php?channelid=$1&tid=$2&nativeplace=$3&infotype=$4
RewriteRule ^category/list-([0-9]+)-([0-9]+)-([0-9]+)-([0-9]+)-([0-9]+)\.html$ /plus/list.php?tid=$1&TotalResult=$2&nativeplace=$3&infotype=$4&PageNo=$5

/include/taglib/infolink.lib.php  整個文件修改為

<?php   if(!defined('DEDEINC')) exit('Request Error!');
/**
 * 分類信息地區(qū)與類型快捷鏈接
 *
 * @version        $Id: infolink.lib.php 1 9:29 2010年7月6日Z tianya $
 * @package        DedeCMS.Taglib
 * @copyright      Copyright (c) 2007 - 2010, DesDev, Inc.
 * @license        http://help.dedecms.com/usersguide/license.html
 * @link           http://www.dedecms.com
 */
 
/*>>dede>>
<name>分類信息地區(qū)與類型快捷鏈接</name>
<type>全局標記</type>
<for>V55,V56,V57</for>
<description>調(diào)用分類信息地區(qū)與類型快捷鏈接</description>
<demo>
{dede:infolink /}
</demo>
<attributes>
</attributes> 
>>dede>>*/
 
require_once(DEDEINC.'/enums.func.php');
require_once(DEDEDATA.'/enums/nativeplace.php');
require_once(DEDEDATA.'/enums/infotype.php');

function lib_infolink(&$ctag,&$refObj)
{
    global $cfg_rewrite,$dsql,$nativeplace,$infotype,$hasSetEnumJs,$cfg_cmspath,$cfg_mainsite;
    global $em_nativeplaces,$em_infotypes;
    
    //屬性處理
    //$attlist="row|12,titlelen|24";
    //FillAttsDefault($ctag->CAttribute->Items,$attlist);
    //extract($ctag->CAttribute->Items, EXTR_SKIP);
    
    $cmspath = ( (empty($cfg_cmspath) || !preg_match("#\/$#", $cfg_cmspath)) ? $cfg_cmspath.'/' : $cfg_cmspath );
    $baseurl = preg_replace("#\/$#", '', $cfg_mainsite).$cmspath;
    
    $smalltypes = '';
    if( !empty($refObj->TypeLink->TypeInfos['smalltypes']) ) {
        $smalltypes = explode(',', $refObj->TypeLink->TypeInfos['smalltypes']);
    }
    
    if(empty($refObj->Fields['typeid'])) {
        $row = $dsql->GetOne("SELECT id FROM `dede_arctype` WHERE channeltype='-8' And reid = '0' ");
        $typeid = (is_array($row) ? $row['id'] : 0);
    }
    else {
        $typeid = $refObj->Fields['typeid'];
    }
    
    $innerText = trim($ctag->GetInnerText());
    if(empty($innerText)) $innerText = GetSysTemplets("info_link.htm");
    $ctp = new DedeTagParse();
    $ctp->SetNameSpace('field','[',']');
    $ctp->LoadSource($innerText);

    $revalue = $seli = '';
    $channelid = ( empty($refObj->TypeLink->TypeInfos['channeltype']) ? -8 : $refObj->TypeLink->TypeInfos['channeltype'] );
    
    $fields = array('nativeplace'=>'','infotype'=>'','typeid'=>$typeid,
                    'channelid'=>$channelid,'linkallplace'=>'','linkalltype'=>'');
    
    $fields['nativeplace'] = $fields['infotype'] = '';
    
	
	//偽靜態(tài)
	if($cfg_rewrite == 'Y')
	{
		$rwlinkallplace = "/category/list-".$channelid."-".$typeid."-".$infotype."-0.html";
		$fields['linkallplace'] = "<a href='{$rwlinkallplace}'>不限</a>";
	}
	else
	{
		$fields['linkallplace'] = "<a href='{$baseurl}plus/list.php?channelid={$channelid}&tid={$typeid}&infotype={$infotype}'>不限</a>";
	}
	//偽靜態(tài)
	if($cfg_rewrite == 'Y')
	{
		$rwlinkalltype = "/category/list-".$channelid."-".$typeid."-".$nativeplace."-0.html";
		$fields['linkalltype'] = "<a href='{$rwlinkalltype}'>不限</a>";
	}
	else
	{
		$fields['linkalltype'] = "<a href='{$baseurl}plus/list.php?channelid={$channelid}&tid={$typeid}&nativeplace={$nativeplace}'>不限</a>";
	}
    
    //地區(qū)鏈接
    if(empty($nativeplace))
    {
        foreach($em_nativeplaces as $eid=>$em)
        {
            if($eid % 500 != 0) continue;
			//偽靜態(tài)
			if($cfg_rewrite == 'Y')
			{
				$rwnativeplace = "/category/list-".$channelid."-".$typeid."-".$eid."-".$infotype.".html";
				$fields['nativeplace'] .= "<a href='{$rwnativeplace}'>{$em}</a>";
			}
			else
			{
				$fields['nativeplace'] .= " <a href='{$baseurl}plus/list.php?channelid={$channelid}&tid={$typeid}&nativeplace={$eid}&infotype={$infotype}'>{$em}</a>\r\n";
			}
        }
    }
    else
    {
        $sontype = ( ($nativeplace % 500 != 0) ? $nativeplace : 0 );
        $toptype = ( ($nativeplace % 500 == 0) ? $nativeplace : ( $nativeplace-($nativeplace%500) ) );
		//2011-6-21 修改地區(qū)列表的一個小空格 論壇http://bbs.dedecms.com/371492.html(by:織夢的魚)
		//偽靜態(tài)
		if($cfg_rewrite == 'Y')
		{
			$rwnativeplace = "/category/list-".$channelid."-".$typeid."-".$toptype."-".$infotype.".html";
			$fields['nativeplace'] = "<a href='{$rwnativeplace}'> <b>{$em_nativeplaces[$toptype]}</b></a> &gt;&gt; ";
		}
		else
		{
			$fields['nativeplace'] = "<a href='{$baseurl}plus/list.php?channelid={$channelid}&tid={$typeid}&nativeplace={$toptype}&infotype={$infotype}'> <b>{$em_nativeplaces[$toptype]}</b></a> &gt;&gt; ";
		}
        foreach($em_nativeplaces as $eid=>$em)
        {
            if($eid < $toptype+1 || $eid > $toptype+499) continue;
            if($eid == $nativeplace) {
                $fields['nativeplace'] .= " <b>{$em}</b>\r\n";
            }
            else {
				//偽靜態(tài)
				if($cfg_rewrite == 'Y')
				{
					$rwnativeplace = "/category/list-".$channelid."-".$typeid."-".$eid."-".$infotype.".html";
					$fields['nativeplace'] .= "<a href='{$rwnativeplace}'>{$em}</a>\r\n";
				}
				else
				{
					$fields['nativeplace'] .= " <a href='{$baseurl}plus/list.php?channelid={$channelid}&tid={$typeid}&nativeplace={$eid}&infotype={$infotype}'>{$em}</a>\r\n";
				}
          }
      }
    }
    //小分類鏈接
    if(empty($infotype) || is_array($smalltypes))
    {
        
        foreach($em_infotypes as $eid=>$em)
        {
            if(!is_array($smalltypes) && $eid % 500 != 0) continue;
            if(is_array($smalltypes) && !in_array($eid, $smalltypes)) continue;
            if($eid == $infotype) 
            {
                $fields['infotype'] .= " <b>{$em}</b>\r\n";
            }
            else {
				//偽靜態(tài)
				if($cfg_rewrite == 'Y')
				{
					$rwinfotype = "/category/list-".$channelid."-".$typeid."-".$eid."-".$nativeplace.".html";
					$fields['infotype'] .= " <a href='{$rwinfotype}'>{$em}</a>\r\n";
				}
				else
				{
					$fields['infotype'] .= " <a href='{$baseurl}plus/list.php?channelid={$channelid}&tid={$typeid}&infotype={$eid}&nativeplace={$nativeplace}'>{$em}</a>\r\n";
				}

            }
        }
    }
    else
    {
        $sontype = ( ($infotype % 500 != 0) ? $infotype : 0 );
        $toptype = ( ($infotype % 500 == 0) ? $infotype : ( $infotype-($infotype%500) ) );
		//偽靜態(tài)
		if($cfg_rewrite == 'Y')
		{
			$rwinfotype = "/category/list-".$channelid."-".$typeid."-".$toptype."-".$nativeplace.".html";
			$fields['infotype'] .= "<a href='{$rwinfotype}'><b>{$em_infotypes[$toptype]}</b></a> &gt;&gt; ";
		}
		else
		{
			$fields['infotype'] .= "<a href='{$baseurl}plus/list.php?channelid={$channelid}&tid={$typeid}&infotype={$toptype}&nativeplace={$nativeplace}'><b>{$em_infotypes[$toptype]}</b></a> &gt;&gt; ";
		}
        foreach($em_infotypes as $eid=>$em)
        {
            if($eid < $toptype+1 || $eid > $toptype+499) continue;
            if($eid == $infotype) {
                $fields['infotype'] .= " <b>{$em}</b>\r\n";
            }
            else {
				//偽靜態(tài)
				if($cfg_rewrite == 'Y')
				{
					$rwinfotype = "/category/list-".$channelid."-".$typeid."-".$eid."-".$nativeplace.".html";
					$fields['infotype'] .= "<a href='{$rwinfotype}'><b>{$em_infotypes[$toptype]}</b></a> &gt;&gt; ";
				}
				else
				{
					$fields['infotype'] .= " <a href='{$baseurl}plus/list.php?channelid={$channelid}&tid={$typeid}&infotype={$eid}&nativeplace={$nativeplace}'>{$em}</a>\r\n";
				}
                
          }
      }
    }
    
    
    if(is_array($ctp->CTags))
    {
        foreach($ctp->CTags as $tagid=>$ctag)
        {
            if(isset($fields[$ctag->GetName()])) {
                $ctp->Assign($tagid,$fields[$ctag->GetName()]);
            }
        }
        $revalue .= $ctp->GetResult();
    }
    
    return $revalue;
}

打開/include/arc.sglistview.class.php 找到

$row['ismake'] = 1;

改成

$row['ismake'] = -1;

繼續(xù)找到

global $nativeplace,$infotype,$keyword;

改成

global $cfg_rewrite,$nativeplace,$infotype,$keyword;

繼續(xù)找到

$geturl = "tid=".$this->TypeID."&TotalResult=".$this->TotalResult."&nativeplace=$nativeplace&infotype=$infotype&keyword=".urlencode($keyword)."&";

改成

// 如果開啟為靜態(tài),則對規(guī)則進行替換
if($cfg_rewrite == 'Y')
{
    $nowurls = preg_replace("/\-/", ".php?", $purl);
    $nowurls = explode("?", $nowurls);
    $purl = $nowurls[0];
}
$geturl = "tid=".$this->TypeID."&TotalResult=".$this->TotalResult."&nativeplace=$nativeplace&infotype=$infotype&";

最后找到

$plist = $indexpage.$prepage.$listdd.$nextpage.$endpage;

改成

$plist = $indexpage.$prepage.$listdd.$nextpage.$endpage;
if($cfg_rewrite == 'Y')
{
    $plist = str_replace('.php?tid=', '-', $plist);
    $plist = str_replace('&TotalResult=', '-', $plist);
    $plist = str_replace('&nativeplace=', '-', $plist);
    $plist = str_replace('&infotype=', '-', $plist);
    $plist = preg_replace("/&PageNo=(\d+)/i",'-\\1.html',$plist);
}

 

 

 

版權(quán)聲明: 本站資源均來自互聯(lián)網(wǎng)或會員發(fā)布,如果侵犯了您的權(quán)益請與我們聯(lián)系,我們將在24小時內(nèi)刪除!謝謝!

轉(zhuǎn)載請注明: 織夢分類信息聯(lián)動地區(qū)偽靜態(tài)+apache偽靜態(tài)規(guī)則

相關(guān)文章
模板推薦