#1 2014-04-29 22:34:41

ukyo
Community Manager
From: Marmaris - Turkey
Registered: 2010-05-19
Posts: 734
Website

Assetic Module - Asset Manager For Ionize CMS

Module Help you to manage your assets, compile and minify javascript and stylesheet files.

About Module, Module Usage
Download (Releases)


<ion:ukyo from="Turkey" />
Ionize CMS Türkçe Dil Çeviri Dosyaları | My Github Repositories
Please send your first message to a forum section, not forum users or administration.

Offline

#2 2014-05-07 17:12:24

colo
Member
Registered: 2013-05-29
Posts: 12

Re: Assetic Module - Asset Manager For Ionize CMS

Hello ukyo, your module is great with assets and i'd like to use it to improve sites!

I installed it but i have this message in the browser:
Fatal error: Class 'TagManager_Form' not found in D:\www\ionize\modules\Assetic\libraries\assetic_tags.php on line 4

Can you help me please?
Thank you!

Offline

#3 2014-05-08 12:40:08

ukyo
Community Manager
From: Marmaris - Turkey
Registered: 2010-05-19
Posts: 734
Website

Re: Assetic Module - Asset Manager For Ionize CMS

Oops, here is correction : https://github.com/trk/Assetic/commit/4 … 47358871d3

Also i updated release, v1.0 to v1.0.1


<ion:ukyo from="Turkey" />
Ionize CMS Türkçe Dil Çeviri Dosyaları | My Github Repositories
Please send your first message to a forum section, not forum users or administration.

Offline

#4 2015-02-20 16:44:17

Kink
Ion Tester
From: France
Registered: 2010-06-04
Posts: 581

Re: Assetic Module - Asset Manager For Ionize CMS

It's a very cool module Ukyo,
i use it for www.agro-dynamic.com.

Thanks a lot.


Webmaster / OUF!WEB

Offline

#5 2015-02-21 14:43:18

ukyo
Community Manager
From: Marmaris - Turkey
Registered: 2010-05-19
Posts: 734
Website

Re: Assetic Module - Asset Manager For Ionize CMS

Thanks @Kink also you can compress your html output


<ion:ukyo from="Turkey" />
Ionize CMS Türkçe Dil Çeviri Dosyaları | My Github Repositories
Please send your first message to a forum section, not forum users or administration.

Offline

#6 2015-02-23 10:46:43

Kink
Ion Tester
From: France
Registered: 2010-06-04
Posts: 581

Re: Assetic Module - Asset Manager For Ionize CMS

Yes @Ukyo, i know, but for an unknown reason, if 'compress html' is activated, some parts of the page are blank. I think it's because of JS in views with some ionize tags inside.

But compressing html is not signifiant to increase load. My big problem for the moment is to reduce weight of pictures... and it's a new story smile


Webmaster / OUF!WEB

Offline

#7 2015-02-24 10:10:51

Kink
Ion Tester
From: France
Registered: 2010-06-04
Posts: 581

Re: Assetic Module - Asset Manager For Ionize CMS

Hey, @Ukyo, i made some enhancement of your module, which handle 'async' option.

in assetic_tags.php :

public static function tag_AssetURL(FTL_Binding $tag)
    {
        $url = $tag->getAttribute('url', NULL);
        $async = $tag->getAttribute('async', false);
        $async = ($async) ? 'async' : '';

        if( file_exists(self::$ci->OutputPath . self::$ci->DP . self::$ci->OutputFileName) )
        {
            $extention = substr(strrchr(self::$ci->OutputFileName, '.'), 1);

            $result = '';

            self::$ci->OutputFileTime   = filemtime(self::$ci->OutputPath . self::$ci->DP . self::$ci->OutputFileName);
            self::$ci->OutputFileURL    = self::$ci->OutputURL . '/' . self::$ci->OutputFileName . '?v=' . self::$ci->OutputFileTime;

            if( is_null($url) )
            {
                switch($extention)
                {
                    case 'css':
                        $result = '<link rel="stylesheet" href="' . self::$ci->OutputFileURL . '" />';
                        break;

                    case 'js':
                        $result = '<script ' . $async . ' type="text/javascript" src="' . self::$ci->OutputFileURL . '"></script>';
                        break;

                }
            }
            else
                $result = self::$ci->OutputFileURL;

            return $result;
        }
        else
            return self::show_tag_error(
                $tag,
                'Output file could not found, check write permission for directory ' . self::$ci->OutputPath . self::$ci->DP . self::$ci->OutputFileName
            );
    }

Then, in your view, you can do that :

<ion:assetic>
	<ion:AssetManager>
		<ion:AssetCollection collection="SiteJQuery" path="javascript/" filename="jquery.min.js">
			<ion:FileAsset src="javascript/jquery.183.min.js" />

			<ion:Compressor method="jsmin" />
			<ion:Render />
			<ion:AssetURL async="true" />
		</ion:AssetCollection>
	</ion:AssetManager>
</ion:assetic>

What do you think of that ?


Webmaster / OUF!WEB

Offline

#8 2015-02-25 00:13:04

ukyo
Community Manager
From: Marmaris - Turkey
Registered: 2010-05-19
Posts: 734
Website

Re: Assetic Module - Asset Manager For Ionize CMS

make a pull request from github, its an option for users.


<ion:ukyo from="Turkey" />
Ionize CMS Türkçe Dil Çeviri Dosyaları | My Github Repositories
Please send your first message to a forum section, not forum users or administration.

Offline

#9 2015-04-10 05:40:36

stylemayster
Member
Registered: 2015-04-10
Posts: 3

Re: Assetic Module - Asset Manager For Ionize CMS

Can you explain how to setup with an example plz?
(And just to be sure, is the <ion:AssetCollection> tag miss the </ close mark?)


All I know is the module can access to development.nameofthefile.js but he apparently never write inside....(and I've set the permission to 777 just for test purpose).

Offline

#10 2015-04-10 13:45:29

stylemayster
Member
Registered: 2015-04-10
Posts: 3

Re: Assetic Module - Asset Manager For Ionize CMS

My baaad, switch the environment to production and it work like a charm! Yeah, work at night make you look like a real noob on forum ^^'

By the way, nice job Ukyo!

Offline

What's Ionize ?

Ionize is an Open Source Content Management System created by webdesigners for webdesigners.

Created and maintained by Partikule and Toopixel, Ionize wants to be the easiest and most powerful CMS.

Can I help ?

Because talent is nothing without involvement, we are looking for motivated coders and webdesigners to join the project team.

Resources

Website : ionizecms.com
Documentation : doc.ionizecms.com

Development : Ionize on GitHub
Translations : Ionize Translations