Estendere IFile

JiFile for Joomla!

JIFile
JiFile is a component for Joomla! that allows you to index file contents (PDF, DOC, etc..) to perform searches in them.

Learn more...  Demo

JoomPhoto Mobile

JPhotoMobile
JoomPhoto Mobile is a component for Joomla! that allows you to share the photos from your Android device to your site Joomla.

Learn more...  Demo

iFile Framework

IFile
IFile is an open source framework written entirely in PHP, allows the indexing of textual content of a document (DOC, PDF, EXCEL, etc.) and a quick search within them.

Learn more...  Demo

Easy Language

EasyLanguage
Easy Language is a plugin for easy and immediate management of multilingual texts in every possible area of joomla, articles, components, modules, metadata, template, other components(example K2) etc.

Learn more...

Article Book Effect

Article Book Effect
View Joomla articles with the effect turns the page of a book. This plugin will display the contents of an article in Joomla as a real book or magazine, using all the benefits of HTML5

Learn more...  Demo

 

Passport photo

Passport photo
The most popular Android app that allows you to print photos cards for your documents with your Android smartphone, in a simple and intuitive way.

Learn more...

 

Crazy Shadow

Crazy Shadow
Crazy Shadow is the 3D fast-paced and fun puzzle Android game! Try to rotate and drag shapes in the position of their shadows without fail! Solve in succession all combinations of levels of the game.

Learn more...

 

Admin Countdown

Admin Countdown
Module for Joomla! 2.5 and 3.x displays in the administration part of the site, a timer with countdown of the time remaining in your session.

Learn more...  Demo

 

Not yet translated

Uses Google Translate :P

Estendere IFile

Realizzare un nuovo ADAPTER


IFIle permette la realizzazione dei nuovi Adapter, o meglio classi, per la parserizzazione di file oltre a quelli già presenti. Di seguito verranno descritte le linee guida per implementare un nuovo Adapter.

Implementazione

Per poter implementare un nuovo adapter bastano tre semplici passi:

Passo 1 – Creazione file PHP:
Creare un nuovo file PHP nella cartella:
/adapter/
con il nome del file così strutturato:
Adapter_Search_Lucene_Document_<EXT>.php

Dove al valore “<EXT>” si dovrà inserire l’estensione, in MAIUSCOLO, del file che si vuole parserizzare. Ad esempio se si vuole creare un Adapter per i file RTF basterà creare un nuovo file vuoto PHP:
/adapter/ Adapter_Search_Lucene_Document_RTF.php

Passo 2 – La classe:
Dopo aver creato il file andrà inclusa la classe astratta:
/adapter/ Adapter_Search_Lucene_Document_Abstarct.php

e creata la classe con lo stesso nome del file (senza .php) che estende la classe sopradescritta.

class Adapter_Search_Lucene_Document_RTF extends Adapter_Search_Lucene_Document_Abstract { 
   public function __construct() { 
       parent::__construct(); 
   }

   public function loadParserFile() {
      // creazione del Bean $this->indexValues = new LuceneDataIndexBean(); 
      // recupero il contenuto dal file 
      $data = mioMetodoRecuperaContenutoFile(); 
      if ($data === ‘’) { 
         require_once 'Adapter_Search_Lucene_Exception.php'; 
         throw new Adapter_Search_Lucene_Exception(' Empty body '); 
      } 
      $this->indexValues->setBody($data);
      return $this->indexValues->getLuceneDocument();
   }
}


basterà implementare il metodo dell’interfaccia Adatpter_Search_Lucene_Document_Interface “loadParseFile” . Il metodo deve restituire un oggetto Zend_Search_Lucene_Document.
Va ricordato che l’oggetto Zend_Search_Lucene_Document deve ritornare un field “body” valorizzato per non mandare in eccezione il processo di indicizzazione.

 
PHP Classes

IFile
by isApp.it

nominee
November 2013