Go Back   vb.org Archive > vBulletin Modifications > vBulletin 4.x Modifications > vBulletin 4.x Add-ons

Reply
 
Thread Tools
Site Life Status for vB 4 Details »»
Site Life Status for vB 4
Version: 1.0.4, by Boofo Boofo is offline
Developer Last Online: Jun 2012 Show Printable Version Email this Page

Category: Forum Home Enhancements - Version: 4.x.x Rating:
Released: 05-31-2010 Last Update: 12-31-2010 Installs: 265
Uses Plugins Auto-Templates
Additional Files  
No support by the author.

Site Life Status for vB 4
Version 1.0.4
(By Boofo)

What does this product do?
This product will add a Site Life Status info area, including Site Startup Date, Site Age, Site Location, Pagehits counter and Average visits, to your forumhome What's Going On box.

NOTE: The maximum counter value will depend on your system. The maximum signed integer value for 32 bit systems is 2147483647 (or 2,147,483,647), while the maximum signed integer value for 64 bit systems is 9223372036854775807 (or 9,223,372,036,854,775,807). These are the highest numbers this counter will be able to count to, depending on your system.

Version Information:
Version 1.0.0 --Initial release for vB 4
Version 1.0.1 --Added Site Life Status Date Display Format option to settings.
Version 1.0.2 --Added Site Life Status Locale option to settings. This will allow you to display the Site Life Status Date Display Format day and month name in your local language.
Version 1.0.3 --Fixed for WGO style changes in vB 4.0.8. (Site_Life_Status_vb4.08.zip only)
Version 1.0.4 --Reverted back to the original js file because of the timer messing up with the added leap year code.

Credits:
A thank you goes out to Shawn Dean for supplying the original javascript code for the Site Age counter.

Installation overview:
-------------------------------
1 Product XML (5 Plugins, 36 Phrases, 1 template, 7 settings and 1 file)

-------------------------------
Installation Instructions:
-------------------------------
1. Upload site_life_status.js to the forums/clientscript folder on your site.

NOTE: You will need to delete the old site_life.js file as the new one has been renamed.

-------------------------------
2. Go to your Admin CP
Scroll down to 'Plugin System'
Click 'Manage Products'
Click 'Add/Import Product'
Click the 'Browse' button, and locate the product-boofo_site_lifestatus.xml file on your computer

3. Go to your Admin CP -> vBulletin Options -> Site Life Status and set the following options:
--Site Life Status Enable: Enable/Disable the Site Life Status.
--Site Life Status Startup Date: Enter your site startup date.
--Site Life Status Location: Type your site location in here. If you do not wish for your location to be shown, leave this option blank.
--Update the page views counter to the value below? If you want to change the current page views counter value on forumhome to the value provided below, set this to "Yes" - it will automatically be reset to "No" once the new value has been set (at the next page view).
--Site Life Status Forumhome Page Views Counter: Enter the number of page views, without commas, to start the page views count at. (Example: 16897)
--Site Life Status Locale: Set your system locale here. This will allow the Site Life Status Date Display Format below to display the month and day names in your local language.
--Site Life Status Date Display Format: Enter the date and time format you want the Site Startup Date to display on the forumhome.
-------------------------------

Done!
Enjoy!


Code:
if ($mark_as_installed != 'clicked')
{
	$you_get = 'squat';
}
else
{
	$you_get = 'support';
}

Download Now

File Type: zip Site_Life_Status_vb4.zip (6.6 KB, 332 views)
File Type: zip Site_Life_Status_vb4.08.zip (6.7 KB, 849 views)

Screenshots

File Type: png status_english.png (10.6 KB, 0 views)
File Type: jpg status_german.jpg (68.4 KB, 0 views)

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.
2 благодарности(ей) от:
Teascu Dorin, Techno Cowboy

Comments
  #262  
Old 03-30-2012, 10:00 AM
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Location: Des Moines, IA (USA)
Posts: 15,776
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by olalaaa View Post
Is there a way to make it only viewable for admins?
You would need to wrap the code in a conditional.
Reply With Quote
  #263  
Old 03-30-2012, 10:36 AM
Hippy's Avatar
Hippy Hippy is offline
 
Join Date: Dec 2001
Location: USA, New Jersey
Posts: 2,392
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by olalaaa View Post
Is there a way to make it only viewable for admins?
add
Code:
if ($vbulletin->userinfo['usergroupid'] == 6) 
{ 
======================================
Life Status Count Number Format                              
			forumhome_complete plugin here
between the brackets
======================================
}
If I remember correctly ife Status Count Number Format plugin

Code:
if ($vbulletin->userinfo['usergroupid'] == 6) 
{
if ($vbulletin->options['site_lifestatus_enable'] AND THIS_SCRIPT == 'index')
{
	$pagehits_counter = $vbulletin->boofocounter;
	$starttime = (TIMENOW - strtotime($vbulletin->options['site_lifestatus_startupdate']));

	$starthour = $starttime / 3600;
	$pagehits_hourly = vb_number_format($pagehits_counter / $starthour, 2);

	$startday = $starttime / 86400;
	$pagehits_daily = vb_number_format($pagehits_counter / $startday, 2);

	$startweek = $starttime / 604800;
	$pagehits_weekly = vb_number_format($pagehits_counter / $startweek, 2);

	$startmonth = $starttime / 2628000;
	$pagehits_monthly = vb_number_format($pagehits_counter / $startmonth, 2);

	$startyear = $starttime / 31536000;
	$pagehits_yearly = vb_number_format($pagehits_counter / $startyear, 2);

	$pagehits_counter = vb_number_format($pagehits_counter);

	if ($vbulletin->options['site_lifestatus_setlocale'])
	{
		setlocale(LC_TIME, $vbulletin->options['site_lifestatus_setlocale']);
	}
	else
	{
		setlocale(LC_TIME, 'en_US.utf8');
	}

	if ($vbulletin->options['site_lifestatus_datedisplay'])
	{
		$startdate = strftime($vbulletin->options['site_lifestatus_datedisplay'], strtotime($vbulletin->options['site_lifestatus_startupdate']));
	}
	else
	{
		$startdate = strftime('%A, %B %e, %Y at %l:%M %P', strtotime($vbulletin->options['site_lifestatus_startupdate']));
	}

	setlocale(LC_TIME, '');

	$boofo_status = vB_Template::create('boofo_site_lifestatus');
	    $boofo_status->register('pagehits_counter', $pagehits_counter);
	    $boofo_status->register('pagehits_hourly', $pagehits_hourly);
	    $boofo_status->register('pagehits_daily', $pagehits_daily);
	    $boofo_status->register('pagehits_weekly', $pagehits_weekly);
	    $boofo_status->register('pagehits_monthly', $pagehits_monthly);
	    $boofo_status->register('pagehits_yearly', $pagehits_yearly);
	    $boofo_status->register('startdate', $startdate);
	$template_hook['forumhome_wgo_pos3'] .= $boofo_status->render();
}
}
*warning I have not had my morning coffee

cause I'm thinking maybe the template needs the condition...
anyway the condition is correct ,, just got to add it to the right code ,,
Reply With Quote
  #264  
Old 03-30-2012, 10:45 AM
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Location: Des Moines, IA (USA)
Posts: 15,776
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Or:

Code:
if ($vbulletin->userinfo['usergroupid'] == 6) 
{
	$boofo_status = vB_Template::create('boofo_site_lifestatus');
	    $boofo_status->register('pagehits_counter', $pagehits_counter);
	    $boofo_status->register('pagehits_hourly', $pagehits_hourly);
	    $boofo_status->register('pagehits_daily', $pagehits_daily);
	    $boofo_status->register('pagehits_weekly', $pagehits_weekly);
	    $boofo_status->register('pagehits_monthly', $pagehits_monthly);
	    $boofo_status->register('pagehits_yearly', $pagehits_yearly);
	    $boofo_status->register('startdate', $startdate);
	$template_hook['forumhome_wgo_pos3'] .= $boofo_status->render();
}

I rewrote it and added a setting for what users/usergroups can view it for my site. Since it is a total rewrite, I won't be releasing it here.
Reply With Quote
  #265  
Old 05-29-2012, 07:53 PM
EasyEazy EasyEazy is offline
 
Join Date: Feb 2011
Posts: 151
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Installed and working great

Thanks for this mod
Reply With Quote
  #266  
Old 05-30-2012, 09:43 AM
Lord Singo Lord Singo is offline
 
Join Date: Apr 2008
Posts: 9
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Any chance of a widget to add to the CMS?
Reply With Quote
  #267  
Old 05-30-2012, 11:31 AM
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Location: Des Moines, IA (USA)
Posts: 15,776
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Since I don't use the CMS, there are 2 chances for this to happen: slim and none.
Reply With Quote
  #268  
Old 07-28-2012, 10:42 PM
Pure Dope Pure Dope is offline
 
Join Date: Dec 2006
Posts: 165
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

its saying the site is only 2 years old. its MUCH older than that.
Reply With Quote
  #269  
Old 07-28-2012, 11:11 PM
Alibass's Avatar
Alibass Alibass is offline
 
Join Date: Mar 2007
Posts: 615
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Are you using single digits in your date like April 1, 1930 if you are change it to April 01, 1930
Reply With Quote
  #270  
Old 07-29-2012, 12:15 AM
Pure Dope Pure Dope is offline
 
Join Date: Dec 2006
Posts: 165
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

i dont think i set a date anywhere.
Reply With Quote
  #271  
Old 07-29-2012, 12:28 AM
Alibass's Avatar
Alibass Alibass is offline
 
Join Date: Mar 2007
Posts: 615
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Mate you need to go into your admincp/options/site life status and setup your site status if you expect it to work...
Reply With Quote
Reply

Thread Tools

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 11:23 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04567 seconds
  • Memory Usage 2,348KB
  • 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
  • (4)bbcode_code
  • (2)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)modsystem_post
  • (1)navbar
  • (4)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (4)pagenav_pagelink
  • (1)pagenav_pagelinkrel
  • (11)post_thanks_box
  • (2)post_thanks_box_bit
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (1)post_thanks_postbit
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (4)postbit_attachment
  • (11)postbit_onlinestatus
  • (11)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_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
  • fetch_musername
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • post_thanks_function_fetch_thanks_bit_start
  • post_thanks_function_show_thanks_date_start
  • post_thanks_function_show_thanks_date_end
  • post_thanks_function_fetch_thanks_bit_end
  • post_thanks_function_fetch_post_thanks_template_start
  • post_thanks_function_fetch_post_thanks_template_end
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_attachment
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete