-
- 697 Posts
@Eoler: Thanks. I tried what you tell but it didn't work. When clicking the "Browse" button to import a new picture, the folder displayed is still on my computer, not on the server.
I assume I will have to emulate what TinyMCE does in order to call mcpuk from MaxiGallery.
-
- 1,145 Posts
@Jul
do not want to upload images, but reuse ones already online?
TinymceWrapper: Complete back/frontend content solution.
Harden your MODX site by
passwording your three main folders:
core, manager, connectors and renaming your
assets (thank me later!)
5 ways to sniff / hack your own sites; even with renamed/hidden folders, burst them all up, to see how secure you are not.
-
- 697 Posts
@donshakespeare: Yes, exactly.
The end user has a website where each page has a gallery associated to it.
For instance, if the page tells about sport, the gallery contains pictures with sport topics (football, basket, tennis, a.s.o.). The page serves as background a picture which is randomly picked in its gallery.
The end user is a non-specialist who can create and edit documents.
I want allowing him to select for such new page, suitable backgrounds which were already loaded to the server. For instance, if the new document is telling about the local football club, the end user should be able to import in the gallery associated to the document one more of existing pictures showing football things.
The idea is that the end user doesn't need the backgrounds being stored on its computer or an usb key, so that new pictures uploaded by the graphic designer are right away available to the end user.
The best would be that MaxiGallery uploads all background pictures in the same folder (and not in one subfolder per page), so that the pictures are easier to pick, and that an already loaded picture remains stored in the cache of the browser.
Doing so will a priori be easy by editing MaxiGallery's source code, as the association between images and documents is not stored by the folder structure, but in database.
The remaining question is calling FCKEditor/mcpuk from MaxiGallery, and let it manage the assets/galleries folder.
FCKEditor/mcpuk should just return the path to the picked image in the managed MaxiGallery's "upload image" field.
If all pictures are stored in the same folder, MaxiGallery's "Upload pictures" should of course not re-upload the picture, but only update its database to store the new "image-M-available-to-page-N" relationship.
The possibility to upload new pictures from the local computer would also be nice, so that the graphic designer can upload new pictures easily.
So, there should ideally be two buttons for each "import image" field "Pick from picture library" and "Import from my computer".
If it too complicated to have those two buttons, the website designer would upload the pictures using FTP.
-
- 1,145 Posts
You want a file manager that has a customizable callback function, field_id and start_folder parameters. And this file manager is either standalone or hooked to your RTE - with possible upload.
The callback function is to tell the file manager what do when an item (e.g an image) is clicked.
It will grab the url of the item clicked, and possibly close the window when done other things you want.
The field_id parameter is attached to the url you used to open the file manager - it is dynamic, can be the id of your input field of choice (#upload_image)
This tells the file manager where to paste the url it grabbed from the clicked image
The start_folder parameter is attached to the url you used to open the file manager - it is dynamic; the file manager will use the value there as its starting point
assets/components/filemanager/browser.php?field_id=upload_image&start_folder=assets/baseball/swords
assets/components/filemanager/browser.php?field_id=upload_image2&start_folder=assets/football/makeup
If this is precisely what you are looking for, find out if FCKEditor/mcpuk can handle it.
The callback function and field_id are standard business for major file managers
TinymceWrapper: Complete back/frontend content solution.
Harden your MODX site by
passwording your three main folders:
core, manager, connectors and renaming your
assets (thank me later!)
5 ways to sniff / hack your own sites; even with renamed/hidden folders, burst them all up, to see how secure you are not.