Discuz!官方免费开源建站系统

 找回密码
 立即注册

QQ登录

只需一步,快速开始

搜索

听雨轩风格[GBK][utf8][一键安装 DIY][20110918更新]

  [复制链接]
 楼主| vr4u 发表于 2011-8-31 09:22:10 | 显示全部楼层
suiyue_wusheng 发表于 2011-8-29 19:09
GBK用软件转换成UTF的都,参照修改方案,用Dreamweaver打开发现有的文件语法有些错误。

模板里面有很多变量值,这些错误是误报。不用理会。
回复

使用道具 举报

 楼主| vr4u 发表于 2011-8-31 09:26:04 | 显示全部楼层
Z_h′↗芣 发表于 2011-8-30 17:35
楼主你好,之前你说大字报轮播因为与DIY发生冲突就取消了。现在我看楼主的站里有开启了大字报轮播,我从你 ...
  1. <script language="javascript" type="text/javascript" src="{IMGDIR}/jquery-1.3.2.min.js"></script>
  2. <script language="javascript" type="text/javascript">
  3. var $ = function (id) {
  4.         return "string" == typeof id ? document.getElementById(id) : id;
  5. };
  6. var Class = {
  7.   create: function() {
  8.         return function() {
  9.           this.initialize.apply(this, arguments);
  10.         }
  11.   }
  12. }
  13. Object.extend = function(destination, source) {
  14.         for (var property in source) {
  15.                 destination[property] = source[property];
  16.         }
  17.         return destination;
  18. }
  19. var TransformView = Class.create();
  20. TransformView.prototype = {
  21.   //容器对象,滑动对象,切换参数,切换数量
  22.   initialize: function(container, slider, parameter, count, options) {
  23.         if(parameter <= 0 || count <= 0) return;
  24.         var oContainer = $(container), oSlider = $(slider), oThis = this;
  25.         this.Index = 0;//当前索引
  26.         this._timer = null;//定时器
  27.         this._slider = oSlider;//滑动对象
  28.         this._parameter = parameter;//切换参数
  29.         this._count = count || 0;//切换数量
  30.         this._target = 0;//目标参数
  31.         this.SetOptions(options);
  32.         this.Up = !!this.options.Up;
  33.         this.Step = Math.abs(this.options.Step);
  34.         this.Time = Math.abs(this.options.Time);
  35.         this.Auto = !!this.options.Auto;
  36.         this.Pause = Math.abs(this.options.Pause);
  37.         this.onStart = this.options.onStart;
  38.         this.onFinish = this.options.onFinish;
  39.         oContainer.style.overflow = "hidden";
  40.         oContainer.style.position = "relative";
  41.         oSlider.style.position = "absolute";
  42.         oSlider.style.top = oSlider.style.left = 0;
  43.   },
  44.   //设置默认属性
  45.   SetOptions: function(options) {
  46.         this.options = {//默认值
  47.                 Up:                        false,//是否向上(否则向左)
  48.                 Step:                5,//滑动变化率
  49.                 Time:                10,//滑动延时
  50.                 Auto:                true,//是否自动转换
  51.                 Pause:                6000,//停顿时间(Auto为true时有效)
  52.                 onStart:        function(){},//开始转换时执行
  53.                 onFinish:        function(){}//完成转换时执行
  54.         };
  55.         Object.extend(this.options, options || {});
  56.   },
  57.   //开始切换设置
  58.   Start: function() {
  59.         if(this.Index < 0){
  60.                 this.Index = this._count - 1;
  61.         } else if (this.Index >= this._count){ this.Index = 0; }
  62.        
  63.         this._target = -1 * this._parameter * this.Index;
  64.         this.onStart();
  65.         this.Move();
  66.   },
  67.   //移动
  68.   Move: function() {
  69.         clearTimeout(this._timer);
  70.         var oThis = this, style = this.Up ? "top" : "left", iNow = parseInt(this._slider.style[style]) || 0, iStep = this.GetStep(this._target, iNow);
  71.        
  72.         if (iStep != 0) {
  73.                 this._slider.style[style] = (iNow + iStep) + "px";
  74.                 this._timer = setTimeout(function(){ oThis.Move(); }, this.Time);
  75.         } else {
  76.                 this._slider.style[style] = this._target + "px";
  77.                 this.onFinish();
  78.                 if (this.Auto) { this._timer = setTimeout(function(){ oThis.Index++; oThis.Start(); }, this.Pause); }
  79.         }
  80.   },
  81.   //获取步长
  82.   GetStep: function(iTarget, iNow) {
  83.         var iStep = (iTarget - iNow) / this.Step;
  84.         if (iStep == 0) return 0;
  85.         if (Math.abs(iStep) < 1) return (iStep > 0 ? 1 : -1);
  86.         return iStep;
  87.   },
  88.   //停止
  89.   Stop: function(iTarget, iNow) {
  90.         clearTimeout(this._timer);
  91.         this._slider.style[this.Up ? "top" : "left"] = this._target + "px";
  92.   }
  93. };
  94. window.onload=function(){
  95.         function Each(list, fun){
  96.                 for (var i = 0, len = list.length; i < len; i++) { fun(list[i], i); }
  97.         };
  98.         ////////////////////////test2
  99.         var objs2 = $("idNum2").getElementsByTagName("li");
  100.         var tv2 = new TransformView("idTransformView2", "idSlider2", 445, 3, {
  101.                 onStart: function(){ Each(objs2, function(o, i){ o.className = tv2.Index == i ? "on" : ""; }) },//按钮样式
  102.                 Up: false
  103.         });
  104.         tv2.Start();
  105.         Each(objs2, function(o, i){
  106.                 o.onmouseover = function(){
  107.                         o.className = "on";
  108.                         tv2.Auto = false;
  109.                         tv2.Index = i;
  110.                         tv2.Start();
  111.                 }
  112.                 o.onmouseout = function(){
  113.                         o.className = "";
  114.                         tv2.Auto = true;
  115.                         tv2.Start();
  116.                 }
  117.         })
  118. }
  119. </script>
