Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • dieudonne Friend
    #185695

    Hello,

    we are trying to use countdown (very beautiful module) in a small module (see sreenshot in attachement).
    But it is not working very well.

    So my question is : how to resize manually the size of the 4 circles ?
    We found the way to do this for the texte but not for the circles.

    Thank in advance for any help.


    1. 2013-03-10_14h29_48
    Stork11 Friend
    #485982

    Hello dieudonne,

    The circles are background images, so they’re fixed in width and height. You can’t change them.

    Regards.

    dieudonne Friend
    #486056

    Thank for your answer.

    So maybe I can change the background image…
    In which file these images are loaded ?

    Stork11 Friend
    #486132

    Hello dieudonne,

    You don’t only resize background but also need to customize javascript code a lot.

    I am sorry to inform that we can’t support customization as it is beyond the support scope.

    Regards.

    dieudonne Friend
    #486379

    Ok, thank for your explanation.

    For other people who want a small countdown, try OSTimer :
    http://extensions.joomla.org/extensions/calendars-a-events/events/countdown/11723

    David Porré Friend
    #486868

    Hello,

    I also did need a smaller countdown.

    Using Layout 1, I changed in tmpl/layout1/layout.php :
    <canvas id=”canvas_days” width=”188″ height=”188″>
    to
    <canvas id=”canvas_days” width=”120″ height=”120″>

    I also changed in tmpl/layout1/js/jacclock.js :
    return (Math.PI/180)*deg – (Math.PI/180)*90
    to
    return (Math.PI/120)*deg – (Math.PI/120)*60

    and :
    var clock = {
    set: {
    days: function(){
    var cdays = $jacd(“#canvas_days”).get(0);
    var ctx = cdays.getContext(“2d”);
    ctx.clearRect(0, 0, cdays.width, cdays.height);
    ctx.beginPath();
    ctx.strokeStyle = glob.daysColor;

    ctx.shadowBlur = 10;
    ctx.shadowOffsetX = 0;
    ctx.shadowOffsetY = 0;
    ctx.shadowColor = glob.daysGlow;

    ctx.arc(94,94,85, deg(0), deg((360/glob.total)*(glob.total – glob.days)));
    ctx.lineWidth = 17;
    ctx.stroke();
    $jacd(“.clock_days .val”).text(glob.days);
    },

    hours: function(){
    var cHr = $jacd(“#canvas_hours”).get(0);
    var ctx = cHr.getContext(“2d”);
    ctx.clearRect(0, 0, cHr.width, cHr.height);
    ctx.beginPath();
    ctx.strokeStyle = glob.hoursColor;

    ctx.shadowBlur = 10;
    ctx.shadowOffsetX = 0;
    ctx.shadowOffsetY = 0;
    ctx.shadowColor = glob.hoursGlow;

    ctx.arc(94,94,85, deg(0), deg(15*glob.hours));
    ctx.lineWidth = 17;
    ctx.stroke();
    $jacd(“.clock_hours .val”).text(24 – glob.hours);
    },

    minutes : function(){
    var cMin = $jacd(“#canvas_minutes”).get(0);
    var ctx = cMin.getContext(“2d”);
    ctx.clearRect(0, 0, cMin.width, cMin.height);
    ctx.beginPath();
    ctx.strokeStyle = glob.minutesColor;

    ctx.shadowBlur = 10;
    ctx.shadowOffsetX = 0;
    ctx.shadowOffsetY = 0;
    ctx.shadowColor = glob.minutesGlow;

    ctx.arc(94,94,85, deg(0), deg(6*glob.minutes));
    ctx.lineWidth = 17;
    ctx.stroke();
    $jacd(“.clock_minutes .val”).text(60 – glob.minutes);
    },
    seconds: function(){
    var cSec = $jacd(“#canvas_seconds”).get(0);
    var ctx = cSec.getContext(“2d”);
    ctx.clearRect(0, 0, cSec.width, cSec.height);
    ctx.beginPath();
    ctx.strokeStyle = glob.secondsColor;

    ctx.shadowBlur = 10;
    ctx.shadowOffsetX = 0;
    ctx.shadowOffsetY = 0;
    ctx.shadowColor = glob.secondsGlow;

    ctx.arc(94,94,85, deg(0), deg(6*glob.seconds));
    ctx.lineWidth = 17;
    ctx.stroke();

    $jacd(“.clock_seconds .val”).text(60 – glob.seconds);
    }
    },

    to :
    var clock = {
    set: {
    days: function(){
    var cdays = $jacd(“#canvas_days”).get(0);
    var ctx = cdays.getContext(“2d”);
    ctx.clearRect(0, 0, cdays.width, cdays.height);
    ctx.beginPath();
    ctx.strokeStyle = glob.daysColor;

    ctx.shadowBlur = 10;
    ctx.shadowOffsetX = 0;
    ctx.shadowOffsetY = 0;
    ctx.shadowColor = glob.daysGlow;

    ctx.arc(60,60,50, deg(0), deg((360/glob.total)*(glob.total – glob.days)));
    ctx.lineWidth = 8;
    ctx.stroke();
    $jacd(“.clock_days .val”).text(glob.days);
    },

    hours: function(){
    var cHr = $jacd(“#canvas_hours”).get(0);
    var ctx = cHr.getContext(“2d”);
    ctx.clearRect(0, 0, cHr.width, cHr.height);
    ctx.beginPath();
    ctx.strokeStyle = glob.hoursColor;

    ctx.shadowBlur = 10;
    ctx.shadowOffsetX = 0;
    ctx.shadowOffsetY = 0;
    ctx.shadowColor = glob.hoursGlow;

    ctx.arc(60,60,50, deg(0), deg(10*glob.hours));
    ctx.lineWidth = 8;
    ctx.stroke();
    $jacd(“.clock_hours .val”).text(24 – glob.hours);
    },

    minutes : function(){
    var cMin = $jacd(“#canvas_minutes”).get(0);
    var ctx = cMin.getContext(“2d”);
    ctx.clearRect(0, 0, cMin.width, cMin.height);
    ctx.beginPath();
    ctx.strokeStyle = glob.minutesColor;

    ctx.shadowBlur = 10;
    ctx.shadowOffsetX = 0;
    ctx.shadowOffsetY = 0;
    ctx.shadowColor = glob.minutesGlow;

    ctx.arc(60,60,50, deg(0), deg(4*glob.minutes));
    ctx.lineWidth = 8;
    ctx.stroke();
    $jacd(“.clock_minutes .val”).text(60 – glob.minutes);
    },
    seconds: function(){
    var cSec = $jacd(“#canvas_seconds”).get(0);
    var ctx = cSec.getContext(“2d”);
    ctx.clearRect(0, 0, cSec.width, cSec.height);
    ctx.beginPath();
    ctx.strokeStyle = glob.secondsColor;

    ctx.shadowBlur = 10;
    ctx.shadowOffsetX = 0;
    ctx.shadowOffsetY = 0;
    ctx.shadowColor = glob.secondsGlow;

    ctx.arc(60,60,50, deg(0), deg(4*glob.seconds));
    ctx.lineWidth = 8;
    ctx.stroke();

    $jacd(“.clock_seconds .val”).text(60 – glob.seconds);
    }
    },

    The rest is just some CSS and images.

    It seems to work fine, only bug I have, is that I have no circle around the days, but I allready had that bug before making those changes..

    Hope this will help,
    Best regards,
    David aka Shapes

    tfosnom Friend
    #487278

    @david

    I have been doing the same mods and finally got the ‘days’ to display etc., then at 2 am changed something and now it doesn’t display the circle again, did you ever figure it out and can point me to what’s wrong?

    I have made mine into a module that can be installed if you want to PM me your email I’ll send it through to you for evaluation.

    Cheers Shannon

    krautela Friend
    #513808

    There seems to be a few more bugs in the module code :
    1) Layout 1 :
    jnow is not declared at line 138
    2) if the event start time and end time are different then countdown goes to event end time!! in fact event end time looks superflous for countdown.

    Saguaros Moderator
    #514303

    Hi krautela,

    <blockquote>jnow is not declared at line 138</blockquote>

    It’s a bug of this module, you can open that jacclock.js file and change from:

    now : jnow?jnow:jacdnow,

    To

    now : (typeof jnow != ‘undefined’ && jnow)?jnow:jacdnow,

    Regards

Viewing 9 posts - 1 through 9 (of 9 total)

This topic contains 9 replies, has 6 voices, and was last updated by  Saguaros 10 years, 11 months ago.

We moved to new unified forum. Please post all new support queries in our New Forum