虚位以待(AD)
虚位以待(AD)
首页 > CMS教程 > Phpwind > phpwind相册显示缩略图却不能显示大图解决方案

phpwind相册显示缩略图却不能显示大图解决方案
类别:Phpwind   作者:码皇   来源:互联网   点击:

将下面的代码复制,然后新建一个htm文件,将其复制到里面保存,重命名为m_photos htm,然后上传到到论坛的 appsphotostemplate 下面 !-- 模板天下教程网:http: www mobantianxia cn --!--?phpprint EOT--!-- EOT ,魔客吧

将下面的代码复制,然后新建一个htm文件,将其复制到里面保存,重命名为m_photos.htm,然后上传到到论坛的
appsphotostemplate
下面

<!-- 模板天下教程网:http://www.mobantianxia.cn -->
<!--<?php
print <<<EOT
-->
<!--
EOT;
if($cssForum){
print <<<EOT
-->
<div class="c"></div>
<link rel="stylesheet" type="text/css" href="$pwModeImg/app.css" />
<!--
EOT;
}
print <<<EOT
-->
<script type="text/javascript">
var imgMaxWidth=710;
function ImgLoad()
{
 var o = document.getElementById("imgview");//.getElementsByTagName("img")[0];
 var pe = document.getElementById('imgpre');
 if(o==null || pe == null || !pe.width)
 {
  setTimeout(ImgLoad, 400);
 }else
 {
  if (pe.width>imgMaxWidth){
   if (o.style.width){
    o.style.width="";
   }
   o.width=imgMaxWidth;
   o.removeAttribute("height");
   o.style.cursor="hand";
   o.vspace=5;
   o.resized=1;
  }
  else
  {
   o.width=pe.width;
  }
  o.src=pe.src;
  var next = getObj('next');
  var pre = getObj('pre');
  setTimeout(function(){
   next.coords = '0 0 ' + ',' + o.width/2 + ',' + o.height;
   pre.coords = o.width/2 + ' 0 ' + ',' + o.width + ',' + o.height;
  },400);
 }
}
</script>
<img id="imgpre" src="$photo[path]" style="position:absolute;left:-10000px" onload="ImgLoad()" />
<div id="content" class="fr">
 <div style="padding:15px 15px 0;">
  <div class="app-title cc">
<!--
EOT;
if($m == 'o'){print<<<EOT
-->
  <a href="{$basename}space=1" class="gray fr">进入个人空间浏览&raquo;</a>

相关热词搜索: phpwind相册显示缩略图却不能显示大图解决