vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vBulletin 4.x Add-ons (https://vborg.vbsupport.ru/forumdisplay.php?f=245)
-   -   vBulletin Forum Sideblocks - VC_Countdown (FORUM BLOCK) (https://vborg.vbsupport.ru/showthread.php?t=271797)

midnz 10-09-2011 10:00 PM

VC_Countdown (FORUM BLOCK)
 
1 Attachment(s)
D E S C R I P T I O N

Countdown timer for forum sidebars that is configurable from the admin control panel. This countdown timer will calculate the remaining time left to reach your targeted event according to the GMT Time Zone Offset that you have pre-set in the admincp (VC_Countdown options). This countdown will expire at the same moment in time for all viewers, regardless of their separate time zones.

You can count down to any future month/day/time within the next 12 months.

This countdown timer is ideal for counting down to:
- have competitors meet at the same time for tournaments on gaming servers (which is what I have used it for)
- for fixed term offers
- for items available in X days
- for sale begins in X days time
or for whatever else tickles your fancy.

This is a no-frills countdown timer but there are no files to upload to your server and there is no need to fiddle around with templates and codes to adjust the countdown expiry date.
You can easily adjust this countdown display to suit forum sidebar widths from 165px to 300px.

I N S T R U C T I O N S

1. Import Product
Plugins & Products / Manage Products / Add/Import Product
Import: product-vc_countdown.xml

2. Create Forum Block
Forums & Moderators / Forum Blocks Manager / Add Block

Select Block Type: Custom HTML/PHP
Title: Event Timer (or whatever you prefer)
Description: VC_Countdown Event Timer
Content Type: HTML
Content: <div></div>
Template to use: block_VC_Countdown

3. Configure VC_Countdown
Admincp / Settings / Options / VC_Countdown

________________________________________

PLEASE NOTE: I have only tested this as working on 4.0.8 PL4.
Confirmed working well on 4.1.3 by rammieone
________________________________________

Updates:
v1.0.3
Removed superfluous css
Added css to enable proper font-color control over all four strings of text
Added ability to include background image
v1.0.4
Added 4 levels of bgimage transparency
Added bgimage 100% height & width of forum block container
Removed option for image:repeat
Added padding options for between (Event Name & top of forum block) and (Event Name & Countdown Numbers)
v1.0.5
Removed "X Days from Now" option (If you don't experience save/default problems using version 1.0.4 there is no need to update to 1.0.5)

ProFifaLeagues 10-11-2011 05:19 AM

Confirmed working well on 4.1.3 too thank you

oldlock 10-11-2011 12:56 PM

Great mod. One question - any idea how to align the output so it's central in the block ? Std <center> tags don't seem to work. ?

socialteenz 10-11-2011 03:54 PM

Thank you.
INSTALLED.

midnz 10-11-2011 05:29 PM

Quote:

Originally Posted by oldlock (Post 2255897)
Great mod. One question - any idea how to align the output so it's central in the block ? Std <center> tags don't seem to work. ?

Have you set the 1st option "FORUM SIDEBAR WIDTH" correctly? That setting should centralise the output according to the width of your forum sidebar.

If you have already set that option correctly and the output is not properly aligned, would you mind providing a link for me to view and also list the browser you're using?

ceho 10-11-2011 07:19 PM

oldlock seems to be right, I have the same issue, width is set correctly, on Opera and FF. I am playing around with the mod, it's actually cool. The event name font color doesn't work from the ACP (condition is missing in the CSS of the template), but that's not a big deal. What I really don't get is to add any extra content to the block, whatever I try it's "only" showing the countdown, I cannot add an image or anything like this. Any idea how to solve this? Otherwise it's a great mod, I have been looking for something like this for a while :). Thanks!

Edit: never mind, I wrote the extras right into the template, that worked ;-).

midnz 10-11-2011 08:09 PM

Quote:

Originally Posted by ceho (Post 2256018)
oldlock seems to be right, I have the same issue, width is set correctly, on Opera and FF. I am playing around with the mod, it's actually cool. The event name font color doesn't work from the ACP (condition is missing in the CSS of the template), but that's not a big deal. What I really don't get is to add any extra content to the block, whatever I try it's "only" showing the countdown, I cannot add an image or anything like this. Any idea how to solve this? Otherwise it's a great mod, I have been looking for something like this for a while :). Thanks!

Edit: never mind, I wrote the extras right into the template, that worked ;-).

I noticed that I missed an option to change the font colour of the counter numbers ... oops! I've already added that option in to an updated .xml that I'm working on as well as removed some superfluous style code that either wasn't necessary or interfered with the alignment of the Expired Notice. (attached - removed attachment)

I'm not sure yet why the display might not be aligned properly for some people.
All of the text within the display should be aligned centre as per the style sheet within the template.
The main div was made to be 20px smaller than the width of the forum sidebar; IE: If your sidebar is 180px wide, and you select the first option (FORUM SIDEBAR WIDTH) at 180px, then the main countdown div would be reduced to 160px. So you could select the next higher option (FORUM SIDEBAR WIDTH) to see if that helps with alignment.

You might want to share how you managed to include a bgimage for the sake of others want to do that too.
You might also want to click that "Mark as Installed" button :)

oldlock 10-12-2011 11:08 AM

Thanks. Changing the width solved my issue.

midnz 10-13-2011 06:03 PM

Version 1.0.3
- added an option to include a background image
- tidied up some CSS

ProFifaLeagues 10-15-2011 07:00 PM

Update works great again with 4.1.3 Thanks mate superb work

exhibitionpoult 11-06-2011 11:58 PM

I have just installed this mod on 4.1.6 and it seems to be working fine.

KeystoneAirsoft 12-11-2011 10:45 PM

:( Not working on 4.1.8. Hope one day this is updated for new vers of vbulletin.

midnz 12-12-2011 05:18 PM

Quote:

Originally Posted by KeystoneAirsoft (Post 2276895)
:( Not working on 4.1.8. Hope one day this is updated for new vers of vbulletin.

I'm upgrading my own forum to 4.1.8 within the next 24 hours or so. I'll be see what the problem might be once that is done.

OldSchoolDSL 12-12-2011 07:20 PM

Quote:

Originally Posted by KeystoneAirsoft (Post 2276895)
:( Not working on 4.1.8. Hope one day this is updated for new vers of vbulletin.

Installed and working on 4.1.8 .... For a little over 1 month now.... :confused:

See for yourself.....

Http://www.SociallyUncensored.eu/forums/

I would suspect you have something conflicting. Try turning off all your other modifications and see if it works.

OldSchoolDSL 12-13-2011 06:52 AM

Confirmed working on

4.1.9 beta 1

But keep in mind this could change upon the release of 4.1.9 final.

So this should easily work for 4.1.8

midnz 12-15-2011 09:16 PM

1 Attachment(s)
Quote:

Originally Posted by KeystoneAirsoft (Post 2276895)
:( Not working on 4.1.8. Hope one day this is updated for new vers of vbulletin.

I've upgraded my own forum to 4.1.8 and, as already stated by OldSchoolDSL, it works.

I wonder if you might have missed following one of the instructions when you created your forum block (Template to use: block_VC_Countdown)?

You need to change the "Template to use" from "block_html" to "block_VC_Countdown" by simply typing it to that field.

Please see the attached image:

ttran 02-12-2012 10:33 PM

Tried to install on 4.1.10 it worked but just wonder if you can make 2 or more countdown events at the same time. That would be great.
THanks.

midnz 02-12-2012 11:33 PM

Quote:

Originally Posted by ttran (Post 2299075)
Tried to install on 4.1.10 it worked but just wonder if you can make 2 or more countdown events at the same time. That would be great.
THanks.

It's not possible to have more than one countdown using this mod in its current form.

Mr_Running 02-13-2012 01:42 AM

1 Attachment(s)
@midnz
4.1.10
I just downloaded and install and this warning come up in the vBAdmin CP

see attachment :)

midnz 02-13-2012 06:17 AM

Quote:

Originally Posted by Mr_Running (Post 2299124)
@midnz
4.1.10
I just downloaded and install and this warning come up in the vBAdmin CP

see attachment :)

Do you have [DBTech] User Status & Moods installed and with the Latest Status Block enabled? If so, read here. If not, let me know and I'll investigate further.

Mr_Running 02-13-2012 11:59 AM

Yes, I have it installed.
I had read that post but forgot about it. :) Thanks

I have installed others mods with the Latest Status Block enabled.
VC_Countdown was first mod I had seen the warning displayed.

Installed.
Cheers, :)

Merjawy 02-13-2012 05:49 PM

Installed on 4.1.10 and works great, only one issue for RTL boards, the numbers don't align with the tags..

seconds numbers are aligned with Days which is really weird to see the number of days change by the second :)

I guess I will have to edit the code


EDIT: Fixed the issue by editing the template to align the numbers with the right tags.. Works great so it looks...

Thanks

Mr_Running 02-13-2012 06:34 PM

TARGET DAY

When selecting
of the month
it works but when going back to the settings it defaults to
days from now

It Appears it may not take Daylight Saving Time into effect?
and
what about a leap year? 2012

midnz 02-13-2012 11:17 PM

Quote:

Originally Posted by Mr_Running (Post 2299340)
TARGET DAY
When selecting
of the month
it works but when going back to the settings it defaults to
days from now

Yes, I did notice that too. Eg; When selecting 24th of the month it defaults to 24 days from now (after saving the settings). The countdown isn't affected unless you press the save button again after it defaults to that different option. I don't know why it does that yet but it annoys me enough that I'll look in to it further when time permits.
Quote:

Originally Posted by Mr_Running (Post 2299340)
It Appears it may not take Daylight Saving Time into effect?
and what about a leap year? 2012

Daylight Saving Time:
I haven't tried counting down from standard time to a period within daylight savings time. Have you tried doing this and found the calculation not to be accurate?
Leap Years:
Calculations made, prior to Feb 29th of a leap year, that expire beyond Feb 29th should still be accurate.

Mr_Running 02-17-2012 03:58 PM

Yes, it appears to be off by one day and one hour.

midnz 02-17-2012 07:40 PM

Quote:

Originally Posted by Mr_Running (Post 2300547)
Yes, it appears to be off by one day and one hour.

Cheers for that.
Changing your GMT Offset option to that which will be accurate at the completion of the countdown should work. Maybe it would be wise for me to simply add that instruction.
Likewise, an instruction advising the consideration of an extra day to compensate for a calculation made prior to Feb 29th of a leap year and expiring after Feb 29th of a leap year should fix that issue. I'll look at adding an option that adds one day to the calculation where Feb 29th becomes an issue, knowing that I will need to do that before 2016.

tommyxv 03-08-2012 07:04 AM

Quote:

Originally Posted by midnz (Post 2299451)
Yes, I did notice that too. Eg; When selecting 24th of the month it defaults to 24 days from now (after saving the settings). The countdown isn't affected unless you press the save button again after it defaults to that different option. I don't know why it does that yet but it annoys me enough that I'll look in to it further when time permits.

Daylight Saving Time:
I haven't tried counting down from standard time to a period within daylight savings time. Have you tried doing this and found the calculation not to be accurate?
Leap Years:
Calculations made, prior to Feb 29th of a leap year, that expire beyond Feb 29th should still be accurate.

Any fix for this yet...It gets me everytime, when i edit it.

midnz 03-08-2012 07:29 AM

Quote:

Originally Posted by tommyxv (Post 2307367)
Any fix for this yet...It gets me everytime, when i edit it.

No sorry, I haven't had the opportunity to look at it yet. I'll try to make some time this weekend (it's Thursday night at the time of posting this) to resolve the issue.

tommyxv 03-08-2012 10:03 PM

Ok, cool. Thanks

midnz 03-10-2012 08:24 PM

Quote:

Originally Posted by Mr_Running (Post 2299340)
TARGET DAY
When selecting
of the month
it works but when going back to the settings it defaults to
days from now

Quote:

Originally Posted by tommyxv (Post 2307367)
Any fix for this yet...It gets me everytime, when i edit it.

Version 1.0.5
Removed the "X Days from Now" option to fix this issue.

tommyxv 03-10-2012 08:47 PM

Sweet. Thanks!

Mr_Running 03-10-2012 08:52 PM

Version 1.0.5
Excellent working on vB 4.1.11

Mr_Running 03-10-2012 09:04 PM

Quote:

Originally Posted by midnz (Post 2300611)
Cheers for that.
Changing your GMT Offset option to that which will be accurate at the completion of the countdown should work. Maybe it would be wise for me to simply add that instruction.
Likewise, an instruction advising the consideration of an extra day to compensate for a calculation made prior to Feb 29th of a leap year and expiring after Feb 29th of a leap year should fix that issue. I'll look at adding an option that adds one day to the calculation where Feb 29th becomes an issue, knowing that I will need to do that before 2016.

Yes, any chance to have Daylight savings and Leap year solved...factored in the settings.

Presently we have to deal with this all year. :p;) 2012.

Cheers.:)

wilford brimley 05-21-2012 03:20 AM

any way to have multiple counters?

midnz 05-21-2012 05:09 AM

Quote:

Originally Posted by wilford brimley (Post 2331175)
any way to have multiple counters?

Yes, there is a way to have multiple counters however that would mean coding a separate .xml for each new counter required. It's not something that I have the spare time to do honestly.

TheSupportForum 05-21-2012 03:34 PM

works in 4.1.12 thx, just what i needed

Hawk7173 06-07-2012 01:27 AM

Trying to get his to work in my side blocks instead of going across the bottom. I've changed the template to block_html in both the product and the block manager. Block shows, but not the timer....

Any ideas as to why?

midnz 06-07-2012 05:38 AM

Quote:

Originally Posted by Hawk7173 (Post 2337306)
Trying to get his to work in my side blocks instead of going across the bottom. I've changed the template to block_html in both the product and the block manager. Block shows, but not the timer....

Any ideas as to why?

The correct code to use can be found in an attached image in post #16 of this thread. See here for your convenience.
Have you typed "block_VC_Countdown" in the "template to use" field?

Hawk7173 06-07-2012 01:55 PM

I changed that to block_html as the side bar uses that template.

Hawk7173 06-07-2012 03:15 PM

I did some playing with the blocks manager and managed to get it to do what I wanted.

Thanks for the help.


All times are GMT. The time now is 10:45 PM.

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.01335 seconds
  • Memory Usage 1,839KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (17)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (40)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.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/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.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
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete