How to update footer in Gallery 3.0.9?

29 views
Skip to first unread message

Mark

unread,
Jan 1, 2021, 2:06:47 PM1/1/21
to Gallery 3 Users
Happy New Year!

I have an old Gallery 3 (v3.0.9) site running with a hard coded copyright year in the footer. I need to update the year to 2021, and it has been so long since I touched the site that I don't remember how to do that. Also, is there a way to make the year roll over automatically?

I grepped the /var/www/gallery directory for the copyright string, but nothing came up. I assume it is a line in a footer template somewhere, but I don't know where.

Thanks!

Mark

Mark

unread,
Jan 1, 2021, 3:05:36 PM1/1/21
to Gallery 3 Users
I found the solution! Admin -> Appearance -> Theme Options. There is a footer section.

I still would like to have the copyright date (ie the current year) roll over automatically. Is there a way to do that?

I have the string "Copyright (C) xxxxx 2001-2021" in the footer. I would like to have the 2021 rollover automatically to 2022 next year. I tried inserting <?= date("Y") ?> in for the year, but all that appears in the footer is "Copyright (C) xxxxx 2001-". Can I put something in the footer for the current year so it rolls over automatically each year?

Thanks!

Mark

Mark

unread,
Jan 1, 2021, 3:22:33 PM1/1/21
to Gallery 3 Users
I came up with one solution that feels like a hack. Is there a more "Gallery3" way of doing this?

In the footer text I put
Copyright (C) xxxxx 2001-<span id="copyright-year"></span>.

In the theme/js/ui.init.js (themes/wind/js/ui.init.js) I added at the bottom:
  var date = new Date().getFullYear();
  document.getElementById("copyright-year").innerHTML = date;

Is there a more idiomatic way to accomplish this goal in the Gallery3/php world?

Thanks!

Mark

JR

unread,
Jan 1, 2021, 9:16:49 PM1/1/21
to gallery...@googlegroups.com

Mark,

Actually, what you've come up with is much closer to a "Gallery3" way of doing it that I was going to sugget -- which is a short bit of PHP script which that work in one of my non-Gallery sites. Not even sure that one could be inserted into the standard Gallery footer text like yours.

-- J.R.

--
WHEN USING AN EMAIL PROGRAM to reply to this message, click REPLY TO LIST or REPLY TO ALL so your reply goes out to everyone in the group. If you click REPLY or REPLY TO SENDER Google will *only* send your reply to the original author (not recommended).
 
To post a NEW MESSAGE to the group, send an new email to:
gallery...@googlegroups.com
 
To view or sign in to this group on the web, use this URL:
https://groups.google.com/forum/#!forum/gallery-3-users
---
You received this message because you are subscribed to the Google Groups "Gallery 3 Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to gallery-3-use...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/gallery-3-users/564554ff-da07-414d-a0b7-0f5f33213ea3n%40googlegroups.com.

Mark

unread,
Jan 2, 2021, 10:57:11 AM1/2/21
to Gallery 3 Users
J.R.,

Gallery seems to strip out any php in the footer section. I tried inserting <?= date("Y") ?> in for the year, but all that appears in the footer is "Copyright (C) xxxxx 2001-". I couldn't find a way to "escape" that bit of php code so Gallery wouldn't remove it when the footer is displayed.

Thanks!

Mark

Adrian London

unread,
Jan 2, 2021, 10:59:59 AM1/2/21
to gallery...@googlegroups.com
Reply all
Reply to author
Forward
0 new messages