Extension talk:PageCSS

Quick correction to extension page
If anyone installs this and wants to use the two examples on the extension front page - one quick note: The line #firstHeading should actually be a class, not an ID. So, the entry should be:

.firstHeading .....

This may be different for different versions of MediaWiki - but for 1.11.1 it is a class.

Thanks for the extension! Enjoy all!


 * Qaaz

Thanks
Thanks for this extension, better than the other. --Add 13:23, 29 December 2007 (UTC)
 * OhOh, I have a problem!!! the extension don't support pictures background. I explain my self:


 * I would change a background on user page,the user choose. But if I put that code it don't work(the background is an example)...


 * Could someone help me, please. thaks.--Add 23:26, 29 December 2007 (UTC)


 * The problem is that the Sanitizer::checkCss-function (a function that is used by this script) does not allow background-images for security reasons.
 * You could either edit the Code of PageCSS and get rid of this function (trust me, you do not want to do that), use "img" inside a div or other css/html constructs or define the background-image in the mediawiki:Common.css. -- Brean 23:18, 2 January 2009 (UTC)

Er, installation?
What do I need to do to install this? I'd like to be able to allow CSS for each user who wants to use it on the pages they create, but I don't know how to install this extension. 75.167.200.148 01:10, 5 March 2008 (UTC)

ItsMeIGuess 12:18, 5 March 2008 (UTC)
 * download this folder trunk/extensions/PageCSS into /path/of/your/wiki/extensions/
 * Add to /path/of/your/wiki/LocalSettings.php
 * For more question / troubles just ask^^'

Thank you! I apologize for sounding like the total newb that I am to this, but I want to have the following CSS on one page:

But, I get the following error:

Fatal error: Call to undefined method Sanitizer::checkcss in /home/xxxx/public_html/wiki/extensions/PageCSS/PageCSS.php on line 28

Can I add all of that CSS to a single page? If so, how do I get it to work? Thank you so much for taking the time to reply. I really appreciate it ^_^

75.167.200.148 13:11, 6 March 2008 (UTC)

Doesn't look like the problem is caused by the css (couldn't really check yet, to tired(sorry for seeing this so late but my mega-paranoid spam filter was kinda trashing the notification... ItsMeIGuess 19:25, 20 March 2008 (UTC)

By the way: what version of mediawiki do you use? ItsMeIGuess 19:36, 20 March 2008 (UTC)

Sorry for the delay in response. My comp crashed. I'm running two versions on different servers for different sites. One version is 1.6.8 See Here The other is 1.11.0 See Here  Thank you so much. I hope you can help me get this figured out. 75.167.205.251 14:11, 8 April 2008 (UTC)


 * Hi. Simply remove all "background-image:"-commands and you will be happy (see my posting above if you want to know why). -- Brean 23:18, 2 January 2009 (UTC)

Fixes and Patches
Hi, I just added a small patch for PageCSS, because I noticed that the CSS-Code of templates, that uses PageCSS and that are included more than once in a page, is also added more than once. So here is the diff of my patch: I am saving the whole CSS-Text in an array. I know that this is not the best way, because the whole text will be checked every time a file with css-code is included. For example if you only get the filename of the included php-file and save that in the array it would be better, but I have not figured out how to do that.

Another solution would be to parse the CSS content and check, which the CSS-classes are already defined, but I think that would be a bit to complex for this.

Greetings from Bremen, Germany! -- Brean 22:38, 2 January 2009 (UTC)