GSOC 2007 - Drupal - Auto Completion of links - uLink

Events happening in the community are now at Drupal community events on www.drupal.org.
garthee's picture

Drupal is used as a content management system (CMS) for various purposes; due its power relies on the modules and the fulfillment of all the needs / additional features / patches that has been arisen. However, auto-completion is still left out, except for auto-complete of user name.

Significance:
It will be extremely important and helpful in a site full of documents such Drupal’s handbooks but not limited to it. For example, in the above paragraph (and also throughout the document) I noticed the keywords such as “Drupal”, “CMS”, “patch” and “modules” that can be added links to make the document more elaborative, where I didn’t, not purposefully but because I was lazy to search and add. It is the same with everyone. However, few do by taking extra trouble; not anymore, with the auto-completion module – ulink.

Details – project structure / deliverables:
A package of modules to restructure to implement the auto-completion through AJAX and refining the way filtering is done. The project, when all the options are selected, will enable the user to complete the links dynamically and along with the background architecture it will be done in a structured way, thus further extensions and configurations for personal preferences will be made effortless.

The package will contain the following basic modules.

Ulink.module
It provides a protocol to interact with auto-completion. Tag [l|href|text|attributes] will be used to identify the insertion of links. Where href is the target referred, text is the text enclosed by the reference, and attributes along with the type of the link and its location guide the rendering of the link.

Basically it provides a skeleton for universal filtering. What is rendered and how it is rendered are completely determined in the configuration. Extensibility is guaranteed by implementing the hooks, specifically for nodes..
ulink_node() : to provide the implementations of node
ulink_node_settings() : to provide the settings form for node rendering
ulink_node_info() : to provide filtering tips to the user regarding the node rendering

Ulink module also gives a default implementation which is dynamic and powerful itself.
In the default implementation for images, when imagecache is available, user will be allowed to use a preset given, and if not direct rendering will be available.

For other types, users can select one of the following.
• Default fixed – implementation.
• Implementation using tokens.
• Advance implementation using PHP code, where PHP variables of the link, text, type and other attributes will be made available in the code.

However, for the benefit of developers, rendering for any type of link can be overridden by implementing the hooks.

Ulink_search.module.

A module to search using AJAX. There are plans to include external search when it allows ajax search (another sister site with Drupal) or provides API to do so (Wikipedia). However we haven’t given finalized and plan to start with simple implementation – only covering internal links.

Ulink_autocompletion.module.

A module to provide user interface to provide dynamic auto completion with minimal user interaction. This part is under discussion. Currently it allows auto-completion in the following ways.

  1. Key press search:
    When the user types “[l|” it gets triggered and listens to the key presses.
    When it recognizes drupal objects like
    User (it can be ‘u’ or ‘us’ or ‘use’ or ‘user’), node (covers comments too) or files it completes the word and expect the user to type the id. When he types partially it tries auto complete that by providing the user with the available options. For example to add a link of ‘user/Garthee’ to the text “my account” a user has to type only the following
    [l| -> it gets triggered here (displayed: [l|)
    U -> it completes user (displayed: [l|user/ )
    Ga -> it does search and provides options (if any) and when user selects (displayed [l|user/Garthee)
    | ->ends the auto-completion (displayed [l|user/Garthee|)
    My account] -> finishes the tag (displayed [l|user/Garthee|my account])

  2. User inactivity search:
    When inactivity is sensed for a period of time the text is searched for keywords and available keywords will be provided to user in a floating window, and when he clicks a particular keyword, ajax search is performed and the results will be presented in another floating window. When he selects one link and click apply changes later, all the keywords are replaced with the tag [l|link|keyword]

  3. On submit search
    Similar to inactivity search, however this is performed only when user submits the form.

Further details of this module will be posted later.

Details – Deliverables / Timeframe

  1. Ulink.module suite (beta release - already released for testing)
    a. Basically a filtering module, as we profess, we developed it as a universal filter to act as a protocol to communicate with auto-completion modules.
    b. Together with the basic skeleton, modules giving the rendering which is found more appropriate are also provided. These modules provide highly configurable universal filtering with on-the-fly configurations using PHPcode or Tokens. Further the skeleton module allows a developer to extend the implementations to provided highly specific rendering.
    c. Currently two extra moudules (ulink_imagecache and ulink_gallery – thanks for Daniel DeGeest) are released together with ulink.module (skeleton and implementations)
    d. They are released under project ulink and available from drupal
    e. However, as this is under development, we suggest users that they download it through CVS to get the latest version.
  2. Ulink_auto.module
  3. Ulink _search.module
    a. Under development
    b. Plan to release the beta version for testing before June 25th together with ulink_search
    c. Will provide interface and background searching architecture
  4. Testing, additional features and enhancing the development of ulink_auto and ulink_search From June 25th to July 10th
  5. Bug fixing, issue tracking and other works related to project release : July 10th to July 20th
  6. Final release before July 30th

Please note: I am a student from Sri Lanka, where there is no summer vacation other than few weeks of vacation we get in the month of April. Hence I plan (also discussed with mentor about this) to finish the project as early as possible and the timeframe is moved earlier to suit. I expect to complete the project one month earlier (I started working in the module on month earlier) so please excuse me for the off-set track.

Links

Project page: http://drupal.org/project/ulink
Issues: http://drupal.org/project/issues/142988
Support pages:
Testing site (thanks for Dan): http://mwt.argz.com/ulink/tests
Download: http://ftp.osuosl.org/pub/drupal/files/projects/ulink-5.x-1.x-dev.tar.gz
Contributor: Gartheeban Ganeshapillai
Contact: Garthee@gmail.com, http://www.theebgar.phpnet.us/drupal
Mentors: Daniel DeGeest: dan.degeest@gmail.com, Kaustubh Srikanth: houndbee@gmail.com

Attachments
http://planet-soc.com/files/Project_proposal.txt
http://planet-soc.com/files/suggestions.txt

SoC 2007

Group notifications

This group offers an RSS feed. Or subscribe to these personalized, sitewide feeds: