Problem/Motivation

The copyright year is hardcoded in the page footer template. This means it's not editable by site owners and admins.

See /templates/page/inc/page-footer.tpl.php
which contains...
<p class="copyright">Copyright &copy; 2014 <?php echo check_plain(openaid2_get_setting('copyright', '')); ?></p>

Proposed resolution

Remove the the hardcoded string inside the p tag.
Add a helper function that automagically inserts the current year instead.
Update the theme settings to use the function too.

Remaining tasks

Tests may be needed?
Needs review.

User interface changes

Yes.

API changes

No.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

kattekrab’s picture

With the help of @cafuego I've made a function that automatically uses the current year as a translateable string.

Removed the hardcoded bit from page-footer and updated the theme settings to use the function.

kattekrab’s picture

Assigned: kattekrab » Unassigned
Status: Active » Needs review
FileSize
1.82 KB

oooops how about we attach the patch too?

kattekrab’s picture

kattekrab’s picture

Status: Needs review » Needs work

Breaks the admin theme.

Had to switch off adminimal and use openaid theme for admin too.

cedewey’s picture

Thanks so much for the contribution! Feel free to reach out if you run into anything as you update the patch to work with the adminimal theme.

Thanks!
Clayton

cafuego’s picture

We'll have a look and see if we can put the helper in theme-settings.php instead, it it'll be available in the admin theme then... just not sure if that file is then loaded by the openaid theme as well when rendering output.

cafuego’s picture

Status: Needs work » Needs review
FileSize
2.22 KB

Attached patch adds a new file, helpers.inc, which is included by both the template.php and theme-settings.php file.

cedewey’s picture

Status: Needs review » Needs work

When I try installing OpenAid with the applied patch I receive the following error

An AJAX HTTP error occurred. HTTP Result Code: 200 Debugging information follows. Path: http://openaid.dev/install.php?profile=openaid&locale=en&id=1&op=do StatusText: OK ResponseText: Home | Drupal @import url("http://openaid.dev/modules/system/system.theme.css?0"); @import url("http://openaid.dev/modules/system/system.menus.css?0"); @import url("http://openaid.dev/modules/system/system.messages.css?0"); @import url("http://openaid.dev/modules/system/system.base.css?0"); @import url("http://openaid.dev/modules/field/theme/field.css?0"); @import url("http://openaid.dev/modules/node/node.css?0"); @import url("http://openaid.dev/modules/search/search.css?0"); @import url("http://openaid.dev/modules/user/user.css?0"); @import url("http://openaid.dev/sites/all/modules/contrib/extlink/extlink.css?0"); @import url("http://openaid.dev/sites/all/modules/contrib/views/css/views.css?0"); @import url("http://openaid.dev/modules/system/system.admin.css?0"); @import url("http://openaid.dev/modules/system/system.maintenance.css?0"); @import url("http://openaid.dev/sites/all/modules/contrib/ctools/css/ctools.css?0"); @import url("http://openaid.dev/themes/seven/reset.css?0"); @import url("http://openaid.dev/themes/seven/style.css?0"); Home Installation tasksChoose profile(done)Choose language(done)Verify requirements(done)Set up database(done)Install profile(active)Configure siteFinished Installation Status message To use menu blocks, find the "Add menu block" link on the administer blocks page. SQLSTATE[23000]: Integrity constraint violation: 1048 Column 'module' cannot be null

If I continue on with the site installation, the adminimal theme and openaid theme are both disabled.

Let me know if there is any additional info that I can provide which would be helpful.

Thanks!

cedewey’s picture

Status: Needs work » Reviewed & tested by the community

The issue I was experiencing was coming from a different issue (https://www.drupal.org/node/2514108), not this patch. My bad!

I've tested this out again it works well. Thanks so much for the contribution kattekrab and cafuego. This improvement will be rolled into the next release.

  • cedewey committed d2886f0 on 7.x-2.x authored by cafuego
    Issue #2483695 by kattekrab, cafuego: Copyright 2014 hardcoded in page-...
kattekrab’s picture

W00t!

Thanks @cedewey :)

kattekrab’s picture

Status: Reviewed & tested by the community » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.