PHPLayers - can the look be edited?

For questions and problems with the CMS core. This board is NOT for any 3rd party modules, addons, PHP scripts or anything NOT distributed with the CMS made simple package itself.
Locked
Juan Tao

PHPLayers - can the look be edited?

Post 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.
jptechnical
Forum Members
Forum Members
Posts: 131
Joined: Wed Jan 12, 2005 12:18 am

PHPLayers - can the look be edited?

Post 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.
Stephan

Re: PHPLayers - can the look be edited?

Post 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,
Locked

Return to “CMSMS Core”