FORUMS CLOSED DUE TO SPAM. YOU STILL CAN ADD POST!

Asset manager plugin

Feed 276 posts, 32 voices

Avatar
1493 posts

Thanks – that was fast! :)

I think I have got the absolute latest. And I think I might have gone back to Admin > Settings, and clicked “Saved” again for good measure. That might have done it.

 
Avatar
291 posts

FYI. I fixed some issues when clicking between body and metadata tabs. Download latest to update.

 
Avatar
291 posts

Some smaller changes have been done:

  • Support all fileformats instead of only images.
  • If possible folders are created automatically when adding them in settings.
  • Show filename in tooltip using title attribute.

Download latest to update.

 
Avatar
651 posts

@tuupola – This is a little bit off-topic, but I was interested in the “Dashboard” plugin that was showing in your mp4 video.

1. Is that something you are allowed/willing to share?
2. What is it and how can I get it? (I’ve been looking for something like that but haven’t had time myself)

:-)

 
Avatar
291 posts

You can find the Dashboard plugin from Github. I have not had time to make a proper webpage for it. That is why I have not announced it on Forums yet.

There are some features which work only on my modified version of Frog but it is still fully compatible with the official version.

All feedback is welcome.

 
Avatar
291 posts

Latest version of Asset manager plugin adds possibility of deleting assets / files by dragging them into trash.

Since video is better than picture check the mp4 screencapture. If you can display previous link there is also lower quality Flash screencapture. Note! In addition to jQuery plugin you will also need the new jQuery UI plugin.

PS. Is it possible to list this plugin in Frog CMS homepage? Correct description is “Mephisto style asset management” and link should be http://www.appelsiini.net/projects/frog_assets

 
Avatar
1493 posts

Is it possible to list this plugin in Frog CMS homepage?

Ack! How did that happen? It is now listed (under “Asset management (Mephisto style)” to help alphabetical sort), as is the jQuery plug. I think I’ve got all the tuupola plugs now (except Dashboard). Do let me know if I’ve missed any.

Maybe it’s time to start thinking about how that user-contributed plugin page is organized, too. Hmmm….

 
Avatar
651 posts

@tuupola – can the Asset Manager plugin handle non-textile editors? I.e. can we use it for markdown, tinymce, etc. aswell?

 
Avatar
291 posts

Asset manager is not editor dependent. Whatever editor you have, when you drag an asset to input field the url of asset will appear.

 
Avatar
25 posts

This is awesome, I have never used mephisto but I am going to love this. Thanks tuupola great work!

 
Avatar
27 posts

I’ve installed the asset-plugin as decsribed at http://www.appelsiini.net/projects/frog_assets although I can’t get it to work proberly somehow.

I don’t get the Assets-tab and when I open and edit a page all I get is view, with the pre-loading icon…

Could there be something I’ve missed? I’m running the Frog installation locally on a Mac using MAMP

 
Avatar
8 posts

same problem as above…
i have asstes tab, but i editing is only “loading”
plz help

 
Avatar
7 posts

There are issues with running assets plugin if you are NOT installed the FrogCMS in DocumentRoot (the root of the website)

To solve your issues follow these steps:
1: in assets plugin folder open an “index.php” file in editor and remove the “if“ statement, leave only:

Plugin::addController('assets', 'Assets');

this change will allow you to show the assets tab!

2: in assets plugin folder relpace an “assets.js” file with this one. Then open it in editor and configure baseUrl variable to be same as URL_PUBLIC in your config.php file, but without trailing slash.

3: then go to Admin panel Disable & Enable assets plugin and go to settings of the assets plugin. In settings page you will see a default asset folder change it to be like “/REL_PATH_OF_FROG/assets” replace “REL_PATH_OF_FROG“ to relative path of the frog installation, for example if you installed frog in “http://example.com/frogtest” then your relative path is “frogtest” and the default assets setting will be “/frogtest/assets”.

4: Try to upload images.

Hope it is clear enough :)

P.S.
The following changes won’t work with 0.9.5RC1. The problem is in ImageResize plugin and the way MOD_REWITE works in 0.9.5RC1. Something with the $_GET[‘QS’] and $_SERVER[‘QUERY_STRING’]. More info is here

