Asset manager plugin
|
291 posts
|
I needed simpler way to upload and embed images into article. Thanks to plugin API it could be easily done. Video tells more than 1000 words so screencapture as mp4 and swf formats. First one is better quality. Assets plugin depends on Peter Gassners excellent Image Resize plugin. Please bear in mind that code was written this afternoon. It works for me now, but I will make it more configurable soon. Thats a promise :)
|
|
1493 posts
|
How cool is that? OK. I will tell you. Very cool. Not the funkiest soundtrack I ever heard, but hey, the video was nice. :) |
|
291 posts
|
Uh did I accidentally record what was playing in iTunes too? :D |
|
1493 posts
|
Unfortunately, no! I just gave it a shot on TestFrog. Ooh boy, that was exciting! Somehow (?) ALL my plugins managed to get un-plugged, and there was a serious shortage of tabs in the admin. O_o It was probably something I did, or maybe it just didn’t like my admin theme. Will try again (somewhere else). |
|
291 posts
|
It does override some CSS stuff to make room for assets on right side. So it is possible layout breaks with custom admin themes. However there is nothing special done when enabling the plugin. |
|
486 posts
|
Very nice, tuupola. Did you already change your admin javascript framework to jquery or are you using both in this case? I would have thought there would be conflicts with the prototype… |
|
291 posts
|
Using both. I am using “noconflict” mode which enable jQuery to be run together with other JavaScript libraries. |
|
1493 posts
|
Have this running nicely on an 0.9.4 install now. Very slick! :) Do you have some dev plans for it, tuupola? |
|
291 posts
|
At least paging for the page under Assets tab (if you have hundreds of images). Support to other assets than images. Configurable folders. Maybe one click upload etc. Anyway I personally like to keep things simple. |
|
316 posts
|
This might actually have something to do with the plugin itself. I was playing with a 301 plugin idea, before I figured out how to properly configure my .htaccess file. After putting the plugin in place and enabling it, all the other plugins were disabled. I really have no idea what went wrong. I stopped playing with the code at that point and went back to learning mod_rewrite rules, which was much simpler in the end. |
|
486 posts
|
This is a very good idea for a plugin. What I’d like to see is a master assets plugin that will allow other plugins to register with it, then whatever data is gathered by those other plugins can show up in this master assets sidebar. Perhaps each registering plugin can then be allocated a section, like an accordion fold. The registering plugin would determine which data would show up. For example, if we had a Calendar plugin, all the event infromation can be added via the tab and forms generated by the Calendar plugin. Because, this Calendar plugin registers with the master assets sidebar plugin, Calendar events will be available from this sidebar that can then be dragged into a page. Basically all I’m looking to do drag is the id of the event into the page (a page Part). Then the layout takes care of the rest. Events that have already been assigned to a page wouldn’t show up in the sidebar. The specific rules for what shows up can be determined by the Calendar plugin. This would work for all kinds of data and can be a good way to have the flexibility of unique forms or custom content types (via plugins), while also keeping the power and order of the Page system. What do you think? |
|
486 posts
|
Perhaps even give the registering plugins the ability to say when its data will show up. So for example to reduce clutter, Calendar plugin might say to the master assets plugin, only pull up calendar data if the page is a child of calendar slug, in other words the parent’s slug is “calendar” |
|
486 posts
|
Also it would be nice if the sidebar widget thing did not have to be stuffed into that tiny body tab… |
|
486 posts
|
Hmm…I’m wondering how you guys got this plugin to work. For me it doesn’t work. It expects images at htdocs/assets whereas the image_resize plugin (a dependency), puts images at mysite/public/images In other words, one uses DOCUMENT_ROOT and the other uses FROG_ROOT. I tried making some changes to get it working, but still not successful. Something else may be going on… Any advice? |
|
291 posts
|
You have old version of image_resize plugin. |
|
291 posts
|
BTW I noticed there are some layout problems when you add new pageparts and resize the screen and Asset manager is enabled. This is due my lack of understanding of CSS. If somebody finds a fix let me know :) |
|
486 posts
|
Thanks, tuupola. I’ll try it again. Just wondering, is there an advantage to using DOCUMENT_ROOT over FROG_ROOT? |
|
291 posts
|
DOCUMENT_ROOT is always DOCUMENT_ROOT. FROG_ROOT can be something else. Meaning if you have installed Frog into subfolder FROG_ROOT would point to that subfolder. |
|
23 posts
|
Just thought you should know, theres a small bug in
Should be
Great work tuupola, I think this can be improved a lot though, I know its a very early beta but I’d like to see:
Just a few ideas. |
|
486 posts
|
Maybe you can avoid the problem by putting the assets in the actual sidebar. To get the sidebar to show up on the page editing pages, you just need to comment out a few lines in admin.css |
|
486 posts
|
in case anybody wants to put it in the sidebar. this is the change in admin.css:
And in the Javascript file something like: |
|
291 posts
|
@rick: Cool thanks. That seems to work pretty well. Although I feel that when assets are thrown into sidebar it feels they are separated from the content area. I will play around with the UI a bit. @eoghanobrien: Thanks for the heads up. Bug is now fixes. Also some of the features you mentioned are already done on my development version. Stay tuned :) |
|
291 posts
|
Here are quick screenshots of new features. You can configure multiple different upload directories. You can use this for categorizing assets. Note that you still have to create the directories manually. This is in my TODO list.
Adventurous people can install latest from GitHub. Same warning as before. Works for me, but is beta quality code. NOTE! If you are using with current svn make sure FROG_VERSION is 0.9.5. |
|
1493 posts
|
@tuupola: I just tried upgrading this plugin to v. 0.3.0, but I’m getting a funny result. (I have installed your jQuery plugin, too!) The older version was working well, and this still shows me my “assets” and handles the upload fine. But! In the sidebar of the Pages for editing, I’m getting a string of little boxes about 6px wide and 22px high corresponding to the files in my Frog’s root dir, rather than the nice little thumbnails of my “assets”. Any thoughts? UPDATE — ignore me! O_o I don’t quite know what happened, but it’s all good now. |
|
291 posts
|
@david: Try first disabling the plugin and then enable it again. New version writes some default settings to Frog’s settings table. I guess you just overwrote the old plugin without disabling it first? I’m running SVN and 0.9.4 myself. BTW. I did some changes to code today. So if you want the latest features you might want to download again. |



