Page 1 of 1

custom css does not avoid standard css in some plugins!

Posted: Tue Jul 31, 2007 2:53 pm
by stm999999999
some plugins have no or wrong code to detect wether the style.css has already a user defined css code for this plugin!

Here a list:

event_entrypaging:

line 142

Code: Select all

if (stristr('.serendipity_entrypaging', $addData)) {
wrong order! First the haystack and then the needle is correct! And it must be $eventData and not $addData!

Code: Select all

if (stristr($eventData,'.serendipity_entrypaging')) {

event_linklist.php

line 137 new code for css:

Code: Select all

                case 'css':
                    if ($this->get_config('style') == "dtree") {
                        if (stristr($eventData, '.dtree')) {
                            // class exists in CSS, so a user has customized it and we don't need default
                            return true;
                            break;
                        }                    
                        $filename = "serendipity_event_dtree.css";
                    } else {
                        if (stristr($eventData, '.linklist')) {
                            // class exists in CSS, so a user has customized it and we don't need default
                            return true;
                            break;
                        }
                        $filename = "serendipity_event_linklist.css";
                    }
                    $out = serendipity_getTemplateFile($filename, 'serendipityPath');
                    if ($out && $out != $filename) {
                        $eventData .= file_get_contents($out);
                    } else {
                        $eventData .= file_get_contents(dirname(__FILE__) . '/'.$filename);
                    }

                    return true;

                    break;

Posted: Wed Aug 01, 2007 12:40 am
by mgroeninger
Both plugins patched to reflect Stephan's fixes.