Changing file's details tab(when right click) using the IShellDispatch interface? - c++

As the title says, is it possible, by using the IShellDispatch interface to change some of the fields shown in the details tab when we right click on a certain file and then choose the properties option?
Thanks!

On Vista/7 use the Shell property store to update the details fields in the shell property page. See http://blogs.msdn.com/b/benkaras/archive/2006/11/21/writing-properties-9-summary.aspx for an example.
For 2000/XP you need to use compound file APIs as the metadata is stored in NTFS alternative stream or the file itself, see http://msdn.microsoft.com/en-us/library/aa379964.aspx

Related

Sitecore field for selecting multiple files from media library with the ability to upload files

I'm looking for something that allow content editors to select multiple files from the media library, which will be listed in a rendering. They also need to be able upload files and to search. It has to work in the Page Editor (named Experience Editor in version 8).
What I have have considered so far:
A bunch of File fields - but I don't know how many files the editor need to select at most, and having something like 20 similar fields seems bad.
Using a field that supports multiple items like a Treelist with the datasource set to the Media Library allows the user to select files in an acceptable way but not uploading. I tested adding one File field just for the upload function, but was not really satisfied.
Notes:
Currently using Sitecore 7.5 but moving to 8 in a few days, so a solution working in Sitecore 8 is preferred.
I have asked the Sitecore support too and will update here if I get useful answers.
And the winner is.... the answer from Sitecore support:
In the Email Experience Manager module there is a field called "File List".
The image shows the dialog in Sitecore 8 and the field itself (below). It has search, supports multiple files and upload. It stores the value as pipe-separated GUIDs (just as similar fields like Treelist).
The Field Types Module on Sitecore Marketplace includes "Visual List" and "Carousel" custom field types which may provide what you need. I have used this in the past and found it to work well, though I'm not sure if it's compatible with Sitecore 8. As I remember, I don't think they provided the option for uploading new media from the field.
An alternative solution is to use a placeholder and a file component with a DataSource.
Give the component a standard File Field. So upload is possible.
But for every new file the editor must add a new component to the placeholder with the page editor. This is with a lot of files more work for the editor. But a standard solution. (and the ability to personalize the files with the rules engine)

change file name when filter changes in Windows file save dialog from c++

In a Windows Save File dialog, I would like to automatically change the extension part of the filename in the edit box when the user changes the filter. That is, if the user is saving an image file, and changes the type to JPEG, the file name automatically changes to .jpg.
IIRC this used to be possible via hooks but that approach is no longer supported. Is there a way to accomplish it now? I'm using C++ (C++Builder if it makes any difference).
Thanks.

Sitecore how to hide/disable HTML tab from your Rich Text Editor

Could someone suggest how to hide/disable HTML tab from your Rich Text Editor on sitecore?
I had a look at this, but requires a change on Sitecore core rich text XML.
Problem with this solution is we need to modify the XML for each instance and what about upgrades?
Thanks.
In the Core database (you can switch using the icon in the bottom right next to the clock) you can go to /sitecore/system/Settings/Html Editor Profiles/*profile you want*/buttons/HTML view and deny read-access on that for your users. Alternatively, at least in Sitecore 6.5, there's a profile without the HTML view. It's called Rich Text IDE. You can set the datasource field of a Rich Text field to that one, and not have the HTML view.
That's only removing the HTML option on the bottom left though, I'm not sure how to remove the Edit HTML option you have before you've opened the RTE itself (where you have Show Editor/ Suggest Fix / Edit Html). Looking at This question it might be you'll have to change the XML anyway.
The way we've got upgrades and different instances handled is by having the changed file in source control, and making sure we include it when building a deployment package.
Adding onto Trayek's great answer - you can remove access to the "Edit HTML" as outlined by Alex Shyba below:
Go to the core database, locate the field definition item:
/sitecore/system/Field types/Simple Types/Rich Text/Menu/Edit Html
On the Security Tab, click “Assign” and select the role you don’t want this option to be available to. Deny inheritance of this item or specify other security settings that make sense for your needs.
I added "Everyone" and then selected the "X" by Inheritance for Items, and the "Edit HTML" option was removed.
Taken from:
http://sitecoreblog.alexshyba.com/2009/10/quick-tip-remove-edit-html-option-for.html

Is it possible to set a default webcontent template in liferay?

maybe you can help me.
I use verison 6.1.1 ce of liferay.
I have installed the "default-web-content-hook" from plugin-repo.
I want to set a default template for the webcontent display portlet, so that when a user clicks "Add Web Content" and the editor opens up, a certain preconfigured template, like "carousel" from the default-web-content-hook.
Anyone found out how it works?
Thanks guys, you're the best!
Have a nice weekend!
I think that there is no such option in Liferay which would set the default structure (template).
But it could be achieved in several ways.
You could just edit the link which opens the add web content dialog and append the structureId param with appropriate value.(&_15_structureId=MULTIPLE-ITEM-CAROUSEL)
Other option would be modify /portal-web/docroot/html/portlet/journal/edit_article.jsp and when the structureId param is null insert there a value. This value could be hard coded or supplied via configuration.
Also you could modify com.liferay.portlet.journal.action.EditArticleAction.

How do I embed my GUI in Windows explorer?

I want to add an option to explorer (in windows) like the 'preview pane' but only an 'edit pane'. The idea is that I have text files that I want to edit, but I dont want to open an application to edit the file. I want to just click over in the edit pane and make the edits. Any suggestions what API's I can use to extend explorer in this way? (More than just 'look at the shell api: I have and I dont know which will allow me to accomplish this).
You have to implement PropertyHandler.
See Windows SDK \Samples\winui\Shell\AppShellIntegration\PropertyHandlers.
Each property is described by property schema XML file. This property schema must be registered with PSRegisterPropertySchema(). Property handler implements IInitializeWithXXX, IPropertyStore and optionally IPropertyStoreCapabilities. You have to register CLSID of your implementation for each file extension you want to handle (.txt in your case).