Dynamic copyright year on footer

This public forum is for user-to-user discussions of PHPMaker. Note that this is not support forum.
Post Reply
ArtwareSolutions
User
Posts: 4

Dynamic copyright year on footer

Post by ArtwareSolutions »

Hi guys,
I am trying to obtain something like:

"©" . date("Y") . Language()->projectPhrase("FooterText")

to dynamically change the year of the copyright in the Site Footer Text in a multi-language project.

I suppose that the way to achieve it may be something like viewtopic.php?p=158599 or viewtopic.php?p=157570, but I can't guess how to concatenate the "©" . date("Y") with the data from Language()->projectPhrase("FooterText") directly in the project without changing any generated file or template.

Help will be really appreciated.
Thank you very much in advance.


arbei
User
Posts: 9434

Post by arbei »

You may use Language_Load server event to set project phrase, e.g.

$this->setProjectPhrase("FooterText", "©" . date("Y") . $this->projectPhrase("FooterText"));


ArtwareSolutions
User
Posts: 4

Post by ArtwareSolutions »

Thank you very much. It works perfectly.


vintoICT
User
Posts: 413

Post by vintoICT »

Cool


vintoICT
User
Posts: 413

Post by vintoICT »

// Get footer text from db.
    $footerstring = ExecuteScalar("SELECT `text` FROM `portalfootertext` WHERE id=1");
     $this->setProjectPhrase("FooterText", $footerstring);

Post Reply