Zimbra offers Open Source email server software and shared calendar for Linux and the Mac
Go Back   Zimbra :: Forums > Zimbra Collaboration Suite > Zimlets

Welcome to the Zimbra :: Forums!
Welcome, if you would like to post a comment please register. We also encourage you to explore all things Zimbra with our team and members of the community.

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 10-26-2007, 10:47 AM
Advanced Member
 
Posts: 215
Default [SOLVED] Fortune File(s) random signature

Ok I dont know who many people would actually care about this, but something I miss with using just mutt on a local machine was the fact that I could have random sig's generated from fortune files ... I don't suppose this is/ever will be possible with Zimbra through a Zimlet?

Not sure it warrants a "feature" request and I think a good chunk of the code must already be out there since it's possible with things like mutt and plugins for squirrelmail ... but I figured I'd check
Reply With Quote
  #2 (permalink)  
Old 10-26-2007, 01:02 PM
Zimbra Employee
 
Posts: 1,434
Default

Yeah, you very well might be able to do that with a zimlet. Probably not straightforward, but doable.
__________________
Bugzilla - Wiki - Downloads - Before posting... Search!
Reply With Quote
  #3 (permalink)  
Old 10-26-2007, 01:26 PM
Zimlet Guru & Moderator
 
Posts: 467
Default

Actually, it's very very easy.

(One of the things writing the O'Reilly book has taught me is that notifyZimlet's is a lot more powerful then people think it is).

You can load a text file with fortunes in them from the scripts. Or use a JSP to select one at random. All very easy. The only hard part is to integrate with Zimbra.

Quote:
Org_Technicaldetails_Basecamp.prototype.onShowView = function(view, isNewView) {
if (view == "COMPOSTE")
{
appCtxt.getCurrentView().getHtmlEditor().setConten t("Quote goes here" );
}
}

Last edited by JoshuaPrismon; 10-26-2007 at 02:46 PM..
Reply With Quote
  #4 (permalink)  
Old 10-26-2007, 02:44 PM
Advanced Member
 
Posts: 215
Default

ok so it's just a matter of randomly selecting a quote from fortune files ... I've done this with perl scripts way back in the day in a hack job CGI ... the next question is after loading the zimlet how do I interact with it.

Sorry for the dumb questions I haven't hacked any real code in quite a while let alone looked at the api or applicable info on creating a Zimlet ... I was wondering if anyone had done something like this but I dont have a problem taking a poke at it in my free time.

Guess I need to buy your book!!
Reply With Quote
  #5 (permalink)  
Old 10-26-2007, 02:48 PM
Zimlet Guru & Moderator
 
Posts: 467
Default

Quote:
Originally Posted by SpEnTBoY View Post
ok so it's just a matter of randomly selecting a quote from fortune files ... I've done this with perl scripts way back in the day in a hack job CGI ... the next question is after loading the zimlet how do I interact with it.

Sorry for the dumb questions I haven't hacked any real code in quite a while let alone looked at the api or applicable info on creating a Zimlet ... I was wondering if anyone had done something like this but I dont have a problem taking a poke at it in my free time.

Guess I need to buy your book!!
The book should be out soon. I am waiting on one last bug to get resolved, then it's off to the races.

In terms of randonly selecting a fortune file, you could run your own fortune server in a CGI script (or you could use Soap::Lite to serve it). The easiest way, if you don't mind learning a little java, is probably to write it in a JSP.

It's actually a pretty good example app. I could probably spin something together real quick to make it happen.
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


Similar Threads

Why Join?

Registering let's you ask questions, makes it easier to search, displays any files attached to posts, and notifies you about replies.

blog.zimbra.com




 

SEO by vBSEO ©2011, Crawlability, Inc.