• Page 1 of 1
  • 1
Forum moderator: bigblog  
What's the code for Modified Date?
khen
Posts: 475
Reputation: 13

Message # 1 | 4:39 PM
hi uCoz, if there's a code for date of addition ($ADD_DATE$), what's the code for the date modified?

Date modified is very important for the Schema Mark-up to provide snippets to search engine.

Post edited by khen - Monday, 2018-03-19, 4:41 PM
Gromov
Posts: 616
Reputation: 14

Message # 2 | 2:00 PM
Hello khen,

The 'Update entry editing date' option changes the editing date, it displays the result from the $LASTMOD$ (timestamp of last entry modification) variable.
khen
Posts: 475
Reputation: 13

Message # 3 | 5:19 AM
Gromov, how to format that into a real date (e.g. March 22, 2018)?
Gromov
Posts: 616
Reputation: 14

Message # 4 | 9:43 AM
khen, it's not possible to modify it, sorry.
khen
Posts: 475
Reputation: 13

Message # 5 | 9:44 AM
Gromov, even in javascript?
Gromov
Posts: 616
Reputation: 14

Message # 6 | 12:37 PM
khen, yes
khen
Posts: 475
Reputation: 13

Message # 7 | 12:40 PM
What's the use of the $LASTMOD$ if it's not readable by humans?
Gromov
Posts: 616
Reputation: 14

Message # 8 | 12:53 PM
khen, it's not a question I can answer, unfortunately. You can always ask the manager in charge of the VIP users if they can assist you with this one. It'll be the best solution for you.
ket311288vry
Posts: 5
Reputation: 0

Message # 9 | 9:31 PM
The value between the < lastmod>< /lastmod> tags is updated every time the site map is regenerated and sets the date and time of the regeneration script execution there in the format necessary for search robots, for example: the module Installation is installed as usual, through the standard add-on installer in the admin area. Copy the module code into a text file called lastmod..xml and save, load it into the installer through the admin panel and update the modifier cache after installation

Added (2018-04-07, 9:31 PM)
---------------------------------------------

Quote khen ()
Какая польза от $ LASTMOD $,


it is used in scripts to check whether the current document should be reloaded or not. we will get high speed site indexing and low load on the server, but this is only if everything is correctly configured
Attachments: 5789600.jpg (19.8 Kb)
Post edited by ket311288vry - Saturday, 2018-04-07, 9:23 PM
joexyz
JOE-vascript
Posts: 1770
Reputation: 78

Message # 10 | 5:03 PM
It is possible via JavaScript.

Code
<script type="text/javascript">
  const modDate = new Date($LASTMOD$ * 1000)

  const modYear = modDate.getFullYear(),
        modMonth = modDate.getMonth(),
        modDay = modDate.getDay()
    let modHr = modDate.getHours(),
        modMin = modDate.getMinutes()
        
  if (modHr.toString().length < 2) modHr = '0' + modHr
  if (modMin.toString().length < 2) modMin = '0' + modMin

  document.write(`${modMonth}/${modDay}/${modYear} ${modHr}:${modMin}`)
</script>

hey i'm joe and i do not work for the company anymore, please contact other staff or tech support
icon by ch-chau

sometimes i lurk here
Elexy
Posts: 93
Reputation: 2

Message # 11 | 7:56 PM
Attachments: 5109592.png (125.3 Kb)

Proud Ucoz Member Since 2013
Warning: Do not trust Zayaan Ibrahim with projects, he will scam you by overpricing!
♥ http://rawtrex.com/ ♥
Post edited by Elexy - Monday, 2018-04-09, 8:35 PM
joexyz
JOE-vascript
Posts: 1770
Reputation: 78

Message # 12 | 7:58 PM
goodness gracious
hey i'm joe and i do not work for the company anymore, please contact other staff or tech support
icon by ch-chau

sometimes i lurk here
khen
Posts: 475
Reputation: 13

Message # 13 | 11:37 PM
bigblog, thanks for the suggestion. cool
  • Page 1 of 1
  • 1
Search: