测试通过,不过非默认模板需要进行一个小小的更改,不然无法直接显示,不知何故,默认模板没测试,演示见签名网站,HOHO~~~
在下面这段前- <!--{if $isnovel||$do != 'index'}-->
- <!--{eval get_laba();$i=0;}-->
- <div style="position: relative;padding:5px 0;width:950px; margin:0 auto;">
- <ul style="position:absolute;height:25px;line-height:25px;text-align:right;overflow:hidden;right:0;top:-19px;" id="top_scroll">
- <!--{loop $_SGLOBAL['laba'] $value}-->
- <!--{eval $say = addslashes(preg_replace('/\r|\n/is', '', shtmlspecialchars($value[say])));}-->
- <li><a id="laba_user" style="color:#1782db" href="space.php?uid={$value[uid]}"></a>(<span id="laba_time" class="gray"><!--{date('Y-m-d H:i',$value[dateline],1)}--></span>)使用小喇叭<span id="laba_act">{$value[act]}</span>:<span id="laba_content">$say</span>
- <img src="image/app/laba.gif" width="16" height="16" />[<a href="laba.php">发布</a>]</li>
- <!--{eval break;}-->
- <!--{/loop}-->
- </ul>
- </div>
-
- <script>
- var labas = Array();
- <!--{loop $_SGLOBAL['laba'] $value}-->
- <!--{eval $say = addslashes(preg_replace('/\r|\n/is', '', shtmlspecialchars($value[say])));}-->
- labas[{$i}]= ['{$value[uid]}','<!--{eval echo addslashes($value[username])}-->','<!--{date('Y-m-d H:i',$value[dateline],1)}-->','{$value[act]}','{$say}', '<!--{eval echo get_rndcolor();}-->','<!--{eval echo get_rndcolor();}-->',{$value[dealy]}];
- <!--{eval $i++;}-->
- <!--{/loop}-->
- var topindex =0;
- function topdealy(){
- if(labas.length<topindex+1)topindex=0;
- $('laba_user').innerHTML = labas[topindex][1];
- $('laba_user').href = 'space.php?uid='+labas[topindex][0];
- $('laba_time').innerHTML = labas[topindex][2];
- $('laba_act').innerHTML = labas[topindex][3];
- $('laba_content').innerHTML = labas[topindex][4];
- $('laba_content').style.color = labas[topindex][5];
- $('laba_act').style.color = labas[topindex][6];
- setTimeout('topdealy()', labas[topindex][7]*1000);
- topindex++;
- }
- topdealy();
- </script>
- <!--{/if}-->
复制代码 增加- <li><a id="laba_user" style="color:#1782db" href="space.php?uid={$value[uid]}"></a>(<span id="laba_time" class="gray"><!--{date('Y-m-d H:i',$value[dateline],1)}--></span>)使用小喇叭<span id="laba_act">{$value[act]}</span>:<span id="laba_content">$say</span>
- <img src="image/app/laba.gif" width="16" height="16" />[<a href="laba.php">发布</a>]</li>
复制代码 更新缓存后发布一条喇叭信息,然后再去除这段代码,即可正常显示! |