Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.6 > vBulletin 3.6 Template Modifications
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Show number of days since forum came online! Details »»
Show number of days since forum came online!
Version: 1.00, by KingPuyol KingPuyol is offline
Developer Last Online: Apr 2008 Show Printable Version Email this Page

Version: 3.6.4 Rating:
Released: 01-21-2007 Last Update: Never Installs: 81
 
No support by the author.

This is an idea I got from somewhere.
It will show the number of days, hours, minutes and seconds since your forum came online in the forum statistics area below.


First open counter.txt, and change the date you opened the forum from the setcountup, and change all what you want until by following all what's written on the counter.txt file.

After that you will need to edit 1 templates:

In FORUMHOME, find:
Code:
			<div><phrase 1="member.php?$session[sessionurl]u=$newuserid" 2="$newusername">$vbphrase[welcome_to_our_newest_member_x]</phrase></div>
After if add:
Code:
[THE CONTENT OF counter.txt]

Then click save and your done.

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.

Comments
  #32  
Old 05-14-2008, 01:21 AM
DianaDiana DianaDiana is offline
 
Join Date: Dec 2007
Posts: 20
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

vBulletin Message
The following error occurred when attempting to evaluate this template:

Parse error: syntax error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting ']' in /home/content/c/h/r/christee19/html/includes/adminfunctions_template.php(3596) : eval()'d code on line 150

This is likely caused by a malformed conditional statement. It is highly recommended that you fix this error before continuing, but you may continue as-is if you wish.
Reply With Quote
  #33  
Old 05-29-2008, 04:10 AM
militarytuners militarytuners is offline
 
Join Date: Oct 2007
Posts: 61
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Feckie (Roger) View Post
In Forum Home Template Find
Code:
<div><phrase 1="member.php?$session[sessionurl]u=$newuserid" 2="$newusername">$vbphrase[welcome_to_our_newest_member_x]</phrase></div>
Add The Following After


Code:
<script type="text/javascript" language="JavaScript">

//modified by Feckie December 10th 2005 (to show years)

//modified by Feckie Jan 18th 2006 
	//fixed years problem
	//rewrite math
	//account for leapyear
	//account for year/years text




/* ?![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(2004,10,24)

//STEP 2: Configure text to be attached to count up
var displaymessage="since $vboptions[bbtitle] - Forums 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","Aug","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)

	var daysInYear

	if ((todayy % 4)==0)
	{
		daysInYear=366;
	}
	else
	{
		daysInYear=365;
	}

years=Math.floor(((((dd/1000)/60)/60)/24)/daysInYear)
compDays=Math.floor((((dd/1000)/60)/60)/24)
days=Math.floor(((((dd/1000)/60)/60)/24)-(years*daysInYear))
compHours=Math.floor(((dd/1000)/60)/60)
hours=Math.floor((((dd/1000)/60)/60)-(compDays*24))
compMinutes=Math.floor((dd/1000)/60)
minutes=Math.floor(((dd/1000)/60)-(compHours*60))
compSeconds=Math.floor(dd/1000)
seconds=Math.floor((dd/1000)-(compMinutes*60))

	var yearText=""

	if (years > 1 || years < 1)
	{
		yearText="years";
	}
	else
	{
		yearText="year";
	}

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+years+ " "+yearText+", "+days+ " days, "+hours+" hours, "+minutes+" minutes, and "+seconds+" seconds "+displaymessage+closetags
setTimeout("countup()",1000)
}
/* ]]? */
</script>

Thanks. It works great on my site.
Reply With Quote
  #34  
Old 06-04-2008, 01:30 PM
GuaRRand GuaRRand is offline
 
Join Date: Oct 2005
Posts: 337
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

workx great!
Reply With Quote
  #35  
Old 06-05-2008, 10:06 AM
GuaRRand GuaRRand is offline
 
Join Date: Oct 2005
Posts: 337
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

