好!欢迎访问迷津渡口 现在时间是: 天气 °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
   支持一下
挤眼 亲亲 咆哮 开心 想想 可怜 糗大了 委屈 哈哈 小声点 右哼哼 左哼哼 疑问 坏笑 赚钱啦 悲伤 耍酷 勾引 厉害 握手 耶 嘻嘻 害羞 鼓掌 馋嘴 抓狂 抱抱 围观 威武 给力
 点赞
 签到
 表情
 图片
 代码
提交评论

清空信息
关闭评论
amesecolombia
 amesecolombia 约 15 小时前回复
#151
<a href="http://www.wordsting.com/wei%C3%9F-nike-cortez-trainers-schuhej">wei脽 nike cortez trainers</a> <a href="http://www.buildtwitter.com/air-jordan-jumpman-team-gs-schwarz-schuhei">air jordan jumpman team gs schwarz</a> <a href="http://www.procrastivity.com/nike-air-max-90-cartoon-hvit-obuvj">nike air max 90 cartoon hvit</a> <a href="http://www.rastadread.com/air-max-98-gituttio-scarpel">air max 98 gituttio</a> <a href="http://www.govtjobsstore.com/hommes-nike-roshe-run-slip-on-orange-gris-chaussuresh">hommes nike roshe run slip on orange gris</a> <a href="http://www.alofilmizle.com/femminile-nike-air-force-1-25th-low-bianca-nero-line-scarpeh">femminile nike air force 1 25th low bianca nero line</a>
amesecolombia http://www.amesecolombia.com/
emtecsolutions
 emtecsolutions 约 23 小时前回复
#150
<a href="http://www.bursatiket.net/nike-free-trainer-5.0-lime-vert-and-noir-scarpef">nike free trainer 5.0 lime vert and noir</a> <a href="http://www.buxpix.net/nike-mercurial-vapor-gris-blanco-chaussuresb">nike mercurial vapor gris blanco</a> <a href="http://www.buyggauto.net/air-jordan-11-low-blanc-zen-gris-suit-butya">air jordan 11 low blanc zen gris suit</a> <a href="http://www.carlinandcompany.net/nike-free-3.0-v5-gr%C3%BCn-glow-mods-schuhee">nike free 3.0 v5 gr眉n glow mods</a> <a href="http://www.carrymebike.net/nike-free-flyknit-4.0-cielo-blu-bianca-chaussurese">nike free flyknit 4.0 cielo blu bianca</a> <a href="http://www.casatienda.net/nike-kd-8-tutti-nero-and-bianca-obuvf">nike kd 8 tutti nero and bianca</a>
emtecsolutions http://www.emtecsolutions.net/
elgintransfer
 elgintransfer 2019-04-17 13:41回复
#149
<a href="http://www.ajpaircon.com/air-jordan-retro-1-azul-blanco-oro-zapatosh">air jordan retro 1 azul blanco oro</a> <a href="http://www.eraoyun.com/adidas-tubular-doom-eqt-rosado-zapatosk">adidas tubular doom eqt rosado</a> <a href="http://www.kembaradunia.com/mens-fur-lined-north-face-jacket-northfaceh">mens fur lined north face jacket</a> <a href="http://www.pybursa.com/nike-air-trainer-max-91-bo-jackson-schwarz-wei%C3%9F-schuhek">nike air trainer max 91 bo jackson schwarz wei脽</a> <a href="http://www.astonsunoco.com/nike-hypervenom-phantom-ii-fg-fluorescent-gr%C3%B8n-lilla-sort-skoi">nike hypervenom phantom ii fg fluorescent gr酶n lilla sort</a> <a href="http://www.mcguber.com/jaune-and-gray-converse-chaussuresh">jaune and gray converse</a>
elgintransfer http://www.elgintransfer.com/
swiftgrocer
 swiftgrocer 2019-04-17 09:07回复
#148
<a href="http://www.jupickuplines.com/nike-zoom-pegasus-34-sky-blue-pink-shoesi">nike zoom pegasus 34 sky blue pink</a> <a href="http://www.saleuggboot.com/adidas-neo-mesh-gr%C3%BCn-orangen-schuhei">adidas neo mesh gr眉n orangen</a> <a href="http://www.fragmanizletv.com/mujeres-nike-zoom-pegasus-31-p%C3%BArpura-naranja-zapatosk">mujeres nike zoom pegasus 31 p煤rpura naranja</a> <a href="http://www.swisshomeas.com/nike-roshe-run-wolf-gray-appelsin-skoi">nike roshe run wolf gray appelsin</a> <a href="http://www.marinersdiary.com/nike-sportswear-nike-free-run-2-sneaker-gr%C3%A5-obuvl">nike sportswear nike free run 2 sneaker gr氓</a> <a href="http://www.bourseasie.com/adidas-ultra-boost-gold-blue-shoesh">adidas ultra boost gold blue</a>
swiftgrocer http://www.swiftgrocer.com/
philippikus
 philippikus 2019-04-16 21:14回复
#147
<a href="http://www.mistopup.com/nfl-san-francisco-49ers-hats-hatj">nfl san francisco 49ers hats</a> <a href="http://www.sporbahispro.com/converse-grigio-rosso-scarpej">converse grigio rosso</a> <a href="http://www.kalrakis.com/adidas-nitrocharge-1.0-schwarz-electricity-schuhei">adidas nitrocharge 1.0 schwarz electricity</a> <a href="http://www.xinyudaili.com/nike-fg-mercurial-superfly-iv-s%C3%B8lv-sort-guld-skoh">nike fg mercurial superfly iv s酶lv sort guld</a> <a href="http://www.marieluwasche.com/vintage-brian-dawkins-authentic-philadelphia-eagles-yellow-jersey-nfli">vintage brian dawkins authentic philadelphia eagles yellow jersey</a> <a href="http://www.ferrepress.com/nike-air-max-90-vt-kvinner-china-r%C3%B8d-obuvk">nike air max 90 vt kvinner china r酶d</a>
[url=http://www.philippikus.com/]philippikus[/url]
atvhdizle
 atvhdizle 2019-04-16 18:50回复
#146
<a href="http://www.flockandvine.com/adidas-zx-750-vino-rojo-blanco-butye">adidas zx 750 vino rojo blanco</a> <a href="http://www.formasindo.com/air-jordan-6-negro-infrarojo-quality-oro-butya">air jordan 6 negro infrarojo quality oro</a> <a href="http://www.covergirlmag.com/nike-tiempo-legend-iv-elite-fg-boots-svartout-obuvb">nike tiempo legend iv elite fg boots svartout</a> <a href="http://www.fuckitmusic.com/nike-air-max-hyperposite-atomic-gr%C3%B8n-scarpec">nike air max hyperposite atomic gr酶n</a> <a href="http://www.mpdcir.com/air-jordan-10-varsity-r%C3%B8d-unblocked-schuhef">air jordan 10 varsity r酶d unblocked</a> <a href="http://www.faketheenvy.com/mennns-nike-free-run-4.0-v3-r%C3%B8d-hvit-scarpec">mennns nike free run 4.0 v3 r酶d hvit</a>
atvhdizle http://www.atvhdizle.com/
invbybeth
 invbybeth 2019-04-16 18:17回复
#145
<a href="http://www.cmtalks.com/adidas-football-sko-r%C3%B8d-obuvi">adidas football sko r酶d</a> <a href="http://www.ianbaaske.com/asics-gel-kayano-21-men-black-orange-blue-shoesj">asics gel kayano 21 men black orange blue</a> <a href="http://www.escawinebar.com/men-nike-zoom-structure-20blue-dark-blue-white-shoesl">men nike zoom structure 20blue dark blue white</a> <a href="http://www.nexcouriers.com/ralph-lauren-messenger-bag-uk-poloh">ralph lauren messenger bag uk</a> <a href="http://www.admitoneuk.com/nike-air-jordan-4-alle-sort-skok">nike air jordan 4 alle sort</a> <a href="http://www.rizeingilizce.com/dam%C3%A4nner-nike-flyknit-lunar-2-gr%C3%BCn-schuheh">dam盲nner nike flyknit lunar 2 gr眉n</a>
invbybeth http://www.invbybeth.com/
chocopictures
 chocopictures 2019-04-16 16:22回复
#144
<a href="http://www.setusoftware.com/black-air-jordan-11-shoesl">black air jordan 11</a> <a href="http://www.shopteamcubs.com/ralph-lauren-womens-long-sleeve-polo-poloh">ralph lauren womens long sleeve polo</a> <a href="http://www.danieldavinci.com/nike-mercurialx-finale-street-tf-terminator-guld-sort-r%C3%B8d-skok">nike mercurialx finale street tf terminator guld sort r酶d</a> <a href="http://www.lovirani.com/air-jordan-retro-5-wei%C3%9F-lila-gr%C3%BCn-schuheh">air jordan retro 5 wei脽 lila gr眉n</a> <a href="http://www.rosebites.com/nike-air-max-2014-men-black-white-shoesk">nike air max 2014 men black white</a> <a href="http://www.webrushllc.com/nike-roshe-run-m%C3%A6nd-breathable-for-summer-sort-gr%C3%B8n-skol">nike roshe run m忙nd breathable for summer sort gr酶n</a>
chocopictures http://www.chocopictures.com/
hinogi
 hinogi 2019-04-16 11:13回复
#143
<a href="http://www.ortzproducts.com/coach-shoes-sandals-coachh">coach shoes sandals</a> <a href="http://www.cooterscamera.com/air-jordan-reveal-yellow-purple-shoesj">air jordan reveal yellow purple</a> <a href="http://www.marjalfun.com/kvinders-nike-roshe-run-gr%C3%A5-sort-skol">kvinders nike roshe run gr氓 sort</a> <a href="http://www.alecsblog.com/nike-flyknit-trainer-hommesthe-verte-chaussuresq">nike flyknit trainer hommesthe verte</a> <a href="http://www.troudumonde.com/hommes-nike-air-max-87-sb-vert-rouge-chaussuresl">hommes nike air max 87 sb vert rouge</a> <a href="http://www.smilesdrdavid.com/herren-asics-gel-kayano-21-wei%C3%9F-schwarz-schuhei">herren asics gel kayano 21 wei脽 schwarz</a>
hinogi http://www.hinogi.com/
solclimasur
 solclimasur 2019-04-15 23:31回复
#142
<a href="http://www.beautymotive.com/adidas-gazelle-trainers-marinen-bl%C3%A5-obuvi">adidas gazelle trainers marinen bl氓</a> <a href="http://www.poleblacks.com/converse-chuck-nero-scarpek">converse chuck nero</a> <a href="http://www.qiefun.com/nike-lebron-soldier-10-white-light-blue-shoesi">nike lebron soldier 10 white light blue</a> <a href="http://www.kickums.com/hombres-mizuno-wave-creation-13-azul-cielo-azul-zapatosi">hombres mizuno wave creation 13 azul cielo azul</a> <a href="http://www.rahndfvd.com/nike-huarache-r%C3%B8d-hvid-and-bl%C3%A5-skoh">nike huarache r酶d hvid and bl氓</a> <a href="http://www.followjacker.com/nike-tn-air-max-nero-scarpei">nike tn air max nero</a>
solclimasur http://www.solclimasur.com/
顶部留言底部
 00:00/00:00
我想和你虚度时光 - 花房姑娘(9)
  1. 我想和你虚度时光
  2. 花房姑娘
  3. 恋恋风尘
  4. 我喜爱一切不彻底的事物
  5. 我的心里是满的
  6. Long Way
  7. 给少年的歌
  8. 晴日共剪窗
  9. 天上的月你的脸