|
|
 Rank: Devotee
Joined: 7/20/2006 Posts: 77 Location: Italy
|
I posted a similiar question before but got no answers http://forum.umbraco.org/extending-umbraco/questions-about-media-typesWhat I am trying to do is to create a new media type that "extends" on image but has additional attributes. I still want to get a thumbnail and file information like umbracoBytes and so on. How do I manage this? regards Gísli
"We come from the land of the ice and snow, From the midnight sun where the hot springs blow"
|
|
 Rank: Addict
Joined: 7/19/2006 Posts: 610 Location: Bad Homburg, Germany
|
Go to settings/mediatypes Add a new datatype give it all the generic properties the image datatype has (be sure to name the aliases like the ones from the image) add your own generic properties That's it Thomas
• 2007/2008 MVP • www.thoehler.com • Bad Homburg, Germany
|
|
 Rank: Devotee
Joined: 7/20/2006 Posts: 77 Location: Italy
|
úps.. I did that and at first it did not work. but after a refreash it works fine :)
"We come from the land of the ice and snow, From the midnight sun where the hot springs blow"
|
|
 Rank: Fanatic
Joined: 10/9/2006 Posts: 460 Location: batavia, IL
|
I am looking to do something similar but want to have a HI-RES image associated with each image in the media section. My thought was a tab [Print Image] with an upload field and identical attributes, umbracoWidth, umbracoHeight, umbracoBytes, etc. but i get errors that say i can't to that... actually, it let's me do it, but it puts the info on generic properties instead of the tab i want, then when i try to delete it errors... i have to go into the DB and delete the duplicate property. any thoughts on how i could achieve this in a user friendly way?
bootnumlock - aka bob baty-barr My Packages Site: http://packages.maliciousthinktank.comBusiness Blog: http://www.maliciousthinktank.com/blogPersonal site: http://www.baty-barr.comLevel 1 Certified!
|
|
 Rank: Umbracoholic
Joined: 7/20/2006 Posts: 1,076 Location: Charleston, West Virginia, United States
|
Hey Bob, A means in which this can be done is to modify (create a new) the datatype for the upload to handle the attributes better. I am going to look into it more.. How do you want your attributes stored? Currently, they are named umbracoSize, umbracoWidth, umbracoHeight (I think), for the upload field named umbracoFile. Would a number work, or do you want to do something like printFile, printSize, printHeight, printWidth, where the fields are based off of the prefix?
• 2007/2008 MVP • 2008/2009 MVP • Certified • Licensing • Support • Development • Hosting •
|
|
 Rank: Fanatic
Joined: 10/9/2006 Posts: 460 Location: batavia, IL
|
i think the printFile, printBytes, printWidth, printHeight would be best -- based off the prefix... you do know this is an extension of our off-line conversation ;) I was trying to help out with the cause... and here you are answering my posts, when i was going to come back to you and say... look, i found this on the forum :) guess i'm busted:innocent:
bootnumlock - aka bob baty-barr My Packages Site: http://packages.maliciousthinktank.comBusiness Blog: http://www.maliciousthinktank.com/blogPersonal site: http://www.baty-barr.comLevel 1 Certified!
|
|
 Rank: Umbracoholic
Joined: 7/20/2006 Posts: 1,076 Location: Charleston, West Virginia, United States
|
:!: I know, I just wanted to pester you a bit..
• 2007/2008 MVP • 2008/2009 MVP • Certified • Licensing • Support • Development • Hosting •
|
|
 Rank: Devotee
Joined: 7/20/2006 Posts: 77 Location: Italy
|
I'm interested in what you find out. so please post it on the forum :)
"We come from the land of the ice and snow, From the midnight sun where the hot springs blow"
|
|
 Rank: Umbracoholic
Joined: 7/20/2006 Posts: 1,076 Location: Charleston, West Virginia, United States
|
Hi Gisli, I have modified the upload field a little to allow it to use store the file attributes for more than one file. Please download and give the DLL a try here.. • copy the dll into the bin folder • create a new datatype, control: upload field 2, database type: nvarchar • edit you mediatype, create a new property alias xxxxFile with the upload datatype that you just created. • create the 4 labels for the attributes with the xxxx from the above file in front of the keywords; Bytes, Width, Height, Extension. • enjoy. Report any problems back to me... Thanks. Case
• 2007/2008 MVP • 2008/2009 MVP • Certified • Licensing • Support • Development • Hosting •
|
|
|
Guest |