Implemented Current year variable

Floren

Well-known member
I was wondering if there is a specific year variable we can use into a phrase, for example xenforo_copyright. I bought the copyright removal and I personalized that phrase to match my needs. I would like to use inside that phrase, a variable that defines the current year. Thank you.
 
Upvote 0
This suggestion has been implemented. Votes are no longer accepted.
Having a reoccurring year being posted sounds illegal. By creating a variable that makes XenForo being copyrighted forever breaks UK laws. Which if I remember correctly, UK law states that typographical works only last from 25 years of the start of creation. I am not sure how code copyright works, but I would assume it is deemed as typographical work.
 
Having a reoccurring year being posted sounds illegal. By creating a variable that makes XenForo being copyrighted forever breaks UK laws. Which if I remember correctly, UK law states that typographical works only last from 25 years of the start of creation. I am not sure how code copyright works, but I would assume it is deemed as typographical work.
I'm not sure of the truth behind this so I'm not commenting on it, but the suggestion can merely be a variable for the current year, much like the $serverTime variable.

It doesn't have to be created for copyright purposes :)
 
It looks like to me XenForo Ltd. is doing it right by only having the year static from the time of creation of the code. What a user does with their forum is their business in my eyes. However, this thread is in the 'Suggestions: Tweaks & Small Features' board, so naturally I would assume they are asking XenForo Ltd. to consult legal counsel before implementing this change across their entire clientele.
 
You can use this:

Code:
{xen:date $serverTime, Y}
Do you happen to know off hand what other (would arguments be the correct term here?) time labels are available if any and what represents those...

Like, if this is year with Y representing current year
Code:
{xen:date $serverTime, Y}
What else can be used (month, day, etc) and what represents those?
 
Do you happen to know off hand what other (would arguments be the correct term here?) time labels are available if any and what represents those...

Like, if this is year with Y representing current year
Code:
{xen:date $serverTime, Y}
What else can be used (month, day, etc) and what represents those?


You can read about all of them here http://php.net/manual/en/function.date.php

For example, if you need year and month, use:

Code:
{xen:date $serverTime, Ym}

If you want day, use:

Code:
{xen:date $serverTime, d}

For year-month-day hour:minute:second, use:

Code:
{xen:date $serverTime, 'Y-m-d H:i:s'}
 
Ohh wow... so if I use xen:date $serverTime I can follow with any proper use of format as specified by the php date function?
 
Having a reoccurring year being posted sounds illegal. By creating a variable that makes XenForo being copyrighted forever breaks UK laws. Which if I remember correctly, UK law states that typographical works only last from 25 years of the start of creation. I am not sure how code copyright works, but I would assume it is deemed as typographical work.

This does not applies for me because I purchased the right to remove the copyright, as described into OP.
You can use this:
Code:
{xen:date $serverTime, Y}
Thank you, it does not work when I put it into a phrase.
Phrase text: xenforo_copyright
Phrase text: Axivo Inc. © {xen:date $serverTime, Y}
 
You will need to edit the phrase to include the year variable:
Axivo Inc. © {year}

And then pass that variable to the phrase:
{xen:phrase xenforo_copyright, 'year={xen:date $serverTime, Y}'}
 
That is why I suggested to be done as default in XenForo source code, yet is marked as implemented.
I was trying not to edit the template, thanks for the suggestion.
 
It's marked as implemented as you specifically asked "if there is a specific year variable we can use into a phrase, for example xenforo_copyright. I bought the copyright removal and I personalized that phrase to match my needs. I would like to use inside that phrase, a variable that defines the current year".

And the answer is yes, as posted above.

What about the suggestion do you feel is still not possible?
 
Top Bottom