cms
cms copied to clipboard
Gleez Media module
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?
I would like to merge both media and imagecache into single media controller. The route example is good.
@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?
The original idea was based on Drupal imagecache module. I saw the module lately and adopted the remote source option.
I have skills with a small part in the development of the Wordpress Backup module We could have fork it for Gleez..
Thats a great add on, i'l join as well..
Somebody busy with the Gleez Media? :)
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);
}
Lets move it to html class..
I made it. See #43
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
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
For compressing example, please see https://github.com/azampagl/kohana-compress
I'm aware of kohana-compress.
Yep! No obstacles to creating a good module :)