Yet Another Media Picker (with upload) Options
maynardsmith
Posted: Saturday, December 01, 2007 5:26:17 PM
Rank: Devotee

Joined: 8/23/2007
Posts: 44
This is an attempt to make a better media picker. I do not think the available facilities for uploading and picking images are very user-friendly, since they require the user to separate the processes of uploading images, and inserting into pages. Also the different mechanisms represent the image in different ways, which makes for confusion in writing templates.

So this is a go at making a better one. As always the best way to start is to find something to plagiarise. In my opinion the most user-friendly current feature is the button in the TinyMCE editor for inserting images into the text, so this is based on that code and user interface.

The first version, with some known (and unknown) errors may be downloaded from http://homepage.ntlworld.com/maynard-smith/YetAnotherMediaPicker v0.1.zip. Installation instructions etc. are included.

If you are interested, please try, and let me have any comments.

Tony.
maynardsmith
Posted: Friday, December 14, 2007 6:24:08 PM
Rank: Devotee

Joined: 8/23/2007
Posts: 44
There is now a second version with a number of bugs fixed.

Download from: http://homepage.ntlworld.com/maynard-smith/YetAnotherMediaPicker v0.2.zip

Tony
maynardsmith
Posted: Tuesday, December 18, 2007 9:05:34 PM
Rank: Devotee

Joined: 8/23/2007
Posts: 44
And a third, providing the ability to upload documents as well as images, and to create new media folders.

Download from http://homepage.ntlworld.com/maynard-smith/YetAnotherMediaPicker v0.3.zip

I would be glad to hear from any users who try it.

Rgds, Tony.
Rodriguez
Posted: Wednesday, December 19, 2007 4:22:21 PM
Rank: Enthusiast

Joined: 11/17/2006
Posts: 22
Hi Tony,

I like your idea of making a new media picker control. So I tried to install it on fresh umbraco 3.0.3 installation and stucked after coping the DLL and the folder.

I'm getting error messages like this when i try to access the site or backend:
the file or assembly yampWrapper wasn't found. Permisson denied.

It doesn't matter if I add "/usercontrols/YetAnotherMediaPicker/" into the Web.config.

My files are located in the following folders:
yampWrapper.dll in /bin
YetAnotherMediaPicker folder in /usercontrols


Greetings
Rod
maynardsmith
Posted: Wednesday, December 19, 2007 5:09:40 PM
Rank: Devotee

Joined: 8/23/2007
Posts: 44
Rod,

I am afraid I am not a great wiz on Windows permissions problems, but it sounds as if you don't have the right permissions set on the DLL file. I suggest you look at the other dlls in /bin and make sure it is the same. I have had trouble in this area and only got out of it by going to the Advanced tab, turning off Inherit from Parent, and turning it on again.

The extra line in webconfig is necessary, but only when you get to trying to open the popup window, and it doesn't look like you have got that far.

I have not tested on Umbraco 3.03, but it doesn't seem likely that this is the problem.

Best of luck,

Tony.
tim
Posted: Wednesday, January 02, 2008 3:10:08 PM

Rank: Addict

Joined: 2/19/2007
Posts: 738
Location: Belgium
Hi Tony,

I have your yamp running but i have a small problem. Sometimes when changing content the yamp is empty again after saving.

Umbraco tips and tricks: http://www.nibble.be - umbraco mvp 08/09 - certified level 1 & 2 professional
maynardsmith
Posted: Thursday, January 03, 2008 3:38:45 PM
Rank: Devotee

Joined: 8/23/2007
Posts: 44
Tim,

I take it you have the lastest version (0.3). Can you be any more specific about the circumstances? I am afraid I don't know of any reason why it should do that (unless it is a caching problem somewhere - I have had some confusion with that).

Regards, Tony.
tim
Posted: Thursday, January 03, 2008 3:48:57 PM

Rank: Addict

Joined: 2/19/2007
Posts: 738
Location: Belgium
Well I'm working on a site where it has allready been installed so I don't know wich version it is. How can i check this ? And how can i upgrade ?

Thanks

Umbraco tips and tricks: http://www.nibble.be - umbraco mvp 08/09 - certified level 1 & 2 professional
maynardsmith
Posted: Thursday, January 03, 2008 4:22:41 PM
Rank: Devotee

Joined: 8/23/2007
Posts: 44
Tim,

The easiest way to tell, if you are just using the facility without access to systems administrator facilities is:

Click the button to "Change" an Image, and bring up the popup window.
Go to the "Create New" tab.
If there is a dropdown list at the top labelled "Media Type" then it is v0.3.

If not then see above in this forum for a link to the download. Installation instructions are included.

Regards.
pkoutoul
Posted: Tuesday, January 15, 2008 6:42:49 PM

Rank: Fanatic

Joined: 8/9/2007
Posts: 284
Location: Kentucky, USA
Hey Tony,

First of all, thanks for sharing YAMP with the umbraco community. It looks like a terrific addition to umbraco. Unfortunately, I am having some difficulty.

I followed all the steps, including the web.config edit. When I place a YAMP field in a document, all seems to work fine. I can use the dialog up until the point of clicking the upload button. When I do that, asp.net throws an exception ("Object reference not set to an instance of an object"). For some reason, I can't even select the error text in the dialog to paste it here. Here is the line of code that blows up:

Code:

Line 55: umbraco.cms.businesslogic.media.Media m = umbraco.cms.businesslogic.media.Media.MakeNew(TextBoxTitle.Text, umbraco.cms.businesslogic.media.MediaType.GetByAlias(imageType), this.getUser(), int.Parse(folderid.Value));


Stack trace:

[img src="http://test.fcps.net/img/exception.gif"][/img]

In case that doesn't show up, try this: http://test.fcps.net/img/exception.gif

Any ideas?

Pete Koutoulas • Fayette County Public Schools • Lexington, Kentucky
maynardsmith
Posted: Friday, January 18, 2008 10:28:24 AM
Rank: Devotee

Joined: 8/23/2007
Posts: 44
Pete,

The only thing I can think of immediately is to do with Media Types. YAMP assumes that the three standard types of Media object exist, i.e. Image, File and Folder. If your installation has altered these (or specifically has altered the one you are trying to use) then it will blow up at this point.

Prompted by your post I have also found a couple more bugs to be aware of, as follows:

1. If you click Insert without selecting an image it will Delete the existing one from the page. It should give a user error message.

2. When uploading a file, if the filename is invalid (manually typed incorectly or altered after using Browse), then it may just sulk and do nothing, may throw a server error (not the one Pete reported), or may load an empty file.

Regards, Tony
pkoutoul
Posted: Friday, January 18, 2008 2:33:58 PM

Rank: Fanatic

Joined: 8/9/2007
Posts: 284
Location: Kentucky, USA
Tony, thanks for the reply. You are correct -- the problem was that I had inadvertently deleted the media types. I have since re-created them and have everything working as far as the media types go. And I no longer get the exception thrown when using YAMP.

However, now I am seeing another problem. In IE 6, the dialog does not display the Insert and Cancel buttons at the bottom. I don't know if they are getting cut off or what, but I can't see them and since there are no scroll bars I can't scroll down to see if they are there. The dialog displays and works perfectly in Firefox, my usual browser of choice. However, other weirdness with the RTE has forced me into using IE with umbraco.

Have you seen this problem?

Pete Koutoulas • Fayette County Public Schools • Lexington, Kentucky
cmarcel
Posted: Thursday, February 07, 2008 8:45:34 PM
Rank: Newbie

Joined: 1/16/2008
Posts: 8
argggghh! For those who haven't visited the forum bug thread, if you click 'reply' when you aren't logged in, on logging in you get re-directed in such a way that your post won't get posted. Very frustrating, as I've lost a few posts 'till now :)

Anyhow, I was getting an error with v0.3 - it seems like the user control does not implement the required umbraco.editorControls.userControlGrapper.IUsercontrolDataEditor interface:

Code:
public partial class YetAnotherMediaPicker : System.Web.UI.UserControl, yampIUserControl


I was not able to find the yampIUserControl interface in any of the cs files in the zip.

Luckily, v0.2 works great for me. Thanks for such a hugely improved media picker Tony!

Best,

Christophe
maynardsmith
Posted: Friday, February 08, 2008 12:29:55 AM
Rank: Devotee

Joined: 8/23/2007
Posts: 44
Christophe,

You are right, twice! I hate that point about logging in as part of replying not working as well.

Also, the ZIP does not contain the yampIUserControl Interface definition, but I have never found it necessary, perhaps because I just put the source .CS files into the website and let IIS compile them on the fly, perhaps it is happy that it has a compiled version of the interface in the yampWrapper.dll, I don't understand the thing to that level of detail I am afraid.

However there is now a copy of the source file in http://homepage.ntlworld.com/maynard-smith/YetAnotherMediaPicker v0.3.1.zip. It is unchanged otherwise.

Regards, Tony.
fed
Posted: Tuesday, July 22, 2008 3:01:48 AM

Rank: Aficionado

Joined: 3/30/2008
Posts: 109
Location: Sweden
Tony,

I have tried installing your media picker on Umbraco v4, but I am running into some trouble. I guess it only needs minor changes to be compatible.

I just want to check if I have your permission to make it compatible with v4?
Users browsing this topic
Guest


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.