Go Back   vb.org Archive > vBulletin Modifications > Archive > vB.org Archives > vBulletin 3.5 > vBulletin 3.5 Add-ons
FAQ Community Calendar Today's Posts Search

Reply
 
Thread Tools
Countdown Timer for your users Details »»
Countdown Timer for your users
Version: 1.12, by Hellcat Hellcat is offline
Developer Last Online: Apr 2014 Show Printable Version Email this Page

Version: 3.5.4 Rating:
Released: 02-09-2006 Last Update: 06-06-2006 Installs: 142
DB Changes Uses Plugins Template Edits
Additional Files  
No support by the author.

(inspired by this thread: https://vborg.vbsupport.ru/showthread.php?t=107226)

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"
  • Import the product .XML

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


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 "Yes" the timer will automatically be shown on the bottom of your sig, set to "No" will hide/disable the time display



Have fun


Update 1.10
[high]IF YOU UPDGRADE FROM A PREVIOUS VERSION, BE SURE TO UNISTALL THE CURRENTLY INSTALLED ONE BEFORE INSTALLING THE UPGRADE![/high]
(unfortunately all events will be lost)
  • [FIX] Phrased the last three things that were not (Yes/No of the enable radio and main description)
  • [NEW] Added Usergroup Permissions for the countdown!
    In the usergroupmanager it now has an area "User Countdown Permissions" where the admin can allow/enable or disallow/disable the countdown timer for each usergroup.

[high]If the usergroup permissions do not work, or even don't show up at all, you might need to rebuild the bitfield using this URL:[/high]
http://yourdomain.tld/pathtoforum/ad...buildbitfields

Show Your Support

  • This modification may not be copied, reproduced or published elsewhere without author's permission.
Благодарность от:
kraghen

Comments
  #122  
Old 06-07-2006, 02:37 PM
slickdawg slickdawg is offline
 
Join Date: May 2006
Posts: 14
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

The new version did the trick! Thanks a bunch hellcat!!!
Reply With Quote
  #123  
Old 06-08-2006, 03:37 AM
kidron kidron is offline
 
Join Date: May 2006
Posts: 13
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I uploaded the file and iimported "product-hc_usercountdown112.xml" in the "Manage Products" section, but still nothing changes under "Edit Options" in the UserCP .. am I missing something?
Reply With Quote
  #124  
Old 06-09-2006, 09:06 PM
Jeordie015 Jeordie015 is offline
 
Join Date: Nov 2002
Location: Illinois, USA
Posts: 125
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Okay, I admit it, I'm picky. I really like this hack, but there were a few things I wanted to change. First, I wanted to change it in the user CP so that the dropdown menu to select the month came before the day. I guess that's an American thing to prefer that. Anyway, I managed to do that. But the other thing that I wanted to change was the actual display in the posts so that there would be a space between the number and the measure of time and add commas where appropriate.

For example, currently the countdown would appear like this in a signature:
19days 1hours 20minutes

I would want it to appear like this:
19 days, 1 hour(s), 20 minutes

Is that possible?
Reply With Quote
  #125  
Old 06-09-2006, 10:33 PM
Hellcat Hellcat is offline
 
Join Date: May 2003
Location: Germany
Posts: 560
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by kidron
I uploaded the file and iimported "product-hc_usercountdown112.xml" in the "Manage Products" section, but still nothing changes under "Edit Options" in the UserCP .. am I missing something?
Make sure you set the usergroup permissions to allow using the contdown forall usergroups you want to be able to....


Quote:
Originally Posted by Jeordie015
But the other thing that I wanted to change was the actual display in the posts so that there would be a space between the number and the measure of time and add commas where appropriate.

I would want it to appear like this:
19 days, 1 hour(s), 20 minutes

Is that possible?
That's just another template edit.
It the.... erhm.....
[high]* Hellcat checks
[/high]
Ah, it's the "usercountdown_display" template - that hods the markup for the counter display, just edit this to your needs.

But the actual time display comes from the plugin itself....
[high]* Hellcat checks again
[/high]
Open ".../includes/plugins_usercountd.php", the actual time/counter display is constructed from line 209 to 219, you can change it there and add the commas and/or change positions and such.....
Reply With Quote
  #126  
Old 06-09-2006, 11:19 PM
Jeordie015 Jeordie015 is offline
 
Join Date: Nov 2002
Location: Illinois, USA
Posts: 125
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Thanks. I knew it wasn't in the template, and I figured it would be in one of the xml files, but I didn't know which one or where.

Hm...I'm not sure how to add spaces and commas where I want them. Can you help me out here?
Reply With Quote
  #127  
Old 06-10-2006, 01:07 AM
Hellcat Hellcat is offline
 
Join Date: May 2003
Location: Germany
Posts: 560
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

To add the commas, in plugin_usercountd.php change:

Line 213:
Code:
$counter = $remain["hours"] . $vbphrase["countdown_hours"] . " " . $counter;
to
Code:
$counter = $remain["hours"] . $vbphrase["countdown_hours"] . ", " . $counter;
Line 218:
Code:
$counter = $remain["days"] . $vbphrase["countdown_days"] . " " . $counter;
to
Code:
$counter = $remain["days"] . $vbphrase["countdown_days"] . ", " . $counter;
Reply With Quote
  #128  
Old 06-10-2006, 01:55 AM
rareclownfish rareclownfish is offline
 
Join Date: Mar 2006
Posts: 245
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Nice update
Reply With Quote
  #129  
Old 06-10-2006, 04:30 AM
kidron kidron is offline
 
Join Date: May 2006
Posts: 13
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

When importing the XML file I get this error "XML Error: unknown at Line 0"
Reply With Quote
  #130  
Old 06-10-2006, 04:38 AM
Hellcat Hellcat is offline
 
Join Date: May 2003
Location: Germany
Posts: 560
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by kidron
When importing the XML file I get this error "XML Error: unknown at Line 0"
You're using Zend?
Reply With Quote
  #131  
Old 06-10-2006, 02:27 PM
Jeordie015 Jeordie015 is offline
 
Join Date: Nov 2002
Location: Illinois, USA
Posts: 125
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Hellcat
To add the commas, in plugin_usercountd.php change:
Awesome. I figured out how to add the spaces myself using what you said. As you can probably tell, I'm not a coder, but I'm not dumb.

Anyway, nice hack. I like the idea. I'm just going to edit some things to make it look like I want.

I think another thing that at least I'm going to attempt to do is show the countdown on the main User CP page. Is there a way to display the current countdown on the main User CP page without it being in the signature?

I'm just thinking especially if it'll be possible to make multiple countdowns in the future, it would be cool to show them all on the main User CP page for the user's sake. Okay, I'm done babbling now. Just some ideas.
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 03:22 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.05642 seconds
  • Memory Usage 2,318KB
  • Queries Executed 25 (?)
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
  • (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
  • (4)pagenav_pagelink
  • (1)pagenav_pagelinkrel
  • (11)post_thanks_box
  • (1)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
  • (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_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete