Make ADAM upload to specified folder - 2sxc

I want to let my content admins use the drag and drop upload through ADAM but keep the images they upload in a specified folder. For example, I have a field called "Background" which is a hyperlink. I've set it to use the Image Manager, and specified the folder to be /Images/landing-backgrounds. But when they drag and drop through ADAM, it puts the .jpg in an ADAM folder. The problem is that they can't access this image later on through /Images/landing-backgrounds. Is there a way I can force them to upload to the specified folder?

At the moment this is not configurable. The reason is that the concept/idea in ADAM is "automatic digital asset management" - and a core part of the automatic is related to "belongs to the item 7503, and only to item 7503".
The moment you want to re-use the assets in other scenarios / items, it's not "automatic management" any more, but simply a nicer upload / file-picker than DNN provides.
So this is currently not possible with ADAM, for this you need to use the "dnn standard" telerik-file-upload component

Related

Alfresco share "site content" (docsummary) dashlets customization

There are three filters out of the box.
1. I've Recently modified,
2. I'm editing and
3 my favorite
inside site content(docsummary) dashlets alfresco share.
I need to add one more filter called "modified by other user".
Is it possible, could someone please put lights on it.
To modify “site content” dashlets:
you need to add <filter type="editingOthers" /> in file docsummary.get.config.xml
And add filter.editingOthers=Modified By Others in file docsummary.get_en.properties
After this you may have to change web script to search desired parameter for your dashlet. For that make changes in doclist.get.js file located in alfresco\tomcat\webapps\alfresco\WEB-INF\classes\alfresco\templates\webscripts\org\alfresco\slingshot\documentlibrary\doclist.get.js.
For ref: https://wiki.alfresco.com/wiki/Web_Scripts#Advanced_Implementations

How do I add version control to uploaded files / images using Plone 4.1?

I want to activate version control facility for uploaded files using Plone 4.1. E.g.Whenever an image is edited using Products.ImageEditor in Plone, I want the entry to appear in the history for the image.
First thing to activate version control for images is to:
1) go to site setup
2) click Types
3) Select Image from the drop down
4) select Automatic versioning
Even with that, I don't think versioning will not automatically be performed for ImageEditor changes. ImageEditor just sets the field value for the image and does not emit any object modified events which I assume is required for plone's versioning to kick in.
FWIW, I'm the author of Products.ImageEditor. You can submit a ticket for the issue if you'd like: https://github.com/collective/Products.ImageEditor/issues

Listing contents of subfolders in a Plone folder view

On a Plone site with the structure
root
+-topic1
| +-page1
| +-page2
|
+-topic2
+-page3
+-page4
I want to have a view for folder root that lists the contents of the subfolders, like:
[http://host/plone/root/]
TOPIC1
- page1
- page2
TOPIC2
- page3
- page4
with "TOPIC1" and "TOPIC2" as headings and "page1" etc. linking to the actual pages.
Simply using a collection aggregating the pages in the topic1 and topic2 folders is not enough since it doesn't generate the subheadings.
I have searched the Plone products repository as well as the web for an extension providing a view like this, with no success. There are sources saying this can be done with custom Display Views, but since I am new to Plone, I hesitate to dig into hacking these.
Is there a Plone product/extension that can provide such a view on subfolder contents?
Or is there even a built-in solution that I am not aware of?
I figured it out.
Basically, what you want to do is extend the folder_summary_view template to include a content list for folder and collection items.
Create a copy. In the ZMI, go to portal_skins/plone_content/folder_summary_view and hit Customize. Go to the copy at portal_skins/custom/folder_summary_view and rename it to (for example) list_contents.
Activate it as folder view. Go to portal_types/Folder and manually add list_contents to the list in Available view methods.
Make sure the view only shows folders and collections. Wrap the code that generates the entry details in <tal:general_check condition="python: item_type in ('Folder', 'Topic')"> GENERATE ENTRY </tal:general_check>
Add the code for listing the item contents. You can steal it from portal_skins/plone_content/folder_listing since this already does what is needed. Copy the <metal:listingmacro> ... <metal:listingmacro> part, but replace the folderContents definition in <tal:foldercontents> with this line to retrieve the contents:
folderContents folderContents|nothing;
folderContents python:item_object.queryCatalog(**contentFilter) or
item_object.getFolderContents(contentFilter, batch=True, b_size=limit_display or 100);
(all in one line)
Note: item_object is the name given to the item in the outer listing.
If you activate list_contents as a folder view now, it works exactly as demanded in the question.
Warning: This is a copy-paste-hack by a Plone novice that works for me™. Use at your own risk.
You can also achieve this just via the Plone-UI:
Install Products.ContentWellPortlets and assign two collection-portlets below the content to your portal's default-view-item (f.e. 'front-page' as by default).
You could use a Collection here, with the two paths configured as criteria.
And if you want to, you could use this collection as default view for "root". Have a look at the default "news" and "events" folders and collections, located in it.
http://plone.org/documentation/manual/plone-4-user-manual/using-collections/adding-collections

cck remote file (image) field - I want to keep the cached copy of the image when the node is deleted

I use the Remote File module for a cck field displaying a remote image. It works with a known issue: images are reloaded on every edit http://drupal.org/node/395256
And as i do tests with lots of nodes and delete them afterwards, the images cached in filesystem become deleted too. Is there a way to tell filefield(?) not to delete them?
edit
Meanwhile found http://drupal.org/project/filefield_sources which works very nice on manually created or edited nodes. But there is no way to make filefield fetch the image on assigning the url to the place where it shows up when i let print_r($node) show it to me.
See also my post to this (wont-fix)issue http://drupal.org/node/590756#comment-2774472
Yes, there is.
You'd need to create an interface between your node and the file so when you delete the node, the file stays in place. Effectively, you're just deleting the association, not the file.
Perhaps this module saves to the files table and the reference to the file exists already.
You could develop a third party module that stores all your external files and has a GUI or some other interface to select them again for new nodes
Or, you could create a specific content type and save the files as separate nodes. Then you'd use node reference to join them.
Alternatively, the developer of that module says he'll add features if you pay him. However he does not guarantee it from what I can see :)

Let user review a file before uploading it

I am programming a control to allow the users of our intranet to upload multiple files into our system, but with some added functionality.
Imagine you as a user are uploading N files, when you add N files the intranet presents you a list like this:
File_name_1 ..... [View] [Remove] [Upload]
File_name_2 ..... [View] [Remove] [Upload]
.
.
.
File_name_n ..... [View] [Remove] [Upload]
[Remove all file] [Upload all files]
If you clic on the View button the file named "file_name_X" will be opened so you can review it and be sure it really is the file you want to upload.
Is this possible?, I am new on the Web programming world and all I found suggest the browsers do not allow you to access local file system from inside a web, but I am not sure.
One way to do this is that you actually upload initially but you only upload it to a "Staging" area. Thus it wouldn't have actually been committed to your system.
This is what Gravatar does which uploads the file and then lets you crop and adjust the image before saving it.
The only other way I've seen this done is using an ActiveX control for example in IE or some other browser extension mechanism.
Uploading files while presenting a good user interface, including progress reporting about the upload, is hard.
I suggest the Yahoo UI uploader widget: http://developer.yahoo.com/yui/uploader/
It's also the basis for the Flickr uploader, see the YUI blog post:
http://yuiblog.com/blog/2009/02/26/flickr-uploadr/
Larry
In IE the file input type will put the full path in the value attribute.

Resources