Friday, December 23, 2005

Modifying Resource Browser to Display Thumbnail for Bitmaps

The Resource Browser (Web Author - Resource Manager) ships with MCMS doesn't provide a thumbnail preview for bmp files. That is acceptable as bmp is not a web image format. But if you are interested in showing a thumbnail for bmp files, it can be done via a customized Resource Manager.

1. Create a class inheriting Microsoft.ContentManagement.WebAuthor.ResourcesBrowse
a) Create a class library.
b) Body of the class -

using System;
using System.Drawing;
using Microsoft.ContentManagement.WebAuthor;
using Microsoft.ContentManagement.Publishing;

namespace MCMS
{
public class CustomResourceBrowser : ResourcesBrowse
{
public CustomResourceBrowser()
{
}

//Create a new method to hide the default DataBindResourceColumnThumbnailUrl
protected new string DataBindResourceColumnThumbnailUrl(object dataitem)
{
Resource resource = (Resource)dataitem;
string url = string.Empty;
IntPtr Missing = IntPtr.Zero;
if(resource.FileExtension.ToLower()=="bmp")
{
using(Image image = Bitmap.FromStream(resource.OpenReadStream()))
{
using(Image thumbImage = image.GetThumbnailImage(32,32,null,Missing))
{
thumbImage.Save(@"PhysicalPath"+resource.Name,System.Drawing.Imaging.ImageFormat.Icon);
url = "http://WebPath/"+resource.Name;
}
}
}
else
{
url = resource.UrlThumbnail;
}
return url;
}
}
}

2. Add the following references
a) using System.Drawing
b) System.Web
c) using Microsoft.ContentManagement.WebAuthor
d) using Microsoft.ContentManagement.Publishing

3. Create a temporary folder with appropriate rights for a web user to write data to that. Have the folder in a saver place as it can be assessed by anyone. Make it as a virtual directory. In the PhysicalPath above class replace it with the path of this directory and WebPath with the virtual directory name.

4. Deploy the dll in the bin folder of your MCMS project.

5. Make a copy of ResourcesBrowse.aspx - its default location "C:\Program Files\Microsoft Content Management
Server\Server\IIS_CMS\WebAuthor\Dialogs\ResourceBrowser\Management\"

6. Open ResourcesBrowse.aspx in notepad and change the Page derivative as bellow
<%@ Page language="c#" Codebehind="ResourcesBrowse.aspx.cs" SmartNavigation="true" AutoEventWireup="false"
Inherits="MCMS.CustomResourceBrowser" %>

This will make thumbnail in the temporary folder for bitmap files, which will be referred by Resource Manager - used to show the preview.

Note: Take precautions before using this method as ResourcesBrowse.aspx may get changed without any notification.

27 Comments:

Blogger Unknown said...

Private Label Rights

2:00 AM  
Anonymous kajal sharma said...

Independent high services in Mumbai, from collage, corporate world, glamour world, high society, they want enjoyment with others we just meets their desire and demands.

8:21 PM  
Blogger Unknown said...

Asian escorts are sweet, they listen to you patiently and loves you passionately like you are the only one in this world who matters to them. Hence many straight as well as lesbian and bisexual people now readily looking out for an asian escorts nyc agency which can provide them a beautiful Asian lady with whom they can spend a magical night.

Agra Escort Service
Agra Call Girls
Escort In Agra

Agra Escort Service
Agra Call Girls
Escort In Agra

1:46 AM  
Blogger Unknown said...

Escorts in Agra are versatile, seductive and high class in any position. Our Independent Escorts in Agraacc are expert adult entertainers and forms, keep to make your days and nights colorful,
Agra Escort
Agra Escorts
Agra Escort Service
Escorts In Agra
Udaipur Escort
Udaipur Escorts
Udaipur Escort Service
Lucknow Escort
Lucknow Escorts
Lucknow Escort Service

5:27 PM  
Blogger Bangalore Escorts Service said...

We are serving those call girls who have some additional push to full fill the first long for you. It's no compelling reason to go for the other standard and exhausting escorts' office. We have extraordinary females who are energetically prepared to hang you up for sexual fun. They all are searching for the pleasure with new men for minimal expenditure. You will get the chance to have all sort of females who can influence you to get the intercourse service in different styles.

Bangalore Escorts
Escorts in Bangalore
Independent Bangalore Escorts Girls
Bangalore Escorts Girls
Sexy Bangalore Escorts
Indian Escorts in Bangalore

2:41 PM  
Anonymous Ruhi Sharma said...

Our Escorts Agency in Bangalore has been set the gigantic standard to another agency provider. We procure the females who have some brilliant standard to draw in the clients. Before they get enlisted all lady needs to finish our few tests after that, they got procure for you. They are from a prominent foundation and have attractive appeal to commit you with energy. They have a vast illicit relationship of serving more than 100 clients and the level of satisfaction drive us to be on top on the rundown.
Bangalore Escorts

Bangalore Escorts Service

Escorts in Bangalore

Independent Bangalore Escorts

Indian Bangalore Escorts

Sexy Bangalore Escorts

4:48 PM  
Anonymous Sanaya Gill said...

We are guarantee that our Escorts service in Bangalore is the best satisfied, you can enlist them whenever. When you feel that you need of truthful to goodness sidekick who makes your inclination, we always present for you with amazing choices. At that point, our agency is open all day, every day at your administration for the sexual fun and happiness.
Bangalore Escorts

Escorts in Bangalore

Independent Bangalore Escorts Girls

Bangalore Escorts Girlsl

Call Girls in Bangalore

4:55 PM  
Blogger kelly sharma said...

Really impressive post. I read it whole and going to share it with my social circles. I enjoyed your article and planning to rewrite it on my own blog

Chandigarh Call Girls
Chandigarh Escort Service
Chandigarh Escort
Escort in Chandigarh
Escorts service in Ludhiana

1:35 AM  
Blogger Danny Escorts said...

Our Bangalore Escort Service girls are not for just only sexual romance and but in addition for psychological assist and healing for any sort of situations & situations, so our Qualified Bangalore Escort Service are merely the best substitute in your case. click here Whatever the situation you stuck in, our women will gratify and please you from the many methods of The underside of their hearts. Visit Here: https://tinyurl.com/ycpoapu3

3:28 PM  
Blogger bangaloreescort said...

bangalore escorts||
mumbai escorts||
mumbai call girls||
andheri escorts||
bangalore call girls||
juhu escorts

5:04 PM  
Blogger NandiniDivekar said...

Call Girl Pune Escorts Services has gorgeous females provides Independent Escorts Service in Pune call girls at 100% satisfaction with VIP models Girl. Provided Pune escorts at our agency are professional in nature and are eager to serve you at your place.

Pune escorts Servives
Escorts in Pune
Pune independent escorts

6:00 PM  
Anonymous Anonymous said...

You should make a point of looking for the Sexy Bindu Escorts and no one else. The hot Mount Abu Escorts of this source are not proud but quite confident about ways to completely please the client.

Other Escorts Partner

http://sexyramya.in/
http://mountabuescort.in/
All the adult services are delivered in the right way and terms of ranking are of top-notch quality. The client never feels that hot babes require inputs for carrying out the adult pleasurable service.
One thing is assured that you will receive a delightful adult service. Selected hot females that you select for the erotic service puts her heart, soul and mind in offering you the service. Just come and feel the pleasurable dominance of the hot females of this source.

6:50 PM  
Blogger Vanishka Jain sexy said...

Amreli Call Girls Service
Escorts in Amreli
Amreli Escorts Service

Dahod Escorts
Dahod Call Girl Service
Escorts Service in Dahod
Dahod Escorts Service
Dahod Escort

Bardoli Escorts
Escorts in Bardoli
Bardoli Call Girls Service
Escort Service Bardoli
Bardoli Escorts Service


Escorts Halol
Halol Call Girls Service
Call Girls Services in Halol
Halol Escorts
Halol Escorts Service

Deesa Escorts Service
Call Girls Service in Deesa
Deesa Call Girls Service

Ahmedabad Escorts Service
Escorts in Ahmedabad
Ahmedabad Call Girls Services
Escorts Service in Ahmedabad
Ahmedabad Escort

4:33 PM  
Blogger Vanishka Jain sexy said...

High profile and independent girls for escort needs in Vadoodara is a really big task. You have contacted most of the escort agencies in Vadodara. Finally ended without satisfaction and bad experience.
Vadodara Escorts || Vadodara Escorts Services
Escorts in Vadodara || Vadodara Escorts Agency
Vadodara Escort || Vadodara Call Girls Services

4:34 PM  
Blogger Vanishka Jain sexy said...

Vadodara Escort Service || Escort Vadodara
Escorts Service in Vadodara || Call Girl in Vadodara
Vadodara escort | High profile vip Vadodara escorts Services |

4:35 PM  
Blogger Vanishka Jain sexy said...

Surat escort
Escorts in Surat
Surat Call girls services
Call Girls Services in Surat
Surat escorts Services

Rajkot Call girls services
Escorts Services in Rajkot
Rajkot escorts
Call Girls Services in Rajkot

Escorts in Bhuj
Bhuj Call Girls Services
Bhuj escorts services
Bhuj escorts

Vapi escort service
Cheap Escorts in Vapi
Vapi Escorts
Vapi Call Girls Services

Nashik escorts
Call Girls Service in Nashik
Nashik Call Girls Services
Nashik escorts Sevices

Jodhpur escorts
Jodhpur Call girls services
Escorts Services in Jodhpur
Jodhpur escorts Services
Jodhpur escort
Cheap rates call girls in Jodhpur

4:35 PM  
Blogger Vanishka Jain sexy said...

Udaipur escorts Services
Call Girls Services in Udaipur
Udaipur escorts agency
Udaipur Call girls services
Udaipur escorts

Escorts in Ajmer
Ajmer Call Girls Service Agency
Ajmer escorts
Ajmer escorts services

Jaisalmer Escort
Jaisalmer Call Girls Services
Escorts in Jaisalmer
Jaisalmer Escorts Services
Low Rates Call Girls Service in Jaisalmer

Bikaner Escort
Bikaner Call Girls Services
Call Girls Services in Bikaner
Bikaner Escorts Services
Bikaner Escorts

Escorts in Sirohi
Sirohi escorts services
Sirohi Call Girls Services
Call Girls Services in Sirohi
Sirohi Escorts

4:36 PM  
Blogger Vanishka Jain sexy said...

Dholpur Escorts
Dholpur Call Girls Services
Escorts Service in Dholpur
Dholpur Escort
Dholpur Escorts Service

Chandigarh Escorts
Chandigarh Call Girls Services
Escorts in Chandigarh
Chandigarh Escorts Services
Chandigarh Escort
Call Girls Services in Chandigarh

Manali Escorts
Manali Call Girls Services
Escorts Services in Manali
Manali Escort
Manali Escorts Services
Low Rates Call Girls Service in Manali

Kullu Escorts
Kullu Call Girls Services
Escorts in Kullu
Kullu Escorts Services
Kullu Escort
Escorts Service in Kullu

Raipur Escorts
Raipur Call girls services
Escorts Service in Raipur
Raipur Escort
Raipur Escorts Services
Hot and sexy call girls in Raipur

Bandra Escorts
Bandra Call Girls Services
Escorts Services in Bandra
Bandra Escorts Services
Call Girls Service in Bandra
Bandra Escort

4:37 PM  
Blogger Vanishka Jain sexy said...

Mahableshwar Escorts
Escorts in Mahableshwar
Mahableshwar Call Girls Services
Call Girls Services in Mahableshwar
Mahableshwar Escorts Service
Mahableshwar Escort

Rishikesh Escorts
Rishikesh Call girls service
Escorts in Rishikesh
Rishikesh Escorts Service
Rishikesh Escort
Call Girls Service in Rishikesh

Dehradun Escorts
Dehradun Call girls services
Escorts Service in Dehradun
Dehradun Escorts Service
Dehradun Escort
Low rates call girls service in Dehradun

Haldwani Escorts
Haldwani Call Girls Services
Escorts Service in Haldwani
Call Girls Service in Haldwani
Haldwani Escort
Haldwani Escorts agency

Sikar Escorts
Sikar Call Girls Services
Escorts in Sikar
Call Girls Service in Sikar
Sikar Escorts Services
Sikar Escort

4:37 PM  
Anonymous Anonymous said...

This comment has been removed by the author.

2:53 PM  
Blogger Vadodara Escorts said...

Gandhinagar Escorts are the Finest Provider of Erotic Service Quality comes first when you think of taking a service. We too pay attention to our quality of services.

5:09 PM  
Blogger Muskan Patel said...

Surat Escorts
Surat Escorts Service
Escorts in Surat
Surat Call Girls
Surat Escorts Agency
Russian Escorts Agency
Independent Surat Escorts
Surat Escort Service
Independent Escorts in Surat
Daman Escorts
Daman Escorts Service
Rajkot Escorts
Rajkot Escorts Service
Vadodara Escorts
Vadodara Escorts Service
Mount abu Escorts
Mount abu Escorts Service

1:45 AM  
Anonymous UltraSonic Keto said...

That means you can get plenty of CBD from comparatively little product. So, we’ll also go over some CBD fundamentals, together with what you are able to do to confirm product quality before you buy. People have used CBD for every little thing from chronic pain to anxiousness.

UltraSonic Keto
One Shot Keto Pro
Insulux Comentarios
Biolife Keto UK
Keto GT Doctor Juan
UltraSonic Keto Pills

3:10 AM  
Anonymous Green Fast Diet Keto said...

I've given up on these Ketosis Diet Pills alternatives. Can't you? This is the time to let your hair down. Here are a few promising theories. I gather they'll like this. My prominence has remained terrific. Some problems are effortless to solve. I'm going to make it very clear. It doesn't require a lot of intelligence. I'm only following in their footsteps. It's why I stopped looking at Ketosis Diet Pills. I have a lot of changes to make.

https://www.supplementz.org/green-fast-keto-reviews/

https://www.supplementz.org/trim-life-keto/
https://www.supplementz.org/exipure-reviews/
https://www.supplementz.org/nutri-acv-gummies/
https://www.supplementz.org/keto-1500-pills/
https://www.supplementz.org/keto-burn-am-reviews/

3:44 AM  
Anonymous Surat escorts said...

very nice post

6:30 PM  
Anonymous Auraiya escort said...

Contact us at +919341695943
Check our links!
Independent Dating girl
Independent VIP girl

7:24 PM  
Anonymous PT Trim Fat Burn said...

In medicine, detoxification can be achieved by decontamination of poison ingestion and the use of antidotes as well as techniques such as dialysis and chelation therapy. "Depending on how intense your addiction is, you can experience withdrawal symptoms, such as brain fog, crankiness and fatigue," Alpert said.


https://supplementsbook.org/pt-trim-fat-burn/
https://supplementsbook.org/african-lean-belly/
https://supplementsbook.org/essence-of-argan/

11:53 PM  

Post a Comment

<< Home