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 |
Jump to:
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!
| Attachment | Size |
|---|---|
| pjirc_path.patch | 14.65 KB |

#1
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
Fixed.
#4
Automatically closed -- issue fixed for 2 weeks with no activity.