K, found one thing wrong.
Quote:
Threads: 1,206, Posts: 26,221, Members: 105, Active Members: 41
Welcome to our newest member, kuip50
1 year, 181 days, 12 hours, 5 minutes, and 1 seconds since GLCOTI.COM came online!
It should show the last 3 members... and we already have new members..they dont show.
The new members registered AFTER i installed the counter thing...
Reply With Quote
  #36  
Old 06-15-2008, 02:33 PM
BigDog56 BigDog56 is offline
 
Join Date: Jan 2007
Posts: 430
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Just reinstalled this in 3.7.1 with TMS and it works like a charm!
Reply With Quote
  #37  
Old 06-29-2008, 06:28 AM
PoetJA-1975's Avatar
PoetJA-1975 PoetJA-1975 is offline
 
Join Date: Sep 2006
Location: Meh...
Posts: 1,218
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Yes! Still works - Thanx again for sharing!
/me Already Clicked Install :P

Jacquii.
Reply With Quote
  #38  
Old 03-31-2014, 08:11 PM
Mr. Burns Mr. Burns is offline
 
Join Date: Mar 2007
Posts: 63
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Anyone know of a version that works in v4.2
Reply With Quote
  #39  
Old 10-03-2014, 07:52 AM
Braders Braders is offline
 
Join Date: Apr 2007
Location: Moscow
Posts: 22
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Mr. Burns View Post
Anyone know of a version that works in v4.2
I just installed it using the code in post #32 by Feckie (Roger) on 4.2.2 and it works like a charm !
Reply With Quote
  #40  
Old 01-07-2016, 12:32 AM
akz645 akz645 is offline
 
Join Date: Jul 2015
Posts: 183
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Feckie's code still works on vBulletin 4.2.3!

AdminCP -> Styles & Templates -> Style Manger -> Forum Home Templates -> FORUMHOME (edit):

Find:
Code:
<p>{vb:rawphrase welcome_to_our_newest_member_x, {vb:link member, {vb:raw newuserinfo}}, {vb:raw newuserinfo.username}}</p>
Quote:
Originally Posted by Feckie (Roger) View Post
Add The Following After:
Code:
<script type="text/javascript" language="JavaScript">

//modified by Feckie December 10th 2005 (to show years)

//modified by Feckie Jan 18th 2006 
	//fixed years problem
	//rewrite math
	//account for leapyear
	//account for year/years text




/* ?![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(2004,10,24)

//STEP 2: Configure text to be attached to count up
var displaymessage="since $vboptions[bbtitle] - Forums 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","Aug","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)

	var daysInYear

	if ((todayy % 4)==0)
	{
		daysInYear=366;
	}
	else
	{
		daysInYear=365;
	}

years=Math.floor(((((dd/1000)/60)/60)/24)/daysInYear)
compDays=Math.floor((((dd/1000)/60)/60)/24)
days=Math.floor(((((dd/1000)/60)/60)/24)-(years*daysInYear))
compHours=Math.floor(((dd/1000)/60)/60)
hours=Math.floor((((dd/1000)/60)/60)-(compDays*24))
compMinutes=Math.floor((dd/1000)/60)
minutes=Math.floor(((dd/1000)/60)-(compHours*60))
compSeconds=Math.floor(dd/1000)
seconds=Math.floor((dd/1000)-(compMinutes*60))

	var yearText=""

	if (years > 1 || years < 1)
	{
		yearText="years";
	}
	else
	{
		yearText="year";
	}

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+years+ " "+yearText+", "+days+ " days, "+hours+" hours, "+minutes+" minutes, and "+seconds+" seconds "+displaymessage+closetags
setTimeout("countup()",1000)
}
/* ]]? */
</script>
Note:
You can edit that parts in red. You can edit more than that, but I wouldn't recommend it if you don't know what you're doing.
Reply With Quote
Reply


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

Forum Jump


All times are GMT. The time now is 10:32 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04624 seconds
  • Memory Usage 2,313KB
  • Queries Executed 26 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (6)bbcode_code
  • (4)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (6)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (9)postbit
  • (10)postbit_onlinestatus
  • (10)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_postinfo_query
  • fetch_postinfo
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete