소스 검색

Update extend.func.php

tags/6.3.2
叙述、别离 1 년 전
부모
커밋
10fbe73af5
1개의 변경된 파일2개의 추가작업 그리고 3개의 파일을 삭제
  1. +2
    -3
      src/system/extend.func.php

+ 2
- 3
src/system/extend.func.php 파일 보기

@@ -61,12 +61,11 @@ function obtainalt($newalt)
$row = $dsql->GetOne("SELECT title FROM `#@__archives` WHERE id='$myid'");
//图片注释自动为标题
$newalt = str_ireplace(array('alt=""', 'alt=\'\'', 'title=""', 'title=\'\''), "", $newalt);
$newalt = str_ireplace("<img ", "<img alt=\"".$row['title']."\" title=\"".$row['title']."\"", $newalt);
$newalt = str_ireplace("<img", "<img alt=\"".$row['title']."\" title=\"".$row['title']."\"", $newalt);
//去掉图片宽度和高度
$newalt = preg_replace("/style=\"width\:(.*)\"/", "", $newalt);
//去掉结尾
$newalt = str_ireplace(" /", "/", $newalt);
$newalt = str_ireplace(" />", ">", $newalt);
$newalt = str_ireplace(" /", "", $newalt);
return $newalt;
}
//联动单筛选{dede:php}obtainfilter(模型id,类型,'字段1,字段2');{/dede:php}类型表示前台展现方式对应case值


불러오는 중...
취소
저장