e-publish CSS

dleong - December 8, 2008 - 15:53
Project:E-Publish
Version:6.x-1.1
Component:Code
Category:bug report
Priority:normal
Assigned:jerdiggity
Status:reviewed & tested by the community
Description

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.

#1

peterzoe - January 17, 2009 - 19:25

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

dleong - January 22, 2009 - 19:07

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

sengstrom - February 17, 2009 - 21:51

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

tobias - August 12, 2009 - 08:27

+1 this worked for me. thanks!

#5

jerdiggity - August 12, 2009 - 10:00
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

jerdiggity - August 12, 2009 - 10:11
Status:active» reviewed & tested by the community

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

 
 

Drupal is a registered trademark of Dries Buytaert.