Wednesday, June 27, 2007

Updating a manager in all rooms

Quickr was just released and it has a new concept of "super user" per place. For older versions, the best we could do is a manager in all rooms. This is a script that will add a manager in every room of a given place:

Set s = New notessession
placename = "placename"
server = "www/projectlounge"
aclname = "CN=Ian Connor/O=projectlounge"

Print "Starting in main room"
Call restoredb(placename, "quickplace/"+placename+"/main.nsf", aclname)

Sub restoredb(roomtitle, roompath, aclname)
Dim roomdb As NotesDatabase
Dim roomview As notesview
Dim doc As notesdocument

Set roomdb = s.GetDatabase(server, roompath)

If roomdb.IsOpen = False Then
Call roomdb.Open(server, roompath)
End If

Dim acl As NotesACL
Dim entry As NotesACLEntry
Set acl = roomdb.ACL
Set entry = acl.GetEntry( aclname )

If entry Is Nothing Then
Set entry = acl.CreateACLEntry _
( aclname, ACLLEVEL_MANAGER )
entry.IsPerson = True
Call entry.EnableRole( "h_Managers" )
Call entry.EnableRole( "h_Members" )
Call acl.Save
End If

Set roomview = roomdb.GetView("System\Subrooms")
Set doc = roomview.GetFirstDocument

While Not (doc Is Nothing)
Dim iroomtitle As String
Dim iroomfile As String

iroomtitle = doc.GetItemValue("h_Name")(0)
iroomfile = doc.GetItemValue("h_LocDbName")(0)

Print "Working on: " + iroomfile
Call restoredb(iroomtitle, "quickplace/"+placename+"/" + iroomfile, aclname)

Set doc = roomview.GetNextDocument(doc)
Wend
End Sub

Friday, June 15, 2007

QuickPlace Red X Fix

If you see a red x in quickplace instead of attachments, it means that you don't have the quickplace upload control installed. This can happen when:
1. You do not have installation rights on the machine; or
2. There is a desktop policy or network firewall preventing it being installed.
In both cases, you really need to talk with your system administration staff for help. Once, you have done this and if you need to install the control manually, here is what you will need to do:
1. Login in as a user that can install software; and
2. Download the file qp2.dll to c:\ and then run "regsvr32 c:\qp2.dll" from a command prompt.

IBM has also released a longer FAQ on the subject here:
http://www-1.ibm.com/support/docview.wss?rs=2338&uid=swg21154131

Labels: