不知道要在哪裡迴響留言的,都請到這邊來吧!

«« moodle更新到1.8.4版 | Google Sites-Google Apps新服務(更新)»»
smps 發表於 11/04/2008, 10:01 [管理]
.....
smps 發表於 10/04/2008, 15:10 [管理]...殘念....
改了半天還是沒有辦法在editcomment上出現tinymce(跟原本一樣)
請問阿欣老師,
一樣沒反應....要在迴響跟編輯迴響加入tinymce還需要在甚麼地方設定嗎?全域設定的html_allowed_tags_in_comments也改了,還是請阿欣老師指點
另外,阿欣老師可以提供您改完的editcomment.template及edit-commentform.js這兩個檔案給我參考嗎?如果可以麻煩將檔案e-mail給我
謝謝!
hsiaosh 發表於 17/03/2008, 18:15 [管理]阿欣老師:
非常感謝您的指導,由於您的說明讓我想起,如果把用 tinyMCE 做迴響編輯器的用法,也套用到 editcomments 上,或許可行。
於是便著手試了一下,修改了 editcomments\templates\editcomment.template
在裡頭加上
<script language="javascript" type="text/javascript" src="{$url->getBaseUrl()}/js/tinymce/tiny_mce.js"></script><script language="javascript" type="text/javascript" src="{$url->getBaseUrl()}/templates/default/edit-commentform.js"></script>
edit-commentform.js 是仿照 tiny_mce-commentform.js 進行修改的檔案,加入我自己需要的功能,我把它放在/templates/default/ 下,讓它也成為共用的模版
果然,在 editcomment 畫面下,如預期般地出現了 tinyMCE 的功能畫面,試了一下,也能如在發表新文章時的動作
事後,再加入您的 <div class="reply"> 部分,便可做到相同的效果
不過,目前在 HTML 模式下,那些語法的排列,無法像在發表文章時,排得那麼整齊,而是和以前一樣,屆時要修改加入 <div class="reply"> 可能會比較麻煩。(這部分不知道要改那裡了?)
想說,您的回覆量比我大多了,如果這樣修改,是否能減輕在那邊複製貼上的麻煩?
現在因為才剛試用,還不知道是否會有什麼後遺症就是。
hsiaosh 發表於 17/03/2008, 09:56 [管理]原來如此,又學到一招了。
非常感謝您的指導。
hsiaosh 發表於 16/03/2008, 11:04 [管理]阿欣老師:不好意思,想請教一下
看見您在迴響處,能夠針對某一篇迴響做回覆的功能,這也是外掛嗎?如果是,想請問這是那一個外掛功能呢?
我試過 nestedcomments,可是並沒有成功,我應該用那個外掛?或是修改那些檔案,才能達到像您一樣的效果呢?
就是「editcomments」這個外掛。
安裝後,在迴響列表裡就可以直接編修迴響。
因為它沒有文字編輯器的介面,所以必要時我會到發表新文章那裡先將迴響內容寫好後,複製迴響內容的 「html碼」,再回到 「Edit Comment」介面將內容貼上。
為了要區分是迴響者或是我的回覆,所以我會在我這模板的 css上加上一段語法
.reply {
background:#D7E4F2;
margin:10px 30px 10px 30px;
padding:10px 10px 10px 20px;
border: 1px solid #aaa;
}然後再回到 「Edit Comment」,貼上如下的內容,就會是你現在看的的樣子了。
<div class=reply>
...我要迴響的html...
</div>阿欣 2008/03/16 23:58:37
阿讚 發表於 13/03/2008, 14:00 [管理]追分國小學長,您的google信箱,是首誌的嗎
如是我再mail 登入資訊給您
再幫我設定一下!!hlps9999@gmail.com
adm@hlps.tcc.edu.tw
這兩個都可以阿欣 2008/03/13 22:40:43
Bad Behavior 已經阻擋了 2931 個過去 7 天試圖闖關的垃圾迴響與引用。
tinymce,我是1.2.7,commentform.template是放在templates/default裡的公用模版,我直接把
<script language="javascript" type="text/javascript" xsrc="{$url->getBaseUrl()}/js/tinymce/tiny_mce.js"></script>
<script language="javascript" type="text/javascript" xsrc="{$url->getTemplateFile("tiny_mce-commentform.js")}"></script>
加在最上面,然後把tiny_mce-commentform.js也放在同一個目錄下,
這樣問題是出在哪裡呢?直接請李老師幫我看好了
我的tiny_mce-commentform.js
tinyMCE.init({
mode : "textareas",
theme : "advanced",
relative_urls : false,
plugins : "fullscreen,table,inlinepopups,insertdatetime,emotions,insertresource",
theme_advanced_buttons1 : "bold,italic,underline,strikethrough,forecolor,outdent,indent,link,unlink,emotions,image,insertresource",
theme_advanced_buttons2 : "",
theme_advanced_buttons3 : "",
language : "zh_tw_utf8",
theme_advanced_toolbar_location : "top",
theme_advanced_toolbar_align : "left",
apply_source_formatting : true,
force_p_newlines : false
force_br_newlines : true
})
我的commentform.template
<script language="javascript" type="text/javascript" xsrc="{$url->getBaseUrl()}/js/tinymce/tiny_mce.js"></script>
<script language="javascript" type="text/javascript" xsrc="{$url->getTemplateFile("tiny_mce-commentform.js")}"></script>
{if $allowComments}
<div id="CommentForm">
<form id="NewComment" action="{$url->getIndexUrl()}" method="post">
<fieldset>
<legend>{$locale->tr("add_comment")}</legend>
{dynamic}
<div><label for="commentTopic">{$locale->pr("comment_topic")}</label><input type="text" name="commentTopic" id="commentTopic" value="{$topic}" /></div>
<div><label for="commentText">{$locale->pr("comment_text")} ({$locale->tr("required")})</label><textarea rows="10" cols="30" name="commentText" id="commentText"></textarea></div>
<div><label for="userName">{$locale->pr("comment_username")} ({$locale->tr("required")})</label>
{if $authuser}
<span id="AuthUser">{$authuser->getUsername()} ({$locale->tr("form_authenticated")})</span>
<input type="hidden" name="userName" id="userNameHidden" value="{if $authuser}{$authuser->getUsername()}{/if}" /></div>
{else}
<input type="text" name="userName" id="userName" value="" /></div>
{/if}
<div><label for="userEmail">{$locale->tr("comment_email")}</label><input type="text" name="userEmail" id="userEmail" value="" /></div>
<div><label for="userUrl">{$locale->tr("comment_url")}</label><input type="text" name="userUrl" id="userUrl" value="" /></div>
{/dynamic}
{if $authimage}{if $authimage->isEnabled()}
<div><label for="authImage">{$locale->tr("authimage_type_code")}</label>
<input type="text" name="authImage" id="authImage" value="" /> {$authimage->show()}</div>
{/if}{/if}
<div id="Submit"><input id="Add" type="submit" value="{$locale->pr("comment_send")}" name="Add" />
<input type="hidden" name="op" value="AddComment" />
<input type="hidden" name="articleId" value="{$post->getId()}" />
<input type="hidden" name="blogId" value="{$blog->getId()}" />
<input type="hidden" name="parentId" value="{$parentId}" /></div>
</fieldset>
</form>
</div>
{/if}
上面的「x」刪除吧!
不知道你是在哪個網頁複製到這一段的,會出現那個「x」,印象中是LifeType在1.0.X版時一個錯誤的地方。
試試看吧!
阿欣 2008/04/12 02:22:15