0
Welcome Guest! Login
0 items Join Now

Dynamic Copyright Date

    • Houston's Avatar
    • Houston
    • Elite Rocketeer
    • Posts: 1077
    • Thanks: 2

    Dynamic Copyright Date

    Posted 14 years 9 months ago
    • I found this article on using a dynamic copyright date but I am not seeing the code that they are referring to . I see it's an older post so perhpas it is outdated. Where would I put this code if I am using Zephyr?

      Thanks,
      Houston
    • Houston Brown - www.splitlightdesigns.com
      Apache Version = 2.2.2 / PHP Version = 5.2.17 or 5.3.15 (dual)
      mySQL Version = 5.5.21
      Joomla Version = 2.5.8 / Web Servers OS Version = CentOS 6
    • CogsInc's Avatar
    • CogsInc
    • Rocketeer
    • Posts: 75
    • Thanks: 0

    Re: Dynamic Copyright Date

    Posted 14 years 9 months ago
    • <?php $now = &JFactory::getDate(); echo $now->toFormat('%Y'); ?>

      zephyr I'm not sure... probably just in the base of the template look for the similar
      <div id="copyright">
                       © Copyright <span class="year"><?php $now = &JFactory::getDate(); echo $now->toFormat('%Y'); ?></span>, All Rights Reserved
      </div>
    • Houston's Avatar
    • Houston
    • Elite Rocketeer
    • Posts: 1077
    • Thanks: 2

    Re: Dynamic Copyright Date

    Posted 14 years 9 months ago
    • What file is this? you never say the name of the file? confused.
    • Houston Brown - www.splitlightdesigns.com
      Apache Version = 2.2.2 / PHP Version = 5.2.17 or 5.3.15 (dual)
      mySQL Version = 5.5.21
      Joomla Version = 2.5.8 / Web Servers OS Version = CentOS 6
  • Re: Dynamic Copyright Date

    Posted 14 years 9 months ago
    • /templates/rt_zephyr_j15/features/copyright.php

      Find:
      <span class="copytext"><?php echo $this->get('text'); ?></span>

      Replace with:
      <span class="copytext">&copy; yoursitenameorwhateveryouwant <?php $now = &JFactory::getDate(); echo $now->toFormat('%Y'); ?></span>

      Should work.
    • Joomla 1.5.20
      PhpBB 3.0.7 PL1
      p8pBB Bridge 1.3.4.

      Apache 2.2,MySQL 5.1,PHP 5.2.13.
    • Houston's Avatar
    • Houston
    • Elite Rocketeer
    • Posts: 1077
    • Thanks: 2

    Re: Dynamic Copyright Date

    Posted 14 years 9 months ago
    • Perfect thank you. I used this code as an alternative so I could still change the name without having to go into the code again. Do you see a problem with this code?
      <span class="copytext">&copy;<?php echo date('Y');?>&nbsp;<?php echo $this->get('text'); ?></span>
    • Houston Brown - www.splitlightdesigns.com
      Apache Version = 2.2.2 / PHP Version = 5.2.17 or 5.3.15 (dual)
      mySQL Version = 5.5.21
      Joomla Version = 2.5.8 / Web Servers OS Version = CentOS 6
  • Re: Dynamic Copyright Date

    Posted 14 years 9 months ago
    • Syntax seems correct, It should work. :)
    • Joomla 1.5.20
      PhpBB 3.0.7 PL1
      p8pBB Bridge 1.3.4.

      Apache 2.2,MySQL 5.1,PHP 5.2.13.

Time to create page: 0.118 seconds