主題: 請教 DOMTAB 問題
作者: guguw 於 一月 13, 2005, 02:23:20 下午
(http://home.pchome.com.tw/my/guguw/Image1.jpg)
我已經弄好 domtab 修改 header.template <ul id="mainnav"> <li><a href="#recentpostTab">文章</a></li> <li><a href="#commentTab">迴響</a></li> <li><a href="#trackbackTab">引用</a></li> <li><a href="#scheduleTab">聯播</a></li> </ul>
最新文章 <div id="recentpostTab" class="tabcontent" style="display:block;"> <p> {foreach from=$recentposts item=recentpost} <img src="imgs/bullet/posts.gif"><a title="{$recentpost->getText()|truncate:150:"..."|strip_tags|escape}" hre f="{$url->postLink($recentpost)}">{$recentpost->getTopic()}</a><br/> {/foreach} </p> </div>
因為現在還沒有把Smarty搞懂嘍 請教一下 <div id="xxxxTab" class="tabcontent" style="display:none;"> <p> 其他3個Tab這裡要怎麼寫? </p> </div>
主題: Re: 請教 DOMTAB 問題
作者: reic 於 一月 13, 2005, 03:12:28 下午
修改 header.template <ul id="mainnav"> <li><a href="#recentpostTab">文章</a></li> <li><a href="#commentTab">迴響</a></li> <li><a href="#trackbackTab">引用</a></li> <li><a href="#scheduleTab">聯播</a></li> </ul> <div id="xxxxTab" class="tabcontent" style="display:none;"> <p> 其他3個Tab這裡要怎麼寫? </p> </div>
其它的 tab 就參考: 迴響 ( plugin 的設法 ) 引用 (plugin 的設法) 和 聯播 的設法,把內容寫在 <div .....> </div> 之間就行了
主題: 版主出現了!
作者: markwu 於 一月 13, 2005, 03:59:18 下午
版主出現了!呵呵! 我順便提供我的模版,你參考一下! Mark <ul id="mainnav"> <li><a href="#recentpostTab">文章</a></li> <li><a href="#commentTab">迴響</a></li> <li><a href="#trackbackTab">引用</a></li> </ul>
<div id="recentpostTab" class="tabcontent" style="display:block;"> <p> {foreach from=$recentposts item=post} <img src="http://your-blog/imgs/bullet/posts.gif" /><a href="{$url->postLink($post)}">{$post->getTopic()}</a><br /> {/foreach} </p> </div>
<div id="commentTab" class="tabcontent" style="display:none;"> <p> {assign var=comments value=$recentcomments->getRecentComments(15)} {foreach from=$comments item=comment} {assign var=postid value=$comment->getArticleId()} {assign var=commentDate value=$comment->getTimestamp()} {assign var=post value=$recentcomments->getCommentArticle($postid)} {if $comment->getUserUrl()} <img src="http://your-blog/imgs/bullet/comments.gif" /><a title="{$comment->getText()|truncate:100:"..."|strip_tags}" href="{$url->postPermalink($post)}#{$comment->getId()}">{$post->getTopic()}</a><div align="right"><font style="font-size: 11px;"><b>by</b> <a title="{$comment->getUserUrl()}" href="{$comment->getUserUrl()}">{$comment->getUsername()}</a> @ {if $locale->formatDate($commentDate,"%D") eq $locale->formatDate($now,"%D")}{$locale->formatDate($commentDate, "%H:%M")}{else}{$locale->formatDate($commentDate, "%m/%d")}{/if}</font></div> {else} <img src="http://your-blog/imgs/bullet/comments.gif" /><a title="{$comment->getText()|truncate:100:"..."|strip_tags}" href="{$url->postPermalink($post)}#{$comment->getId()}">{$post->getTopic()}</a><div align="right"><font style="font-size: 11px;"><b>by</b> {$comment->getUsername()} @ {if $locale->formatDate($commentDate,"%D") eq $locale->formatDate($now,"%D")}{$locale->formatDate($commentDate, "%H:%M")}{else}{$locale->formatDate($commentDate, "%m/%d")}{/if}</font></div> {/if} {/foreach} </p> </div>
<div id="trackbackTab" class="tabcontent" style="display:none;"> <p> {assign var=trackbacks value=$recenttrackbacks->getRecentTrackbacks(15)} {foreach from=$trackbacks item=trackback} {assign var=postid value=$trackback->getArticleId()} {assign var=trackbackDate value=$trackback->getDateObject()} {assign var=post value=$recenttrackbacks->getTrackbackArticle($postid)} <img src="http://your-blog/imgs/bullet/trackbacks.gif" /><a href="{$url->postPermalink($post)}">{$post->getTopic()}</a><br /><div align="right"><font style="font-size: 11px;"><b>by</b> <a title="{$trackback->getTitle()}" href="{$trackback->getUrl()}">{$trackback->getBlogName()}</a> @ {if $locale->formatDate($trackbackDate,"%D") eq $locale->formatDate($now,"%D")}{$locale->formatDate($trackbackDate, "%H:%M")}{else}{$locale->formatDate($trackbackDate, "%m/%d")}{/if}</font></div> {/foreach} </p> </div>
|