Automatically changing copyright date

Дата добавления:
17.09.2016
Последнее изменение:
16.09.2016
Хиты:
4279
Рейтинг:
 
Голосовать:
Хорошо - Плохо

Ответ

Task

You need to output an actual copyright date (year) in a module.

Solution 1

Output current year in copyright date.

Set the DW Anything module settings as follows.

 

Setting Value Description
SQL Query select year(now()) cur_date

Enter SQL query to get the current date from MySQL server.

Note that you can use standard Joomla! '#_' prefix for database table names

Header HTML
Leave this blank
Template © {cur_date} Copyright by Your Company

Enter HTML code to display data row returned by SQL query.

To insert data field, type it's name enclosed within curly barckets ({})

Footer HTML

Leave this blank

Result

© 2016 Copyright by Your Company

Solution 2

Output the last content modification date in copyright.

Set the DW Anything module settings as follows.

 

Setting Value Description
SQL Query select year(max(modified)) content_date from #__content limit 1

Enter SQL query to get the last modification date from your site's content table.

Note that you can use standard Joomla! '#_' prefix for database table names

Header HTML
Leave this blank
Template © {content_date} Copyright by Your Company

Enter HTML code to display data row returned by SQL query.

To insert data field, type it's name enclosed within curly barckets ({})

Footer HTML

Leave this blank

Result

© 2016 Copyright by Your Company

Категория

Добавить комментарий


Защитный код
Обновить

SEO by Artio