mairix searching, need some help

[email protected] Mon, 20 Aug 2012 20:20:00 -0600
Newsgroups gmane.mail.squirrelmail.devel
Message-ID <[email protected]>
Hi,

I have a plan to integrate fast mairix searches into Squirrelmail in
various ways.  I would like to eventually make a plugin, but for the
moment I'm prototyping.  Also, at least one needed hook is missing,
although it might be available in v1.5+  I'm using SM 1.4.23.

(For readers' information, mairix is an email indexing and searching
facilty which uses astonishing small index files, and produces
astonishingly fast search results, including *threaded* results.
http://www.rpcurnow.force9.co.uk/mairix/index.html).  Search results are
returned in a special mail folder as symlinks to emails.  Mail folders and
all subdirectories can easily be searched.

My goal is to make SM searching so fast and flexible that it can replace
to a large extent the use of folders, similar to the concept of gmail. 
Using mairix as the search engine, "virtual folders" can also be
implemented.  Although SM does not support the use of tags nor editing of
mail headers for existing mail, I think traditional folders can be a
satisfactory substitute for tags.

My plan is roughly as follows:
1. Add Mairix fast indexed search to the Search page.  I have this working
pretty well, although I couldn't get the search submit button to
immediately display the results message list (which appear as symlinks in
a mail folder) via right_main.php.  Instead, after a mairix search, where
you would expect the results to appear it shows a message telling how many
results there were and instructs the user to click the "mairix" folder
link in the folders list to view the results.  I'm sure a direct jump to
right_main.php, displaying the mairix search folder content, is possible.

2. Add a "show all correspondence with sender" search link to each message
in message lists.  This is a feature I must have, and is the reason I hung
on to Opera mail for many years.  In SM, I have implemented it as a
one-character-wide link for each message in message lists.  Clicking this
link immediately shows all the messages ever exchanged between the user
and the sender of the message.  It's working just the way I want it.  My
code changes were added to mailbox_display.php.  There is no hook
available in 1.4.23.

3. Add a Virtual Folders list below the regular folders list in the left
panel.  This is where I'm currently stuck.  When I add a virtual folder
link to left_main.php to display the search results list via
right_main.php, the results list of messages is rendered in the *left*
panel!  This bewilders me, since a nearly identical link in left_main.php
opens the mairix search folder correctly in the right panel.

Let me know if it is OK to post code snippets here.  I can do that
off-list if that is better.

-- 
Lloyd

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
-----
squirrelmail-devel mailing list
Posting guidelines: http://squirrelmail.org/postingguidelines
List address: [email protected]
List archives: http://news.gmane.org/gmane.mail.squirrelmail.devel
List info (subscribe/unsubscribe/change options): https://lists.sourceforge.net/lists/listinfo/squirrelmail-devel