Results 1 to 5 of 5

Thread: [SOLVED] Fortune File(s) random signature

  1. #1
    SpEnTBoY is offline Advanced Member
    Join Date
    Mar 2007
    Location
    Regina, Sask.
    Posts
    215
    Rep Power
    8

    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

  2. #2
    dkarp is offline Zimbra Employee
    Join Date
    Aug 2005
    Posts
    1,433
    Rep Power
    12

    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!

  3. #3
    JoshuaPrismon is offline Zimlet Guru & Moderator
    Join Date
    Nov 2005
    Posts
    477
    Rep Power
    9

    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.

    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.

  4. #4
    SpEnTBoY is offline Advanced Member
    Join Date
    Mar 2007
    Location
    Regina, Sask.
    Posts
    215
    Rep Power
    8

    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!!

  5. #5
    JoshuaPrismon is offline Zimlet Guru & Moderator
    Join Date
    Nov 2005
    Posts
    477
    Rep Power
    9

    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.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] Error Installing Zimbra on RHEL 5
    By harris7139 in forum Installation
    Replies: 10
    Last Post: 09-25-2007, 11:39 AM
  2. Replies: 8
    Last Post: 02-27-2007, 04:10 AM
  3. Replies: 2
    Last Post: 11-15-2006, 12:23 AM
  4. svn version still won't start
    By kinaole in forum Developers
    Replies: 0
    Last Post: 10-04-2006, 06:47 AM
  5. Replies: 16
    Last Post: 09-07-2006, 06:39 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •