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

当前位置:66网站目录 » 站长资讯 » 站长教程 » 文章详细

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

来源:优站网 浏览:2253次 时间: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是很老的站了相信不会轻易关闭

推荐站点

  • 聚站网聚站网

    聚站网,免费提供网站目录分类检索,收集正规的中文网站,用户自主的网站提交,为各行业分类目录收藏,聚站网努力打造优质丰富的网站收录平台。

    www.565865.com
  • YY分类目录YY分类目录

    YY分类目录全人工编辑的开放式网站分类目录,收录国内外、各行业优秀网站,旨在为用户提供网站分类目录检索、优秀网站参考、网站推广服务。

    www.yydir.com
  • 66网站目录66网站目录

    66网站目录是免费收录各行业优秀网站,提供网站分类目录检索,关键字搜索,提交网站即可免费推广,增加外链,提升网站流量。

    www.66dir.com
  • 25分类目录25分类目录

    25分类目录专业提供网站网址免费提交收录,25分类目录是采用开放导航式的网站大全,收录国内外各行业优秀的网站网址,让网站在各大搜索引擎收录快排名靠前。

    www.25dir.com
  • 和讯科技和讯科技

    和讯科技是和讯网核心资讯频道,以报道科技中国,分享全球智慧为目标,为高端财经网络用户提供有关TMT产业领域及时、快速、全面的资讯报道。

    tech.hexun.com
  • 百度搜索百度搜索

    百度,全球最大的中文搜索引擎、最大的中文网站。

    www.baidu.com