好!欢迎访问迷津渡口 现在时间是: 天气 °C ~ °C

迷津渡口

越感到迷惑 越接近真理

emlog获取友链favicon站标

网站的favicon站标是一个网站的标志,如何为Emlog的友链添加favicon站标呢?

常用的方法是利用一些提供站标的网站:

http://statics.dnspod.cn/proxy_favicon/_/favicon?domain=www.qingzz.cn

http://g.soz.im/http://www.qingzz.cn

上面两个网址是比较常用的,点开看到本站的favicon图标了吧。


首先打开模板的 module.php 文件,找到添加友链的函数 widget_link:

<?php
//widget:链接
function widget_link($title){
	global $CACHE; 
	$link_cache = $CACHE->readCache('link');
 if (!blog_tool_ishome()) return;#只在首页显示友链去掉双斜杠注释即可
	?>
<div class="sidebar">
	<h3><i class="fa fa-globe mar-r-4"></i><?php echo $title;?></h3>
	<ul id="link">
	<?php foreach($link_cache as $value): ?>
	<li><a href="<?php echo $value['url']; ?>" title="<?php echo $value['des']; ?>" target="_blank"><?php echo $value['link']; ?></a></li>
	<?php endforeach; ?>
	</ul>
	</div>
<?php }?>

其中这一句就是输出友链的一行:

<li><a href="<?php echo $value['url']; ?>" title="<?php echo $value['des']; ?>" target="_blank"><?php echo $value['link']; ?></a></li>


如果用dnspod获取友链favicon,则将这一句代码改为:

<li><img src="http://statics.dnspod.cn/proxy_favicon/_/favicon?domain=<?php echo $value['url']; ?>" onerror="vascript:this.src='http://statics.dnspod.cn/proxy_favicon/_/favicon?domain=default.ico';" width="16" height="16" /><a href="<?php echo $value['url']; ?>" title="<?php echo $value['des']; ?>" target="_blank"><?php echo $value['link']; ?></a></li>


如果用 http://g.soz.im/ ,将代码替换为:

<li><img src="http://g.soz.im/<?php echo $value['url']; ?>/cdn.ico?defaulticon=lightpng" width="16" height="16" /><a href="<?php echo $value['url']; ?>" title="<?php echo $value['des']; ?>" target="_blank"><?php echo $value['link']; ?></a></li>


另一种方法是直接到源站获取站标:

将代码替换为:

<li><img src="<?php echo $value['url']; ?>/favicon.ico" onerror="vascript:this.src='<?php echo TEMPLATE_URL; ?>images/demo.ico';" width="16" height="16" /><a href="<?php echo $value['url']; ?>" title="<?php echo $value['des']; ?>" target="_blank"><?php echo $value['link']; ?></a></li>

注意这种方法需要在模板的images/demo.ico放置一个默认的站标,以防无法正确获取。

点赞4
   支持一下
挤眼 亲亲 咆哮 开心 想想 可怜 糗大了 委屈 哈哈 小声点 右哼哼 左哼哼 疑问 坏笑 赚钱啦 悲伤 耍酷 勾引 厉害 握手 耶 嘻嘻 害羞 鼓掌 馋嘴 抓狂 抱抱 围观 威武 给力
 点赞
 签到
 表情
 图片
 代码
提交评论

清空信息
关闭评论
fincasagaro
 fincasagaro 约 21 小时前回复
#64
<a href="http://www.lauraundleon.com/air-jordan-5-blanc-bleu-jaune-chaussuresa">air jordan 5 blanc bleu jaune</a> <a href="http://www.michaelphenow.com/limited-terrance-west-youth-jersey-cleveland-browns-28-home-brown-nflc">limited terrance west youth jersey cleveland browns 28 home brown</a> <a href="http://www.kguides.com/adidas-stan-smith-journeys-runningg">adidas stan smith journeys</a> <a href="http://www.nvusforex.com/zdeno-chara-33-boston-bruins-reebok-premier-alternate-jersey-small-nflv">zdeno chara 33 boston bruins reebok premier alternate jersey small</a> <a href="http://www.dinerwaresb.com/air-jordan-9-before-recently-trainersa">air jordan 9 before recently</a> <a href="http://www.slipoverfx.com/nike-air-max-95-gr%C3%A5-and-hvit-quartz-scarpec">nike air max 95 gr氓 and hvit quartz</a>
fincasagaro http://www.fincasagaro.com/
seymourdugan
 seymourdugan 2019-02-15 22:27回复
