Jump to content

Mod CSS


Guest Jaggi

Recommended Posts

I would like the ability to have CSS files that are part of your mods/applications. So instead of trying to import it into the bottom of the current ipb one you could have a css that is loaded just when it loads a page out of your application. This would be a good addition imo as with the ip.tracker we have a template with all our css in it which we load but being able to have a css file related to that mod would be much better, maybe extend this to js files too?

Link to comment
Share on other sites

Already possible with our new output library, both from the skin and the source file.

* Add content to the document <head> * * @access public * @param string Type of data to add: css, js, raw, rss, rsd, etc * @param string Data to add */ public function addToDocumentHead( $type, $data ) { $this->_documentHeadItems[ $type ][] = $data; }

	/**











We've additionally added a template plugin that makes use of this method, in case you want to just specify to import the CSS from a template.

Link to comment
Share on other sites

One thing I might add to it, as far as that function goes, I gather it literally just prints it into the output, in between the <head> tags, yeah?

What would be really cool, is that each modification can add its CSS in the installer or whatever, and then administrators can edit it in the Admin CP like they can with the default CSS.

Link to comment
Share on other sites

One thing I might add to it, as far as that function goes, I gather it literally just prints it into the output, in between the <head> tags, yeah?



If you set type to 'raw', yes. If you set it to CSS the data should just be the URL to the CSS file.

What would be [b]really[/b] cool, is that each modification can add its CSS in the installer or whatever, and then administrators can edit it in the Admin CP like they can with the default CSS.



The skin system already supports this, though I'm not sure of the logistics behind it at the moment. Skins can support multiple CSS files now, however.
Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...