I do hope you enjoyed your Fourth of July day off (if you’'re in a country that celebrates it).
I was wondering…
the image online/offline status is all fine and dandy - but at this point I’'d like to use a text link so I could do something like this…
online:
“
”
offline:
“”
(empty string)
…
I don’'t see any way to use text links for the status right now. Is this something that could be added in the future? Or could we tie the images to a link, instead of a workgroup? Right now, if I wanted to put more than one link on a page, I either need two workgroups or need an image that works in both places.
open the jivelive.jsp page in a text editor (save a copy on your drive as a back up) located in your openfire plugins directory
" …\Openfire\plugins\webchat\jivelive.jsp"
Copy the first function code and paste at the bottom so it lines up with the others should look like this
Change the “showChatButton” to “showChatLink” so it looks like this:
function showChatLink(workgroup) {
var d = new Date();
var v1 = d.getSeconds() + ‘’ + d.getDay();
var img = “<%=urls %>/live?action=isAvailable&workgroup=” + workgroup;
var gotoURL = “<%= urls %>/start.jsp?workgroup=” + workgroup + “&location=” + window.location.href;
document.write(
“<a href=”#" onclick=“launchWin(‘framemain’,’”+gotoURL+"’,500, 400);return false;"><img border=“0” src=""+img+"">");
}
Remove the code below in the tail end of the script and put in place the text you would like to see
Close file, save changes
Insert your chat snippet into your webpage and adjust the “showChatButton” to “showChatLink”:
I have no idea how to set up the text link to recognize presence. You may want to look into to a text link that shows your operator office hours. some thing link “Live Chat Support (M-F 8a - 5p)”. At least this way you can customize the link with your sites CSS Style and it blends with your site nicely.
Well since I’m a novice the above is a long method of how to get a text link. I found another, which everyone probably knows by now, just thought I’d share.
Place this into your “” tags of your webpage
Next: Place this where you want the text link to appear (mod to suit your domain and workgroup)
<a onclick="launchWin('framemain','http://--path to your webchat directory--/webchat/start.jsp?workgroup=support@workgroup.your-domain.com&location=http://page where link is located.com',500, 400);return false;" href="#">Start a Chat</a>
That should be it, you can now style it with CSS and all that good stuff. I’m a bone head newbie so I hope this helps fellow newbies as well. Thanks everyone for your support