主題: 問如何在版面中加入自己的圖片
作者: yksl 於 十一月 21, 2005, 04:07:25 下午
請問如何在版面模版中加入自己的圖片,或把Flickr Daily Zeitgeist 所產生的相簿堪入版面中,已試過直接把html碼或javascript 加入模版中都無效,
主題: Re: 問如何在版面中加入自己的圖片
作者: lss 於 十一月 21, 2005, 04:13:53 下午
圖檔若使用相對路徑,路徑要相對於 index.php 。再試試看!
主題: Re: 問如何在版面中加入自己的圖片
作者: james 於 十一月 23, 2005, 10:09:38 上午
請問如何在版面模版中加入自己的圖片,或把Flickr Daily Zeitgeist 所產生的相簿堪入版面中,已試過直接把html碼或javascript 加入模版中都無效,
先假設你已經把圖片上傳到該模版的目錄的imgs目錄下,該圖檔名稱為 pic.jpg 那麼你可以使用 {$url->getUrl("/imgs/pic.jpg")} 加入自己的圖片. 其它的請以此類推囉 ^^ 參考一下. :-D James
主題: Re: 問如何在版面中加入自己的圖片
作者: markwu 於 十一月 24, 2005, 11:04:04 上午
你要不要先描述一下你怎麼加的,這樣我們才好告訴你怎麼改。
Mark
主題: Re: 問如何在版面中加入自己的圖片
作者: yksl 於 十一月 26, 2005, 10:58:59 上午
很抱歉,沒說清楚,想要的效果如同http://show.focusing.com.tw/index.php?page=9裡面的flicker相簿,鑲入版面中,謝謝!
主題: Re: 問如何在版面中加入自己的圖片
作者: ajer001 於 十一月 26, 2005, 11:47:44 上午
Hi,那個是flickr的功能 登入後點閱這邊http://flickr.com/fun/zeitgeist/
主題: Re: 問如何在版面中加入自己的圖片
作者: yksl 於 十一月 26, 2005, 01:34:25 下午
現在的問題是堪入在版面上有問題,無法把原始碼放入模版中,放入後會出現問題。也就是鑲入模版中會出現錯誤,請問如何撰寫原始碼。如在http://163.23.113.47/plog/index.php?blogId=2,要把flicker鑲入左側版面要如何更改。謝謝!
主題: Re: 問如何在版面中加入自己的圖片
作者: bibicall 於 十一月 26, 2005, 01:42:17 下午
那請問你是怎麼把那一串程式碼加上去的? Mark在樓上的樓上那篇留言就問過了 起告訴我們你是怎麼加上去的
主題: Re: 問如何在版面中加入自己的圖片
作者: yksl 於 十一月 26, 2005, 02:10:59 下午
在links.template 中增加 <DIV class=sidetitle>flicker</DIV><DIV class=side><DIV class=sidebody></DIV> </div> 皆下來是flicker相簿原始碼 <!-- Start of Flickr Badge --><style type="text/css"></style><script type="text/javascript"></script><div align="center"><div class="zg_div"><div class="zg_div_inner" align="left"><div align="center"><a href="http://www.flickr.com/">www.<strong style="COLOR: #3993ff">flick<span style="COLOR: #ff1c92">r</span></strong>.com</a><br /><script type="text/javascript"></script><iframe title="Flickr Badge" style="BORDER-RIGHT: medium none; BORDER-TOP: medium none; BORDER-LEFT: medium none; BORDER-BOTTOM: medium none; BACKGROUND-COLOR: #ffffff" src="http://www.flickr.com/apps/badge/badge_iframe.gne?zg_bg_color=ffffff&zg_person_id=29983502%40N00" frameborder="0" width="113" scrolling="no" height="151"></iframe><div id="zg_whatlink"><a style="COLOR: #3993ff" onclick="function anonymous() { function anonymous() { zg_toggleWhat(); return false; } }" href="http://www.flickr.com/badge_new.gne">what is this?</a></div></div><div id="zg_whatdiv" style="DISPLAY: none"><div align="center">This is a Flickr badge showing public photos from <a href="http://www.flickr.com/photos/29983502@N00">newyksl</a>. Make your own badge <a href="http://www.flickr.com/badge_new.gne">here</a>.</div></div><div align="center"><script type="text/javascript"></script></div></div></div></div><!-- End of Flickr Badge --> 請問如何前把flicker原始碼加入 <DIV class=sidetitle>flicker</DIV><DIV class=side><DIV class=sidebody></DIV> </div> 中,謝謝!
主題: Re: 問如何在版面中加入自己的圖片
作者: ajer001 於 十一月 26, 2005, 02:17:24 下午
請加在 <DIV class=sidetitle>flicker</DIV> <DIV class=side><DIV class=sidebody> 後面。
在 </div></div> 前面。
其實如果這個不懂,你可以先看看同一個template裡面其他的語法是怎麼寫的 就可以大概推出來了。
試試看吧 :-)
主題: Re: 問如何在版面中加入自己的圖片
作者: yksl 於 十一月 26, 2005, 02:45:39 下午
加入後出現下列錯誤,還是不太懂plog檔案結構和css語法,可能要再加強一下了! Exception message: Smarty error: [in ./templates/blog_2/roodo-template-blue/links.template line 99]: syntax error: unrecognized tag: margin:0px 5px 5px 0px; width:117px; (Smarty_Compiler.class.php, line 403) Error code: 256 -- Backtrace -- /home/webadmin/html/plog/class/template/smarty/Smarty.class.php(1108): trigger_error /home/webadmin/html/plog/class/template/smarty/Smarty.class.php(1870): smarty_compiler.trigger_error /home/webadmin/html/plog/class/template/smarty/Smarty_Compiler.class.php(2131): smarty_compiler._trigger_fatal_error /home/webadmin/html/plog/class/template/smarty/Smarty_Compiler.class.php(403): smarty_compiler._syntax_error /home/webadmin/html/plog/class/template/smarty/Smarty_Compiler.class.php(298): smarty_compiler._compile_tag /home/webadmin/html/plog/class/template/smarty/Smarty.class.php(1506): smarty_compiler._compile_file /home/webadmin/html/plog/class/template/smarty/Smarty.class.php(1441): cachedtemplate._compile_source /home/webadmin/html/plog/class/template/smarty/Smarty.class.php(1922): cachedtemplate._compile_resource /home/webadmin/html/plog/tmp/2/%%365^%%365490330^main.template.php(52): cachedtemplate._smarty_include /home/webadmin/html/plog/class/template/smarty/Smarty.class.php(1281): include /home/webadmin/html/plog/class/template/cachedtemplate.class.php(48): smarty.fetch /home/webadmin/html/plog/class/view/smartyview.class.php(190): cachedtemplate.fetch /home/webadmin/html/plog/class/view/blogview.class.php(224): smartyview.render /home/webadmin/html/plog/class/view/defaultview.class.php(82): blogview.render /home/webadmin/html/plog/class/controller/controller.class.php(325): defaultview.render /home/webadmin/html/plog/index.php(44): blogcontroller.process
Exception message: Smarty error: [in ./templates/blog_2/roodo-template-blue/links.template line 99]: syntax error: unrecognized tag '' (Smarty_Compiler.class.php, line 551) Error code: 256 -- Backtrace -- /home/webadmin/html/plog/class/template/smarty/Smarty.class.php(1108): trigger_error /home/webadmin/html/plog/class/template/smarty/Smarty.class.php(1870): smarty_compiler.trigger_error /home/webadmin/html/plog/class/template/smarty/Smarty_Compiler.class.php(2131): smarty_compiler._trigger_fatal_error /home/webadmin/html/plog/class/template/smarty/Smarty_Compiler.class.php(551): smarty_compiler._syntax_error /home/webadmin/html/plog/class/template/smarty/Smarty_Compiler.class.php(298): smarty_compiler._compile_tag /home/webadmin/html/plog/class/template/smarty/Smarty.class.php(1506): smarty_compiler._compile_file /home/webadmin/html/plog/class/template/smarty/Smarty.class.php(1441): cachedtemplate._compile_source /home/webadmin/html/plog/class/template/smarty/Smarty.class.php(1922): cachedtemplate._compile_resource /home/webadmin/html/plog/tmp/2/%%365^%%365490330^main.template.php(52): cachedtemplate._smarty_include /home/webadmin/html/plog/class/template/smarty/Smarty.class.php(1281): include /home/webadmin/html/plog/class/template/cachedtemplate.class.php(48): smarty.fetch /home/webadmin/html/plog/class/view/smartyview.class.php(190): cachedtemplate.fetch /home/webadmin/html/plog/class/view/blogview.class.php(224): smartyview.render /home/webadmin/html/plog/class/view/defaultview.class.php(82): blogview.render /home/webadmin/html/plog/class/controller/controller.class.php(325): defaultview.render /home/webadmin/html/plog/index.php(44): blogcontroller.process
Exception message: Smarty error: [in ./templates/blog_2/roodo-template-blue/links.template line 100]: syntax error: unrecognized tag: color:#666666; text-align:center; font-family:arial, helvetica; font-size:11px; (Smarty_Compiler.class.php, line 403) Error code: 256 -- Backtrace -- /home/webadmin/html/plog/class/template/smarty/Smarty.class.php(1108): trigger_error /home/webadmin/html/plog/class/template/smarty/Smarty.class.php(1870): smarty_compiler.trigger_error /home/webadmin/html/plog/class/template/smarty/Smarty_Compiler.class.php(2131): smarty_compiler._trigger_fatal_error /home/webadmin/html/plog/class/template/smarty/Smarty_Compiler.class.php(403): smarty_compiler._syntax_error /home/webadmin/html/plog/class/template/smarty/Smarty_Compiler.class.php(298): smarty_compiler._compile_tag /home/webadmin/html/plog/class/template/smarty/Smarty.class.php(1506): smarty_compiler._compile_file /home/webadmin/html/plog/class/template/smarty/Smarty.class.php(1441): cachedtemplate._compile_source /home/webadmin/html/plog/class/template/smarty/Smarty.class.php(1922): cachedtemplate._compile_resource /home/webadmin/html/plog/tmp/2/%%365^%%365490330^main.template.php(52): cachedtemplate._smarty_include /home/webadmin/html/plog/class/template/smarty/Smarty.class.php(1281): include /home/webadmin/html/plog/class/template/cachedtemplate.class.php(48): smarty.fetch /home/webadmin/html/plog/class/view/smartyview.class.php(190): cachedtemplate.fetch /home/webadmin/html/plog/class/view/blogview.class.php(224): smartyview.render /home/webadmin/html/plog/class/view/defaultview.class.php(82): blogview.render /home/webadmin/html/plog/class/controller/controller.class.php(325): defaultview.render /home/webadmin/html/plog/index.php(44): blogcontroller.process
Exception message: Smarty error: [in ./templates/blog_2/roodo-template-blue/links.template line 100]: syntax error: unrecognized tag '' (Smarty_Compiler.class.php, line 551) Error code: 256 -- Backtrace -- /home/webadmin/html/plog/class/template/smarty/Smarty.class.php(1108): trigger_error /home/webadmin/html/plog/class/template/smarty/Smarty.class.php(1870): smarty_compiler.trigger_error /home/webadmin/html/plog/class/template/smarty/Smarty_Compiler.class.php(2131): smarty_compiler._trigger_fatal_error /home/webadmin/html/plog/class/template/smarty/Smarty_Compiler.class.php(551): smarty_compiler._syntax_error /home/webadmin/html/plog/class/template/smarty/Smarty_Compiler.class.php(298): smarty_compiler._compile_tag /home/webadmin/html/plog/class/template/smarty/Smarty.class.php(1506): smarty_compiler._compile_file /home/webadmin/html/plog/class/template/smarty/Smarty.class.php(1441): cachedtemplate._compile_source /home/webadmin/html/plog/class/template/smarty/Smarty.class.php(1922): cachedtemplate._compile_resource /home/webadmin/html/plog/tmp/2/%%365^%%365490330^main.template.php(52): cachedtemplate._smarty_include /home/webadmin/html/plog/class/template/smarty/Smarty.class.php(1281): include /home/webadmin/html/plog/class/template/cachedtemplate.class.php(48): smarty.fetch /home/webadmin/html/plog/class/view/smartyview.class.php(190): cachedtemplate.fetch /home/webadmin/html/plog/class/view/blogview.class.php(224): smartyview.render /home/webadmin/html/plog/class/view/defaultview.class.php(82): blogview.render /home/webadmin/html/plog/class/controller/controller.class.php(325): defaultview.render /home/webadmin/html/plog/index.php(44): blogcontroller.process
Exception message: Smarty error: [in ./templates/blog_2/roodo-template-blue/links.template line 101]: syntax error: unrecognized tag: color:#3993ff; background:inherit !important; text-decoration:none !important; (Smarty_Compiler.class.php, line 403) Error code: 256 -- Backtrace -- /home/webadmin/html/plog/class/template/smarty/Smarty.class.php(1108): trigger_error /home/webadmin/html/plog/class/template/smarty/Smarty.class.php(1870): smarty_compiler.trigger_error /home/webadmin/html/plog/class/template/smarty/Smarty_Compiler.class.php(2131): smarty_compiler._trigger_fatal_error /home/webadmin/html/plog/class/template/smarty/Smarty_Compiler.class.php(403): smarty_compiler._syntax_error /home/webadmin/html/plog/class/template/smarty/Smarty_Compiler.class.php(298): smarty_compiler._compile_tag /home/webadmin/html/plog/class/template/smarty/Smarty.class.php(1506): smarty_compiler._compile_file /home/webadmin/html/plog/class/template/smarty/Smarty.class.php(1441): cachedtemplate._compile_source /home/webadmin/html/plog/class/template/smarty/Smarty.class.php(1922): cachedtemplate._compile_resource /home/webadmin/html/plog/tmp/2/%%365^%%365490330^main.template.php(52): cachedtemplate._smarty_include /home/webadmin/html/plog/class/template/smarty/Smarty.class.php(1281): include /home/webadmin/html/plog/class/template/cachedtemplate.class.php(48): smarty.fetch /home/webadmin/html/plog/class/view/smartyview.class.php(190): cachedtemplate.fetch /home/webadmin/html/plog/class/view/blogview.class.php(224): smartyview.render /home/webadmin/html/plog/class/view/defaultview.class.php(82): blogview.render /home/webadmin/html/plog/class/controller/controller.class.php(325): defaultview.render /home/webadmin/html/plog/index.php(44): blogcontroller.process
Exception message: Smarty error: [in ./templates/blog_2/roodo-template-blue/links.template line 101]: syntax error: unrecognized tag '' (Smarty_Compiler.class.php, line 551) Error code: 256 -- Backtrace -- /home/webadmin/html/plog/class/template/smarty/Smarty.class.php(1108): trigger_error /home/webadmin/html/plog/class/template/smarty/Smarty.class.php(1870): smarty_compiler.trigger_error /home/webadmin/html/plog/class/template/smarty/Smarty_Compiler.class.php(2131): smarty_compiler._trigger_fatal_error /home/webadmin/html/plog/class/template/smarty/Smarty_Compiler.class.php(551): smarty_compiler._syntax_error /home/webadmin/html/plog/class/template/smarty/Smarty_Compiler.class.php(298): smarty_compiler._compile_tag /home/webadmin/html/plog/class/template/smarty/Smarty.class.php(1506): smarty_compiler._compile_file /home/webadmin/html/plog/class/template/smarty/Smarty.class.php(1441): cachedtemplate._compile_source /home/webadmin/html/plog/class/template/smarty/Smarty.class.php(1922): cachedtemplate._compile_resource /home/webadmin/html/plog/tmp/2/%%365^%%365490330^main.template.php(52): cachedtemplate._smarty_include /home/webadmin/html/plog/class/template/smarty/Smarty.class.php(1281): include /home/webadmin/html/plog/class/template/cachedtemplate.class.php(48): smarty.fetch /home/webadmin/html/plog/class/view/smartyview.class.php(190): cachedtemplate.fetch /home/webadmin/html/plog/class/view/blogview.class.php(224): smartyview.render /home/webadmin/html/plog/class/view/defaultview.class.php(82): blogview.render /home/webadmin/html/plog/class/controller/controller.class.php(325): defaultview.render /home/webadmin/html/plog/index.php(44): blogcontroller.process
Exception message: Smarty error: [in ./templates/blog_2/roodo-template-blue/links.template line 104]: syntax error: unrecognized tag 'var' (Smarty_Compiler.class.php, line 551) Error code: 256 -- Backtrace -- /home/webadmin/html/plog/class/template/smarty/Smarty.class.php(1108): trigger_error /home/webadmin/html/plog/class/template/smarty/Smarty.class.php(1870): smarty_compiler.trigger_error /home/webadmin/html/plog/class/template/smarty/Smarty_Compiler.class.php(2131): smarty_compiler._trigger_fatal_error /home/webadmin/html/plog/class/template/smarty/Smarty_Compiler.class.php(551): smarty_compiler._syntax_error /home/webadmin/html/plog/class/template/smarty/Smarty_Compiler.class.php(298): smarty_compiler._compile_tag /home/webadmin/html/plog/class/template/smarty/Smarty.class.php(1506): smarty_compiler._compile_file /home/webadmin/html/plog/class/template/smarty/Smarty.class.php(1441): cachedtemplate._compile_source /home/webadmin/html/plog/class/template/smarty/Smarty.class.php(1922): cachedtemplate._compile_resource /home/webadmin/html/plog/tmp/2/%%365^%%365490330^main.template.php(52): cachedtemplate._smarty_include /home/webadmin/html/plog/class/template/smarty/Smarty.class.php(1281): include /home/webadmin/html/plog/class/template/cachedtemplate.class.php(48): smarty.fetch /home/webadmin/html/plog/class/view/smartyview.class.php(190): cachedtemplate.fetch /home/webadmin/html/plog/class/view/blogview.class.php(224): smartyview.render /home/webadmin/html/plog/class/view/defaultview.class.php(82): blogview.render /home/webadmin/html/plog/class/controller/controller.class.php(325): defaultview.render /home/webadmin/html/plog/index.php(44): blogcontroller.process
Exception message: Smarty error: [in ./templates/blog_2/roodo-template-blue/links.template line 108]: syntax error: unrecognized tag: document.getElementById('zg_whatdiv').style.display = (document.getElementById('zg_whatdiv').style.display != 'none') ? 'none' : 'block'; document.getElementById('zg_whatlink').style.display = (document.getElementById('zg_whatdiv').style.display != 'none') ? 'none' : 'block'; return false; (Smarty_Compiler.class.php, line 403) Error code: 256 -- Backtrace -- /home/webadmin/html/plog/class/template/smarty/Smarty.class.php(1108): trigger_error /home/webadmin/html/plog/class/template/smarty/Smarty.class.php(1870): smarty_compiler.trigger_error /home/webadmin/html/plog/class/template/smarty/Smarty_Compiler.class.php(2131): smarty_compiler._trigger_fatal_error /home/webadmin/html/plog/class/template/smarty/Smarty_Compiler.class.php(403): smarty_compiler._syntax_error /home/webadmin/html/plog/class/template/smarty/Smarty_Compiler.class.php(298): smarty_compiler._compile_tag /home/webadmin/html/plog/class/template/smarty/Smarty.class.php(1506): smarty_compiler._compile_file /home/webadmin/html/plog/class/template/smarty/Smarty.class.php(1441): cachedtemplate._compile_source /home/webadmin/html/plog/class/template/smarty/Smarty.class.php(1922): cachedtemplate._compile_resource /home/webadmin/html/plog/tmp/2/%%365^%%365490330^main.template.php(52): cachedtemplate._smarty_include /home/webadmin/html/plog/class/template/smarty/Smarty.class.php(1281): include /home/webadmin/html/plog/class/template/cachedtemplate.class.php(48): smarty.fetch /home/webadmin/html/plog/class/view/smartyview.class.php(190): cachedtemplate.fetch /home/webadmin/html/plog/class/view/blogview.class.php(224): smartyview.render /home/webadmin/html/plog/class/view/defaultview.class.php(82): blogview.render /home/webadmin/html/plog/class/controller/controller.class.php(325): defaultview.render /home/webadmin/html/plog/index.php(44): blogcontroller.process
Exception message: Smarty error: [in ./templates/blog_2/roodo-template-blue/links.template line 108]: syntax error: unrecognized tag '' (Smarty_Compiler.class.php, line 551) Error code: 256 -- Backtrace -- /home/webadmin/html/plog/class/template/smarty/Smarty.class.php(1108): trigger_error /home/webadmin/html/plog/class/template/smarty/Smarty.class.php(1870): smarty_compiler.trigger_error /home/webadmin/html/plog/class/template/smarty/Smarty_Compiler.class.php(2131): smarty_compiler._trigger_fatal_error /home/webadmin/html/plog/class/template/smarty/Smarty_Compiler.class.php(551): smarty_compiler._syntax_error /home/webadmin/html/plog/class/template/smarty/Smarty_Compiler.class.php(298): smarty_compiler._compile_tag /home/webadmin/html/plog/class/template/smarty/Smarty.class.php(1506): smarty_compiler._compile_file /home/webadmin/html/plog/class/template/smarty/Smarty.class.php(1441): cachedtemplate._compile_source /home/webadmin/html/plog/class/template/smarty/Smarty.class.php(1922): cachedtemplate._compile_resource /home/webadmin/html/plog/tmp/2/%%365^%%365490330^main.template.php(52): cachedtemplate._smarty_include /home/webadmin/html/plog/class/template/smarty/Smarty.class.php(1281): include /home/webadmin/html/plog/class/template/cachedtemplate.class.php(48): smarty.fetch /home/webadmin/html/plog/class/view/smartyview.class.php(190): cachedtemplate.fetch /home/webadmin/html/plog/class/view/blogview.class.php(224): smartyview.render /home/webadmin/html/plog/class/view/defaultview.class.php(82): blogview.render /home/webadmin/html/plog/class/controller/controller.class.php(325): defaultview.render /home/webadmin/html/plog/index.php(44): blogcontroller.process
主題: Re: 問如何在版面中加入自己的圖片
作者: ajer001 於 十一月 26, 2005, 04:13:52 下午
你flickr那段語法可能有問題,check一下吧
主題: Re: 問如何在版面中加入自己的圖片
作者: markwu 於 十一月 26, 2005, 05:09:22 下午
不是他的語法有問題,是他插入 LifeType 的 Template 時發生問題。再插入 有 {} 符號的程式到 teplate 中,一定要用{literal} 與{/literal}包起來。這樣子 LifeType 才不會誤認你的程式也是模版的物件(標籤)的一部份。 所以,你改行下面這樣子,應該就對了!(我假設你的 Javascript 是正確的) {literal}
<!-- Start of Flickr Badge --><style type="text/css"></style><script type="text/javascript"></script><div align="center"><div class="zg_div"><div class="zg_div_inner" align="left"><div align="center"><a href="http://www.flickr.com/">www.<strong style="COLOR: #3993ff">flick<span style="COLOR: #ff1c92">r</span></strong>.com</a><br /><script type="text/javascript"></script><iframe title="Flickr Badge" style="BORDER-RIGHT: medium none; BORDER-TOP: medium none; BORDER-LEFT: medium none; BORDER-BOTTOM: medium none; BACKGROUND-COLOR: #ffffff" src="http://www.flickr.com/apps/badge/badge_iframe.gne?zg_bg_color=ffffff&zg_person_id=29983502%40N00" frameborder="0" width="113" scrolling="no" height="151"></iframe><div id="zg_whatlink"><a style="COLOR: #3993ff" onclick="function anonymous() { function anonymous() { zg_toggleWhat(); return false; } }" href="http://www.flickr.com/badge_new.gne">what is this?</a></div></div><div id="zg_whatdiv" style="DISPLAY: none"><div align="center">This is a Flickr badge showing public photos from <a href="http://www.flickr.com/photos/29983502@N00">newyksl</a>. Make your own badge <a href="http://www.flickr.com/badge_new.gne">here</a>.</div></div><div align="center"><script type="text/javascript"></script></div></div></div></div><!-- End of Flickr Badge -->
{/literal} Mark
主題: Re: 問如何在版面中加入自己的圖片
作者: ajer001 於 十一月 26, 2005, 06:35:30 下午
喔喔喔喔 原來
不好意思誤導您了@@
也謝謝mark,多學到一課。
主題: Re: 問如何在版面中加入自己的圖片
作者: yksl 於 十一月 27, 2005, 11:46:44 上午
果真!加入後一切OK,謝謝各位的指教。
|