To make Assets plugin work in FrogCMS version 0.9.5RC1, do all above steps then go to image_resize plugin directory. Open in editor “index.php” file, then…

find (should be in line 30):

$path = $_SERVER['QUERY_STRING'];

replace with:

$path = @$_GET['QS'];
 
Avatar
291 posts

Sorry it took a while to answer. I have been spending more time with RC helicopters than open source coding lately :)

Anyways, thanks for the heads up. Will do a more userfriendly (no need to edit anything) version of the patch and commit it soon.

 
Avatar
291 posts

Just committed patch with shamil.si’s changes. Difference is if you are running svn version you do not need to edit JavaScript files by hand.

 
Avatar
7 posts

Hi tuupola,

Thanks for taking my advise :)

Just a notice:
The JavaScript that was changed by me, I’ve also added a “greedy” option to the assets folder.
I mean, you replacing “/” with “:” but it will only apply to first “/” until you use a “greedy” option of regular expressions. this will let you use a many nested folders inside the assets folder.

please take a look at my JavaScript, and tell me what you think.

 
Avatar
291 posts

Did not notice that. Fixed in Git. Thanks again!

 
Avatar
1493 posts

@tuupola – I just discovered that your Asset Manager does not like to play with BDesign’s “Frogr/Flickr” plugin! =/

What do you use for “slimbox” style picture display in Frog with Asset Manager??

(Tried to get you on IRC — alas! No reply this time!)

Update: is there a simple way of integrating the jQuery version of Slimbox with your jQuery plugins? There must be a little more to it than just dropping in the call the Slimbox js file…

 
Avatar
291 posts

I do not use any slimbox / lighthbox style JavaScript plugin in asset manager. Images are just thumbnailed and injected into HTML.

To use the Slimbox jQuery plugin you mentioned you just include jQuery (by hand or by using my jQuery Frog plugin) and Slimbox JavaScript in the page. Then Slimbox is automatically working with all images which have rel=“lightbox”.

It seems Slimbox plugin does not allow you to write your own selectors which images it should be binded to.

 
Avatar
1493 posts

@tuupola – thanks for that!

Meanwhile – Is the current commit of Asset Manager backwards compatible with 0.9.4? or does it work only with >0.9.5, in which case I would need a “legacy” version. Advice?

 
Avatar
291 posts

Works atleast with 0.9.4 and latest from SVN. I have not tried 0.9.5RC1 zip package.

 
Avatar
291 posts

Latest version works when Frog is not installed into document root.

Note! If you are running 0.9.4 or older and Frog is not installed in document root you have to edit assets.js manually. You need to add path to Frog root. For example if you have installed Frog into folder “toad” do the following:

var frog_root = '/toad';

You do NOT need to edit any files if you have installed Frog into document root or you are running 0.9.5 or newer.

 
Avatar
32 posts

The plugin currently requires PHP 5.2.0 to show the thumbnails. The building of the thumbnail URL uses $path_parts[‘filename’] from pathinfo() in AssetsController.php:236 …

Adding the following mimics PHP 5.2.0 functionality:

if (empty($path_parts['filename']))  // PHP < 5.2.0
   $path_parts['filename'] = substr( $path_parts['basename'], 0,
            strlen($path_parts['basename']) - strlen($path_parts['extension']) - 1  );

Edit: made the statement conditional

 
Avatar
1493 posts

@tuupola – I have noticed one bit of odd behaviour with the Assets Manager, but I finally just worked out the “consistency” factor:

  • if you are editing a page that has parts, and the “Body” tab is active-after-save, then the “Assets” drop-down and items goes into the right-hand side-margin as it should;
  • BUT if any other tab is active (e.g. “sidebar”, “extended”), then the assets drop-down and items go to the upper left-hand corner of the window.

Is there any way to make the Manager behave when “Body” is not the active-tab-after-save?

[Btw – I looked on Git to see if there was an “issues list” type thing, but couldn’t spot one!]

Update – here’s a pic:

 
Avatar
291 posts

@David: Thanks! I have noticed that myself too but never figured out what caused the problem. Your explanation cleared things up and now I know how to fix it.