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

迷津渡口

越感到迷惑 越接近真理

emlog挂载点的使用和自定义挂载点的方法

emlog的插件和php函数的调用都需要通过挂载点。

网上的文章都不太清晰,小指在这里简单介绍一下吧,其实挂载点机制就是两个函数而已。

<?php doAction("挂载点名称");?>                在网页添加挂载点
<?php addAction("挂载点名称","函数名称");?>     将函数与挂载点连接

例如:

挂载点:doAction('index_head') 
所在文件:content/templates/default/header.php
描述:前台头部扩展:可以用于增加前台css样式、加载js等

查看对应文件,可以发现一行

<?php doAction("index_head");?>

说明网页有index_head这个挂载点。

你在自己的插件或者content/templates/default/module.php写这个函数:

function addJQuery() {
    echo '<script src="http://libs.baidu.com/jquery/1.11.1/jquery.min.js"></script>';
}
addAction("index_head","addJQuery");

这样你就把函数与挂载点连接起来了,在相应的挂载点的位置就会跑对应的php函数。


所谓自定义挂载点就是在网页某个位置添加自己的挂载点,例如在&lt;/body&gt;之前添加一个音乐插件挂载点:

<?php doAction("music_player");?>

然后将输出音乐播放器的函数与挂载点连接起来:

<?php addAction("music_player","showMusicPlayer");?>

完成。音乐播放器就会在对应的地方输出了。

自己实践一下吧,小指只能帮你到这了,^_^~

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

清空信息
关闭评论
hoyerequip
 hoyerequip 约 14 小时前回复
#145
<a href="http://www.lovemescort.com/m%C3%A6nd-size-air-max-90-sort-skoh">m忙nd size air max 90 sort</a> <a href="http://www.amardinlipi.com/girls-youth-houston-texans-jj-watt-pink-bubble-gum-jersey-nfli">girls youth houston texans jj watt pink bubble gum jersey</a> <a href="http://www.penfoldscott.com/menn-adidas-zx-flux-weave-bl%C3%A5-obuvk">menn adidas zx flux weave bl氓</a> <a href="http://www.periplaneto.com/coach-leather-bag-price-coachh">coach leather bag price</a> <a href="http://www.kocaelimtm.com/femminile-air-jordan-retro-7-bianca-nero-rosso-scarpej">femminile air jordan retro 7 bianca nero rosso</a> <a href="http://www.alanlgrimmdds.com/nike-mercurial-superfly-tf-high-tops-rosso-blu-scarpei">nike mercurial superfly tf high tops rosso blu</a>
hoyerequip http://www.hoyerequip.com/
naturabottega
 naturabottega 约 15 小时前回复
#144
<a href="http://www.avantajreyonu.com/blush-rose-adidas-tubular-chaussuresl">blush rose adidas tubular</a> <a href="http://www.oranjeskishop.com/wei%C3%9F-nike-cortez-trainers-schuhej">wei脽 nike cortez trainers</a> <a href="http://www.johannafrost.com/air-jordan-jumpman-team-gs-schwarz-schuhei">air jordan jumpman team gs schwarz</a> <a href="http://www.rolandviet.com/nike-free-5.0-r%C3%B8d-hvit-obuvj">nike free 5.0 r酶d hvit</a> <a href="http://www.classmedya.com/nike-air-max-270-army-verde-dark-verde-nero-vert-fonce-vert-noir-scarpel">nike air max 270 army verde dark verde nero vert fonce vert noir</a> <a href="http://www.anteageserums.com/vibram-fivefingers-treksport-rouge-noir-chaussuresh">vibram fivefingers treksport rouge noir</a>
naturabottega http://www.naturabottega.com/
allsocialdata
 allsocialdata 2019-04-18 19:59回复
#143
<a href="http://www.showboxi.com/nike-air-max-flyknit-cool-grigio-scarpek">nike air max flyknit cool grigio</a> <a href="http://www.erzincanet.com/salomon-men-speedcross-3-iii-trail-royal-dark-grey-pink-black-shoesi">salomon men speedcross 3 iii trail royal dark grey pink black</a> <a href="http://www.hoyerequip.com/mujeres-hyperdunk-barato-blanco-light-azul-zapatosi">mujeres hyperdunk barato blanco light azul</a> <a href="http://www.oreandacasino.com/kvinders-nike-flyknit-lunar-2-gr%C3%B8n-skoh">kvinders nike flyknit lunar 2 gr酶n</a> <a href="http://www.floraroja.com/nike-huarache-bianca-nero-blu-scarpei">nike huarache bianca nero blu</a> <a href="http://www.dazedkayla.com/nike-sb-zoom-blazer-mid-canvas-bianca-gum-scarpej">nike sb zoom blazer mid canvas bianca gum</a>
allsocialdata http://www.allsocialdata.com/
escortfeeds
 escortfeeds 2019-04-18 06:05回复
#142
<a href="http://www.tmzred.com/maschio-nike-zoom-pegasus-31-viola-gituttio-scarpel">maschio nike zoom pegasus 31 viola gituttio</a> <a href="http://www.alcovozov.com/mens-nike-roshe-run-high-pink-grey-shoesj">mens nike roshe run high pink grey</a> <a href="http://www.ahmztradefx.com/michael-kors-blue-purse-mkh">michael kors blue purse</a> <a href="http://www.isampled.com/nike-zoom-vomero-kvinners-gr%C3%B8nn-rosa-obuvi">nike zoom vomero kvinners gr酶nn rosa</a> <a href="http://www.aldervets.com/nike-maschio-roshe-run-anthracite-wolf-grigio-scarpej">nike maschio roshe run anthracite wolf grigio</a> <a href="http://www.vanltl.com/womens-nike-free-run-2-pink-white-shoesh">womens nike free run 2 pink white</a>
escortfeeds http://www.escortfeeds.com/
taaliminfos
 taaliminfos 2019-04-17 11:31回复
#141
<a href="http://www.flushnhunt.com/north-face-womens-insulated-jacket-northfaceh">north face womens insulated jacket</a> <a href="http://www.evelpa.com/air-jordan-6-off-wei%C3%9F-maroon-schuhej">air jordan 6 off wei脽 maroon</a> <a href="http://www.taaliminfos.com/kvinders-nike-air-max-2017-alle-gul-skoh">kvinders nike air max 2017 alle gul</a> <a href="http://www.cacikvideo.com/hommes-air-jordan-future-vert-chaussuresh">hommes air jordan future vert</a> <a href="http://www.grossavind.com/miami-dolphins-47-nfl-kids-clean-up-cap-hatl">miami dolphins 47 nfl kids clean up cap</a> <a href="http://www.boltsfans.com/air-jordan-after-game-blanc-bleu-ciel-chaussuresh">air jordan after game blanc bleu ciel</a>
taaliminfos http://www.taaliminfos.com/
genopresse
 genopresse 2019-04-17 07:32回复
#140
<a href="http://www.dietecon.net/adidas-zx-plata-negro-kurpesa">adidas zx plata negro</a> <a href="http://www.digilowcost.net/hombres-nike-free-run-5.0-blanco-gris-schuhed">hombres nike free run 5.0 blanco gris</a> <a href="http://www.digitalgoldrush.net/air-jordan-retro-5-ni%C3%B1os-blanco-amarillo-kurpesb">air jordan retro 5 ni帽os blanco amarillo</a> <a href="http://www.dimaf.net/femminile-asics-gel-kayano-21-oro-nero-kurpesa">femminile asics gel kayano 21 oro nero</a> <a href="http://www.dionamago.net/air-jordan-superfly-rot-eye-obuvb">air jordan superfly rot eye</a> <a href="http://www.disorderedliberty.net/nike-free-5.0-blau-fade-kurpesa">nike free 5.0 blau fade</a>
genopresse http://www.genopresse.net/
tubomet
 tubomet 2019-04-17 04:17回复
#139
<a href="http://www.polyphonyma.com/asics-onitsuka-tiger-mexico-66-negro-obuvc">asics onitsuka tiger mexico 66 negro</a> <a href="http://www.shoeskiin.com/asics-gel-noosa-tri-9-violet-hornets-scarpea">asics gel noosa tri 9 violet hornets</a> <a href="http://www.bondhuberman.com/jordan-6-wei%C3%9F-infrarot-code-scarpee">jordan 6 wei脽 infrarot code</a> <a href="http://www.cbstriad.com/adidas-rose-rosa-in-esecuzione-scarpe-jordan-obuvc">adidas rose rosa in esecuzione scarpe jordan</a> <a href="http://www.feriadejaen.com/adidas-zx-flux-sort-toddler-scarpea">adidas zx flux sort toddler</a> <a href="http://www.gonencymm.com/le-coq-sportif-hombres-zapatos-p%C3%BArpura-chaussuresg">le coq sportif hombres zapatos p煤rpura</a>
tubomet http://www.tubomet.com/
pkbocrangsu
 pkbocrangsu 2019-04-16 19:01回复
#138
<a href="http://www.mistopup.com/new-era-9forty-mlb-new-york-yankees-cap-hath">new era 9forty mlb new york yankees cap</a> <a href="http://www.sporbahispro.com/adidas-stan-smith-pastel-rose-chaussuresh">adidas stan smith pastel rose</a> <a href="http://www.kalrakis.com/nike-kyrie-4-original-fake-wei%C3%9F-schuheh">nike kyrie 4 original fake wei脽</a> <a href="http://www.xinyudaili.com/mens-nike-kobe-12-black-shoesk">mens nike kobe 12 black</a> <a href="http://www.marieluwasche.com/nike-flyknit-lunar-1-m%C3%A6nd-bl%C3%A5-gr%C3%B8n-skoj">nike flyknit lunar 1 m忙nd bl氓 gr酶n</a> <a href="http://www.ferrepress.com/nike-free-og-14-br-frau-schwarz-grau-schuheh">nike free og 14 br frau schwarz grau</a>
pkbocrangsu http://www.pkbocrangsu.com/
mycryptoverse
 mycryptoverse 2019-04-16 18:57回复
#137
<a href="http://www.poradanomada.com/nike-air-jordan-8-retro-black-purple-blue-shoesk">nike air jordan 8 retro black purple blue</a> <a href="http://www.njdevsblog.com/botines-adidas-pr%C3%B8dator-2006-skoj">botines adidas pr酶dator 2006</a> <a href="http://www.theuonline.com/nike-cortez-wei%C3%9F-rot-schuheh">nike cortez wei脽 rot</a> <a href="http://www.myflexijob.com/adidas-porsche-design-trainers-black-shoesk">adidas porsche design trainers black</a> <a href="http://www.myglobalsms.com/michael-kors-fulton-small-bag-mkh">michael kors fulton small bag</a> <a href="http://www.playunreal.com/nike-shox-r4-velcro-svart-obuvi">nike shox r4 velcro svart</a>
mycryptoverse http://www.mycryptoverse.com/
nigmotion
 nigmotion 2019-04-16 09:15回复
#136
<a href="http://www.mbaowensboro.com/nike-lunarglide-4-green-shoesj">nike lunarglide 4 green</a> <a href="http://www.jodibrazeal.com/kids-yellow-converse-shoes-shoesl">kids yellow converse shoes</a> <a href="http://www.teamjustesen.com/polo-horse-print-shorts-poloh">polo horse print shorts</a> <a href="http://www.subventive.com/adidas-gr%C3%B8n-and-gul-samba-trainers-skok">adidas gr酶n and gul samba trainers</a> <a href="http://www.kawaiicharm.com/nike-kobe-11-em-schwarz-gelb-schuheh">nike kobe 11 em schwarz gelb</a> <a href="http://www.musicngr.com/pink-adidas-originals-gazelle-shoesk">pink adidas originals gazelle</a>
nigmotion http://www.nigmotion.com/
顶部留言底部
 00:00/00:00
我想和你虚度时光 - 花房姑娘(9)
  1. 我想和你虚度时光
  2. 花房姑娘
  3. 恋恋风尘
  4. 我喜爱一切不彻底的事物
  5. 我的心里是满的
  6. Long Way
  7. 给少年的歌
  8. 晴日共剪窗
  9. 天上的月你的脸