deano87
Member
Registered: 21st Oct 06
Location: Bedfordshire Drives: Ford Fiesta
User status: Offline
|
I look after our company website which is in the process of being upgraded to Joomla 2.5. I suspect this will be supported in that version other than our current v1.5.
We have a page on our website that reads this:
quote: The Storage Equipment Centre (SEC) Ltd was originally formed in 1998. It has grown to become one of the UK's largest independent suppliers of warehouse storage solutions, pallet racking systems and commercial interior fit out & refurbishment works.
Over the past 14 years, the company has grown from a select few warehouse fit out experts to a 30 strong team of people dedicated to supplying the highest levels of service & quality installations.
Now someone has pointed out 1998 was 15/16 years ago, so the 14 years was correct when the site was first published.
Is there any code or plugin that can be used to autoupdate the 14 years on a certain anniversary?
(Excuse the poor copy as this page is also going to be updated in the future once our v2.5 site is live).
|
Steve
Premium Member
Registered: 30th Mar 02
Location: Worcestershire Drives: Defender
User status: Offline
|
you could do it in php easily if you can output in php..have a look at the date function the rest is simple maths
[Edited on 14-02-2014 by Steve]
|
deano87
Member
Registered: 21st Oct 06
Location: Bedfordshire Drives: Ford Fiesta
User status: Offline
|
I'm not techy enough to understand PHP
Not a major issue. Set a reminder in my diary for 5th January 2015 to update it, if the copy is the same then
|
Nismo
Member
Registered: 12th Sep 02
User status: Offline
|
As Steve said PHP is the answer, failing that I would just change the text to say.
"Since the company was formed it has grown from..."
Or something along those lines.
|
Balling
Premium Member
Registered: 7th Apr 04
Location: Denmark
User status: Offline
|
As per reply above, clever phrasing is going to be a much better/easier solution than clever coding.
|
Dom
Member
Registered: 13th Sep 03
User status: Offline
|
quote: Originally posted by Balling
As per reply above, clever phrasing is going to be a much better/easier solution than clever coding.
I'd word it differently but you could just use JS on the page -
quote: <script type="text/javascript">document.write((new Date().getFullYear()) - 1998);</script>
[Edited on 14-02-2014 by Dom]
|
Ian
Site Administrator
Registered: 28th Aug 99
Location: Liverpool
User status: Offline
|
If you're using JS, have a fall back.
If you've got spare processor cycles, use PHP.
If you have PHP hosting but can't work it out, code snippet would be easy.
I personally wouldn't use client side where I can avoid it.
|
ed
Member
Registered: 10th Sep 03
User status: Offline
|
<?php echo date('Y') - 1998; ?>
Though I'd guess that Joomla will prevent you from putting inline PHP into a page so you might not be able to do it that way.
|
deano87
Member
Registered: 21st Oct 06
Location: Bedfordshire Drives: Ford Fiesta
User status: Offline
|
Ok thanks guys
|