Community @ The Turning Gate

Support community for TTG plugins and products.

You are not logged in.

#1 2014-12-28 09:31:42

Tom
Member
Registered: 2012-09-25
Posts: 20
Website

Automatic date in footer

My WordPress theme uses the following code to display the current year:

© 2013-<?php echo date('Y'); ?> John Doe. All Rights Reserved.

I would like to somehow modify my phplugins.php to do the same. It currently looks like this:

function ttg_footer( $style, $path ) {
    if (G_STYLE == 'CE2-WORDPRESS') {
        return true;
    } else {
        echo '

        <div id="custom_footer" class="footer">
        <div id="custom_footer_content">

        <p>&copy; 2013-2014 John Doe. All Rights Reserved.
        </p>

        </div>
        </div>

        ';
    }
    return false;
} // END

How can I achieve this?

Offline

#2 2014-12-28 10:42:27

rod barbee
Moderator
From: Port Ludlow, WA USA
Registered: 2012-09-24
Posts: 12,559
Website

Re: Automatic date in footer

I used this in my old CE3 site (from Daniel)

  ....
    <p>Copyright &copy; 1993-'.date("Y").' Rod Barbee, All rights reserved.</p>
   
.....

       

modify the classes of the surrounding markup as needed for CE2, if that's what you're still using or modify it with CE4 classes if that's what you're using.


Rod 
Just a user with way too much time on his hands.
www.rodbarbee.com
ttg-tips.com, Backlight test site

Offline

#3 2014-12-28 12:16:31

Tom
Member
Registered: 2012-09-25
Posts: 20
Website

Re: Automatic date in footer

Thank you very much!

Offline

#4 2015-09-18 07:56:35

rod barbee
Moderator
From: Port Ludlow, WA USA
Registered: 2012-09-24
Posts: 12,559
Website

Re: Automatic date in footer

Rod: You mentioned modifying the CE4 classes, but to what?

some css classes changed between CE2, CE3, and CE4. Those new classes would have to be used instead.

But if you're already using CE4, you don't need to modify any classes.
Just copy the existing footer source code from your already published page and use that.

You'll need to use the updated CE4 phplugins hook: ttg_footer_top
http://ce4.theturninggate.net/docs/doku … footer_top

It looks like this is the code you would need to copy:

<div class="collapse clearfix">

        <div id="attribution" class="collapse">
        

<h5><center><p>Map to Studio: <a href="http://kennethbenjaminreed.com/find-studio.jpg">2127 N Albina Ave Suite 212 Portland, OR 97227</a> - Copyright Kenneth Benjamin Reed 2015 - <a href="http://kennethbenjaminreed.com/privacy-policy ">Privacy Policy</a></center></p></h5>



        </div>
        
         
        <p id="back-to-top" class="back-to-top"><a href="#body-mantle"></a></p>

        </div>

I'd suggest changing the Map to Studio part to this, as <center> is deprecated.

<h5 style="text-align:center;">Map to Studio: <a href="http://kennethbenjaminreed.com/find-studio.jpg">2127 N Albina Ave Suite 212 Portland, OR 97227</a> - Copyright Kenneth Benjamin Reed 2015 - <a href="http://kennethbenjaminreed.com/privacy-policy ">Privacy Policy</a></h5>

Rod 
Just a user with way too much time on his hands.
www.rodbarbee.com
ttg-tips.com, Backlight test site

Offline

Board footer

Powered by FluxBB