Register   Login
     
  Latest Posts  
RE: News Article Detail and Lightbox
by Declic Video on 3/19/2010 3:03 AM
RE: NA Latest - Template question
by spirit on 3/18/2010 3:52 PM
RE: Show a few articles under a Category?
by mao on 3/18/2010 2:34 PM
Show a few articles under a Category?
by nknight on 3/18/2010 1:55 PM
RE: NA Latest - Template question
by mao on 3/18/2010 1:52 PM
RE: Is there a way to add image, based on x of DATE
by ray-isc on 3/18/2010 12:09 PM
RE: NA Latest - Template question
by Blondie on 3/18/2010 11:15 AM
Server Time Issue?
by JoeyJ248 on 3/18/2010 8:33 AM
RE: Multiple images in RSS feed
by swebster on 3/18/2010 7:58 AM
RE: NA Latest - Template question
by spirit on 3/18/2010 7:45 AM
  Forums  
Subject: Using Blackbirdjs for PM Alerts
Prev Next
You are not authorized to post a reply.

Author Messages
Hector SosaUser is Offline
Gold Membership
Ventrian Active Member
Ventrian Active Member
Posts:32


4/28/2009 3:21 PM  

I just saw a new javascript library to create slick alerts. It's called Blackbird. This would be a nice replacement for the current PM alert popups.

http://code.google.com/p/blackbirdjs/


=+=+=+=+=+=+=+=+=+=+=+=+=+=
Hector Sosa, Jr
http://www.systemwidgets.com
Utilities for taming IT Operations
Scott McCullochUser is Offline
Administrators
Ventrian Master
Ventrian Master
Posts:17204


4/29/2009 8:14 AM  
This does look pretty good :)

Scott McCulloch
Site Administrator
DarkmoorUser is Offline
Registered Users
Ventrian Super Newbie
Ventrian Super Newbie
Posts:17

10/26/2009 5:34 PM  

In that BlackBirdJS is a client-side library rather than a server-side one like Eeeksoft's, it's something of a pain in the butt to get working…but the skinning capabilities of BlackBirdJS more than make up for the hassle:

 






DarkmoorUser is Offline
Registered Users
Ventrian Super Newbie
Ventrian Super Newbie
Posts:17

10/27/2009 4:58 PM  

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.)

You are not authorized to post a reply.
Forums > Modules > Private Messages > Using Blackbirdjs for PM Alerts



ActiveForums 3.7