Results 1 to 4 of 4

Thread: contentObject element in zimlet definition file

  1. #1
    jiggy is offline Active Member
    Join Date
    Feb 2007
    Posts
    32
    Rep Power
    8

    Default contentObject element in zimlet definition file

    hello,

    I have gone through sample zimlets like that for date,url,emails...
    In all of them the contentObject element specifies a attribute named type.

    Can anybody please tell me what does that represent and what is its purpose??

    Thanks.

  2. #2
    JLee is offline Zimbra Employee
    Join Date
    Oct 2005
    Posts
    59
    Rep Power
    9

    Default

    It's there largely for historical reason. New zimlets don't need type attribute in contentObject element.

  3. #3
    jiggy is offline Active Member
    Join Date
    Feb 2007
    Posts
    32
    Rep Power
    8

    Default One more query

    Thanks a lot JLee for your reply.

    I have one more query to ask about regarding contentObject.

    The scenario is i have to select some content in the email with the mouse and in the contextmenu i have provided some menu items clicking on which a dialog gets opened up with a input field.What i need to do is the content which is previously selected by the user should get populated in the input field of the dialog box opened on click of a contextMenu Item.

    I have no idea regarding how to do this and hence would appreciate every suggestion from anybody.

    Thanks.
    Last edited by jiggy; 02-28-2007 at 11:45 PM.

  4. #4
    ychaouche is offline Senior Member
    Join Date
    Jul 2012
    Location
    Algiers
    Posts
    55
    Rep Power
    2

    Default

    ZmZimletBase has a match method. Maybe you could overload that method and play with it.

    {array} match(content, startIndex)
    This method is called when content (e.g. a mail message) is being parsed. The match method may be called multiple times for a given piece of content and should apply the pattern matching as defined for a given zimlet <regex>. Zimlets should also use the "g" option when constructing their <regex>.

    The return should be an array in the form:

    result[0...n] // should be matched string(s)
    result.index // should be location within line where match occurred
    result.input // should be the input parameter content

    Parameters:
    {string} content
    the content line to perform a match against
    {number} startIndex
    the start index (i.e. where to begin the search)

    Returns:
    {array} the matching content object from the startIndex if the content matched the specified zimlet handler regular expression; otherwise null

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Replies: 21
    Last Post: 02-04-2010, 10:06 AM
  2. centos 5 zimbra 4.5.6 no statistics
    By rutman286 in forum Installation
    Replies: 9
    Last Post: 08-14-2007, 09:30 AM
  3. Opensource backup Question.
    By nfear24 in forum Administrators
    Replies: 3
    Last Post: 03-31-2007, 11:47 PM
  4. Traslation SVN tree status
    By meikka in forum I18N/L10N - Translations
    Replies: 7
    Last Post: 02-13-2007, 11:13 AM
  5. M3 problem with shares
    By titangears in forum Users
    Replies: 4
    Last Post: 01-12-2006, 01:01 PM

Posting Permissions

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