Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Days counter supports only 2 digits. This works fine if your counter is shorter than 100 days. But there are cases when a longer counter is required.
Comment | File | Size | Author |
---|
Comments
Comment #1
Miszel CreditAttribution: Miszel commentedWhen trying to apply the patch I am getting:
error: patch failed: js/jquery_countdown_timer.js:4
error: js/jquery_countdown_timer.js: patch does not apply
Comment #2
johnnykrisma CreditAttribution: johnnykrisma commentedi believe i screwed it up. let me try again and I will repost. Sorry, still a n00b.
Comment #3
SiliconMind CreditAttribution: SiliconMind commentedThis patch adds 3rd digit to the days counter. Not too pretty, but works. The problem is that the whole counter was coded with only 2 digits per "section" in mind, so the patch looks more like a hack :)
Comment #4
SiliconMind CreditAttribution: SiliconMind commentedDamn PHP habits. This patch will work for Chrome too.
Comment #5
jaesperanza CreditAttribution: jaesperanza commented#4 Patch works like a charm on D7, cross-browsers! Thanks!
Comment #6
Miszel CreditAttribution: Miszel commentedIs anyone interested in co-maintaining this module? I currently cannot afford the time to test and commit patches and finish the D8 version.
Comment #7
JoshDavies CreditAttribution: JoshDavies commentedI used what SiliconMind did but I made some minor adjustments to the output portion because I needed the formatting to stay the same even when adding a third digit to the days section.
Just replace the code at line 31 - 117 the line numbers are if you still have the commented section at the top. I hope this helps!
Comment #8
meckl CreditAttribution: meckl commentedHi everyone,
i'm new in drupal and javascript.
Your code works fine for me. I have changed the code a little bit for my claims
Right now it looks like this:
234
:12:32:12
Days
:Hours:Minutes:Seconds
But i want it to look like this:
234 Days
12:32:12
EDIT:
I got it :-)
Here is the Code:
Comment #9
Petergriggs CreditAttribution: Petergriggs commentedCan anyone upload the full working JS file ? I can't get the three digits to show ... :-(
Comment #10
aprilr CreditAttribution: aprilr commentedNone of these "patches" work for me and I also need 3 digit days to show up. Anyone?
Comment #11
aprilr CreditAttribution: aprilr commentedOk, so, just cutting and pasting the code did not work, but I was able to get it functioning using bits and pieces of the code snippets above. What I had at the end that is now working is below:
Comment #12
sfelder CreditAttribution: sfelder commentedThanks, #4 works - directed here from Code Karate
Comment #13
karolus CreditAttribution: karolus as a volunteer commentedJust tested the patch in #4--all appears to be operating normally at this time.
Comment #14
jlockhartI just applied the patch and tested. Works perfectly thanks.
Comment #15
mimran CreditAttribution: mimran as a volunteer commentedpatch was outdated with the latest release!
Comment #16
SajithAthukorala CreditAttribution: SajithAthukorala as a volunteer commentedComment #17
SajithAthukorala CreditAttribution: SajithAthukorala as a volunteer commentedSince new release update with showing weeks functionality this wont be continue ...