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!

CommentFileSizeAuthor
pjirc_path.patch14.65 KBtwo2the8

Comments

ruharen’s picture

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.

arturro’s picture

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";
ruharen’s picture

Version: 5.x-1.2 » 5.x-1.x-dev
Assigned: Unassigned » ruharen
Status: Needs review » Fixed

Fixed.

Status: Fixed » Closed (fixed)

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