Uauto.module - Description from the user point of view:
Uauto.module is a sub-module of ulink project, provides the user interface, handling of client side activities and customized search.
Dependency:
Ulink.module
Upon the installation (along with ulink – if it is not installed beforehand), settings will available at admind/settings/ulink
Configuration:
Uauto.module provides the configurations for key search and Inactivity / Demanded search separately under general settings tab.
These settings include the following and will be described later.
• Key search
o Enable Key search
o Timeout
o Limit search results to
• Inactivity / Demanded search
o Enable Inactivity search
o Enable search on submission
o Search for path alias
o Search for user names
o Inactivity timeout
o Limit search results to
o Show this in the results
o Words to be ignored in the search
Key search
Key search is triggered (when Enable Key search is enabled), when user enters “[l|” (which is considered to be the keyword and will be implemented as a configurable option later) and it will start listening to user input, however to allow the user to complete as fast as he can it triggering will be delayed for Timeout period
When user enters the link, it will be searched for in the tables for the following fields.
• url_alias - alias
• Nodes – node title
• Users - usernames
• Files – filenames or filepaths
User search will be typically like the following
[l|use -> searching for “use” in the url_alias only as it doesn’t contain any word like user/ or node/ or files/
[l|user/a -> searching for “user/a” in the url_alias followed by the search in users for “a”
Results will be displayed in a popup window (the results will be limited to Limit search results to) from where user selects the suitable link.
Suppose here user selects “admin” which will insert [l|user/admin and completes the search. User can close this by either entering “|” or “]”, which produces the final output [l|user/admin].
User can also stops the search by pressing cancel; however it will be resumed upon the next keypress.
Inactivity / Demanded search
If there is no keypress even occurs for Inactivity timeout it will be triggered provided that
Enable Inactivity search is set. Alternatively user can trigger that by pressing Autocomplete Links.
The search is done in the similar manner and the keywords in the text are displayed in a dropdown list. By clicking an item in the list, matched search results are displayed in another popup window. User can select a link. However, it won’t be applied till he presses Apply button, therefore he can select another search result when he wants to.
When he presses the Apply button, the matched results are used to replace the keywords in the document with [l|matched_result_link|key_word].
Uauto.module - Description from the developer point of view:
As I explained in the operations in the user point of view, data to be searched for is sent to the server, where it is analyzed.
Key search
I would like to encourage the reader to go through the code for more reference, and as it is still under development I will only explain the concerns here.
Search is done in the following manner:
cache_uauto >> url_alias >> relevant type searches in case of k_search and user_search, node_search in case of i_search
Cache_uauto is not yet implemented. I am planning to store the applied search results in a table with field weight which will be increased by 1 every time it is applied. Every time a match is found in the cache_uauto, search will be stopped and user will provided an option to apply that or “search for more”. If he chooses to “search for more”, weight will be reduced by 5 and a fresh search will be called for.
I welcome the comments on the implementation of this.
Search keyword pickup from the text sent – i_search
In the client side, the user entered text is filtered for [l|link|text] and any other non-alphanumeric characters. Then text is sent to the server and all the words user entered in the “Words to be ignored in the search” will be filtered. However it has to be filtered for common words like “is, the, like, hello” and probably all adverbs, conjunctions, adjectives and verbs which leaves only nouns and abbreviations to be searched for. I hope to do this by maintaining a list of words in the server side. However, as this kind of matching will take a lot of processing power I hope to find a better way.
I welcome the comments on the implementation of this.
