在loop里面使用了{title_style($v[style])}标题样式,如果当前标题不存在样式(高亮、加粗),就会生成多余的废弃代码 style="" 。如:标题,看了不舒服吧。,修改:phpcmslibsfunctionsglobal.func.php 1476行开始,代码如下:,
在loop里面使用了{title_style($v[style])}标题样式,如果当前标题不存在样式(高亮、加粗),就会生成多余的废弃代码 style="" 。如:标题,看了不舒服吧。
修改:phpcmslibsfunctionsglobal.func.php 1476行开始,代码如下:
- /**
- * 生成标题样式
- * @param $style 样式
- * @param $html 是否显示完整的STYLE
- */
- function title_style($style, $html = 1) {
- $str = '';
- if ($html) $str = ' style="';
- $style_arr = explode(';',$style);
- if (!empty($style_arr[0])) $str .= 'color:'.$style_arr[0].';';
- if (!empty($style_arr[1])) $str .= 'font-weight:'.$style_arr[1].';';
- if ($html) $str .= '" ';//xiariboke.net
- return $str;
- }
- //修改成如下代码:
- /**
- * 生成标题样式
- * @param $style 样式
- * @param $html 是否显示完整的STYLE
- */
- function title_style($style, $html = 1) {
- if (!emptyempty($style)){
- $str = '';
- if ($html) $str = ' style="';
- $style_arr = explode(';',$style);
- if (!empty($style_arr[0])) $str .= 'color:'.$style_arr[0].';';
- if (!empty($style_arr[1])) $str .= 'font-weight:'.$style_arr[1].';';
- if ($html) $str .= '"';
- return $str;
- }
- }
,
在loop里面使用了{title_style($v[style])}标题样式,如果当前标题不存在样式(高亮、加粗),就会生成多余的废弃代码 style="" 。如:标题,看了不舒服吧。
修改:phpcmslibsfunctionsglobal.func.php 1476行开始,代码如下:
- /**
- * 生成标题样式
- * @param $style 样式
- * @param $html 是否显示完整的STYLE
- */
- function title_style($style, $html = 1) {
- $str = '';
- if ($html) $str = ' style="';
- $style_arr = explode(';',$style);
- if (!empty($style_arr[0])) $str .= 'color:'.$style_arr[0].';';
- if (!empty($style_arr[1])) $str .= 'font-weight:'.$style_arr[1].';';
- if ($html) $str .= '" ';//xiariboke.net
- return $str;
- }
- //修改成如下代码:
- /**
- * 生成标题样式
- * @param $style 样式
- * @param $html 是否显示完整的STYLE
- */
- function title_style($style, $html = 1) {
- if (!emptyempty($style)){
- $str = '';
- if ($html) $str = ' style="';
- $style_arr = explode(';',$style);
- if (!empty($style_arr[0])) $str .= 'color:'.$style_arr[0].';';
- if (!empty($style_arr[1])) $str .= 'font-weight:'.$style_arr[1].';';
- if ($html) $str .= '"';
- return $str;
- }
- }
此处评论已关闭