网站推广三步走:十秒注册 -> 提交网站 -> 快速审核 -> 带来无限流量和外链 -> 点入及点出一次即可排名第一位

当前位置:豫龙分类目录 » 站长资讯 » 站长教程 » 文章详细 订阅RssFeed

35dir无法获取网站缩略图解决办法

来源:优站网 浏览:2180次 时间:2021-01-21

简介:以下有两种方法,一种是直接链接别的网站,第二种是使用后台自带的功能。

以下有两种方法,一种是直接链接别的网站,第二种是使用后台自带的功能。


方法一:


1. 打开文件 source\module\prelink.php
搜索get_webthumb 找到以下代码


function get_webthumb($web_pic) {
    global $options;
 
    if (!empty($web_pic)) {
        $strurl = $options['site_root'].$options['upload_dir'].'/'.$web_pic;
    } else {
        $strurl = $options['site_root'].'public/images/nopic.gif';
    }
 
    return $strurl;
}


修改成以下代码




function get_webthumb($web_pic,$web_url) {
global $options;
 
if (!empty($web_pic)) {
$strurl = $options['site_root'].$options['upload_dir'].'/'.$web_pic;
} else {
$strurl= 'http://www.aizhan.com/ajaxAction/webthumb.php?domain='.$web_url;
 
}
return $strurl;
}


2.打开文件 source\module\website.php
搜索get_webthumb
找到
$web['web_pic'] = get_webthumb($web['web_pic']); 需要替换两次
全部替换成
$row['web_pic'] = get_webthumb($row['web_pic'],$row['web_url']);
 
3.打开文件 module\siteinfo.php
搜索get_webthumb
找到
$web['web_pic'] = get_webthumb($web['web_pic']);  这行
替换成
$web['web_pic'] = get_webthumb($web['web_pic'],$web['web_url']);
 
4.打开文件 module\linkinfo.php
搜索get_webthumb
找到
$link['web_pic'] = get_webthumb($link['web_pic']);
这行
替换成
$link['web_pic'] = get_webthumb($link['web_pic'],$link['web_url']);


方法二:修复官方的失效自带下载缩略图功能


修改 \source\include\function.php


搜索  save_to_local  函数


 大约在434行


$imgurl = 'http://open.thumbshots.org/image.pxf?url='.$weburl;


替换成


$imgurl = 'http://www.myip.cn/webthumb.php?q='.$weburl;


保存即可,然后去后台-站点管理-下载图片
下载所有图片即可大约每个图片100K   图片保存在\uploads\website目录下


方法一:把网页图片调用其他网站的缩略图。这种方法比较节省服务器资源。具体操作如下。


1.打开文件  source\module\prelink.php


查找代码:


<span class="crayon-t">function</span><span class="crayon-h"> </span><span class="crayon-e">get_webthumb</span><span class="crayon-sy">(</span><span class="crayon-v">$web_pic</span><span class="crayon-sy">)</span><span class="crayon-h"> </span><span class="crayon-sy">{</span><div class="crayon-line crayon-striped-line" id="crayon-55c425564969d459345953-8"><span class="crayon-h"> </span><span class="crayon-m">global</span><span class="crayon-h"> </span><span class="crayon-v">$options</span><span class="crayon-sy">;</span></div><div class="crayon-line" id="crayon-55c425564969d459345953-9"> </div><div class="crayon-line crayon-striped-line" id="crayon-55c425564969d459345953-10"><span class="crayon-h"> </span><span class="crayon-st">if</span><span class="crayon-h"> </span><span class="crayon-sy">(</span><span class="crayon-o">!</span><span class="crayon-k ">empty</span><span class="crayon-sy">(</span><span class="crayon-v">$web_pic</span><span class="crayon-sy">)</span><span class="crayon-sy">)</span><span class="crayon-h"> </span><span class="crayon-sy">{</span></div><div class="crayon-line" id="crayon-55c425564969d459345953-11"><span class="crayon-h"> </span><span class="crayon-v">$strurl</span><span class="crayon-h"> </span><span class="crayon-o">=</span><span class="crayon-h"> </span><span class="crayon-v">$options</span><span class="crayon-sy">[</span><span class="crayon-s">'site_root'</span><span class="crayon-sy">]</span><span class="crayon-sy">.</span><span class="crayon-v">$options</span><span class="crayon-sy">[</span><span class="crayon-s">'upload_dir'</span><span class="crayon-sy">]</span><span class="crayon-sy">.</span><span class="crayon-s">'/'</span><span class="crayon-sy">.</span><span class="crayon-v">$web_pic</span><span class="crayon-sy">;</span></div><div class="crayon-line crayon-striped-line" id="crayon-55c425564969d459345953-12"><span class="crayon-h"> </span><span class="crayon-sy">}</span><span class="crayon-h"> </span><span class="crayon-st">else</span><span class="crayon-h"> </span><span class="crayon-sy">{</span></div><div class="crayon-line" id="crayon-55c425564969d459345953-13"><span class="crayon-h"> </span><span class="crayon-v">$strurl</span><span class="crayon-h"> </span><span class="crayon-o">=</span><span class="crayon-h"> </span><span class="crayon-v">$options</span><span class="crayon-sy">[</span><span class="crayon-s">'site_root'</span><span class="crayon-sy">]</span><span class="crayon-sy">.</span><span class="crayon-s">'public/images/nopic.gif'</span><span class="crayon-sy">;</span></div><div class="crayon-line crayon-striped-line" id="crayon-55c425564969d459345953-14"><span class="crayon-h"> </span><span class="crayon-sy">}</span></div><div class="crayon-line" id="crayon-55c425564969d459345953-15"> </div><div class="crayon-line crayon-striped-line" id="crayon-55c425564969d459345953-16"><span class="crayon-h"> </span><span class="crayon-k ">return</span><span class="crayon-h"> </span><span class="crayon-v">$strurl</span><span class="crayon-sy">;</span></div>}
修改为:
<span class="crayon-t">function</span><span class="crayon-h"> </span><span class="crayon-e">get_webthumb</span><span class="crayon-sy">(</span><span class="crayon-v">$web_pic</span><span class="crayon-sy">,</span><span class="crayon-v">$web_url</span><span class="crayon-sy">)</span><span class="crayon-h"> </span><span class="crayon-sy">{</span><div class="crayon-line" id="crayon-55c425564969d459345953-21"><span class="crayon-m">global</span><span class="crayon-h"> </span><span class="crayon-v">$options</span><span class="crayon-sy">;</span></div><div class="crayon-line crayon-striped-line" id="crayon-55c425564969d459345953-22"> </div><div class="crayon-line" id="crayon-55c425564969d459345953-23"><span class="crayon-st">if</span><span class="crayon-h"> </span><span class="crayon-sy">(</span><span class="crayon-o">!</span><span class="crayon-k ">empty</span><span class="crayon-sy">(</span><span class="crayon-v">$web_pic</span><span class="crayon-sy">)</span><span class="crayon-sy">)</span><span class="crayon-h"> </span><span class="crayon-sy">{</span></div><div class="crayon-line crayon-striped-line" id="crayon-55c425564969d459345953-24"><span class="crayon-v">$strurl</span><span class="crayon-h"> </span><span class="crayon-o">=</span><span class="crayon-h"> </span><span class="crayon-v">$options</span><span class="crayon-sy">[</span><span class="crayon-s">'site_root'</span><span class="crayon-sy">]</span><span class="crayon-sy">.</span><span class="crayon-v">$options</span><span class="crayon-sy">[</span><span class="crayon-s">'upload_dir'</span><span class="crayon-sy">]</span><span class="crayon-sy">.</span><span class="crayon-s">'/'</span><span class="crayon-sy">.</span><span class="crayon-v">$web_pic</span><span class="crayon-sy">;</span></div><div class="crayon-line" id="crayon-55c425564969d459345953-25"><span class="crayon-sy">}</span><span class="crayon-h"> </span><span class="crayon-st">else</span><span class="crayon-h"> </span><span class="crayon-sy">{</span></div><div class="crayon-line crayon-striped-line" id="crayon-55c425564969d459345953-26"><span class="crayon-v">$strurl</span><span class="crayon-o">=</span><span class="crayon-h"> </span><span class="crayon-s">'http://www.aizhan.com/ajaxAction/webthumb.php?domain='</span><span class="crayon-sy">.</span><span class="crayon-v">$web_url</span><span class="crayon-sy">;</span></div><div class="crayon-line" id="crayon-55c425564969d459345953-27"> </div><div class="crayon-line crayon-striped-line" id="crayon-55c425564969d459345953-28"><span class="crayon-sy">}</span></div><div class="crayon-line" id="crayon-55c425564969d459345953-29"><span class="crayon-k ">return</span><span class="crayon-h"> </span><span class="crayon-v">$strurl</span><span class="crayon-sy">;</span></div><div class="crayon-line crayon-striped-line" id="crayon-55c425564969d459345953-30"><span class="crayon-sy">}</span></div> 


