Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2006-05-01 14:18:00

net-carver
Archived Plugin Author
Registered: 2006-03-08
Posts: 1,648

[plugin] [ORPHAN] sed_copyright

sed copyright

version: 1.3 Now TxP 4.0.4 friendly.
Here’s a link to the sed_copyright homepage.

Can now be used in articles or article forms to provide per-article copyright attribution either to the article author or another party specified in custom field values.

Summary

This is a simple plugin that helps you keep your copyright message bang up to date.

It can generate a copyright message in the format:

copyright-section date-section owner-section

or

copyright-section owner-section date-section

All three sections can be customised/controlled by attributes of the plugin’s tag and the owner-section can be formatted as a hyperlink.

By default the date-section will be a range (startyear—endyear) where startyear is the year of the earliest posted article in your TXP installation and endyear is the year of the last update to any article. If the start and end years are the same then a single date will be output.

This effectively means you (and your clients) can forget about having to do copyright notice maintenance: because it’s all driven from the DB content.

If you want a copyright message of a different format then there is a new helper tag that can just get the date range for you.

Updated May 25th, 2006.

v1.2 Now available via the above link…

  • Can be used in articles or article forms to provide per-article copyright attribution.
    • Uses a packed custom field to stuff in the copyright owner, start year, end year and a link if needed.
  • Uses a library plugin to do the packed custom field access.

Credits

Credit where it is due: this plugin was inspired by an article on Nathan Smith’s website.

Last edited by net-carver (2006-10-24 23:26:09)


Steve

Offline

#2 2006-05-01 17:51:09

els
Moderator
From: The Netherlands
Registered: 2004-06-06
Posts: 7,458

Re: [plugin] [ORPHAN] sed_copyright

Thanks for this. Working fine. It also made me remember to change ‘2005’ into ‘2006’, won’t have to think about that anymore ;)

Offline

#3 2006-05-01 20:37:33

ragger
Member
From: Netherlands
Registered: 2005-04-10
Posts: 82
Website

Re: [plugin] [ORPHAN] sed_copyright

Thank you, I will be using this one. I like your site, too. It’s very clear with perfect navigation.

Offline

#4 2006-05-03 06:30:15

net-carver
Archived Plugin Author
Registered: 2006-03-08
Posts: 1,648

Re: [plugin] [ORPHAN] sed_copyright

Els: Yeah, that’s the nice thing about having it driven from the DB content. I think most people just plain forget to update.

One drawback—if you don’t write an article in the current year then, of course, your end-year won’t get updated unless you force it to ‘now’ using the ‘end_year’ attribute.

ragger: Thanks for the feedback on the site. Actually the site is based on an example from Nathan Smith’s SonSpring website. which I have extended and reworked.


Steve

Offline

#5 2006-05-04 08:45:44

ragger
Member
From: Netherlands
Registered: 2005-04-10
Posts: 82
Website

Re: [plugin] [ORPHAN] sed_copyright

Could you make the copyright owner clickable, i.e. perhaps include the posibility to include <txp:email>?

Offline

#6 2006-05-04 09:01:49

net-carver
Archived Plugin Author
Registered: 2006-03-08
Posts: 1,648

Re: [plugin] [ORPHAN] sed_copyright

ragger: Thanks and yes, making the owner clickable can be done. Let me think about it first as the txp:email tag only allows mailto: links but other folks might want it to point to a contact form or another page—not necessarily to pop up their mail client.

Will post again when things are ready.

Last edited by net-carver (2006-05-07 12:26:15)


Steve

Offline

#7 2006-05-07 12:28:00

net-carver
Archived Plugin Author
Registered: 2006-03-08
Posts: 1,648

Re: [plugin] [ORPHAN] sed_copyright

ragger: I decided to add your request into the original tag. You can now supply an href and a title for the owner.

all: There is also a new tag that only pulls out the date-section in case you want to have a copyright message that the original tag cannot handle. You can use the new tag in a form to build the message you want.

Last edited by net-carver (2006-05-17 01:22:05)


Steve

Offline

#8 2006-05-08 18:39:03

ragger
Member
From: Netherlands
Registered: 2005-04-10
Posts: 82
Website

Re: [plugin] [ORPHAN] sed_copyright

Nice, thanks.

Offline

#9 2006-05-08 20:03:01

ragger
Member
From: Netherlands
Registered: 2005-04-10
Posts: 82
Website

Re: [plugin] [ORPHAN] sed_copyright

Default wraptag is now <p class="copyright">, you have to actually explicitly use <wraptag=""> in order to be able to use an inline copyright notice (in an existing textblock). Maybe an empty default wraptag should be default?

Other than that, it’s working perfectly now, thanks you very much!

And eh, one more tiny thing: sometimes you’re using ', sometimes ", without apparent logic (there is none). Try to be more consistent there. :)

Offline

#10 2006-05-09 02:41:05

net-carver
Archived Plugin Author
Registered: 2006-03-08
Posts: 1,648

Re: [plugin] [ORPHAN] sed_copyright

ragger wrote:

Default wraptag is now <p class="copyright">, you have to actually explicitly use <wraptag=""> in order to be able to use an inline copyright notice (in an existing textblock). Maybe an empty default wraptag should be default?

That’s a good idea—noted for the next release.

Other than that, it’s working perfectly now, thanks you very much!

:)

And eh, one more tiny thing: sometimes you’re using ', sometimes ", without apparent logic (there is none). Try to be more consistent there. :)

Thanks for the feedback, I knew php would catch me out somewhere. I’ll try to be more consistent in the future. At present I am favouring ' where there is no need for $vars in the output.


Steve

Offline

#11 2006-05-10 14:55:33

net-carver
Archived Plugin Author
Registered: 2006-03-08
Posts: 1,648

Re: [plugin] [ORPHAN] sed_copyright

FYI: v1.0 is out now.

No new features but two bugfixes and small code cleanups.

Two things to note:

  1. Please update if you are using v0.3 and ied_plugin_composer on your site, I introduced an incompatibility in the 0.3 release.
  2. The default value of the wraptag attribute has been changed.

Enjoy!


Steve

Offline

#12 2006-06-06 10:22:31

net-carver
Archived Plugin Author
Registered: 2006-03-08
Posts: 1,648

Re: [plugin] [ORPHAN] sed_copyright

Updated to 1.2 which adds per-article copyright attribution.


Steve

Offline

Board footer

Powered by FluxBB