复制代码
这段代码复制到 discuz.htm里的第二行,也就是 <!--{subtemplate common/header}-->
的下面一行。
回复

使用道具 举报

 楼主| vr4u 发表于 2011-8-31 09:27:25 | 显示全部楼层
cailaohu 发表于 2011-8-31 01:42
楼主,模板非常好,我换定了。

不过有一个小缺陷,,,首页的广告位子.... 貌似没预留。。。。

无法预留,自行修改模板文件添加吧
回复

使用道具 举报

-渔{芯疼}莪 发表于 2011-8-31 10:32:59 | 显示全部楼层
楼主、可否分享一下你的那个电台的调用!!谢谢!!
回复

使用道具 举报

。朵朵 发表于 2011-8-31 12:55:40 | 显示全部楼层
楼主请回答下 1022楼的 论坛 排行 竖条要怎么处理掉  我也遇见了。。
回复

使用道具 举报

diyunzhou 发表于 2011-8-31 15:14:23 | 显示全部楼层
  每天漂过!!!
回复

使用道具 举报

 楼主| vr4u 发表于 2011-8-31 15:47:57 | 显示全部楼层
。朵朵 发表于 2011-8-31 12:55
楼主请回答下 1022楼的 论坛 排行 竖条要怎么处理掉  我也遇见了。。

那个地方是搜索与前面隔开的竖线,你把搜索删掉了?
如果不需要请打开common.css 619行左右:
  1. #nv .SearchWord{ float:left; margin:15px 0 0 15px; padding:0 0 0 15px; height:20px; line-height:20px; border-left:solid 1px #C9C0A7;}
复制代码
改为:
  1. #nv .SearchWord{ float:left; margin:15px 0 0 15px; padding:0 0 0 15px; height:20px; line-height:20px;}
复制代码
回复

使用道具 举报

夜魅羽 发表于 2011-8-31 18:23:38 | 显示全部楼层
vr4u 发表于 2011-8-31 15:47
那个地方是搜索与前面隔开的竖线,你把搜索删掉了?
如果不需要请打开common.css 619行左右:改为:

楼主你怎么不回答我的问题啊?
回复

使用道具 举报

cailaohu 发表于 2011-8-31 19:33:25 | 显示全部楼层
本帖最后由 cailaohu 于 2011-8-31 19:33 编辑

楼主,请问能不能加上 空间的模板呢?

简单点 也行的。这样就完美了。
回复

使用道具 举报

。朵朵 发表于 2011-9-1 00:03:16 | 显示全部楼层
楼主说过不提供播放器,我想用别的播放器,可以提供下方法吗?怎么才能只在首页添加播放器不影响到其他页面?在导航的那个位置
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

手机版|小黑屋|Discuz! 官方站 ( 皖ICP备16010102号 )star

GMT+8, 2024-10-5 21:07 , Processed in 0.685682 second(s), 18 queries , Gzip On.

Powered by Discuz! X3.4

Copyright © 2001-2023, Tencent Cloud.

快速回复 返回顶部 返回列表