theme_copyright() function / description in the documentation

Started by Axeia, October 31, 2009, 11:04:02 AM

Previous topic - Next topic

Axeia

http://docs.simplemachines.org/index.php?topic=470.0 states the following
QuoteAm I allowed to remove/change the copyright?
No. You cannot alter, remove, or hide the copyright tag at the bottom of any SMF forum in any way, with the exception of having written permission from Simple Machines LLC.

Also, you are not allowed to alter or remove any credit information from the SMF source code. You cannot copy any part of the SMF source code, or claim any SMF code is yours.

Please read The Simple Machines License for further information.

So since I'm allowed to alter the sourcecode of it am I supposed to hack my way trough CSS simply for another display style or change of font family by the use of !important? the inline styling should be removed from it imo as it just makes the pages heavier (every bit helps) and it can be easily circumvented by the use of background colors in the same color as the foreground or by something like
body>span.smalltext{ display: none !important; }

The styling should be moved out of the function and into the CSS allowing customization.

[edit]
Would be nice to not have that pipe symbol in there as seperator as well, a list would be appropriate and much easier to style. As it is now if I want to have the "SMF © 2006–2009, Simple Machines LLC" bit displayed under the first bit instead of next to it then it's made unnecessary complicated.
I'd have override the visible part with !important to be invisible and then style the links in it as blocks and set their visibility to visible again.

Arantor

Quote from: Axeia on October 31, 2009, 11:04:02 AM
So since I'm allowed to alter the sourcecode of it am I supposed to hack my way trough CSS simply for another display style or change of font family by the use of !important? the inline styling should be removed from it imo as it just makes the pages heavier (every bit helps) and it can be easily circumvented by the use of background colors in the same color as the foreground or by something like ...

Yes, but if we are notified we do follow it up every time to insist you return it to being visible. Additionally no theme will ever be approved on our theme site if the copyright is not visible.

QuoteThe styling should be moved out of the function and into the CSS allowing customization.

That's to help ensure it remain present.

Quote
Would be nice to not have that pipe symbol in there as seperator as well, a list would be appropriate and much easier to style. As it is now if I want to have the "SMF © 2006–2009, Simple Machines LLC" bit displayed under the first bit instead of next to it then it's made unnecessary complicated.
I'd have override the visible part with !important to be invisible and then style the links in it as blocks and set their visibility to visible again.

Again, I believe that's done to "encourage" authors not to remove it.
Holder of controversial views, all of which my own.


Axeia

Quote from: Arantor on October 31, 2009, 01:02:43 PM
Quote from: Axeia on October 31, 2009, 11:04:02 AM
QuoteThe styling should be moved out of the function and into the CSS allowing customization.

That's to help ensure it remain present.
It doesn't ensure anything. I've already shown you one way to get around it and I can come up with a million more.
you'd have to set everything with !important inside the style attribute if you want to ensure anything.. and then pretty much set about 8 properties or so? (visible, display, color, background, font-size, z-index, positioning, margins and so on)

Given the flexibility CSS offers you're better off giving up on trying to  force it like that.
It reminds me of the DRM nonsense with audiofiles, the music industry tried.. but failed as its more of a hindrance then that it actually does any good.
Give people the ability to customize it an it might be left intact more often/found to be less disturbing.

Arantor

I didn't say it did. It "helps" ensure, nothing more.

We have cases brought to us VERY regularly of people flat out removing it and/or rebranding our software. Making it 'more customizable' would amount to making it easier to remove the copyright on.

Our license is quite clear; we require it to be left in, as-is. The way it is done deters some types of user from removing it.
Holder of controversial views, all of which my own.


Axeia

That's why I'm suggesting to keep it as clear as it is atm, but allow customization. As it is fitting in the copyright with the rest of theme is made harder then it should be due to the restrictions you put down which don't "avoid" the problem you're trying to avoid in the first place.

Besides making it harder to remove it you're also making it harder to adapt it to the theme. As I stated earlier, making it easier to customize might lead to LESS people trying to remove it as they are actually able to place it where they want to place it, looking like they want to look it.
The purpose in the end is to have the text and the links there isn't? Allowing some creativity isn't going to hurt anyone and letting something that doesn't work in the first place get in the way of that seems like a silly reason.

A comment in the sourcecode itself pointing to the page stating you can't flat out remove it should be good enough. I doubt there are that many people who have enough knowledge to try and edit to hide it but full but lack the knowledge to target it via different selector or edit a file and wrap it another element and target that.

Some people might be offended by this guilty until proven innocent approach as well.

aw06

on some smf forums .. i see people remove what version of smf they are using ... and just display powered by smf ... is that allowed ?

and i think my smf 1.1.10 needs an update .. it says

Powered by SMF 1.1.10 | SMF © 2006-2008 .... and not -2009 ??
:: ShopinJA.com Powered by SMF 1.1.19 | Ig-Oh Theme by Koni | 70 Rock Solid Error Free Mods | Many Custom Edits & Tweaks ::
- Host Unlimited Websites - Free Website Builder & Templates - Unlimited Disk Space & Bandwidth

Arantor

Quote from: Axeia on October 31, 2009, 05:14:53 PM
Besides making it harder to remove it you're also making it harder to adapt it to the theme. As I stated earlier, making it easier to customize might lead to LESS people trying to remove it as they are actually able to place it where they want to place it, looking like they want to look it.
The purpose in the end is to have the text and the links there isn't? Allowing some creativity isn't going to hurt anyone and letting something that doesn't work in the first place get in the way of that seems like a silly reason.

All of the themes on the theme site seem to manage it readily enough, I would say.

But I would also say that the majority of the time it isn't because people can't style it, it's that they don't want to admit they didn't make the software.

Quote from: Axeia on October 31, 2009, 05:14:53 PM
A comment in the sourcecode itself pointing to the page stating you can't flat out remove it should be good enough. I doubt there are that many people who have enough knowledge to try and edit to hide it but full but lack the knowledge to target it via different selector or edit a file and wrap it another element and target that.

There already is such a comment in part of the source, but it REALLY isn't enough. I've lost count of how many forums we've pulled up on it, just since I've been in the team. We've seen people hide it with CSS, hide it with HTML and even remove it from the PHP side in a variety of ways, so making it EASIER to hide isn't really a goal here.

Quote
Some people might be offended by this guilty until proven innocent approach as well.

I don't really think anyone's taken us to task on that before, but I have to say we get offended when people remove the copyright and then rebrand it under their own name, or remove it entirely. It's a smack in the mouth for us that work on it and help improve it.


Quote from: aw06 on October 31, 2009, 05:19:30 PM
on some smf forums .. i see people remove what version of smf they are using ... and just display powered by smf ... is that allowed ?

Yes. There's a mod for it from one of our project managers.

Quote from: aw06 on October 31, 2009, 05:19:30 PM
and i think my smf 1.1.10 needs an update .. it says

Powered by SMF 1.1.10 | SMF © 2006-2008 .... and not -2009 ??

That's odd, but I've seen it happen. I actually don't believe it's a problem but I'll check with the team on that.
Holder of controversial views, all of which my own.



Arantor

Holder of controversial views, all of which my own.


Axeia

Well since my suggestion is going nowhere, how about a compromise.
Give the function some parameters, to allow some flexiblity.

For example it currently is iirc is accepting a boolean value to retrieve it as string instead of echo'ing it out directly.

/**
* @param bool   $asString     If true this function will retrieve the string, if false it will be echo'd directly.
* @param string $separator  The string used to seperate the 'powered by' and 'copyright notice' strings
* @param bool   $asList         If true a list will be used instead of a span, the $separator parameter will be ignored.
*/
theme_copyright( $asString = false, $separator = ' | ', $asList = false )

(PHPDoc syntax for the comment, but should be self explanatory)

The second parameter could that way allow people to insert a linebreak (<br/>) or use a dash (-) or even a long dash (— / &#8213;) should they desire to do so.

(Unrelated to the thread itself: The .phpcode class in this theme could use some work.)

The Goblin

Quote from: Arantor on October 31, 2009, 05:26:46 PM
Quote from: aw06 on October 31, 2009, 05:19:30 PM
on some smf forums .. i see people remove what version of smf they are using ... and just display powered by smf ... is that allowed ?

Yes. There's a mod for it from one of our project managers.

Where is this Mod  ;D

Arantor

Holder of controversial views, all of which my own.


The Goblin

Quote from: Arantor on November 04, 2009, 10:39:38 PM
Amazing what a search of the SMF mod site would review - http://custom.simplemachines.org/mods/index.php?action=search;basic_search=smf+version;bool=and;asc;start=0

Yes, amazing isnt it  ;) although I looked under minimize logo and smf logo and copyright

I didnt think of the word smf version of all things.  Sorry to waste your time, but thank you for responding.  :)

Axeia

This is basically what I'm requesting, do note that it's theme_copyright_improved() and not theme_copyright() as I'm not allowed to alter the actual function  O:)



/**
* Checks to make sure the copyright is there and outputs the copyright message if it is.
*
* @param bool   $context    Used to determine whether or not to show whether the copyright has been found (default is false; set to true from the template_footer function...)
* @param string $separator  The string used to seperate the 'powered by' and 'copyright notice' strings
* @param bool   $asList     If true a list will be used instead of a span, the $separator parameter will be ignored.
*/
function theme_copyright_improved($get_it = false, $separator = '|', $asList = false)
{
global $forum_copyright, $context, $boardurl, $forum_version, $txt, $modSettings;
static $found = false;

// Meaning, this is the footer checking in..
if ($get_it === true)
return $found;

// Naughty, naughty.
if (mt_rand(0, 2) == 1)
{
$temporary = preg_replace('~<!--.+?-->~s', '', ob_get_contents());
if (strpos($temporary, '<!--') !== false)
echo '-->';
}

// For SSI and other things, detect the version.
if (!isset($forum_version) || strpos($forum_version, 'SMF') === false || isset($_GET['checkcopyright']))
{
$data = substr(file_get_contents(__FILE__), 0, 4096);
if (preg_match('~\*\s*Software\s+Version:\s+(SMF\s+.+?)[\s]{2}~i', $data, $match) == 0)
$match = array('', 'SMF');
$forum_copyright = preg_replace('~(<a href="http://www.simplemachines.org/"[^>]+>)</a>~', '$1' . $match[1] . '</a>', $forum_copyright);
}

// Put in the version...
$forum_copyright = sprintf($forum_copyright, $forum_version);

//Axeia: Added separator logic
if( $separator != '|' )
$forum_copyright = str_replace('|', $separator, $forum_copyright);

// If it's in the copyright, and we are outputting it... it's been found.
if (isset($modSettings['copyright_key']) && sha1($modSettings['copyright_key'] . 'banjo') == '1d01885ece7a9355bdeb22ed107f0ffa8c323026')
{
 $found = true;
}
elseif (preg_match('~<a\shref="http://www.simplemachines.org/"[^<>]*>(SMF|Powered by SMF)~', $forum_copyright) && preg_match('~<a\shref="http://www.simplemachines.org/about/copyright.php"[^<>]*>SMF\s.{1,6}[\s\d,ndash\-&;]*Simple Machines LLC~', $forum_copyright))
{
 $found = true;
 
 //Axeia: Added check for if it should be a list, and handle accordingly to whether is is or isn't.
 if( ! $asList )
echo '
<span class="smalltext" style="display: inline; visibility: visible; font-family: Verdana, Arial, sans-serif;">
'
.$forum_copyright.'
</span>'
;
 else
 {
  echo '
<ul class="smalltext" style="display: inline; visibility: visible; font-family: Verdana, Arial, sans-serif;">'
;
  foreach( explode( $separator, $forum_copyright ) as $li )
{
echo '
<li>'
.$li.'</li>';
}
echo '
</ul>'
;
}
}
}


Axeia


Arantor

To be honest, I don't think anyone has looked at this because things have been very busy the last week with the public release of RC2.

I don't believe there are any plans for this, however, I will refer the topic back to the team and especially the developers for comment.
Holder of controversial views, all of which my own.


Advertisement: