When selecting "all right reserved", 3 icons attempt to show up in this order:
all.png
all-rights-reserved.png
reserved.png

Only the middle one displays "C"
The other are broken links as these icons do not exist.
What's wrong?
- the module rightly calling for missing icons
- the module wrongly trying to call irrelevant icons?

Thanks

Comments

Sylvain Corlay’s picture

+1
I also have the same issue with all.png and reserved.png

hongpong’s picture

Subscribe - this must come from the API, there is no 'all.png' in the code.

hongpong’s picture

Version: 6.x-1.0-rc1 » 6.x-1.x-dev

Also this is on dev not just RC so i'll switch it.

jvieille’s picture

+1

kreynen’s picture

Status: Active » Needs review

I believe this was only an using the icon setting. The icon option includes an extra option for displaying $, €, ¥. That setting is available in the admin settings for all options, but only impacts the display when icon is selected. I added some additional text to that effect to the form, but it would be nice if "someone" added some javascript so that setting wasn't even an option unless Icons was selected.

@HongPong is right. There is no all.png in the code. In the get_image function in creativecommons.class.php the path to the images is dynamical generated by code like...

case 'button_small':
        // The directory which the icons reside
        $dir = $img_dir .'/'. str_replace('_', 's/', $style) .'/';

        $img[] = '<img src="'. $dir . (isset($filename) ? $filename : $this->type) .'.png" style="border-width: 0pt;" title="'. $this->get_name('full') .'" alt="'. $this->get_name('full') .'"/>';
        break;

For Icons, the code is different...

foreach (explode('-', $this->type) as $filename) {

          // NC options
          if ($filename == 'nc' && $nc) {
            $filename .= '-'. $nc;
          }
          if($filename == 'rights') {
            $filename = $this->type;
          }

          $img[] = '<img src="'. $img_dir .'/icons/'. $filename .'.png" style="border-width: 0pt; width: '. $px .'px; height: '. $px .'px;" alt="'. $name[$filename] .'"/>';
        }

So all-rights-reserved was getting split up into all, rights, and reserved and only fixed once by the $filename == 'rights' check.

I committed a fix, but that whole functions needs some love.

MPetrovic’s picture

Status: Needs review » Reviewed & tested by the community
kreynen’s picture

Version: 6.x-1.x-dev » 6.x-1.0
Status: Reviewed & tested by the community » Closed (fixed)