关于DEDECMS图片跑马灯调用跑马灯的问题

温馨提示!由于新浪微博认证机制调整,您的新浪微博帐号绑定已过期,请重新绑定!&&|&&
LOFTER精选
网易考拉推荐
用微信&&“扫一扫”
将文章分享到朋友圈。
用易信&&“扫一扫”
将文章分享到朋友圈。
阅读(6019)|
用微信&&“扫一扫”
将文章分享到朋友圈。
用易信&&“扫一扫”
将文章分享到朋友圈。
历史上的今天
loftPermalink:'',
id:'fks_',
blogTitle:'解决织梦(DedeCMS)系统自定义字段图片调用问题',
blogAbstract:'一、实现方法1)创建自定义函数打开 /include/extend.func.php 文件(注:这个文件就是系统预留的自定义函数接口文件,主要用于二次开发用的。如果你是老版本,默认没有这个文件,自己创建一个PHP文件即可),在最下面的?&上一行加入以下函数代码:/****************function GetOneImgUrl@@ 功能:读取自定义字段图片地址*****************/function GetOneImgUrl($img,$ftype=1){if($img && \'\'){$dtp = new DedeTagParse();$dtp-&LoadSource($img);if(is_array($dtp-&CTags)){foreach($dtp-&CTags as $ctag){',
blogTag:'自定义,字段,imgurl,调用,dtp',
blogUrl:'blog/static/',
isPublished:1,
istop:false,
modifyTime:0,
publishTime:8,
permalink:'blog/static/',
commentCount:1,
mainCommentCount:1,
recommendCount:1,
bsrk:-100,
publisherId:0,
recomBlogHome:false,
currentRecomBlog:false,
attachmentsFileIds:[],
groupInfo:{},
friendstatus:'none',
followstatus:'unFollow',
pubSucc:'',
visitorProvince:'',
visitorCity:'',
visitorNewUser:false,
postAddInfo:{},
mset:'000',
remindgoodnightblog:false,
isBlackVisitor:false,
isShowYodaoAd:false,
hostIntro:'',
hmcon:'1',
selfRecomBlogCount:'0',
lofter_single:''
{list a as x}
{if x.moveFrom=='wap'}
{elseif x.moveFrom=='iphone'}
{elseif x.moveFrom=='android'}
{elseif x.moveFrom=='mobile'}
${a.selfIntro|escape}{if great260}${suplement}{/if}
{list a as x}
推荐过这篇日志的人:
{list a as x}
{if !!b&&b.length>0}
他们还推荐了:
{list b as y}
转载记录:
{list d as x}
{list a as x}
{list a as x}
{list a as x}
{list a as x}
{if x_index>4}{break}{/if}
${fn2(x.publishTime,'yyyy-MM-dd HH:mm:ss')}
{list a as x}
{if !!(blogDetail.preBlogPermalink)}
{if !!(blogDetail.nextBlogPermalink)}
{list a as x}
{if defined('newslist')&&newslist.length>0}
{list newslist as x}
{if x_index>7}{break}{/if}
{list a as x}
{var first_option =}
{list x.voteDetailList as voteToOption}
{if voteToOption==1}
{if first_option==false},{/if}&&“${b[voteToOption_index]}”&&
{if (x.role!="-1") },“我是${c[x.role]}”&&{/if}
&&&&&&&&${fn1(x.voteTime)}
{if x.userName==''}{/if}
网易公司版权所有&&
{list x.l as y}
{if defined('wl')}
{list wl as x}{/list}在includes/extend.func.php末尾添加方法:
//取第一张图地址
function firstimg($str_pic)
$str_sub=substr($str_pic,0,-7).".jpg";//删除缩略图字符串最后七位,然后再补上后缀.jpg
return $str_sub;
在模板调用处添加:
&img src="{dede:field name='litpic' function="firstimg(@me)"/} " /&
阅读(...) 评论()现在开始讲一下二级域名下文章/商品内容中的图片无法显示的问题。在这里我要指出的是我看了一下网站的好多解决方法都不能解决根本,
include/inc_arclist_view.php 594行
include/inc/inc_fun_spgetarclist.php 195行
$row['litpic'] = $row['siteurl'].$row['litpic'];替换这一行为
$row['litpic'] = $row['litpic'];
这个修改方法我就是在网上看到的。当然不能排除这个方法有效,但是我没有用,为什么呢?这个文件改的是include里面的核心文件,所以我放弃,因为我要考虑到系统的完整性,
这个很明显不能解决我的问题。
1:我们可以看到& DedeCms系统配置参数-&其它选项中有两个配置选项:[附件目录是否绑定为指定的二级域名 | 附件目录的二级域名]很明显示官方早就注意到了在二级域名下的种种子问题。
2:打开include/FCKeditor/editor/dialog/目录下的文件:&dede_image.php&。
if($cfg_multi_site=='N')&&&&&&&&&{&&&&&&&&&&&&&$imgHtml&.=&&&&img&src=\&$imgsrcValue\&&width=\&$imgwidthValue\&&border=\&0\&&height=\&$imgheightValue\&&alt=\&$altname\&&style=\&cursor:pointer\&&onclick=\&window.open('$urlValue')\&&/&&br&/&\r\n&;&&&&&&&&&}&&&&&&&&&else&&&&&&&&&{&&&&&&&&&&&&&if(empty($cfg_basehost))&$cfg_basehost&=&'http://'.$_SERVER[&HTTP_HOST&];&&&&&&&&&&&&&$imgHtml&.=&&&&img&src=\&$imgsrcValue\&&width=\&$imgwidthValue\&&border=\&0\&&height=\&$imgheightValue\&&alt=\&$altname\&&style=\&cursor:pointer\&&onclick=\&window.open('$urlValue')\&&/&&br&/&\r\n&;&&&&&&&&&}&
if($GLOBALS['cfg_addon_domainbind']){$addon_domain&&&=&$GLOBALS['cfg_addon_domain'];}&&&&&&&&&if($cfg_multi_site=='N')&&&&&&&&&{&&&&&&&&&&&&&$imgHtml&.=&&&&img&src=\&{$addon_domain}{$imgsrcValue}\&&width=\&$imgwidthValue\&&border=\&0\&&height=\&$imgheightValue\&&alt=\&$altname\&&style=\&cursor:pointer\&&onclick=\&window.open('{$addon_domain}{$urlValue}')\&&/&&br&/&\r\n&;&&&&&&&&&}&&&&&&&&&else&&&&&&&&&&{&&&&&&&&&&&&&if(empty($cfg_basehost))&$cfg_basehost&=&'http://'.$_SERVER[&HTTP_HOST&];&&&&&&&&&&&&&$imgHtml&.=&&&&img&src=\&{$addon_domain}{$imgsrcValue}\&&width=\&$imgwidthValue\&&border=\&0\&&height=\&$imgheightValue\&&alt=\&$altname\&&style=\&cursor:pointer\&&onclick=\&window.open('{$addon_domain}{$urlValue}')\&&/&&br&/&\r\n&;&&&&&&&&&}&
现在上传的图片正常 了,接下来我们要考虑的是下面不是有一个&浏览&的按纽吗,[图片/随便/flash/多媒体]都有这个功能。
先打开include/dialog/目录下的 select_images.php|select_media.php|select_soft.php|select_templets.php
将下面的代码:
$activeurl&=&'..'.$activepath;&
if($GLOBALS['cfg_addon_domainbind']){$addon_domain&&&=&$GLOBALS['cfg_addon_domain'];}&$activeurl&=&'..'.$addon_domain.$activepath;&
至此完成所以的更改,这样更改是在保证dedecms系统的完整性上改的,只有内容中的图片才会变。
当然前提是你开启:附件目录是否绑定为指定的二级域名
并且指定二级域名地址。如果不开启就会和你原来的是一样的。
评论列表(网友评论仅供网友表达个人看法,并不表明本站同意其观点或证实其描述)}

我要回帖

更多关于 android 图片跑马灯 的文章

更多推荐

版权声明:文章内容来源于网络,版权归原作者所有,如有侵权请点击这里与我们联系,我们将及时删除。

点击添加站长微信