[04:01:33] New review: Krinkle; "Using 'module' for 1.20+/master is not good. We still need to use both because there are several thi..." [integration/testswarm] (master); V: 0 C: -1; - https://gerrit.wikimedia.org/r/11830 [04:10:25] New patchset: Krinkle; "(bug 34815) Use QUnit ?module= query parameter." [integration/testswarm] (master) - https://gerrit.wikimedia.org/r/11830 [04:29:26] hi all, how to get CSS styles for skin, modules in extension? [04:30:19] I need to include styles in html page [04:33:02] I make extension to export to pdf, and I want to get the styles to generate pdf file [04:38:30] I look at the source of ResourceLoader and do not understand how it works :-( [04:38:53] pastakhov: Look at the documentation instead to the source code [04:39:00] ResourceLoader is quite complex, but easy to use [04:39:13] https://www.mediawiki.org/wiki/ResourceLoader [04:39:18] https://www.mediawiki.org/wiki/ResourceLoader/Developing_with_ResourceLoader [04:44:34] ResourceLoader->makeModuleResponse use $stylePairs = $module->getStyles( $context ); where $module is ResourceLoaderModule, but ResourceLoaderModule->getStyles() return array(); [04:44:47] Krinkle: thanks for links [04:45:09] pastakhov: You shouldn't have to worry about internals like makeModuleResponse. [04:45:34] pastakhov: You want what to generate a pdf file? [04:46:39] pdf generated by mpdf http://www.mpdf1.com/mpdf/ [04:47:26] I need get styles for him [04:48:36] Krinkle: i want get html of printable wiki page with css styles [04:49:35] pastakhov: Do you want the regular page css included or the print version? [04:50:28] Krinkle: print version [04:52:35] Krinkle: i not want download styles by link , i want get it by resourceloader [04:53:05] pastakhov: I don't understand what the problem is [04:53:21] This PHP library takes an HTML document and transforms it into a PDF [04:53:48] ResourceLoader is the loading procedure. The HTML is just HTML. The print styles for the skin are linked from the . [04:54:03] Does it need a special way to define the print stylesheet? [04:54:05] If so, what way? [04:54:51] Krinkle: i not want download styles by link from [04:55:16] So how do you want to download them? [04:57:01] Krinkle: i want in extension get array of module, and module->getRawStyles() :-) [04:57:20] something like [04:58:30] Krinkle: OutputPage->Styles()... mInlineStyles()... etc... [04:59:50] OutputPage::getModuleStyles () [05:00:29] pastakhov: Why would you want to go into all that and try to extract that? [05:00:37] That'll return non-print styles as well [05:01:10] BRB [05:03:14] OutputPage::setPrintable() [05:04:22] pastakhov: Is this for 1 particular page? [05:04:23] Because the modules loaded on a page depends on the page itself [05:04:24] From what perspective, how are you getting the HTML? [05:04:36] Each module object has a method getStyles() which returns an array keyed by media type, you could use that and filter out 'print' [05:04:40] in php.ini allow_url_fopen maybe false... [05:05:38] I'm not sure I follow.. If you have server side access to iterate through modules, why would you have to worry about being able to fetch a url in php? [05:05:40] Krinkle: this for 1 particular page [05:05:46] pastakhov: Are you on a Mac? [05:06:18] Many browsers or OSes have a Print option and you can print to PDF [05:06:19] Krinkle: openSUSE (Linix) [05:06:46] the browser takes care of using the print-media styles. No matter where they are (in a tag or