« Instant Technologies Expands Instant Agent Framework for Lotus Sametime to Include LDAP Queries | Main| We're in Chicago... »

Blogging may become a bit quiet over the next few days...

Category
As I will be celebrating my brothers 30th birthday (yes about 3 weeks late) at Indianapolis with him. We will take my machine with me, and we'll try and take some cool photos of pit babes and post them, maybe I can get some pictures as good as the ones Volker posts...

Just so I can leave you with something useful, a customer wanted a quick and dirty way to have STLinks on a webpage prompt for a users name when they click on a link, so that it didn't say something like you are chatting with anonymous1232/Instant. The following is the easiest and quickest way I could come up with to do it very easily. This is not necessarily the best approach, but it's a good one to get started with as it requires no modifications to STLinks source directories.
<html>

<head>
   <LINK REL=STYLESHEET HREF="http://sametime.acme.com/sametime/stlinks/stlinks.css" TYPE="text/css">
   <SCRIPT src="http://sametime.acme.com/sametime/stlinks/stlinks.js"></SCRIPT>
   <SCRIPT>
      //Track if the STLink was clicked so that we do not start a chat when the applet is logged in for the first time
      STLinkClickedResult = false;
      startchatwith = "";
      setSTLinksURL("http://sametime.acme.com/sametime/stlinks");
   </SCRIPT>
   <SCRIPT>
      //Login to website as anonymous ST Links User
      writeSTLinksApplet("Anonymous Visitor","",false);
   </SCRIPT>
   <SCRIPT>
      //Override STLinksLoggedIn function and if logged in clicked, start chat with selected person
      function STLinksLoggedIn(myUserId, myUserName) {
         //alert("STLinkClickedResult =" + STLinkClickedResult);
         //alert("startchatwith =" + startchatwith);
         if (STLinkClickedResult == true) {
            STLinkClickedResult = false;
            STLinksCreateIM(startchatwith);
         }
      }
   </SCRIPT>
</head>

<body>
<SCRIPT>
function STLinkClicked(userName, displayName, status, evt){
   STLinkClickedResult = true;
   startchatwith = userName;
   STLinksLogout();
   var visitorName = prompt ("Please enter your name","");
   STLinksLogin(visitorName,"",false);
}
</script>
   <SCRIPT>
      //Person to display awareness for on page
      writeSametimeLink("Carl Tyler","Carl Tyler",false);
   </SCRIPT>

</body>

</html>
If you're a talented DIV/Layer type person you could popup a fake window that prompts for this info rather than using an ugly javascript prompt.

Comments

Gravatar Image1 - Hi Carl!

I was wondering.... using a Domino 7.x and Sametime 7.5.x server, if it is possible to show user names on Intranet pages as followes:

User "John Doe/Acme" is logging into the corporate website.
Each page on the Intranet has at least a "Created by:" and "Last modified by:" sections. Each with a different name next to its label.

If our guy "John Doe" is on a page which is created by "A. Doe" (currently also online) and last modified by "B. Doe" (currently offline) I want the following:

The HTML for the created by should be something like:
<div id="CreatedBy" class="stUsername stOnline"><a href="">A. Doe</a></div>

The HTML for the modified by should be something like:
<div id="ModifiedBy" class="stUsername stOffline"><a href="">B. Doe</a></div>

The <a> links on each name should popup the Sametime chat applet and the currently logged in user "John Doe" should be the sender and either A. Doe or B. Doe should be the receiver (depending on which links John Doe clicks on).

Is this scenario possible.... and if it is... do you know how to implement it?

I can't figure out how to automatically login "John Doe" in the webpage from the Domino login to the Sametime login.

Any feedback would be appreciated. Thanks! :o)

John Hansen

Post A Comment

:-D:-o:-p:-x:-(:-):-\:angry::cool::cry::emb::grin::huh::laugh::rolleyes:;-)