Put jsMath files in file area

gustav - July 11, 2008 - 12:41
Project:JsMath for displaying mathematics with TeX
Version:6.x-1.0
Component:Code
Category:feature request
Priority:normal
Assigned:adam.nellis
Status:needs work
Issue tags:Libraries
Description

Currently the jsmath module installation instructions ask you to put the jsMath files into the jsmath module directory. This is not very good because there are very many font files and having these in a subdirectory of the module directory slows down Drupal's autodiscovery of modules. It would be better if the jsMath files were uploaded to the standard Drupal files area. This requires some minor changes to the module

To make this convenient for the admin the settings page should provide upload buttons for this purpose. Can Drupal automatically unzip uploaded files?

#1

adam.nellis - July 14, 2008 - 15:17
Component:Miscellaneous» Code
Assigned to:Anonymous» adam.nellis
Status:active» needs review

Moved the jsMath files into the Drupal "files" folder.

Added a facility to the admin settings page to upload and unzip the jsMath zip files.
This facility requires PHP 5.2.0 or later and the php_zip extension.

AttachmentSize
jsmath.patch 6.76 KB

#2

gustav - July 15, 2008 - 14:01
Status:needs review» postponed

There is a problem with this when the file area is set to "private". In that case one should not use that private file area for the jsMath files. Sorry for not thinking about this earlier. I don't know what the solution to this is. Let's put this issue on hold for now.

#3

gustav - July 19, 2008 - 05:54
Status:postponed» needs work

In order to get around the problem with the private file areas we would need to check whether the admin has set the file area to public. Only in that case should the option to upload the jsMath files to that file are be given.

If the admin has set the file area to private then the admin needs to be instructed to upload the jsMath files to another directory that is accessible to the web server. The settings form should in this case ask for the base URL for this public file area.

I wish Drupal core would provide for both public and private file areas in parallel, in which case this problem would not have come up.

#4

shoerder - July 24, 2008 - 13:57

Hi,

this patch would really be helpful. After I installed additional fonts, I only got a blank page instead of the 'administer'-page. In my logs I got:
[...] [error] [client ...] PHP Fatal error:  Maximum execution time of 30 seconds exceeded in /.../includes/file.inc on line 889

For the time being I solved my problem by setting
max_execution_time=60
in a php.ini file but having the fonts in the files folder would be much nicer.

It's a great module, thanks for all the work. :-)

Simon

#5

turadg - August 14, 2009 - 16:14

There is now a Libraries API for this purpose. Basically, you put library code in /sites/all/libraries. WYSIWYG uses it and other modules are beginning to.

The Libraries API module itself has only devel releases yet, but it's not really necessary in order to begin using the path. When the module is finished, it will make managing the dir easier and I think provide hooks to automatically download libraries.

 
 

Drupal is a registered trademark of Dries Buytaert.