Advertisement:

Author Topic: Add url of copyright to credits tag in package-info.xml  (Read 590156 times)

Offline davidhs

  • Sr. Member
  • ****
  • Posts: 991
  • Gender: Male
Add url of copyright to credits tag in package-info.xml
« on: December 19, 2017, 01:18:02 PM »
With SMF 2.1 Beta 1 was added credits tag :)
Code: [Select]
<credits url="..." license="..." copyright="..." title="..." />
And this was shown in credits page:
Code: [Select]
<a href="URL">TITLE OR MODNAME: MODVERSION</a> | LICENSE | COPYRIGHT

With SMF 2.1 Beta 3 was added url of license :D
Code: [Select]
<credits url="..." license="..." licenseurl="..." copyright="..." title="..." />
And this was shown in credits page:
Code: [Select]
<a href="URL">TITLE OR MODNAME: MODVERSION</a> | <a href="LICENSEURL">LICENSE</a> | COPYRIGHT

And now... can be added url of copyright?
Code: [Select]
<credits url="..." license="..." licenseurl="..." copyright="..." copyrighturl="..." title="..." />
And this will be shown in credits page:
Code: [Select]
<a href="URL">TITLE OR MODNAME: MODVERSION</a> | <a href="LICENSEURL">LICENSE</a> | <a href="COPYRIGHTURL">COPYRIGHT</a>

For example, I could add url to my mods https://custom.simplemachines.org/mods/index.php?action=search;author=242014 or another personal webpage.

This require to increase size of the field credits of table smf_log_packages in database (now is varchar(255)).
If my credits in package-info.xml is
Code: [Select]
<credits url="https://custom.simplemachines.org/mods/index.php?mod=2507" license="Creative Commons Attribution 3.0 Unported License" licenseurl="https://creativecommons.org/licenses/by/3.0/" copyright="2010-2017, davidhs" />
the content of field credits of table smf_log_packages is
Code: [Select]
{"url":"https:\/\/custom.simplemachines.org\/mods\/index.php?mod=2507","license":"Creative Commons Attribution 3.0 Unported License","licenseurl":"https:\/\/creativecommons.org\/licenses\/by\/3.0\/","copyright":"2010-2017, davidhs","title":""}
243 characters! And I do not use title... and my nick is small!

Offline Suki

  • Kaizoku Jotei
  • Developer
  • SMF Super Hero
  • *
  • Posts: 15,333
  • I don't really come from outer space
    • MissAllSunday on GitHub
    • SMF mods
Re: Add url of copyright to credits tag in package-info.xml
« Reply #1 on: December 19, 2017, 01:25:32 PM »
Yep, forgot about the length bit.  Tracked. Thanks :)
« Last Edit: December 19, 2017, 01:59:40 PM by Suki »
Disclaimer: unless otherwise stated, all my posts are personal and does not represent any views or opinions held by Simple Machines.

Look at them. They're just asking for it. Maybe the human race deserves to be wiped out.

Offline albertlast

  • Development Contributor
  • Jr. Member
  • *
  • Posts: 341
Re: Add url of copyright to credits tag in package-info.xml
« Reply #2 on: December 19, 2017, 02:33:49 PM »
Changed the credit field from varchar to text,
please had in mind that you had to change this field manuel on your side(no update process availeble).

Offline davidhs

  • Sr. Member
  • ****
  • Posts: 991
  • Gender: Male
Re: Add url of copyright to credits tag in package-info.xml
« Reply #3 on: December 19, 2017, 03:06:53 PM »
Changed the credit field from varchar to text,
please had in mind that you had to change this field manuel on your side(no update process availeble).
Thanks! I do not use SMF 2.1 Beta in my forum (and I am not a beta tester), I only add support to 2.1 Beta in my own mods. ;)

And about url of copyright?

Offline Suki

  • Kaizoku Jotei
  • Developer
  • SMF Super Hero
  • *
  • Posts: 15,333
  • I don't really come from outer space
    • MissAllSunday on GitHub
    • SMF mods
Re: Add url of copyright to credits tag in package-info.xml
« Reply #4 on: December 19, 2017, 04:35:48 PM »
The license has a separate url type because I wanted to have a list of commonly used licenses, kinda like github has it, fetch them if no license url were provided and the license matches one in the list. Never got to do that, sadly.

That and because having a single "fit it all" copyright type offers mod authors some more freedom.
Disclaimer: unless otherwise stated, all my posts are personal and does not represent any views or opinions held by Simple Machines.

Look at them. They're just asking for it. Maybe the human race deserves to be wiped out.