Is it possible to modify/customize the Component "Info" details in Tridion 2011 - tridion

Is it possible to modify/customize the Component "Info" tab details according to user. Please see the details below:
Now in above image, I want to show full path of Image like (d:\images\Chrysanthemum.jpg) "Original File:" as it was coming Tridion 2009.
Is it possible?

Unfortunately these are ReadOnly fields set by the system.
If the item was uploaded using the SDL Tridion UI, this should contain the full path of the original image (I am surprised to see only the filename without the path), however it won't tell you from which editor's machine the path was on, so it is of very little use.
What are you trying to achieve and why? Perhaps someone can suggest a different approach.

Showing extra image information, such as size and dimensions, is a great idea and a good candidate for a gui extension.
Your solution has 4 parts:
Backend, talking with the Tridion API using Core Service to get the MM Image and perform size and dimension calculations. (maybe the dimensions could be calculated in javascript?). In the Core Service write some C# code to get the image from Tridion and calculate image size.
Expose the backend call via a Web Service. I like to use ServiceStack.Net and create a very simple, thin web service on top of the C# code. If you create an asp.net web app and host the ServiceStack web service there then make sure to deploy it to a 'Web App' or Virtual Directory under the Tridion 2011 IIS site. This will help with any Post actions since it will use the same port # and not be considered cross-domain. Pluralsight has a great training video on Servicestack. Also, you can use Rest Console in the Chrome browser to test the web service.
Call web service from an HTML page with jQuery. Create a small web form, serialize it with jQuery, and call the ServiceStack web service. The jQuery response will be a JSON object with image info.
Create an ASCX control, configure Tridion to use it as a Tab extension. Copy/paste your working HTML / jQuery into the tab.
All done!

Related

Working with Sabre web services but not by using proxy class?

i got sabre wsdl and tpfc connector services from sabre. also got their wsdl proxy class samples. Now these things are old, i mean their sample code is using .net framework 2.0, and proxy classes. Now its an old APPROACH, while someone suggested me app web reference which will create a .discomap , but i dont see any good reference tutorial.
So what i need to know is , a step by step guide or simple points:
1. how to add wsdl as .discomap web reference
2. how to use that added discomap and how it differs from proxy class.
recently i done some tinkering myself and added a webreference, but i still have no idea what steps i have used to add this.
thanks
To add a reference of one of Sabre's webservices you need to right click on Service Reference in your solution explorer and choose Add Service Reference. In the Add Service Reference window displayed, click on Advance locatetd at the low left side. This will display the Service Reference Settings window, click on Add Web Reference at the low left side of the window. In the URL field of the Add Web Reference window add the path where you downloaded the service files and wsdl or the online wsdl url.
Hope this information is helpful.

GetItemByWebDavUrl in anguilla

I'm writing an SDL Tridion Anguilla extension and need to pull a config component using a webdav url. The config also has a set of webdav urls and I need to fetch item Objects for these.
Frank - May be I ate a few words in my question.. I'm writing a CMS GUI extension and writing javascript. So is there something like $models.getItem(); which gives me the component or xml of the component?
In most Tridion Content Manager APIs you can read an item by either its TCM URI or its WebDAV URL.
So if you're using the Core Service, you can simply do:
var item = client.Read(webdavURL, null);
Then you can iterate over the fields (if you're using the Core Service this Fields helper class will come in handy) and do the same for each value in there.
If you need to have the mapping available to the client, you'll need to create a custom web service to make it available. Although not trivial at first, creating a WCF service is not as daunting as some people make it out to be. Especially not when you start with this example of a minimal WCF service for Tridion.
There is no functionality on the client to resolve items by WebDAVUrl. The only functionality we have is:
var item = $models.getItem(tcmUri);
item.getWebDavUrl(); // will return you WebDAVUrl, if it was loaded before
item.loadWebDavUrl(); // will make async call to load WebDAVUrl. "loadwebdavurl" or "loadwebdavurlfailed" will be fired on the item afterwards

Vs2010 Proxy, where's the code

I have inhherited a vs2010 c# web project (asp.net). It has a web reference to a web service. There's been a slight change to the service - a new operation has been added. I'd like to update the proxy class so that i can call the new operation but i can't find the class. I seem to remember there used to be a "show all files" button in solution explorer that would reveal the proxy class but i can see no sign of that. Unfortunately, i'm not able to refresh the proxy by pointing it at the web service metadata wsdl because vs is no longer installed on any pc that can reach the web service. Anyone know where i can find the proxy class?
It doesn't matter you can't find it in Visual Studio - you can always locate a proper file in your filesystem, under the project directory.
Problem was, the app was running - doh!
Yes, you are right. There is a "Show all files" icon in the tool bar. It will only be available when you have a project selected, so you want to select the web service's parent project:
Expand the service reference and under it the file called Reference.cs is the proxy class.
You should NOT be hand editing this though. You should make the changes to the service and then regenerate the proxy using the Update Service Reference right click option. But then if you really can't do that as you say, then just hand edit the file. But beware that any changes you make will be lost if someone does regenerate it again in the future. Very Risky! (I prey you are using source control)
There is a WSDL.exe command line tool.
Copy and execute this command line tool in the PC where you can have access to the WebService, it will generates the proxy again and you can replace them with the files in your project.
http://msdn.microsoft.com/en-us/library/7h3ystb6(v=vs.80).aspx

how to deploy flex app using different web service urls?

Is there some sort of configuration settings in FlashBuilder 4.5 where you can easily switch between webservice urls? Right now I have to delete and recreate the web service every time I switch from local to production and vice versa.
The need/requirement is this – Since I work in a startup, we keep changing servers, and their IP addresses. And being a service oriented application – I need to be able to edit the webservice endpoints in my Flex application in a easy manner every time this happens.
My Solution for this -
Assumption is that my webservice endpoint looks like this -
http:////ListAllServices/
1) Create a file config.xml in a folder named “settings” that sits in the root folder of your Flex application – outside the “src” folder. And the config.xml will be a simple xml file of the following format -
localhostTestFlexApp
At the end of this exercise the directory structure of your flex source code will look like this -
flex_src(root of the source code)
-com(some source folder)
–testapp
—view
—
-images
-settings
–config.xml
-appName.mxml
2) Now in your application code, setup a HTTPService object either in mxml or action script. Set the url of that object to this value- “settings/config.xml” – And the above xml fiel containing the current settings will be loaded into memory .
Now you can store these values in a singleton object and construct your Webservice call at runtime.
And whenever you want to move this to a new server in production, edit the tag of your config.xml and you should be good to go.
And this can be automated as well via the EnvGen ant task.
This is not the best way but yes it is very helpful while switching among servers.
Alrighty... The way I was doing it before in fact worked. The problem was browser caching.
For the benefit of others I modified the subsclass for the generated service and replace the wsdl variable with whatever endpoint I need.

Managing web services in FlexBuilder - How does the manager work?

In FlexBuilder 3, there are two items under the 'Data' menu to import and manage web services. After importing a webservice, I can update it with the manage option. However, the webservices seems to disappear after they are imported. The manager does however recognize that a certain WSDL URL was imported and refuses to do anything with it.
How does the manager know this, and how can I make it refresh a certain WSDL URL?
In your src folder of the flexbuilder project you should see the generated classes. For instance, if you use the manager to generate the proxy classes for www.example.com you should see the folders /com/example with the generated proxy classes inside.
To consume these webservices in ActionScript use the statement:
"import com.example.*;"
To consume the webservice in mxml include the .as file using:
<mx:Script source="yourscriptname.as"/>
To refresh the generated proxy classes, consuming the latest WSDL, simply open the manager and select "update".
Also, I found this article very useful for consuming web services.
I hope that helps, the question was kind of vague about the problem.

Resources