• This forum has been archived. New threads and replies may not be made. All add-ons/resources that are active should be migrated to the Resource Manager. See this thread for more information.

Countdown Timer Cliptheapex.com

Status
Not open for further replies.
Updated: First post

Hi All.
This should eliminate your template edits once and for all. Was an easy process for me to just throw in the options. Ant, if you want me to demonstrate how for you some time let me know via PC and we'll set something up.

That would be cool...I'll def hit yah back really soon on that...like right after I catch up on the responses to questions I had the other day. ;-)

Hope it's okay for me to upload these modified files. Of course if it isn't okay, please feel free to remove this message.. the changes I made to the add-on itself were just to add some pretty simple options is all, and in the code I just made params available to the template, you're free to use them with zero attribution to myself of course.

Of course it is OK and thanks for doing this...I have been busy trying to learn how to do a few other things so I kind of became lax on updating anything and options is something I haven't touched yet as you know...so big ups to you bro.

I may even use it myself instead of the template edit I still have in place :D
slacker ;-)

P.S. I can see a few typos in the screenshot above: "donth of the year" for month and "day of the year" for year.
Fixed those typos up and re-uploaded the addon in the op.
 
Sorry for disturbing you, but it started to countdown already :)
I just reverted files in temptates into original. I changed something manually first and that's why it didn't worked.
uff... nice :)

now I'm wondering how to move up countdown clock above users online sidebars :confused:
 
LOL awesome...I was just about to wipe and install it to see if I could duplicate the issue.

I may or may not be updating this in a few days, (I have an idea for an additional option) pending that what I try works and is worth adding when I finish.

And of course...I'm not disturbed...or at least that is what my mother keeps telling me. ;)
 
Is there a way to put the countdown exactly where you want them on the sidebar?

I mean if you don't mind template edits and a little code shifting you could more than likely place the timer anywhere in the forum period. At the moment the only way that I would know how to place the thing exactly where I want in the sidebar would be to edit a default xf template.

sadsdasd.webp
 
First I will say that there is probably a few real dev's out there that will scream at me for doing it this way...but what do I know...I am not a developer.

I did that above by adding this where I wanted the countdown to appear
<xen:hook name="cta_countdown_custom_hook">
</xen:hook>

and then change the listener.php in /library/CTA/CDtimer/ so that it is looking for the templateHook
PHP:
<?php

class CTA_CDtimer_Listener
{
    public static function templateHook($hookName, &$contents, array $hookParams, XenForo_Template_Abstract $template)
    {
        switch ($hookName)
        {
            case 'cta_countdown_custom_hook':
            {
                $contents .= $template->create('cta_countdown_main', $template->getParams());
                break;
            }
        }
    }
}

If you leave the old listener where it is as a backup...changing the name will suffice for now.. change it to listener.php.ORIG for your reference and then you can just download this file and add it to the directory.

Now just play around adding <xen:hook name="cta_countdown_custom_hook"></xen:hook> where ever you want taking note of your changes.
 

Attachments

sorry, but I'm not familiar with "html"
which file shoud I open to paste that formula, if I want to place it like you did, below user's avatar.
<xen:hook name="cta_countdown_custom_hook">
</xen:hook>
in one of temptates? which one?
 
<xen:hook name="cta_countdown_custom_hook">
</xen:hook>

Template: sidebar_visitor_panel
above <xen:else />

hmgjfjfj.webp
 
If you log out of your forum....that is what it is right now :)

Edit: read your post wrong....I read it as you do not want visitors to see it...to enable it for guests...

paste the :
<xen:hook name="cta_countdown_custom_hook">
</xen:hook>

under the <xen:else /> as well...
 
the same situation in Mozilla - ZERO

did you set a time?

I did, but I set the wrong time, apparantly.

I set minutes and seconds to 60, instead of zero.

Mozilla was forgiving of my error, but not Chrome or IE, those *******s.:rolleyes:

Setting both to 0 works in all three browsers.
Code:
<script type="text/javascript">
jQuery(document).ready(function() {
    $('#countdown').countDown({
        targetDate: {
            'day':      1,
            'month':    1,
            'year':    2012,
            'hour':    12,
            'min':      0,
            'sec':      0,
            'utc':        true
        }
    });
});
</script>
 
Status
Not open for further replies.
Top Bottom