Once In A White Moon - by Gina Therese Hvidsten
© 2024
Once In A White Moon

Change image tag generated by CKEditor

For a new project of mine I’m using a rich text editor called CKEditor. This is a highly configurable editor that, unfortunately, suffers from cluttered and not easily understandable documentation. I needed to change the generated HTML from the editor so that images that were resized not only had their size set as style attributes, but as query string variables. So I needed this: <img src=”http://yoursite.com/photo.jpg” style=”width:150px; height:200px;” /> to be output as this: <img src=”http://yoursite.com/photo.jpg?width=150&height=200″ style=”width:150px; height:200px;” /> That proved to be easier said than done, but after quite a lot of googling, asking on several forums, and getting some helpful (and some not helpful at all) replies, I finally ended up with the following: Put the following code into CKEditor’s config.js: CKEDITOR.on(‘instanceReady’, function […] Read more

Art history lesson

Today my nephew got baptized. Let’s not dwell on that and look at what I got him instead.A few days ago I actually went into an art gallery and bought a piece of art. There’s certainly a first time for everything! I hope the little guy will appreciate a genuine piece of art as he grows older. What I got him was this lithograph from artist Per Krohg, son of the renowned Christian Krohg. Per originally made a series of pictures for his son Guy when he was a child. Each picture represented a letter in the alphabet. The family of artists were typical of their time and lived in France, so each picture also represented something in French.Unfortunately the gallery didn’t have the letter […] Read more

Response.Redirect inside an UpdatePanel

Recently I’ve had more and more pages displaying unexpected behaviour. I had an UpdatePanel with a button inside it. The button’s Click event performed a Response.Redirect(), but nothing happened. The Javascript error console showed the following error message: Sys.WebForms.PageRequestManagerParserErrorException: The message received from the server could not be parsed. Common causes for this error are when the response is modified by calls to Response.Write(), response filters, HttpModules, or server trace is enabled. After some googling it seems that ASP.Net doesn’t quite support Response.Redirect() inside UpdatePanels any more. The solution was to make sure the button actually performed a full postback of the webpage, and not only a partial postback (as it would do because it was inside an UpdatePanel). There are two ways of doing […] Read more

Samba/Winbind connection issues

I recently had to reconfigure my linux (Ubuntu 10.04 LTS) servers.I had previously used these two howto’s to configure my servers.Suddenly one of them refused to properly connect with various error messages: # wbinfo -pPing to winbindd failed # wbinfo -uError looking up domain users # wbinfo -tchecking the trust secret via RPC calls failedCould not check secret After a week of googling I finally found the following solution, which did the trick for me. Stop smbd, nmbd and winbindd (make sure they are really dead using ps. winbindd still lingered after I stopped the service) Delete the linux computer from the Primary Domain Controller (using the Management Console) Delete the secrets database (/var/lib/samba/secrets.tdb) Join the domain again Start the daemons (smbd, nmbd and winbindd) […] Read more