#63
<a href="http://www.truthtapes.com/nike-free-run-3-mujeres-negro-p%C3%BArpura-zapatosk">nike free run 3 mujeres negro p煤rpura</a> <a href="http://www.veskopetrov.com/mujeres-nike-roshe-run-hyp-naranja-verde-zapatosp">mujeres nike roshe run hyp naranja verde</a> <a href="http://www.kaosmotogp.com/the-north-face-womens-osito-2-fleece-jacket-black-northfaceh">the north face womens osito 2 fleece jacket black</a> <a href="http://www.doularhythms.com/herren-nike-lunarglide-6-gold-lila-schuhej">herren nike lunarglide 6 gold lila</a> <a href="http://www.animalpainvet.com/nike-cortez-hvid-gym-r%C3%B8d-skoh">nike cortez hvid gym r酶d</a> <a href="http://www.texarillo.com/ladies-rose-nike-shox-chaussuresh">ladies rose nike shox</a>
seymourdugan http://www.seymourdugan.com/
omegaspark
 omegaspark 2019-02-14 03:11回复
#62
<a href="http://www.atlantaaiport.com/nike-flyknit-racer-schwarz-wei%C3%9F-volt-lyrics-obuvc">nike flyknit racer schwarz wei脽 volt lyrics</a> <a href="http://www.bdimpact.com/nike-roshe-run-floreale-argento-marrone-scarpea">nike roshe run floreale argento marrone</a> <a href="http://www.dutchpuffers.com/air-max-2017-schwarz-and-grau-kit-scarpee">air max 2017 schwarz and grau kit</a> <a href="http://www.klgateslaw.com/mujeres-air-jordan-retro-6-naranja-verde-obuvc">mujeres air jordan retro 6 naranja verde</a> <a href="http://www.nomorbogor.com/yeezy-350-boost-gris-scarpea">yeezy 350 boost gris</a> <a href="http://www.projabbag.com/adidas-john-wtout-blanc-orange-chaussuresf">adidas john wtout blanc orange</a>
omegaspark http://www.omegaspark.com/
findnewcoupon
 findnewcoupon 2019-02-12 20:46回复
#61
<a href="http://www.wuxiangtaichi.com/nike-kobe-9-kvinders-gul-himmelbl%C3%A5-skoi">nike kobe 9 kvinders gul himmelbl氓</a> <a href="http://www.culdesacmag.com/nike-zoom-pegasus-34-oransje-rosa-obuvq">nike zoom pegasus 34 oransje rosa</a> <a href="http://www.livinggreedy.com/nike-kobe-icon-green-grey-shoesh">nike kobe icon green grey</a> <a href="http://www.clickstroy.com/femminile-nike-air-max-lunar-1-blu-rosa-scarpei">femminile nike air max lunar 1 blu rosa</a> <a href="http://www.zotorrent.com/air-jordan-reveal-blau-minzgr%C3%BCn-schuhej">air jordan reveal blau minzgr眉n</a> <a href="http://www.viptarimas.com/minnesota-twins-new-era-mlb-leather-metal-plate-9fifty-snapback-cap-hath">minnesota twins new era mlb leather metal plate 9fifty snapback cap</a>
findnewcoupon http://www.findnewcoupon.com/
geuwompo
 geuwompo 2019-02-12 18:23回复
#60
<a href="http://www.anthillprague.com/nike-air-force-1-high-07-lv8-flax-outdoor-gr%C3%BCn-schuhed">nike air force 1 high 07 lv8 flax outdoor gr眉n</a> <a href="http://www.bisbeegrille.com/nike-mercurial-superfly-gris-marron-scarpec">nike mercurial superfly gris marron</a> <a href="http://www.chipchak.com/adidas-wild-14-joel-eriksson-ek-green-salute-to-service-stitched-nhl-jersey-nflw">adidas wild 14 joel eriksson ek green salute to service stitched nhl jersey</a> <a href="http://www.maruldeaur.com/nfl-robert-alford-womens-black-23-atlanta-falcons-nike-backer-long-sleeve-t-shirt-nflx">nfl robert alford womens black 23 atlanta falcons nike backer long sleeve t shirt</a> <a href="http://www.pepinmystep.com/kd-trey-5-all-r%C3%B8d-band-kurpesa">kd trey 5 all r酶d band</a> <a href="http://www.redtokill.com/air-jordan-12-retro-billig-quality-butyf">air jordan 12 retro billig quality</a>
geuwompo http://www.geuwompo.com/
biddingstream
 biddingstream 2019-02-11 20:24回复
#59
<a href="http://www.mumbaikichut.com/femmes-air-jordan-retro-11-vert-rouge-chaussuresl">femmes air jordan retro 11 vert rouge</a> <a href="http://www.ikmsdkravmaga.com/air-jordan-5-infrarojo-zapatosq">air jordan 5 infrarojo</a> <a href="http://www.themusinglens.com/nike-air-max-90-premium-gr%C3%B8n-lyser%C3%B8d-skoj">nike air max 90 premium gr酶n lyser酶d</a> <a href="http://www.startagencia.com/adidas-neo-campus-lilla-hvit-obuvi">adidas neo campus lilla hvit</a> <a href="http://www.drjennieward.com/nike-lunarbeast-elite-td-rojo-zapatosk">nike lunarbeast elite td rojo</a> <a href="http://www.genievres.com/herre-asics-asics-gel-kinsei-2-bl%C3%A5-guld-skoq">herre asics asics gel kinsei 2 bl氓 guld</a>
biddingstream http://www.biddingstream.com/
mesmertronic
 mesmertronic 2019-02-07 21:49回复
