форум vBSupport.ru > vBulletin > Вопрос — Ответ > Помогите найти!
  • »
VBsupport перешел с домена .ORG на родной .RU Ура! Пожалуйста, обновите свои закладки - VBsupport.ru
 
 
 
 
space_man
Простоузер
 
space_man's Avatar
Lightbulb время существования форума
0

Quote:
Code:
<script type="text/javascript" language="JavaScript1.2">
/* <![CDATA[ */


function setcountup(theyear,themonth,theday){
yr=theyear;mo=themonth;da=theday
}

//////////CONFIGURE THE countup SCRIPT HERE//////////////////

//STEP 1: Configure the date to count up from, in the format year, month, day:
//This date should be less than today
setcountup(2005,02,21)

//STEP 2: Configure text to be attached to count up
var displaymessage="since $vboptions[bbtitle] came online!"

//STEP 3: Configure the below 5 variables to set the width, height, background color, and text style of the countup area
var countupwidth='95%'
var countupheight='20px' //applicable only in NS4
var countupbgcolor='alt1'
var opentags='<span class="smallfont">'
var closetags='</span>'

//////////DO NOT EDIT PASS THIS LINE//////////////////

var montharray=new Array("Jan","Feb","Mar","Apr","May","Jun","Jul","A ug","Sep","Oct","Nov","Dec")
var crosscount=''

function start_countup(){
if (document.layers)
document.countupnsmain.visibility="show"
else if (document.all||document.getElementById)
crosscount=document.getElementById&&!document.all? document.getElementById("countupie") : countupie
countup()
}

if (document.all||document.getElementById)
document.write('<span id="countupie" style="width:'+countupwidth+'; background-color:'+countupbgcolor+'"></span>')

window.onload=start_countup


function countup(){
var today=new Date()
var todayy=today.getYear()
if (todayy < 1000)
todayy+=1900
var todaym=today.getMonth()
var todayd=today.getDate()
var todayh=today.getHours()
var todaymin=today.getMinutes()
var todaysec=today.getSeconds()
var todaystring=montharray[todaym]+" "+todayd+", "+todayy+" "+todayh+":"+todaymin+":"+todaysec
paststring=montharray[mo-1]+" "+da+", "+yr
dd=Date.parse(todaystring)-Date.parse(paststring)
dday=Math.floor(dd/(60*60*1000*24)*1)
dhour=Math.floor((dd%(60*60*1000*24))/(60*60*1000)*1)
dmin=Math.floor(((dd%(60*60*1000*24))%(60*60*1000) )/(60*1000)*1)
dsec=Math.floor((((dd%(60*60*1000*24))%(60*60*1000 ))%(60*1000))/1000*1)

if (document.layers){
document.countupnsmain.document.countupnssub.document.write(opentags+dday+ " days, "+dhour+" hours, "+dmin+" minutes, and "+dsec+" seconds "+displaymessage+closetags)
document.countupnsmain.document.countupnssub.document.close()
}
else if (document.all||document.getElementById)
crosscount.innerHTML=opentags+dday+ " days, "+dhour+" hours, "+dmin+" minutes, and "+dsec+" seconds "+displaymessage+closetags

setTimeout("countup()",1000)
}
/* ]]> */
</script>
lnd добавил 08.01.2006 в 13:01
Кто бы ещё подсказал, как сделать, чтобы можно было просматривать все сообщения темы на одной странице.
Как прикрутить этот скрипт? Очень хочется, чтобы внизу показывало время существования форума с момента открытия ))
Bot
Yandex Bot Yandex Bot is online now
 
Join Date: 05.05.2005
Реклама на форуме А что у нас тут интересного? =)
 
 
kerk
k0t
 
kerk's Avatar
Default
0

попробуй сделать так же, как этот хак
тоже портировал из JS
можно так же настройки из самого скрипта перенести в настройки в админку
 
 
space_man
Простоузер
 
space_man's Avatar
Default
0

что-то не получается у меня.... Может поможешь? Если не трудно, конечно...
 
 
Profess1on
Продвинутый
Default
0

Присоединяюсь к просьбе...
 
 
Rule
Продвинутый
 
Rule's Avatar
Default
0

Буду признателен.
 
 
ua4wiy
Продвинутый
Default
0

В шаблоне FORUMHOME ищем следующую строку
Code:
<div><phrase 1="member.php?$session[sessionurl]u=$newuserid" 2="$newusername">$vbphrase[welcome_to_our_newest_member_x]</phrase></div>
		</div>
и после неё вставляем этот JavaScript.
У меня работает.
 
 
Rule
Продвинутый
 
Rule's Avatar
Default
0

У меня не работает.
ua4wiy,
У тебя какая версия форума?
 
 
kerk
k0t
 
kerk's Avatar
Default
7

блин, народ, там же все просто, как 2 копейки... =))
пихаете тот код, что выше, в файл, называете его (да как угодно) и с расширением *.js потом грузите в папку скриптов на фрум и там, где хотите вывести отображение времени пихаете ссылку на этот скрипт
ну в общем я свой вариант сделал, мне тот, что выше, не понравился =))
скрипт не трогал, только перевел и в табличку засунул
============
загружаем файл lifetime.js из архива, в папку forum/clientscript
открываем шаблон footer и где то перед:
Code:
<div align="center">
	<div class="smallfont" align="center">
	<!-- Do not remove this copyright notice -->
	$vbphrase[powered_by_vbulletin]
	<!-- Do not remove this copyright notice -->
	</div>
пихаем след. код:
Code:
<script type="text/javascript" src="clientscript/lifetime.js"></script>
все...
Attached Files
File Type: rar lifetime.rar (1.2 KB, 55 views)
 
 
ua4wiy
Продвинутый
Default
0

Quote:
Originally Posted by Rule
У меня не работает.
ua4wiy,
У тебя какая версия форума?
3.5.3
Смотри сам тут
 
 
Profess1on
Продвинутый
Default
0

Есть одна маленькая проблема. С хаком World Time работать не хочет.
http://vbsupport.ru/forum/showthread.php?t=3478
Тоесть время в реальном режиме не показыват.
Поможите ...
 


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off




All times are GMT +4. The time now is 04:30 AM.


Powered by vBulletin® Version 3.0.16
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Loading...