You'll have to forgive me, these instructions aren't going to be quite as in-depth as the forum integration ones were, but here's the gist of what it took to get Private Messages using blackbirdjs instead of Eeeksoft's popup window:
First, you have to modify blackbird.js slightly. By default there is no way to programmatically show, hide, or move the window, only to toggle its visibility and current location.
File: blackbird.js
Find:
Replace With:
Next we need to change the namespace to prevent possible conflicts:
File: blackbird.js
Find:
Replace With:
blackbird.js is now ready for use. Now comes the tricky part: making it work from MessageCount, and the bit where I get a little vague. I got fancy and built in some limited skinning capabilities by moving the two PNGs and the CSS file into a subdirectory and allowing for multiple directories, specified in the View Options via a dropdown (Directory.GetDirectories(Server.MapPath("/DesktopModules/DnnForge - Message Count/blackbirdjs/")) will get you the "theme" folders) as well as options for location and font color. While it's handy, it also makes the changes significantly more complex, so I'm going to go with just the most basic "get it working" bit here:
File: MessageCount.ascx.vb
Find:
Replace With:
Yup, you read that right—all we're doing is building the JavaScript behind the scenes and making the browser add it to the BODY OnLoad event (the setInterval() is there to fix a problem with IE's scripted order of operations—without it IE tries to move/populate/show the popup before it exists.) |