With SMF 2.1 Beta 1 was added credits tag :)
<credits url="..." license="..." copyright="..." title="..." />
And this was shown in credits page:
<a href="URL">TITLE OR MODNAME: MODVERSION</a> | LICENSE | COPYRIGHT
With SMF 2.1 Beta 3 was added url of license :D
<credits url="..." license="..." licenseurl="..." copyright="..." title="..." />
And this was shown in credits page:
<a href="URL">TITLE OR MODNAME: MODVERSION</a> | <a href="LICENSEURL">LICENSE</a> | COPYRIGHT
And now... can be added url of copyright?
<credits url="..." license="..." licenseurl="..." copyright="..." copyrighturl="..." title="..." />
And this will be shown in credits page:
<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
<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
{"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!
Yep, forgot about the length bit. Tracked (https://github.com/SimpleMachines/SMF2.1/issues/4414). Thanks :)
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).
Quote from: albertlast 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).
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?
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.
I write here instead of in new topic because the main request of this topic is unsolved still. :(
Quote from: Suki on December 19, 2017, 04:35:48 PM
[...] having a single "fit it all" copyright type offers mod authors some more freedom.
Ok, I am agree with this. Now SMF 2.1 RC1 and RC2 allows a longer text in copyright of credits but I can not add an url because
copyright attribute of
credits tag does not allow HTML/BBC tags. ??? Or maybe I do something wrong?
For example:
- I want add this credit:
Quote from: Credits page
Enhancements to purge inactive members: Versión 1.3.8 | License: Creative Commons Attribution 3.0 Unported License | Copyrights © 2010-2019, davidhs
- With only text (with no url :(, like SMF 2.1 Beta 2), works:
<credits url="https://custom.simplemachines.org/mods/index.php?mod=2569" license="Creative Commons Attribution 3.0 Unported License" licenseurl="https://creativecommons.org/licenses/by/3.0/" copyright="2010-2019, davidhs" />
{"url":"https:\/\/custom.simplemachines.org\/mods\/index.php?mod=2569","license":"Creative Commons Attribution 3.0 Unported License","licenseurl":"https:\/\/creativecommons.org\/licenses\/by\/3.0\/","copyright":"2010-2019, davidhs","title":""}
Quote from: Credits page
Enhancements to purge inactive members: Versión 1.3.8 | License: Creative Commons Attribution 3.0 Unported License | Copyrights © 2010-2019, davidhs
- With HTML does not work (show nothing):
<credits url="https://custom.simplemachines.org/mods/index.php?mod=2569" license="Creative Commons Attribution 3.0 Unported License" licenseurl="https://creativecommons.org/licenses/by/3.0/" copyright="2010-2019, <a href=https://custom.simplemachines.org/mods/index.php?action=search;author=242014>davidhs</a>" />
or
<credits url="https://custom.simplemachines.org/mods/index.php?mod=2569" license="Creative Commons Attribution 3.0 Unported License" licenseurl="https://creativecommons.org/licenses/by/3.0/" copyright="2010-2019, <a href='https://custom.simplemachines.org/mods/index.php?action=search;author=242014'>davidhs</a>" />
or
<credits url="https://custom.simplemachines.org/mods/index.php?mod=2569" license="Creative Commons Attribution 3.0 Unported License" licenseurl="https://creativecommons.org/licenses/by/3.0/" copyright="2010-2019, <a href="https://custom.simplemachines.org/mods/index.php?action=search;author=242014">davidhs</a>" />
{"url":"","license":"","licenseurl":"","copyright":"","title":""}
Quote from: Credits page
Enhancements to purge inactive members: Versión 1.3.8
- With all HTML entities does not work (show entities):
<credits url="https://custom.simplemachines.org/mods/index.php?mod=2569" license="Creative Commons Attribution 3.0 Unported License" licenseurl="https://creativecommons.org/licenses/by/3.0/" copyright="2010-2019, <a href="https://custom.simplemachines.org/mods/index.php?action=search;author=242014">davidhs</a>" />
{"url":"https:\/\/custom.simplemachines.org\/mods\/index.php?mod=2569","license":"Creative Commons Attribution 3.0 Unported License","licenseurl":"https:\/\/creativecommons.org\/licenses\/by\/3.0\/","copyright":"2010-2019, <a href="https:\/\/custom.simplemachines.org\/mods\/index.php?action=search;author=242014">davidhs<\/a>","title":""}
Quote from: Credits page
Enhancements to purge inactive members: Versión 1.3.8 | License: Creative Commons Attribution 3.0 Unported License | Copyrights © 2010-2019, <a href="https://custom.simplemachines.org/mods/index.php?action=search;author=242014">davidhs</a>
- With BBC does not work (show BBC without parse):
<credits url="https://custom.simplemachines.org/mods/index.php?mod=2569" license="Creative Commons Attribution 3.0 Unported License" licenseurl="https://creativecommons.org/licenses/by/3.0/" copyright="2010-2019, [url=https://custom.simplemachines.org/mods/index.php?action=search;author=242014]davidhs[/url]" />
{"url":"https:\/\/custom.simplemachines.org\/mods\/index.php?mod=2569","license":"Creative Commons Attribution 3.0 Unported License","licenseurl":"https:\/\/creativecommons.org\/licenses\/by\/3.0\/","copyright":"2010-2019, [url=https:\/\/custom.simplemachines.org\/mods\/index.php?action=search;author=242014]davidhs[\/url]","title":""}
Quote from: Credits page
Enhancements to purge inactive members: Versión 1.3.8 | License: Creative Commons Attribution 3.0 Unported License | Copyrights © 2010-2019, [url=https://custom.simplemachines.org/mods/index.php?action=search;author=242014]davidhs[/url]
Hmm I would think at least bbc should work.
If you think it is an issue I would file a github bug report.
https://github.com/SimpleMachines/SMF2.1/blob/release-2.1/Sources/Packages.php#L1018
Those are the tags you can use inside the credits node, heres an example: https://github.com/MissAllSunday/OharaYouTubeEmbed/blob/master/package-info.xml#L22
Quote from: vbgamer45 on April 05, 2019, 11:47:03 AM
Hmm I would think at least bbc should work.
If you think it is an issue I would file a github bug report.
Yes, please. I tested several times (in RC1 and RC2) with the previous examples and it does not work.
Solution can be modify Source/Who.php file:
<php?
$copyright = empty($credit_info['copyright']) ? '' : $txt['credits_copyright'] . ' © ' . $smcFunc['htmlspecialchars']($credit_info['copyright']);
?><php?
$copyright = empty($credit_info['copyright']) ? '' : $txt['credits_copyright'] . ' © ' . parse_bbc($smcFunc['htmlspecialchars']($credit_info['copyright']));
?>But link of copyright is written as
...<a href="..." class="bbc_link" target="_blank" rel="noopener">...</a>...
instead of equal to other links of credits
...<a href="...">...</a>...
and all links on the credits page should have same style.
Quote from: Suki on April 05, 2019, 12:28:50 PM
https://github.com/SimpleMachines/SMF2.1/blob/release-2.1/Sources/Packages.php#L1018
Those are the tags you can use inside the credits node, heres an example: https://github.com/MissAllSunday/OharaYouTubeEmbed/blob/master/package-info.xml#L22
Ok, the syntax of
credits tag is
<credits url="MOD_URL" license="LICENSE_TEXT" copyright="COPYRIGHT_TEXT" licenseurl="LICENSE_URL">TITLE</credits>
I know default TITLE is the mod name, but I did not know could write other TITLE between open-close tags. :)
But I want add url (with BBC or HTML) to COPYRIGHT_TEXT.
I believe that may have purposefully been disallowed...
you get to specify the license URL and a URL for the mod...
Yes, it was completely deliberated, the credits node only allows two urls, one for the mod and another one for the license, this is to prevent link abuse.
It may be worth noting that mods can also add copyright info using the integrate_credits hook, which allows more freedom to the mod author.