2.打开文件  module\linkinfo.php
搜索get_webthumb
<span class="crayon-v"></span><span class="crayon-v"></span><span class="crayon-v">$link</span><span class="crayon-sy">[</span><span class="crayon-s">'web_pic'</span><span class="crayon-sy">]</span><span class="crayon-h"> </span><span class="crayon-o">=</span><span class="crayon-h"> </span><span class="crayon-e">get_webthumb</span><span class="crayon-sy">(</span><span class="crayon-v">$link</span><span class="crayon-sy">[</span><span class="crayon-s">'web_pic'</span><span class="crayon-sy">]</span><span class="crayon-sy">)</span><span class="crayon-sy">;</span><span class="crayon-sy"></span><span class="crayon-h"></span>
<span class="crayon-v"></span>
替换成
<div class="crayon-line" id="crayon-55c425564969d459345953-37"><span class="crayon-v"></span><div class="crayon-line crayon-striped-line" id="crayon-55c425564969d459345953-52"><span class="crayon-v">$link</span><span class="crayon-sy">[</span><span class="crayon-s">'web_pic'</span><span class="crayon-sy">]</span><span class="crayon-h"> </span><span class="crayon-o">=</span><span class="crayon-h"> </span><span class="crayon-e">get_webthumb</span><span class="crayon-sy">(</span><span class="crayon-v">$link</span><span class="crayon-sy">[</span><span class="crayon-s">'web_pic'</span><span class="crayon-sy">]</span><span class="crayon-sy">,</span><span class="crayon-v">$link</span><span class="crayon-sy">[</span><span class="crayon-s">'web_url'</span><span class="crayon-sy">]</span><span class="crayon-sy">)</span><span class="crayon-sy">;</span><span class="crayon-sy"></span></div></div>


3.打开文件  module\siteinfo.php
搜索get_webthumb
<span class="crayon-v">$web</span><span class="crayon-sy">[</span><span class="crayon-s">'web_pic'</span><span class="crayon-sy">]</span><span class="crayon-h"> </span><span class="crayon-o">=</span><span class="crayon-h"> </span><span class="crayon-e">get_webthumb</span><span class="crayon-sy">(</span><span class="crayon-v">$web</span><span class="crayon-sy">[</span><span class="crayon-s">'web_pic'</span><span class="crayon-sy">]</span><span class="crayon-sy">)</span><span class="crayon-sy">;</span>
替换成
<div class="crayon-line crayon-striped-line" id="crayon-55c425564969d459345953-44"><span class="crayon-v">$web</span><span class="crayon-sy">[</span><span class="crayon-s">'web_pic'</span><span class="crayon-sy">]</span><span class="crayon-h"> </span><span class="crayon-o">=</span><span class="crayon-h"> </span><span class="crayon-e">get_webthumb</span><span class="crayon-sy">(</span><span class="crayon-v">$web</span><span class="crayon-sy">[</span><span class="crayon-s">'web_pic'</span><span class="crayon-sy">]</span><span class="crayon-sy">,</span><span class="crayon-v">$web</span><span class="crayon-sy">[</span><span class="crayon-s">'web_url'</span><span class="crayon-sy">]</span><span class="crayon-sy">)</span><span class="crayon-sy">;</span></div>


