Download & Extend

Module installation on /sites/all/modules

Project:PJIRC
Version:5.x-1.x-dev
Component:Code
Category:bug report
Priority:normal
Assigned:ruharen
Status:closed (fixed)

Issue Summary

Hey there,

I installed the pjirc module using my multi-site install, and it didn't work. On review of the code, I see that it's because the module was looking for the PJIRC files in /modules/pjirc/pjirc, per this line of code:

$output .= "<applet codebase=modules/pjirc/pjirc/ code=IRCApplet.class archive=\"irc.jar,pixx.jar\" width=500 height=400>\n";

My version of PJIRC was in fact installed at sites/mysite.com/modules/pjirc/pjirc. I suspect that this is the case for others with multi-site installs as well. So, with thanks to the TinyMCE module, I created this patch. It adds a function to find the PJIRC module wherever it is located, and then inserts that path into the line of code above. Check it out & lemme know what you think. It definitely works for me.

Thanks for this handy module!

AttachmentSize
pjirc_path.patch14.65 KB

Comments

#1

Title:pjirc for multi-site installs» Module installation on /sites/all/modules

I faced this same problem because my installation of the pjirc module is on /sites/all/modules instead of /modules so the hardcoded path is incorrect.

The patch seems correct but it would be better if only includes the lines modified instead of modifying the whole .module file.

#2

Better solution:

  $output .= "<applet codebase=".base_path() . drupal_get_path('module', 'pjirc')."/pjirc/ code=IRCApplet.class archive=\"irc.jar,pixx.jar\" width=500 height=400>\n";

#3

Version:5.x-1.2» 5.x-1.x-dev
Assigned to:Anonymous» ruharen
Status:needs review» fixed

Fixed.

#4

Status:fixed» closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.