Header Counter

Responsive Joomla events template to create conference, festival and other big-name event website.
Rate this topic: Evaluations: 1, 1.00 on the average.Evaluations: 1, 1.00 on the average.Evaluations: 1, 1.00 on the average.Evaluations: 1, 1.00 on the average.Evaluations: 1, 1.00 on the average.Evaluations: 1, 1.00 on the average.1.00 out of 6 based on 1 vote(s)
GK User
Mon May 20, 2013 11:49 am
Reply with quote
Report this post
Hi I would like to use the header as a simple money counter instead of a date countdown:

Total amount of money raised for our clients
£750,000

Can you please edit this so that the counter will stop at £1,000,000

So I am assuming this something that can be edited in the following code?

<div
class="gk-jscounter gk-scale-up"
data-dateend="2-6-2013"
data-timeend="19:42"
data-timezone="+2"
data-start="{opacity:0}"
data-end="{opacity:1}"
data-delay="900"
data-time="500"
>
Counting finished!
</div>

Thanks for your help in advance.
User avatar
Fresh Boarder

GK User
Mon May 20, 2013 12:57 pm
Reply with quote
Report this post
You would like there a normal counter, not connected to any data providen?
When should it reach 1.000.000?
User avatar
Moderator

GK User
Mon May 20, 2013 3:13 pm
Reply with quote
Report this post
Correct - I just want a Normal counter which would count up every second. An example would be:

"For our clients we have raised

£750,000"

And every second it would go up by £1.

So basically I just need the counter to count up
User avatar
Fresh Boarder

GK User
Mon May 20, 2013 3:16 pm
Reply with quote
Report this post
Its not that easy, because if You setup it to count from 750.000 up everytime user refreashes page, counter starts again from 750000.
Better solution would be to setup a time when counter should reach 1.000.000, and then calculate number basing on time difference between now and counter end limit.
Is that a way that satisfies You?
User avatar
Moderator

GK User
Mon May 20, 2013 4:54 pm
Reply with quote
Report this post
Hi Thanks for your reply.

That sound's great - how would I do this?

Is there some code you can give me to try?

Thanks,
User avatar
Fresh Boarder

GK User
Tue May 21, 2013 12:30 pm
Reply with quote
Report this post
Last question - is it J2.x or J3.x?
User avatar
Moderator

GK User
Tue May 21, 2013 3:38 pm
Reply with quote
Report this post
That's okay - it is J2.5
User avatar
Fresh Boarder

GK User
Tue May 21, 2013 7:46 pm
Reply with quote
Report this post
Ok, sadly replacing time counter with theoretically simpler version needs a lot of custom coding to do.

The place to start is /templates/gk_fest/js/gk.script.js where all javascript counter code resides.
You should also edit a module with name "header" that is posted under "header" position, edit its html and replace:
Code: Select all
<div class="gk-jscounter gk-scale-up" data-dateend="21-06-2013" data-timeend="19:42" data-timezone="+2" data-start="{opacity:0}" data-end="{opacity:1}" data-delay="900" data-time="500">Counting finished!</div>

with end date as I mentioned before, and which end date is used by javascript to count the difference.
User avatar
Moderator


cron