Carabiner 1.4: Asset Management Library |
[eluser]Maglok[/eluser]
Aahhh I see, nice. Personally I plan to upgrade to 2.0 when it appears on the site and I don't have to grab it from whatever thing is used for grabbing new versions. ![]() Then I'll see about upgrading all the apps that need it here at work.
[eluser]Daniel H[/eluser]
I'm having huge problems using groups - it seems I can't create more than one group. My code: Code: // Load all the js we need Here, nothing at all is returned for Code: $this->carabiner->display('footer') Code: $this->carabiner->display('header')
[eluser]Daniel H[/eluser]
Answered my own problem: Code: // Load all the js we need
[eluser]monodesigns[/eluser]
I stumbled across a strange error while testing this library locally. I put this in a subdirectory on my local machine to test, but kept getting errors such as: Code: Message: file_get_contents() [function.file-get-contents]: Filename cannot be empty After some research, it appears that file_get_contents() and file_put_contents() functions doesn't use the base_url from the CI config file, it uses the site's root directory. Therefore, to get this to work in my subdirectory I had to do the following: Code: $config['script_dir'] = 'subdirectory/js/';
[eluser]umefarooq[/eluser]
better you give base_url like this will work Code: $config['base_uri'] = base_url();
[eluser]DavidBer[/eluser]
First off, thanks for this library. It looks pretty dang cool! I am trying out version 1.45 on a CI 2 install. Yes, you know . . . bleeding edge ![]() In my carabiner config file, I left the base_uri commented. In my controller, I load up the library. In my view, it looks like: Code: $this->carabiner->css('wb.css','screen'); When I load up the page, it does not show any css. However, in viewing the source of the html, it seems this is the problem. Code: <link type="text/css" rel="stylesheet" href="http:/d.xyz.com/assets/css/wb.css" media="screen" /> This seems correct to me, so I was stumped. Then when I ran my mouse over the link to the css, I noticed it was not correct. It was actually d.xyz.com/d.xyz.com/assets/css/wb.css This is where I am stuck. I think the html being spit out is incorrect or I am doing something wrong (probably) ![]() Thanks in advance. dave
[eluser]Unknown[/eluser]
I want to make a suggestion to modify the cssmin library. I was experimenting with data URIs in my stylesheet and I ran into a problem. As it stands, a data URI can contain double slashes and it will display correctly, however, if it does not have double slashes, then cssmin will prefix the base_url in front of the data URI. Go to application/libraries/cssmin.php, line 370, change it to the following and you're OK: Code: if (strpos($url, '//') > 0 || stripos($url, 'data:image') !== FALSE) {
[eluser]gautaml[/eluser]
Is there any plans to add an expiry option? i.e. Force the cached files to be recreated after file has aged a certain amount
[eluser]Devon Lambert[/eluser]
[quote author="gautaml" date="1298201141"]Is there any plans to add an expiry option? i.e. Force the cached files to be recreated after file has aged a certain amount[/quote] Hey Gautaml, I believe this option is already built into the library, you can use: Code: $this->carabiner->empty_cache('both', 'yesterday'); It should be noted that Tony has moved on to RoR and I don't believe he will be making further updates to this project. Sad to see him leave, but for others hoping for future updates, you may want to check out another asset lib/or dig deep for the fix on your own.
[eluser]ice_prince7[/eluser]
Hi I have added another stuff in to deal with images. Kinda straightforward. It outputs the image file e.g. 'logo.png' Its output : e.g. <img src="http://localhost/project_name/assets/images/logo.png" border="0" /> * where http://localhost/project_name/ is your base_uri ## CONFIG # WHERE TO ADD: line 29 in /application/config/carabiner.php Code: /* ## LIBRARIES # WHERE TO ADD: line 247 in /application/libraries/carabiner.php # - under public $style_uri = ''; Code: //added by tr7 # WHERE TO ADD: line 326 in /application/libraries/carabiner.php # - under $this->style_uri = $this->base_uri.$this->style_dir; Code: //added by tr7 # WHERE TO ADD: line 437 in /application/libraries/carabiner.php # - after public function css(){...} Code: /** # WHERE TO ADD: line 1021 in /application/libraries/carabiner.php function # - inside the _tag(...){...} Code: //added by tr7 #USAGE <div> <?php $this->carabiner->img('logo.png');?> </div> #OUTPUT <div> <img src="http://localhost/project_name/assets/images/logo.png" border="0" /> </div> Hope somebody can make use of this. |
Welcome Guest, Not a member yet? Register Sign In |