From: Matthew M. <ma...@tu...> - 2004-04-27 21:02:29
|
Good questions. Lets talk about what to do now and then later. For now, I would ship the module with the library tarball. I would give instructions that it should be placed in the lib/pear directory or in your server's php lib directory. You _could_ add code to your install.php that would copy it over, but that would require write access to that directory. You could also test the directory with an is_writable(). If it fails, print a message detailing where the file is, how and where to copy it, untar it, etc. As for the future, what do people feel about a module installing its own libraries? Should boost have a parameter for library files? if ($mod_has_pear_files && !is_writable(PHPWS_SOURCE_DIR . "lib/pear")) $boostContent[] = "This module requires the library directory to be writable"; Another reason for us to consider this is for javascript. Some folks may want their custom javascripts to install into the javascript/ directory when their module installs. So, how much do we help the site admins? Should they be responsible for copying these files over or should the software help them out? ~ Matt On Tue, 2004-04-27 at 15:05, Tony Miller wrote: > I am contemplating writing a chat module which can be used with > phpwebsite. In order to do that, I will probably need to install a pear > library. If I need to install a pear library, do I need to install it in > the pear path? If so, do I need to make sure it's uninstalled? What > happens if another module comes along and uses it? > > Is there any information out there on using pear libraries in new modules. > > -Tony -- Matthew McNaney Internet Systems Architect Electronic Student Services Appalachian State University Phone: 828-262-6493 http://phpwebsite.appstate.edu http://ess.appstate.edu |