本文发布于:2009-04-09,最后更新于:2016-07-26,如果内容失效请留言告知。
寻找了很久的选项卡多格日志效果。本压缩包文件是集合论坛搜索相关帖子,比较多种版本整理并加稍加以改进而来,各插件版权归原作者所有。
安装:
1.下载安装包,后台安装所有插件。热门日志、随机日志插件如原来安装过,最好先卸载掉,然后覆盖本压缩包内文件再次安装。top_tab文件夹内为需用到的两个文件,并非插件。
2.在后台新建TAB内容模块 设置排序位最小值(保持在顶部)
如果安装了WBC的相关日志插件的建议TAB模块设置为首页独享
3.编辑HTML 插入代码:
方法一:使用幻灯图片一(即XPhotoFocus,可以后台上传图片,但不能引用):
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 | < link id = "css" rel = "stylesheet" type = "text/css" href = "plugins/top_tab/tab.css" /> < div class = "Content" > < script type = "text/javascript" src = "plugins/top_tab/tabs.js" ></ script > < div id = "test1" style = "" > < div class = "ntab2-head" > < li >最新留言</ li > < li >最新日志</ li > < li >随机日志</ li > < li >热门日志</ li > </ div > < div style = "FLOAT: left;width=160px;height=120px;padding-top:6px;padding-left:6px;padding-right:12px;" ><$ShowXphotoFocus$></ div >< div class = "ntab2-body" > < dl > <$NewMsg2$> </ dl > < dl > < script language = "javascript" src = "topblognodate.asp?TopLen=9&titleLength=18" ></ script > </ dl > < dl > <$RandomLog$> </ dl > < dl > <$HotLog$> </ dl > </ div > </ div ></ div > < script language = "javascript" >ntab2_register('test1', 3);</ script > |
使用第二种图片展示效果(即,可以直接添加图片地址,但不能后台上传图片):
编辑HTML 插入:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 | < link id = "css" rel = "stylesheet" type = "text/css" href = "tab.css" /> < table width = 100 %> < tr > < td > < div class = "Content" > < script type = "text/javascript" src = "tabs.js" ></ script > < div id = "test1" style = "" > < div class = "ntab2-head" > < li >最新留言</ li > < li >最新日志</ li > < li >随机日志</ li > < li >热门日志</ li > </ div > < div style = "FLOAT: left;width=160px;height=120px;padding-top:6px;padding-left:6px;padding-right:12px;" > < script type = "text/javascript" > linkarr = new Array(); picarr = new Array(); textarr = new Array(); var focus_width=<$Wt$>; var focus_height=<$Ht$>; var text_height=<$TextHt$>; var pics = ""; var links = ""; var texts = ""; var swf_height = focus_height+text_height; <$FanbinPic$> for(i=0;i< picarr.length ;i++) { if(pics=="") pics = picarr <span style = "text-decoration: line-through;" >; else pics += "|"+picarr< span style = "text-decoration: line-through;" >; } for(i=0;i< linkarr.length ;i++) { if(links=="") links = linkarr <span style = "text-decoration: line-through;" >; else links += "|"+linkarr< span style = "text-decoration: line-through;" >; } for(i=0;i< textarr.length ;i++) { if(texts=="") texts = textarr <span style = "text-decoration: line-through;" >; else texts += "|"+textarr< span style = "text-decoration: line-through;" >; } document.write('< div style = "margin-top: 8px; margin-left: auto; margin-right: auto;" >'); document.write('< object classid = "clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase = "http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,0,0" width = "'+ focus_width +'" height = "'+ swf_height +'" >'); document.write('< param name = "allowScriptAccess" value = "sameDomain" />< param name = "movie" value = "plugins/PicShowFlash/fla.swf" />'); document.write('< param name = "quality" value = "high" />< param name = "bgcolor" value = "#F0F0F0" />'); document.write('< param name = "menu" value = "false" />< param name = wmode value = "opaque" />'); document.write('< param name = "FlashVars" value = "pics='+pics+'&links='+links+'&texts='+texts+'&borderwidth='+focus_width+'&borderheight='+focus_height+'&textheight='+text_height+'" />'); document.write('< embed src = "plugins/PicShowFlash/fla.swf" wmode = "opaque" FlashVars = "pics='+pics+'&links='+links+'&texts='+texts+'&borderwidth='+focus_width+'&borderheight='+focus_height+'&textheight='+text_height+'" menu = "false" bgcolor = "#F0F0F0" quality = "high" width = "'+ focus_width +'" height = "'+ swf_height +'" allowScriptAccess = "sameDomain" type = "application/x-shockwave-flash" pluginspage = "http://www.macromedia.com/go/getflashplayer" />'); document.write('</ object >'); document.write('</ div >'); </ script > </ div >< div class = "ntab2-body" > < dl > <$NewMsg2$> </ dl > < dl > < script language = "javascript" src = "topblog.asp?TopLen=7&titleLength=24" ></ script > </ dl > < dl > <$RandomLog$> </ dl > < dl > <$HotLog$> </ dl > </ div > </ div ></ div > </ td > </ tr > </ table > < script language = "javascript" >ntab2_register('test1', 3);</ script > |
以上两中方式可以同时安装,设置两个模块,使用一个模块的时候隐藏另一个即可。效果请看本站演示[mDown=attachments/month_0904/9200948211833.rar]点击下载此文件[/mDown]
你好,我按你的步骤进行的。怎么首页热门文章 显示<$HotLog$>?
怎么调整随机和热门日志中title的显示长度?
[reply=任侠,2009-06-08 09:19 PM]这需要在那两个插件的文件里修改,你找一下相关的代码,我修改的默认为18个字符,你在文件里搜素18 ,然后看相关代码就该能看出来控制标题长度的地方了~~~
还有提示的title信息,好像我默认设置的是23个字符,你也可以根据需要找相关的地方修改~~~[/reply]
为什么我的无法显示图片呢?请教一下
[reply=任侠,2009-06-02 01:30 PM]是幻灯无法显示图片?注意你用的是哪个幻灯的插件~ 建议你用和我博客相同的这个,另一个图片都需要后台添加感觉有点麻烦~ 用这个幻灯图片地址要写绝对地址,每行一个~~~[/reply]