4.打开文件  source\module\website.php 修改以下两处


<span class="crayon-v">$web</span><span class="crayon-sy">[</span><span class="crayon-s">'web_pic'</span><span class="crayon-sy">]</span><span class="crayon-h"> </span><span class="crayon-o">=</span><span class="crayon-h"> </span><span class="crayon-e">get_webthumb</span><span class="crayon-sy">(</span><span class="crayon-v">$web</span><span class="crayon-sy">[</span><span class="crayon-s">'web_pic'</span><span class="crayon-sy">]</span><span class="crayon-sy">)</span><span class="crayon-sy">;</span><span class="crayon-h"></span>
替换成(替换两次)
<div class="crayon-line" id="crayon-55c425564969d459345953-37"><span class="crayon-v">$row</span><span class="crayon-sy">[</span><span class="crayon-s">'web_pic'</span><span class="crayon-sy">]</span><span class="crayon-h"> </span><span class="crayon-o">=</span><span class="crayon-h"> </span><span class="crayon-e">get_webthumb</span><span class="crayon-sy">(</span><span class="crayon-v">$row</span><span class="crayon-sy">[</span><span class="crayon-s">'web_pic'</span><span class="crayon-sy">]</span><span class="crayon-sy">,</span><span class="crayon-v">$row</span><span class="crayon-sy">[</span><span class="crayon-s">'web_url'</span><span class="crayon-sy">]</span><span class="crayon-sy">)</span><span class="crayon-sy">;</span></div>


利用myip的接口显示缩略图图片是调用myip的不会占用自己服务器空间资源速度也有保证




 myip是很老的站了相信不会轻易关闭



推荐站点

  • 河南论坛河南论坛

    河南论坛—河南论坛,是河南省的社区交流论坛,成立之初就定位于:致力给广大河南居民提供一个生活交流的平台,在这里,您可以进行讨论和交流,还可以针对生活中的家庭与邻里、购房与置业、物业与开发商、业委会和居委会、和表决,团购和集采、装修和生活消费等各种话题进行讨论、交流和分享。

    bbs.wbn360.cn
  • 学信网学信网

    教育部学历查询网站、教育部高校招生阳光工程指定网站、全国硕士研究生招生报名和调剂指定网站。

    www.chsi.com.cn
  • 洛阳网洛阳网

    洛阳网(www.lyd.com.cn)——洛阳日报报业集团主办,国务院新闻办公室批准的国家一类新闻网站,拥有独立采编权的省属重点新闻网站,下设洛阳新闻、百姓呼声、22楼会客厅、洛阳房产、洛阳汽车、经典洛阳等频道, 拥有本地互动论坛“洛阳社区”, 在河南综合性网站及社区网站综合影响力排名榜单上进入前三强,为洛阳高知名度和强影响力的门户网站。

    www.lyd.com.cn
  • 优站导航优站导航

    优站分类目录-免费收录各地区行业优秀网站的中文网站目录,提供分类目录网址提交,中文网站目录检索搜索功能,免费推广网站,分享互联网价值所在.

    www.youzhan.co
  • 设计师网址导航设计师网址导航

    优站设计师网站导航为设计师提供全方位的供ps教程、UI设计、素材下载、高清图库、配色方案、用户体验、网页设计等全方位设计师网站导航指引。每周更新及时,同时是优站网(YOUZHAN.CO)旗下最实用、最专业、最全面、最好用的设计师网址导航!

    dc.xinmeit.com
  • Onlylady女人志Onlylady女人志

    Onlylady女人志女性时尚生活平台是专业的女性时尚网站,为广大用户提供专业的时尚潮流、美容方法、流行趋势、服饰时装资讯,打造专业时尚、美容、生活、达人、互动平台。

    www.onlylady.com