#58
<a href="http://www.kainjipark.com/womens-nike-new-york-jets-92-leonard-williams-limited-black-2016-salute-to-service-nfl-jersey-nflr">womens nike new york jets 92 leonard williams limited black 2016 salute to service nfl jersey</a> <a href="http://www.lapthelakes.com/nike-sb-portmore-femminile-viola-skoa">nike sb portmore femminile viola</a> <a href="http://www.delmaroffice.com/air-jordan-son-of-mars-green-valley-sneakere">air jordan son of mars green valley</a> <a href="http://www.medieneinsatz.com/herre-nike-shox-current-hvid-lilla-kurpesa">herre nike shox current hvid lilla</a> <a href="http://www.linexcanton.com/billig-adidas-forum-mid-herren-wei%C3%9F-sneakerb">billig adidas forum mid herren wei脽</a> <a href="http://www.saskostomy.com/nike-free-flyknit-4.0-womens-silver-black-shoesg">nike free flyknit 4.0 womens silver black</a>
[url=http://www.mesmertronic.com/]mesmertronic[/url]
yourctt
 yourctt 2019-02-07 06:07回复
#57
<a href="http://www.headmull.com/nike-tiempo-legend-5-schwarz-pack-obuvd">nike tiempo legend 5 schwarz pack</a> <a href="http://www.inforoche.com/nike-flyknit-trainer-violet-mattress-scarpea">nike flyknit trainer violet mattress</a> <a href="http://www.mytopdollar.com/nike-air-max-95-mettodasic-plata-yarn-scarpef">nike air max 95 mettodasic plata yarn</a> <a href="http://www.tipicousa.com/nike-darwin-wei%C3%9F-nails-obuvc">nike darwin wei脽 nails</a> <a href="http://www.urevomedia.com/adidas-eqt-kinder-schuhe-gelb-scarpea">adidas eqt kinder schuhe gelb</a> <a href="http://www.webdevbook.com/air-jordan-future-vert-glow-chaussuresg">air jordan future vert glow</a>
yourctt http://www.yourctt.com/
pdxwoof
 pdxwoof 2019-02-06 22:04回复
#56
<a href="http://www.epointsclub.com/nike-air-max-87-sb-grau-schwarz-butyf">nike air max 87 sb grau schwarz</a> <a href="http://www.hiphoprapjam.com/herre-nike-shox-deliver-clearance-obuvf">herre nike shox deliver clearance</a> <a href="http://www.inanaktar.com/soccers-chaussures-marron-or-obuvd">soccers chaussures marron or</a> <a href="http://www.pdxwoof.com/vibram-fivefingers-speed-rose-violet-kurpesg">vibram fivefingers speed rose violet</a> <a href="http://www.uncwliving.com/kyrie-1-infrar%C3%B8d-olx-obuvb">kyrie 1 infrar酶d olx</a> <a href="http://www.wonkytrax.com/nike-kobe-8-r%C3%B8d-rosa-butya">nike kobe 8 r酶d rosa</a>
pdxwoof http://www.pdxwoof.com/
vstsblog
 vstsblog 2019-02-05 00:22回复
#55
<a href="http://www.atrapaniapp.com/adidas-superstar-r%C3%B8d-gr%C3%A5-skol">adidas superstar r酶d gr氓</a> <a href="http://www.maplebeyond.com/femmes-asics-gel-kayano-20-bleu-ciel-rouge-chaussuresq">femmes asics gel kayano 20 bleu ciel rouge</a> <a href="http://www.collisionsix.com/nike-lebron-zoom-soldier-8-rouge-chaussuresl">nike lebron zoom soldier 8 rouge</a> <a href="http://www.todololitas.com/herren-nike-free-tr-fit-gr%C3%BCn-rot-schuhei">herren nike free tr fit gr眉n rot</a> <a href="http://www.jcwjrlaw.com/kyrie-2-velvet-rot-schuheh">kyrie 2 velvet rot</a> <a href="http://www.vstsblog.com/air-max-90-kvinners-svart-obuvj">air max 90 kvinners svart</a>
vstsblog http://www.vstsblog.com/
顶部留言底部
 00:00/00:00
我想和你虚度时光 - 花房姑娘(9)
  1. 我想和你虚度时光
  2. 花房姑娘
  3. 恋恋风尘
  4. 我喜爱一切不彻底的事物
  5. 我的心里是满的
  6. Long Way
  7. 给少年的歌
  8. 晴日共剪窗
  9. 天上的月你的脸