Forum for discussing general topics related to Couch.
7 posts Page 1 of 1
Is it possible to link directly to the File Manager from the admin interface, so clients can upload images without editing a page?
One trick I've used is to create a non-executable template - upload-image.php - dedicated just to uploading images. It has a single image editable that is used solely to gain access to the uploader.

If you were more adventurous, you could poke around in the code to figure out how the uploader is being triggered, then add an "upload" button to the admin panel with a custom theme.

And of course, you can always get to the file manager through any image editable. You don't have to edit the page.
tim wrote: And of course, you can always get to the file manager through any image editable. You don't have to edit the page.


Thanks. What do you mean by this last sentence? Just going to a page to access the file manager, but not saving the page?

I'll probably set up the separate page with a single image as you suggested. I think I've done that in the past. Just coming back to Couch after drifting away for a few years. :)
vwatson wrote: Thanks. What do you mean by this last sentence? Just going to a page to access the file manager, but not saving the page?

That's correct. You don't even have to select an image. You can get into the file manager and simply manage files - upload, delete, rename, manage folders - without taking any actions that would affect the page. Just close the file manager when you're done. But for clients it's nice to have a "button to push" where they don't have to think about it or worry about messing something up.

Couch Version 2.0 added a lot of tools for customizing the admin panel. That's where the "add a button to your custom theme" idea comes from. A button to open the file manager would be a nice feature. Maybe someone will take it up as a project and share it on the forum. Or you could try hiring a developer from the forum to do it for you (and share it on the forum ;) ).
Okay, if I get some time, I may take a look at the admin customization options myself. :)
As @Tim pointed out -
Couch Version 2.0 added a lot of tools for customizing the admin panel. That's where the "add a button to your custom theme" idea comes from

Indeed, it shouldn't be too difficult to add that link in the admin-panel. There are two approaches -
a. PHP code (using hooks)
b. Theme overriding

Let us take the theme overriding approach for this.
As explained at viewtopic.php?f=5&t=10241 (under "Theming"), we'll first need to activate our custom theme to override the Couch default admin theme.

Assuming that is done, please place the attached modified 'main.html' template (extract it from the zip) in your custom theme folder ('sample' by default).

And now you should see two links at the bottom of the admin sidebar (where we have the usual 'Download Dump' etc. utilities)

If you are interested you may compare the modified main.html template with the original found in couch/theme/_system.

Hope this helps.

Attachments

Okay, got that working. :)
Image
7 posts Page 1 of 1

Who is online

In total there are 4 users online :: 0 registered, 0 hidden and 4 guests
(based on users active over the past 5 minutes)

Users browsing this forum: No registered users and 4 guests

cron