WP plugin: Blog Copyright
- plugin:
- Blog Copyright
- version:
- R2.1
- download:
- blog-copyright.zip
- source:
- blog-copyright.php
Blog Copyright is a WordPress plugin that displays a dated copyright mark. When displayed on general, category, search and author queries it provides a range of dates (first-last post years); on single posts, Pages and archive queries the year for the content will be used. Name, copyright term and reservation of rights text can be fully customized through tag parameters, or completely overridden with a custom field.
Blog Copyright is not so much a new plugin for me as a collection of code I’ve been using for a while, just now wrapped up in plugin clothing. So those who might be concerned I’m not driving on towards the finish line for a certain other project, rest assured this was little more than a pit stop.
To install the plugin, download the zip file, extract blog-copyright.php, upload this to your wp-content/plugins/ directory, and activate Blog Copyright in WordPress under Plugins. To use, the template tag <?php blog_copyright(); ?> can be placed anywhere in your theme templates.
Usage:
<?php blog_copyright(owner, author, 'idmode', 'customkey', 'before', 'after', 'copyterm', 'rights', in_loop, display); ?>
~or~
<?php szub_blog_copyright('args'); ?>
Parameters*:
- owner
- (integer -or- string) User ID of copyright holder. Set to 0 (zero) to use the blog name as holder (this is the default). Provide a string to override value and use a custom name for holder: ‘Joe aka The Bloggermeister’.
- author
- (boolean) Use post or Page author as copyright holder. Set to FALSE (0) to use ‘owner’ (blog name if ‘owner’ set to 0). Default is TRUE (1).
- idmode
- (enum) Set format for copyright holder’s name. Default is display option set under their user profile. Options:
- ‘login’ - login name
- ‘nickname’ - nickname only
- ‘firstname’ - first name only
- ‘lastname’ - last name only
- ‘namefl’ - name in format “firstname lastname”
- ‘namelf’ - name in format “lastname firstname”
- ‘namenl’ - name in format “nickname lastname”
- customkey
- (string) Copyright custom field key expected when using a custom field for individual post or Page copyright information. Example: ‘cc’ (for say a Creative Commons license). Default is ‘copyright’. Using a custom field for copyright info overrides all other parameter values (except ‘before’ and ‘after’)
- before
- (string) Text or HTML displayed before copyright. Default is ‘<p>’.
- after
- (string) Text or HTML displayed after copyright. Default is ‘</p>’.
- copyterm
- (string) Text displayed for copyright term. Default is ‘Copyright©’.
- rights
- (string) Text displayed for “reservation of rights,” which comes after the copyright holder’s name. Example: ‘All Rights Reserved’. There is no default.
- in_loop
- (boolean) Whether function is run within The Loop . Set to TRUE (1) if it is. Default is FALSE (0).
- display
- (boolean) Whether to display copyright notice or return it for use in other code. Set it to FALSE (0) to return only. Default is TRUE (1).
* For boolean parameters, use only the value in parentheses (1 or 0) with szub_blog_copyright().
Examples:
<?php blog_copyright('Bob & Alice Jones', TRUE, 'namefl', '', '<div class="copyright">', '</div>', '', 'All Rights Reserved'); ?>
Display “Bob & Alice Jones” for copyright holder; use author as copyright holder on posts/Pages; firstname lastname for name format; default custom field key; “<div class=”copyright”>” and “</div>” as before and after text (HTML tags); default copyright term; “All Rights Reserved” for reservation of rights text.
<?php szub_blog_copyright('owner=2&author=0&customkey=commons&before=&after='); ?>
Display user #2 for copyright owner; do not use author as copyright holder for posts/Pages; ‘commons’ used for custom field key; no before and after text, defaults for name format, copyright term and reservation of rights.
<?php blog_copyright(); ?>
~or~
<?php szub_blog_copyright(); ?>
Display defaults: blog name as copyright holder; use author as copyright holder on posts/Pages; profile display option for name format; ‘copyright’ used for custom field key; ‘<p>’ and ‘</p>’ for before and after text; default copyright term (Copyright©); no reservation of rights text.
Copyright Resources:
I’m hardly an expert in this (or just about any) area of law, so for information on issues of copyright and intellectual property, check out these sites:
- What Is Copyright Protection?
- The Copyright Website
- World Intellectual Property Organization copyright pages
<?php blog_copyright(); ?> in The Loop—it displays the range of dates for copyright instead of the year of the current post. I’m currently looking over how to resolve it (or just leave it as is).
Author: Kaf Oseo
Categories: WordPress
Comments: (15) · Leave a comment · Comments RSS2 · Trackback URL
Dude! You rock! That is one sweet plugin. Took me all of three minutes to download it and get it tweaked as I wanted. Woo-Hoo!
Tg
Glad you like it Tg. Yours is the kind of support comment I’ve always preferred. Surprising, huh?
This is awesome, Kaf. Just to add more work onto you by way of a suggestion, it would sure be nice, and a lot easier for dumb moose, to be able to set this up using the Options Panel in the WP backend. :)
Thanks for putting this out, dude. I can’t wait to figure out how to set PHP variables! LMAO!
Hi,
I have several wordpress blogs that I am running with multiple authors. I’d like to give proper credit/copyrights for each author’s post, but this plug in only didplays my display name as the author in any given post.
What am I doing wrong with the plug in such that the sorrect author’s name does not display?
You can view one of the pages here to look at the source code:
http://www.eternalsky.us/Bonegrinder
Thanks!
Thank you very much. Much easier than editting the footer in Wordpress too often.
Sorry, got a newbie question here…
I’m having trouble working out how to upload this file… all the FAQs on Wordpress seem to say they don’t permit plug-ins!
Can somebody help me out, tad confused here. :)
cheers
Ringo, use FTP manager to upload files. And than activate plugin in WP admin area.
Hi Kaf, firstly thanks for doing this plugin. I use it in my article meta. However, I also use your Post Updated plugin. In situations where an article’s original post year and updated post year are different, is it possible to modify Blog Copyright to give the year range rather than the year it was first posted?
Here’s what I get now:
Posted: 18-Dec-04, 04:12 GMT [+0000] Edit
Updated: 09-Jul-07, 09:30 BST [+0100]
Copyright © 2004 A N Other. All Rights Reserved.
What I’d like to see is this:
Posted: 18-Dec-04, 04:12 GMT [+0000] Edit
Updated: 09-Jul-07, 09:30 BST [+0100]
Copyright © 2004-2007 A N Other. All Rights Reserved.
Is this an easy mod?
Best Regards,
Jamie
Thanks for the plugin. I run an article directory together with some friends and it was always a problem to add the right copyright at the end. But with this plugin it is so easy. Thanks again.
What do you mean by “…anywhere in your theme templates?” I tried sticking the code in the author.php to no avail.