1
makakazo
Issue with tables and CSS
  • 2007/3/8 18:53

  • makakazo

  • Just popping in

  • Posts: 10

  • Since: 2007/1/11


Hi, I have a little big problem with my module.

The basic output my module prints are tables with player standings and the like, but in the default theme css, tables are set to width:100% which totally screws my desired presentation.

As my idea is to provide a module so it can be installed in any XOOPS site I don't like the idea of changing the default css, and I don't know how it would affect all the other modules.

So I'd like to know if there's a way to override that 100% width setting somehow, like creating my own css with just table specifications and forcing my module to use it or any other way that wouldn't imply messing with code used by the rest of the site.

Any help?

2
stefan88
Re: Issue with tables and CSS
  • 2007/3/8 19:34

  • stefan88

  • Community Support Member

  • Posts: 1086

  • Since: 2004/9/20


I think you can have something like this in your modules header or footer:

$xoopsTpl->assign("xoops_module_header"'');


where YOURMODULEURL_URL is the path to your module, and put the style in "module.css"
..

3
makakazo
Re: Issue with tables and CSS
  • 2007/3/8 21:21

  • makakazo

  • Just popping in

  • Posts: 10

  • Since: 2007/1/11


Dude Stefan it worked! I mean, now I can add the css to my module, but the most important thing is... how did you learn about that? I don't know how to find the template file used for the header, where "xoops_module_header" should be. Using templates suck when you have no documentation about it...

4
snow77
Re: Issue with tables and CSS
  • 2007/3/9 0:56

  • snow77

  • Just can't stay away

  • Posts: 864

  • Since: 2003/7/23


here you can get the latest you can do with template overriding in XOOPS, the best I've seen until now for creating template sets:

from the XOOPS 2.0.14 Release notes:

Quote:

New blocks positions

Support for the new blocks positions must be added to themes: if you place blocks in the bottom and do not see them, this may be because your theme is too old. Most of the times, such support can be added easily by copying the theme.html portion that inserts the center top blocks just after the <{$xoops_contents}> division, and changing the variables so the duplicated code inserts the bottom blocks (see the default theme for an example).

Templates overriding

Designers can add custom templates to their themes, and those will be used instead of the default ones. To exploit this feature, templates have to be created in subfolders of the themes duplicating the default folders structure and removing the "templates" part:

* To overload system_userinfo.html template located in modules/system/templates/system_userinfo.html you have to create your custom version in /modules/system/system_userinfo.html
* To overload system_block_login.html template located in modules/system/templates/blocks/system_block_login.html you have to create your custom version in /modules/system/blocks/system_block_login.html

Output resources overriding for developers

To allow theme designers to customize images or stylesheets, you have to use the new theme class and xoImgUrl templates plug-in.

* Scripts and stylesheets can be declared to XOOPS using the theme class addScript and addStylesheet methods. The theme instance is available after the inclusion of header.php by using the $xoTheme global variable, and in a template variable of the same name:
<{$xoTheme->addStylesheet('modules/newbb/style.css')}>
* Images and medias URLs have to be generated by using the xoImgUrl plug-in in your templates:
reply

Output resources overriding for designers

Designers can also provide custom versions of most output-related resources using a mechanism similar to the one available to templates, for modules that support this.

* To create a custom stylesheet that will replace modules/newbb/style.css, create your customized file in /modules/newbb/style.css
* To create a custom image that will replace modules/newbb/images/reply.png, create your customized file in /modules/newbb/images/reply.png

Login

Who's Online

281 user(s) are online (212 user(s) are browsing Support Forums)


Members: 0


Guests: 281


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Nov 30
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits