Changes from Finder 2.0.1

From Joomla! Documentation

Revision as of 04:39, 9 November 2011 by Mbabker (Talk | contribs)

This page describes the changes that have been made from Finder 2.0.1 to convert it from being Joomla! 1.5 to 1.7+ compatible.

Front End Layouts

The front end search layout and module have been redesigned to emulate the current com_search layouts. The internal logic to have overrides based on the content type (such as article or weblink) remains intact. Front end designers will only need to add the new classes and IDs to their CSS, which mostly is only changing "search" to "finder".

Plugin Events

Finder's plugin events have been converted to use the CMS's core content plugin events versus the custom events found in the 1.5 version. Third parties who have created their own Finder plugins will need to modify their plugins at a minimum to use these new events.

@TODO: Table of old events to new events

Changed Events

  • onChangeJoomlaCategory -> onContentBeforeSave & onContentAfterSave
  • onChangeJoomlaXXX (Article, Contact, etc.) -> onContentBeforeSave & onContentAfterSave for access level changes
  • onChangeJoomlaXXX (Article, Contact, etc.) -> onContentChangeState for state changes
  • onTrashJoomlaXXX (Article, Contact, etc.) -> onContentChangeState

New Events

  • onCategoryChangeState - called after a successful save event from com_categories to handle state changes on all items in a category (affects index state only)

Adapter Changes

The plugins, which extend FinderIndexerAdapter, have been lightened in terms of code by moving small functions to the adapter and adding new class variables which are used throughout the plugins and the base adapter.

@TODO: A full list of moved functions and new variables

New variables in FinderIndexerAdapter

  • $old_cataccess - The category's access level before saving changes (set in onContentBeforeSave events)
  • $old_access - The access level of an item before saving changes (set in onContentBeforeSave events)
  • $extension - The extension's name in "com_content" format

Moved functions from plugins to FinderIndexerAdapter

  • getURL - Function is no longer abstract, now accepts 3 parameters which dynamically set the item URL in the non-SEF format
  • translateState - Function is protected versus private, accepts the category's state as an optional parameter

Changes to FinderIndexerAdapter functions

  • change function - Optimized to work with a single item versus an array of items based on the plugin event structure; should be called in the plugin event's foreach loop