Project:E-Publish
Version:6.x-1.1
Component:Code
Category:bug report
Priority:normal
Assigned:jerdiggity
Status:closed (fixed)

Issue Summary

Hello,
Thanks for maintaining this module. I hope that future revisions will include the option of direct link of file names to uploaded PDFs of newsletters, journal editions, etc.
Has anyone noticed the option of using the e-publish CSS is not working on 6.x 1.0? Even though I've chosen the option in the e-Publish configuration page...the generated pages still conform to my theme css settings. More importantly, any changes I make to the e-Publish css file do not appear.

Thanks for any help.

Comments

#1

True, I just added
$path = drupal_get_path('module', 'epublish');
if (variable_get('epublish_css', 1)) {
drupal_add_css($path .'/epublish.css');
}
upfront in epublish.module.

Now it works, not quite sure though, where stuff like this should belong in D6. adding it to hook_menu() does not seem to be appropriate at least...

Cheers, Peter.

#2

Hi Peter,
Thanks for the help. I've been tackling other issues so I haven't gotten around to this one yet. Just to clarify (I'm a bit of a Drupal novice and PHP-illiterate), you basically add the piece of code to the beginning of the epublish.module?

Thanks.

#3

Other modules add it to the _init hook and it seems a reasonable place for epublish as well.
In epublish.module add this:

/**
* Added _init hook to include epublish .css and .js files
* Stefan Engstrom 2009-02-17
*/


function epublish_init() {
  $path = drupal_get_path('module', 'epublish');
  if (variable_get('epublish_css', 1)) {
    drupal_add_css($path .'/epublish.css');
  }
  drupal_add_js($path .'/epublish.js');
}

#4

+1 this worked for me. thanks!

#5

Version:6.x-1.0» 6.x-1.1
Assigned to:Anonymous» jerdiggity

Sorry (just took over this module)... Code checks out for me as well. Will commit & release version 6.x-1.2. (Thanks for the info!)

#6

Status:active» reviewed & tested by the community

Committed new release (6.x-1.2). Thanks again!

#7

Status:reviewed & tested by the community» fixed

Issue-queue clean-up (still showing up as an active bug)...

#8

Status:fixed» closed (fixed)

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