Page 1 of 1

PHPLayers - can the look be edited?

Posted: Sat Feb 26, 2005 2:09 am
by Juan Tao
WOw ! I'm installed and editing, and generally having a lot of fun. Thanks! This is probably obvious, but I can't see how to change the look of the menus which (I think) are coming from PHPLayers.

PHPLayers - can the look be edited?

Posted: Sat Feb 26, 2005 5:00 am
by jptechnical
first thing you need to do is get the css out of the static page that phplayers keeps it in. The file is located in /modules/PHPLayers/phplayers/layersmenu-cms.css

copy all the css and paste it either in your template in the css box below or in a new css item in the css management.

Then replace the css in the file above with

Code: Select all

/* css moved to css management or template */
Then the css will be editable from the admin, and you won't forget where it is.

It is best to do this particularly now, there is a bug in the .9 series that duplicates this file. If you tried to use an inline css editor in your browser you would pull your hair out wondering why nothing you change makes any effect... until you scroll down and see that it is loaded as much as 4 times. For goodness sake... SAVE THE HAIR!

Then tweak to your hearts content.

Re: PHPLayers - can the look be edited?

Posted: Sat Mar 12, 2005 1:23 pm
by Stephan
Wouldn't it be nice if the phplayers module had a configuration switch to tell it whether or not to insert its css? Like so:

(optional) loadcss - 1/0, whether you want to supply your own style (0) or use the default (1).

Line 87 of PHPLayers.module could be changed (have not tested this):

Code: Select all

function ContentStylesheet(&$stylesheet) {
    $loadcss= isset($params['loadcss']) ? $params['loadcss'] : 0 ;
    if ($loadcss== 1) {
		$config = $this->cms->config;
		@ob_start();
		@readfile(dirname(__FILE__).'/phplayers/layersmenu-cms.css');
		$stylesheet = @ob_get_contents() . $stylesheet;
		@ob_end_clean();
    }
}
Greetings,