花魁直播高品质美女在线视频互动社区 - 花魁直播官方版

 歡迎來到素材無憂網(wǎng),按 + 收藏我們
登錄 注冊(cè) 退出 找回密碼

怎樣實(shí)現(xiàn)dede織夢(mèng)評(píng)論實(shí)現(xiàn)多個(gè)表情方法

時(shí)間: 2018-04-30 22:13 閱讀: 作者:素材無憂網(wǎng)

不知道大家使用織夢(mèng)有沒有注意到評(píng)論頁(yè)添加評(píng)論智能選取一個(gè)表情,不能多選,這對(duì)于用戶體驗(yàn)來說不太好,不太靈活,那怎樣才能修改讓發(fā)布評(píng)論的時(shí)候,表情和文字都結(jié)合,這樣發(fā)出來的東西才有聲有色

下面是具體修改的方法兩步搞定:

第一步修改  feedback_ajax.php件。

該文件在 根目錄下的 plus / 文件夾下。打開該文件以后,查找以下代碼:if($dopost=='getlist')
在該代碼的上面插入以下代碼(紅色代碼): 
function convertem($message){   
$a = array('[em01]','[em02]','[em03]','[em04]','[em05]','[em06]','[em07]','[em08]','[em09]','[em10]','[em11]','[em12]','[em13]','[em14]','[em15]','[em16]','[em17]','[em18]','[em19]','[em20]','[em21]','[em22]','[em23]','[em24]');  
$b = array('<img src="../../../images/mood/ico-mood-1.gif" />','<img src="../../../images/mood/ico-mood-2.gif" />','<img src="../../../images/mood/ico-mood-3.gif" />','<img src="../../../images/mood/ico-mood-4.gif" />','<img src="../../../images/mood/ico-mood-5.gif" />','<img src="../../../images/mood/ico-mood-6.gif" />','<img src="../../../images/mood/ico-mood-7.gif" />','<img src="../../../images/mood/ico-mood-8.gif" />','<img src="../../../images/mood/ico-mood-9.gif" />','<img src="../../../images/mood/ico-mood-10.gif" />','<img src="../../../images/mood/ico-mood-11.gif" />','<img src="../../../images/mood/ico-mood-12.gif" />','<img src="../../../images/mood/ico-mood-13.gif" />','<img src="../../../images/mood/ico-mood-14.gif" />','<img src="../../../images/mood/ico-mood-15.gif" />','<img src="../../../images/mood/ico-mood-16.gif" />','<img src="../../../images/mood/ico-mood-17.gif" />','<img src="../../../images/mood/ico-mood-18.gif" />','<img src="../../../images/mood/ico-mood-19.gif" />','<img src="../../../images/mood/ico-mood-20.gif" />','<img src="../../../images/mood/ico-mood-21.gif" />','<img src="../../../images/mood/ico-mood-22.gif" />','<img src="../../../images/mood/ico-mood-23.gif" />','<img src="../../../images/mood/ico-mood-24.gif" />');  
$message = str_replace($a,$b,$message);  
return $message;   

第二步:

再打開ajaxfeedback.htm 這個(gè)文件,該文件在你具體的模板目錄下,系統(tǒng)默認(rèn)的模板目錄為 根目錄下templets /default/ajaxfeedback.htm 打開該文件,

找到以下代碼<div class="dcmp-mood">,在它的下面有Ul  和Li  , Li有12行。把這12行的Li 全部替換,替換的代碼(紅色代碼)為
 <img src="{dede:global.cfg_cmsurl/}/images/mood/ico-mood-1.gif" onclick="javascript:document.getElementById('msg').value+='[em01]';" />   <img src="{dede:global.cfg_cmsurl/}/images/mood/ico-mood-2.gif" onclick="javascript:document.getElementById('msg').value+='[em02]';" />   <img src="{dede:global.cfg_cmsurl/}/images/mood/ico-mood-3.gif" onclick="javascript:document.getElementById('msg').value+='[em03]';" />   <img src="{dede:global.cfg_cmsurl/}/images/mood/ico-mood-4.gif" onclick="javascript:document.getElementById('msg').value+='[em04]';" />   <img src="{dede:global.cfg_cmsurl/}/images/mood/ico-mood-5.gif" onclick="javascript:document.getElementById('msg').value+='[em05]';" />   <img src="{dede:global.cfg_cmsurl/}/images/mood/ico-mood-6.gif" onclick="javascript:document.getElementById('msg').value+='[em06]';" />   <img src="{dede:global.cfg_cmsurl/}/images/mood/ico-mood-7.gif" onclick="javascript:document.getElementById('msg').value+='[em07]';" />   <img src="{dede:global.cfg_cmsurl/}/images/mood/ico-mood-8.gif" onclick="javascript:document.getElementById('msg').value+='[em08]';" />   <img src="{dede:global.cfg_cmsurl/}/images/mood/ico-mood-9.gif" onclick="javascript:document.getElementById('msg').value+='[em09]';" />   <img src="{dede:global.cfg_cmsurl/}/images/mood/ico-mood-10.gif" onclick="javascript:document.getElementById('msg').value+='[em10]';" />   <img src="{dede:global.cfg_cmsurl/}/images/mood/ico-mood-11.gif" onclick="javascript:document.getElementById('msg').value+='[em11]';" />   <img src="{dede:global.cfg_cmsurl/}/images/mood/ico-mood-12.gif" onclick="javascript:document.getElementById('msg').value+='[em12]';" />   <img src="{dede:global.cfg_cmsurl/}/images/mood/ico-mood-13.gif" onclick="javascript:document.getElementById('msg').value+='[em13]';" />   <img src="{dede:global.cfg_cmsurl/}/images/mood/ico-mood-14.gif" onclick="javascript:document.getElementById('msg').value+='[em14]';" />   <img src="{dede:global.cfg_cmsurl/}/images/mood/ico-mood-15.gif" onclick="javascript:document.getElementById('msg').value+='[em15]';" />   <img src="{dede:global.cfg_cmsurl/}/images/mood/ico-mood-16.gif" onclick="javascript:document.getElementById('msg').value+='[em16]';" />  <img src="{dede:global.cfg_cmsurl/}/images/mood/ico-mood-17.gif" onclick="javascript:document.getElementById('msg').value+='[em17]';" /> <img src="{dede:global.cfg_cmsurl/}/images/mood/ico-mood-18.gif" onclick="javascript:document.getElementById('msg').value+='[em18]';" />  <img src="{dede:global.cfg_cmsurl/}/images/mood/ico-mood-19.gif" onclick="javascript:document.getElementById('msg').value+='[em19]';" />   <img src="{dede:global.cfg_cmsurl/}/images/mood/ico-mood-20.gif" onclick="javascript:document.getElementById('msg').value+='[em20]';" />  <img src="{dede:global.cfg_cmsurl/}/images/mood/ico-mood-21.gif" onclick="javascript:document.getElementById('msg').value+='[em21]';" /> <img src="{dede:global.cfg_cmsurl/}/images/mood/ico-mood-22.gif" onclick="javascript:document.getElementById('msg').value+='[em22]';" />  <img src="{dede:global.cfg_cmsurl/}/images/mood/ico-mood-23.gif" onclick="javascript:document.getElementById('msg').value+='[em23]';" /> <img src="{dede:global.cfg_cmsurl/}/images/mood/ico-mood-24.gif" onclick="javascript:document.getElementById('msg').value+='[em24]';" />
 
通過兩步的修改,已經(jīng)OK了,接下來測(cè)試吧,看看最后測(cè)試的效果。還是很不錯(cuò)的。

溫馨提示:需要說明的是,表情的目錄是在根目錄的images  這個(gè)大家需要注意一下,圖片目錄大家可以隨便改。我是為了防止泄露模板目錄,所以直接放在了根目錄里的images。

版權(quán)聲明: 本站資源均來自互聯(lián)網(wǎng)或會(huì)員發(fā)布,如果侵犯了您的權(quán)益請(qǐng)與我們聯(lián)系,我們將在24小時(shí)內(nèi)刪除!謝謝!

轉(zhuǎn)載請(qǐng)注明: 怎樣實(shí)現(xiàn)dede織夢(mèng)評(píng)論實(shí)現(xiàn)多個(gè)表情方法

標(biāo)簽:  
相關(guān)文章
模板推薦