首页新闻幻灯图片+类别+标题的实现方法


首先复制goffice提供的"首页调用新闻图片幻灯片轮换"代码

地址:http://www.joekoe.com/forum/view_53639.html

首页调用

'---------------------------中间1 开始----------------------------
%>
<table cellspacing=0 cellpadding=4 class=table align=center><tr><td class=td0> 最新新闻</td></tr><tr class=bg_td><td>
<table border=0 cellspacing=0 cellpadding=0 width='100%'>
<tr>
<td width='35%' align=center>
<%call revealTrans_news_pic()%>
</td>
<td width='65%'>
<table border=0 width='100%'>
<%
sql="select top 6 tim,news.id,news.topic,jk_class.c_name,jk_class.c_id  from news inner JOIN jk_class ON news.c_id = jk_class.c_id where hidden=1 order by id desc"

set rs=joekoe_cms.exec(sql,1)
do while not rs.eof
id=rs("id")
topic=rs("topic")
response.write vbcrlf&" <tr><td height='"&dim_num(6)&"'>·[<a href=news_list.asp?c_id="&rs("c_id")&" alt='"&joekoe_cms.code_html(rs("c_name"),1,0)&"'>"&joekoe_cms.code_html(rs("c_name"),1,5)&"</a>] <a href='news_view.asp?id="&id&"' target=_blank alt='"&joekoe_cms.code_html(topic,1,0)&"'>"&joekoe_cms.code_html(topic,1,14)&"</a></td><td align=right class=timestyle><font class=gray>"&joekoe_cms.time_type(rs("tim"),4)&"</font><td></td></tr><tr><td height=1 background='images/bg_dian.gif' colspan='2'></td></tr>"
rs.movenext
loop
rs.close
%>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
<%
response.write ukong

大家看2013的演示(大致效果就是那样,我不过在图片右边的标题前增加了新闻类别)

地址:http://wj2013.com

说明:

pic0=pic_fk(pic0&"' name=bannerADrotator style='FILTER: revealTrans(duration=2,transition=20)",2,"javascript:jump2url();")

其中红色的2为图片大小,你可以自行定义图片的大小。
http://www.joekoe.com/forum_view.asp?forum_id=7&view_id=56304
</textarea></div></div><script language="javascript" type="text/javascript">initUBB("Message")</script></td>
             </tr>
                                 <tr>
               <td align="right" valign="top"> </td>
                <td colspan="2" align="left"><label for="label4">
               <label for="label4"><input id="label4" name="log_disImg" type="checkbox" value="1" />
   禁止显示图片</label>
                 <label for="label5">
                 <input name="log_DisSM" type="checkbox" id="label5" value="1" />
   禁止表情转换</label>
                 <label for="label6">
                 <input name="log_DisURL" type="checkbox" id="label6" value="1" />
   禁止自动转换链接</label>
                <label for="label7">
                 <input name="log_DisKey" type="checkbox" id="label7" value="1" />
   禁止自动转换关键字</label></td>
             </tr>
           <tr>
               <td  align="right" valign="top"><span style="font-weight: bold">内容摘要:</span></td>
               <td colspan="2" align="left"><div><label for="shC"><input id="shC" name="log_IntroC" type="checkbox" value="1" onclick="document.getElementById('Div_Intro').style.display=(this.checked)?'block':'none'" />编辑内容摘要</label></div>
               <div id="Div_Intro" style="display:none">
              
                <textarea name="log_Intro" class="editTextarea" style="width:99%;height:120px;">首先复制goffice提供的"首页调用新闻图片幻灯片轮换"代码

地址:http://www.joekoe.com/forum/view_53639.html

首页调用

'---------------------------中间1 开始----------------------------
%>
<table cellspacing=0 cellpadding=4 class=table align=center><tr><td class=td0> 最新新闻</td></tr><tr class=bg_td><td>
<table border=0 cellspacing=0 cellpadding=0 width='100%'>
<tr>
<td width='35%' align=center>
<%call revealTrans_news_pic()%>
</td>
<td width='65%'>
<table border=0 width='100%'>
<%
sql="select top 6 tim,news.id,news.topic,jk_class.c_name,jk_class.c_id from news inner join jk_class ON news.c_id = jk_class.c_id where hidden=1 order by id desc"
set rs=joekoe_cms.exec(sql,1)
do while not rs.eof
id=rs("id")
topic=rs("topic")
response.write vbcrlf&" <tr><td height='"&dim_num(6)&"'>·[<a href=news_list.asp?c_id="&rs("c_id")&" alt='"&joekoe_cms.code_html(rs("c_name"),1,0)&"'>"&joekoe_cms.code_html(rs("c_name"),1,5)&"</a>] <a href='news_view.asp?id="&id&"' target=_blank alt='"&joekoe_cms.code_html(topic,1,0)&"'>"&joekoe_cms.code_html(topic,1,14)&"</a></td><td align=right class=timestyle><font class=gray>"&joekoe_cms.time_type(rs("tim"),4)&"</font><td></td></tr><tr><td height=1 background='images/bg_dian.gif' colspan='2'></td></tr>"
rs.movenext
loop
rs.close
%>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
<%
response.write ukong

大家看2013的演示(大致效果就是那样,我不过在图片右边的标题前增加了新闻类别)

地址:http://wj2013.com

说明:

pic0=pic_fk(pic0&"' name=bannerADrotator style='FILTER: revealTrans(duration=2,transition=20)",2,"javascript:jump2url();")

其中红色的2为图片大小,你可以自行定义图片的大小。
http://www.joekoe.com/forum/view_56304.html

[本日志由 cmscn 于 2008-01-14 01:11 PM 编辑]
文章来自: Original
引用通告: 查看所有引用 | 我要引用此文章
Tags:
相关日志:
评论: 6 | 引用: 0 | 查看次数: 695
发表评论
昵 称:
密 码: 游客发言不需要密码.
内 容:
验证码: 验证码
选 项:
虽然发表评论不用注册,但是为了保护您的发言权,建议您注册帐号.
字数限制 20 字 | UBB代码 关闭 | [img]标签 关闭