[dev] Patch for Zip and Rar Mime Viewers

Chuck Hagenbuch chuck@horde.org
Tue, 18 Jun 2002 22:03:28 -0400


Quoting Michael M Slusarz <slusarz@bigworm.colorado.edu>:

> With IMP it's easy because, in the MIME Viewer, you add links to the list
> output that will load view.php.  Additionally, you can pass various 
> parameters and know that you will be able to access them. However, with a 
> generic driver in Horde, how is this possible?  I am not familiar with 
> gollem, but gollem might not have a seperate script (like view.php) to
> use so its links will be different.
> 
> I guess a compromise is to put the code that generates the links into the
> Horde viewer.  This function (it could be render()) could accept, as a 
> parameter, a callback function that will handle the link production. 
> Then, an application specific Viewer would need only to define this 
> callback to handle link production and then call parent::render().  This 
> sounds like a viable alternative... any comments?

Maybe have the Horde viewer generate (and handle) the parameters - maybe 
using SCRIPT_NAME? - and rely on the application to be in a script that 
will recognize them and load the MIME_Viewer again?

We already have things like the vcard templates, and there a few other 
Horde libraries (CategoryTree, the upcoming VFSBrowser) that have their own 
templates - maybe MIME_Viewers could have a supporting output script, too?

Or, maybe, a generic MIME_Viewer script, similar to how maintenance.php 
handles maintenance for all modules, and help.php handles help for all 
modules? Dunno...

-chuck

--
Charles Hagenbuch, <chuck@horde.org>
"What was and what may be, lie, like children whose faces we cannot see, in 
the arms of silence. All we ever have is here, now." - Ursula K. Le Guin