Plugin copyrights in the footer

Arantor

  • As powerful as possible, as complex as necessary.
  • Posts: 14,278
Re: Plugin copyrights in the footer
« Reply #15, on January 13th, 2012, 04:01 PM »
Quote
Pete. Why would a hook be able to test for dupes more than a handler relying on a hook?
Because right now the hook itself exposes the entire credits list. It would be trivial for any hooked function to see what else is there.

But if there's a secondary handler, by definition the handler's the one handling the credits - so what the hook sees/gets/returns is only its own. So the handler would have to do the work of figuring out duplicates. (That is, assuming the handler is being set up to prevent abuse. If not, the handler becomes unnecessary because the entire variable just gets passed directly to the hook in the first place)
Quote
Remember that Smf's credit page is well hidden, hence why no one uses it...
Not only that, but it's actually impossible to cleanly add to the list and be reliable. There is no hook in SMF to attach to, so short of some other hack introducing a layer in Who.php, that manipulates $context['copyrights'] as an _above template so that it's applied before the main layer is called, you're reliant on standard editing.

The problem with standard editing is that it's fragile, because the entirety of its code is thus:
Code: [Select]
$context['copyrights'] = array(
'smf' => sprintf($forum_copyright, $forum_version),

/* Modification Authors:  You may add a copyright statement to this array for your mods.
Copyright statements should be in the form of a value only without a array key.  I.E.:
'Some Mod by Thantos © 2010',
$txt['some_mod_copyright'],
*/
'mods' => array(
),
);

if (!$in_admin)
{
loadTemplate('Who');
$context['sub_template'] = 'credits';
$context['robot_no_index'] = true;
$context['page_title'] = $txt['credits'];
}

That's the end of the SMF credits function after that. So the only thing you can do is rely on not hitting something else that another mod has - because if you do, while it's possible that it'll still work, it's more likely that one, or other, or both of the mods will cease to be uninstallable thereafter.

Without actually having a hook for credits, the page becomes next to useless to have.

Oh, and note the fact that it's not indexed by search engines. I'm undecided whether that should change in Wedge - but there is good reason not to.
When we unite against a common enemy that attacks our ethos, it nurtures group solidarity. Trolls are sensational, yes, but we keep everyone honest. | Game Memorial

Nao

  • Dadman with a boy
  • Posts: 16,082
Re: Plugin copyrights in the footer
« Reply #16, on January 13th, 2012, 07:08 PM »
My bad, looks like the plugin section is not on its own column... It used to be, though. We'll have to figure out whether we should 'split' the column each time we reach a certain number of credits in it...
Quote from Lurker on January 13th, 2012, 04:01 PM
But if there's a secondary handler, by definition the handler's the one handling the credits - so what the hook sees/gets/returns is only its own. So the handler would have to do the work of figuring out duplicates.
I can't see how it'd be harder than giving the task to a plugin author... Who's just as likely to fail as we do :P
Quote
Not only that, but it's actually impossible to cleanly add to the list and be reliable. There is no hook in SMF to attach to, so short of some other hack introducing a layer in Who.php, that manipulates $context['copyrights'] as an _above template so that it's applied before the main layer is called, you're reliant on standard editing.
And on conflicts with other mods (just like the footer area is home to so many conflicts...!)
Quote
Oh, and note the fact that it's not indexed by search engines. I'm undecided whether that should change in Wedge - but there is good reason not to.
Hmm, AFAIK, it's the page itself that's not indexed, but they can perfectly well crawl the links and index them, can't they...? It doesn't have rel="nofollow" in them AFAIK...

Arantor

  • As powerful as possible, as complex as necessary.
  • Posts: 14,278
Re: Plugin copyrights in the footer
« Reply #17, on February 8th, 2012, 04:07 PM »
Another thought occurred to me. The plugin spec already allows for an author to specify a site for themselves, and one for the plugin itself (separately, too) - there's no reason why we couldn't pick that up automatically for the enabled plugins.

What we'd have to do is add a copyright date facility into the plugin spec, and some way to indicate libraries/icons used by a plugin, and we could do it all that way - without needing to issue a hook. Something similar can be done for themes, if needed.

The upside is that it's less prone to abuse, and it's actually one hook we can dispense with at that point because if it's not required by anything after that, and it's less likely to be forgotten about by authors, IMO.

Nao

  • Dadman with a boy
  • Posts: 16,082
Re: Plugin copyrights in the footer
« Reply #18, on February 8th, 2012, 06:35 PM »
Wouldn't this slow down the credits page noticeably...? (Well, for the server at least.)

Arantor

  • As powerful as possible, as complex as necessary.
  • Posts: 14,278
Re: Plugin copyrights in the footer
« Reply #19, on February 8th, 2012, 07:11 PM »
Not necessarily noticeably, especially with caching. I'm just thinking of making it easier for mod authors to toe the line, and really it's probably not that different, it's still a file that will normally be loaded and parsed.

On the other hand, what you might find on the flip side is people shoving in credits into existing files which might make parsing slower.

Hard to say really.

Nao

  • Dadman with a boy
  • Posts: 16,082
Re: Plugin copyrights in the footer
« Reply #20, on February 8th, 2012, 11:17 PM »
Yeah, maybe they wouldn't know that putting credits into the xml would be reflected in the credits page and might break the layout etc...

Arantor

  • As powerful as possible, as complex as necessary.
  • Posts: 14,278
Re: Plugin copyrights in the footer
« Reply #21, on February 8th, 2012, 11:20 PM »
I don't think that's a huge problem, actually. Especially since the *required* elements wouldn't be enough on their own - you'd need a year as well, which would make it a conscious action rather than a thing that 'just happens'.

The one thing I should point out is that there is actually nothing preventing mods from doing footer copyrights on a technical basis; all the tools for doing it are in Wedge just as they are in SMF (and they're better in Wedge, incidentally), and still without so much as a file change. So my view on it is just about preventing it as part of how things go as standard, but if third party sites want to do it, best of luck to them.

I'd rather make it much easier for people to build a mod that appropriately credits them.

Nao

  • Dadman with a boy
  • Posts: 16,082

Arantor

  • As powerful as possible, as complex as necessary.
  • Posts: 14,278
Re: Plugin copyrights in the footer
« Reply #23, on February 8th, 2012, 11:26 PM »
There are things I'm clear on and things I'm not. Footer copyrights are something I don't want to see - period. No rule I've seen will allow for reputable authors to get credit when it's due and not allow miscreants to abuse it, so either every plugin can, or no plugin can (subject to where I have any say in the matter)

On the other hand, I'm also aware that miscreants can and will abuse whatever provisions they are given. I can imagine plugins that could remove everyone else's attribution (accidentally or otherwise), so the fewer places a mod author can screw it up, even accidentally, the better. I know full well that the base copyright can be derived from what's in the manifest, should they choose to use it, but that removes the *choice* of the author to have one or not have one.

You see, I want to give mod authors the tools to do it properly, but I can't trust them not to abuse it.