Invision Community 4: SEO, prepare for v5 and dormant account notifications Matt November 11, 2024Nov 11
Posted August 31, 20204 yr Hello, I'm trying to get the copyright line to display the current year. Copyright ©️ LuzFaltex, LLC 2014-<?php echo date("Y"); ?>, all rights reserved <span id="elCopyright_userLine">Copyright ©️ LuzFaltex, LLC 2014-<!--?php echo date("Y"); ?-->, all rights reserved</span> I have also tried using template syntax, but this just gets rendered raw. <span id="elCopyright_userLine">Copyright ©️ LuzFaltex, LLC 2014-{{date("Y")}}, all rights reserved</span> I tried searching for this copyright line in the templates, but neither the global nor footer templates have any mention of this. The footer template ends with the "Contact Us" link and the global template just references the footer and then moves on to javascript. Is there a way that I can do what I'm trying to accomplish here or do I need to just opt for no copyright line and then create it myself manually by modifying the footer template? Edited August 31, 20204 yr by Foxtrek_64 Fix code blocks
August 31, 20204 yr Author 35 minutes ago, Ryan Ashbrook said: {expression="date('Y')"} Try that. Hi Ryan, Thanks for the response. Unfortunately this also renders as raw text. Copyright line text: Copyright ©️ LuzFaltex, LLC 2014-{expression="date('Y')"}, all rights reserved Rendered text: <span id="elCopyright_userLine">Copyright ©️ LuzFaltex, LLC 2014-{expression="date('Y')"}, all rights reserved</span>
August 31, 20204 yr Community Expert 1 hour ago, Foxtrek_64 said: Is there a way that I can do what I'm trying to accomplish here or do I need to just opt for no copyright line and then create it myself manually by modifying the footer template? Correct. 🙂
August 31, 20204 yr Author 18 minutes ago, Paul E. said: Are you trying to do this in the ACP copyright option or editing the templates? Through the ACP. 16 minutes ago, DawPi said: Correct. 🙂 I'll do it through the templates. That seems the easiest option here.
August 31, 20204 yr With javascript? <script type='text/javascript'>document.write(new Date().getFullYear());</script>
August 31, 20204 yr Author 4 minutes ago, Ioannis D said: With javascript? <script type='text/javascript'>document.write(new Date().getFullYear());</script> I was able to get it with modifying the template. I'm not unfamiliar with template modifications, but I was trying to figure out if I could do it with the built-in copyright text system.
August 31, 20204 yr Community Expert Just now, Foxtrek_64 said: I was able to get it with modifying the template. I'm not unfamiliar with template modifications, but I was trying to figure out if I could do it with the built-in copyright text system. Oh, no that is made for just simple plaintext. If you want to do dynamic things like JavaScript or PHP, then the templates would need to be modified. 🙂