cms icon indicating copy to clipboard operation
cms copied to clipboard

Gleez Media module

Open sergeyklay opened this issue 12 years ago • 14 comments

We have a separate routing for this module

if (! Route::cache())
{
  // Image resize
  Route::set('resize', 'media/imagecache/<type>/<dimensions>(/<file>)',
    array(
      'dimensions' => '\d+x\d+',
      'type' => 'crop|ratio|resize',
      'file' => '.+'
    ))
    ->defaults(array(
        'controller' => 'resize',
        'action' => 'image'
  ));

  // Static file serving (CSS, JS, images)
  Route::set('media', 'media/<file>',
    array(
      'file' => '.+'
    ))
    ->defaults(array(
      'controller' => 'media',
      'action' => 'serve',
      'file' => NULL
  ));
}

What do you think about this?

sergeyklay avatar Dec 08 '12 20:12 sergeyklay

I would like to merge both media and imagecache into single media controller. The route example is good.

sandeepuno avatar Dec 08 '12 22:12 sandeepuno

@sandeepone Yes! It's perfect idea :+1:
May be also you would be interested to look at the imagefly module?

I understand you correctly - you do make it module?

sergeyklay avatar Dec 08 '12 22:12 sergeyklay

The original idea was based on Drupal imagecache module. I saw the module lately and adopted the remote source option.

sandeepuno avatar Dec 08 '12 23:12 sandeepuno

I have skills with a small part in the development of the Wordpress Backup module We could have fork it for Gleez..

sergeyklay avatar Dec 08 '12 23:12 sergeyklay

Thats a great add on, i'l join as well..

sandeepuno avatar Dec 09 '12 07:12 sandeepuno

Somebody busy with the Gleez Media? :)

sergeyklay avatar Dec 10 '12 22:12 sergeyklay

This should be moved from core class Gleez_Core:

  /**
   * Create a image tag for sprite images
   *
   * @param   mixed   $class  Image class name
   * @param   string  $title  Image title [Optional]
   * @return  string  An HTML-prepared image
   */
  public static function spriteImg($class, $title = NULL)
  {
    $attr           = array();
    $attr['width']  = 16;
    $attr['height'] = 16;
    $image_class    = '';

    if (is_array($class))
    {
            foreach ($class as $name)
            {
                    $image_class .= $name;
            }
    }
    elseif (is_string($class))
    {
            $image_class = $class;
    }

    $attr['class'] = 'icon ' . $image_class;

    if (!is_null($title))
    {
            $attr['title'] = $title;
    }

    return HTML::image(Route::get('media')->uri(array(
            'file' => 'images/spacer.gif'
    )), $attr);
  }

sergeyklay avatar Dec 31 '12 12:12 sergeyklay

Lets move it to html class..

sandeepuno avatar Dec 31 '12 23:12 sandeepuno

I made it. See #43

sergeyklay avatar Jan 01 '13 23:01 sergeyklay

Hi @sandeepone!

Today I started to develop Gleez Media module, because the currently available solution is not flexible enough. Assign this issue to me please.

And if possible, create a repository (eg https://github.com/gleez/media) so that we can connect to Gleez Media module as a git submodule, and develop Gleez Media module separately. Or if it is permissible, we can use this address for Gleez Media repo: https://github.com/sergeyklay/gleez-media

sergeyklay avatar Feb 20 '13 02:02 sergeyklay

Hi @sandeepone! beta version of the Gleez Media module is ready I need you to estimate it, so that we could include this in the main stream

sergeyklay avatar Feb 20 '13 19:02 sergeyklay

For compressing example, please see https://github.com/azampagl/kohana-compress

sergeyklay avatar Mar 01 '13 23:03 sergeyklay

I'm aware of kohana-compress.

sandeepuno avatar Mar 01 '13 23:03 sandeepuno

Yep! No obstacles to creating a good module :)

sergeyklay avatar Mar 01 '13 23:03 sergeyklay