Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.7 > vBulletin 3.7 Add-ons

Reply
 
Thread Tools
Countdown Timer in signature Details »»
Countdown Timer in signature
Version: 1.3.00, by Howell Howell is offline
Developer Last Online: Oct 2014 Show Printable Version Email this Page

Category: Profile Enhancements - Version: 3.7.x Rating:
Released: 06-13-2008 Last Update: 06-13-2008 Installs: 181
Uses Plugins Auto-Templates
Additional Files  
No support by the author.

Original Modification by Hellcat

Previous versions:
vB3.5.x "User Countdown Timer".
vB3.6.x "User Countdown Timer".


I have taken the original modification and simply edited templates to get it working with vB3.7.x

Note: I did not write the original modification so support of this release may be limited.

This little AddOn gives your users the option to show a custom countdown timer at the bottom of their signature.

Features:
  • Fully configurable via UserCP (see screenshot)
  • BB-Code can be used for eventname and overmessage
  • fully phrased/templated, nothing hardcoded and so fully customizable
  • leading days or hours with a value of "0" are not shown
    (so it shows "42minutes" rather then "0days 0hours 42minutes")
Installation:
Painless:
  • Upload "plugins_usercountd.php" to ".../forum/includes"
  • Upload "bitfield_hc_countdown.xml" to ".../forum/includes/xml"
  • Import the product .XML
You may also need to rebuild your languages after the install.
This can be done by going to:
AdminCP - Laguages & Phrases -> Language Manager -> Rebuild all languages

DONE
That's it.
No template edits, no nothing


Usergroup permission:
Go to -> AdminCP -> Usergroups -> Usergroup Manager -> User Countdown Permissions


Members Usage:
Go into your UserCP -> Edit Options
On the very bottom you will find the options for the Countdown Timer.
Set it to whatever you like, if "Enable" is set to "ON" the timer will automatically be shown on the bottom of your sig, set to "OFF" will hide/disable the time display.

Please MARK AS INSTALLED & NOMINATE FOR MOTM

Enjoy.

Supporters / CoAuthors

Show Your Support

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

Comments
  #102  
Old 12-30-2008, 03:03 PM
x YNWA x x YNWA x is offline
 
Join Date: Jun 2007
Posts: 119
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Hi
I have this intalled, it is enabeld in admincp, enabled in usergroup and also ive gone into usercp and put the time and date on and enabled it but nothing appears in my sig...
Reply With Quote
  #103  
Old 12-30-2008, 03:16 PM
x YNWA x x YNWA x is offline
 
Join Date: Jun 2007
Posts: 119
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Its ok, I put something in my sig and it works. Shame you actually have to do that to get it to work. Ill probably uninstall it and buy one that lets you include pictures, good mod though.
Reply With Quote
  #104  
Old 01-10-2009, 11:09 PM
stuartn stuartn is offline
 
Join Date: Apr 2006
Posts: 81
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I would like to have it when the counter reaches the end it then set's the function to "Off".

Any idea's on how to do this ?

Modded the code slightly to add more fields which all work fine, now I would like an auto reset if possible.
Reply With Quote
  #105  
Old 01-12-2009, 07:36 PM
Megatr0n Megatr0n is offline
 
Join Date: Jul 2007
Posts: 455
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Anyone got it working for 3.8?
Reply With Quote
  #106  
Old 01-25-2009, 12:24 AM
bw1 bw1 is offline
 
Join Date: Apr 2007
Posts: 4
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Megatr0n View Post
Anyone got it working for 3.8?
Works
Reply With Quote
  #107  
Old 01-25-2009, 03:50 AM
inciarco's Avatar
inciarco inciarco is offline
 
Join Date: Mar 2007
Posts: 758
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Great Mod, Thank You For Sharing It. :up:

One Idea: It would be really nice also to be able to see the CountDown Information on the Member Profile on the Statistics Tab. And Perhaps to Allow the User to Choose where to Display the Countdown (On Postbit, On Profile, On Both Postbit and Profile).

My Best Regards.

Reply With Quote
  #108  
Old 01-25-2009, 03:54 AM
asking asking is offline
 
Join Date: Aug 2008
Posts: 58
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

whats use of this mod ?
Reply With Quote
  #109  
Old 01-25-2009, 04:49 AM
inciarco's Avatar
inciarco inciarco is offline
 
Join Date: Mar 2007
Posts: 758
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

This Mod Can be Used as a Reminder for an Event of the User.


I'd Like to Share the Inclusion of the CountDown on the User Profile (If Someone knows a Better Way to do This would be Nice to Share it. ):


Step 1: Edit File plugins_usercountd.php and after that Upload it on the "includes" Folder, Overwriting the Existing File, (the one you Uploaded when Installed this Mod).

Include at the end of the File, before the Code ?> the Following Code:

Code:
// ********************************************************************** \\

if ( $THIS_HOOK == "member_profileblock_fetch_unwrapped" )
{
    $cdfield = "field" . $vbulletin->options["countdownfield"];
    $query = $vbulletin->db->query_read( "SELECT $cdfield FROM " . TABLE_PREFIX . "userfield WHERE userid='" . $userinfo["userid"] . "';" );
    $result = mysql_fetch_array( $query );
  
    $cddata = unserialize( str_replace( """, '"', $result[$cdfield] ) );
  
    if ( $cddata["enabled"] == "Yes" )
	{

	  require_once( "./includes/class_bbcode.php" );
	  require_once( "./includes/functions_newpost.php" );
	  $vbulletin->cdbbcode_parse =& new vB_BbCodeParser($vbulletin, fetch_tag_list());
	  
	  $eta = mktime ( intval( $cddata["hour"] ), intval( $cddata["minute"] ), 0, intval( $cddata["month"] ), intval( $cddata["day"] ), intval( $cddata["year"] ) );
	  $tremain = $eta - time();
	  if ( $tremain > 0 )
	  {
	    $t = $tremain;
	    $remain["days"] = intval ( $t / 86400 );
		$t = $t - ( $remain["days"] * 86400 );
		$remain["hours"] = intval ( $t / 3600 );
		$t = $t - ( $remain["hours"] * 3600 );
		$remain["minutes"] = intval ( $t / 60 );
		
		$counter = $remain["minutes"] . $vbphrase["countdown_minutes"];
		
		if ( ( $remain["hours"] != 0 ) OR ( $remain["days"] != 0 ) )
		{
		  $counter = $remain["hours"] . $vbphrase["countdown_hours"] . " " . $counter;
		}
		
		if ( $remain["days"] != 0 )
		{
		  $counter = $remain["days"] . $vbphrase["countdown_days"] . " " . $counter;
		}
	  } else {
	    $counter = $vbulletin->cdbbcode_parse->parse(convert_url_to_bbcode($cddata["overmsg"]), 'nonforum');
	  }
	  $event = $vbulletin->cdbbcode_parse->parse(convert_url_to_bbcode($cddata["event"]), 'nonforum');
	  
	}
}

Step 2: Create Plugin.

On Admin Control Panel (ACP) -> Plugins and Products -> Add New Plugin

Product: vBulletin
Hook Location: member_profileblock_fetch_unwrapped
Title: User CountDown - Block Statistics
Execution Order: 5
Plugin is Active: Yes
Plugin PHP Code:

Code:
$THIS_HOOK = "member_profileblock_fetch_unwrapped";

require( "./includes/plugins_usercountd.php" );
Click the "Save" Button to Save New Plugin.


Step 3: Edit Template "memberinfo_block_statistics"

Find at the End of the Template

$template_hook[profile_stats_last]

Before that Add:

Code:
<!-- Start User Countdown memberinfo_block_statistics -->

<if condition="$counter">

<fieldset class="fieldset">
<legend>$vbphrase[countdown_title]</legend>

<strong>$vbphrase[countdown_counting_down_to]:</strong> $event <br />
<em>$counter</em>

</fieldset>

</if>

<!-- End User Countdown memberinfo_block_statistics -->
Step 4: ENJOY! That's It


My Best Regards.

Reply With Quote
  #110  
Old 01-25-2009, 02:32 PM
Daisyboo Daisyboo is offline
 
Join Date: Jul 2008
Location: Somerset UK
Posts: 174
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Worked perfectly adding it to profiles, thanks!
Reply With Quote
  #111  
Old 01-25-2009, 05:13 PM
Howell Howell is offline
 
Join Date: Apr 2007
Location: UK
Posts: 110
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks inciarco, I may update this to include that feature.
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:27 PM.


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.14147 seconds
  • Memory Usage 2,311KB
  • 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
  • (3)bbcode_code
  • (1)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
  • (4)pagenav_pagelink
  • (11)post_thanks_box
  • (11)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (11)post_thanks_postbit_info
  • (10)postbit
  • (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
  • 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