1
ipwgc
which is the best solution to change the colors of the modules?
  • 2008/9/7 7:12

  • ipwgc

  • Quite a regular

  • Posts: 216

  • Since: 2005/8/13


which is the best solution to change the colors of the modules?.

I can use the multi thema, and I can change the color of the modules, but if I want to change the colors of 5 modules below, as example. newbb, news, smartfaq, xfguestbook, mylinks, in this case I need to have 5 different themas with different names.

this is not good for me, because it increases the number of files in the "template_c" folder.

I look for a single thema that does the whole work of changing the colors in these 5 modules.

for reference and exemple you can see this portal clic here http://www.univision.com/portal.jhtml

Any solution and idea it welcome.
Regards,
David

2
tcnet
Re: which is the best solution to change the colors of the modules?
  • 2008/9/8 16:08

  • tcnet

  • Friend of XOOPS

  • Posts: 297

  • Since: 2006/5/12


See this FAQ: How can I display different images or include different stylesheets according to the currently viewed module?

The following modification will change the theme stylesheet depending on the module in use.

Make and name a copy of the theme's stylesheet (themes/yourtheme/style.css) for each module you want to customize (ie: newsstyle.css, newbbstyle.css, etc.). Make your color/format changes in the renamed stylesheets.

Modify the HEAD of your themes/yourtheme/theme.html under the existing stylesheet links:

Replace this:

<
link rel="stylesheet" type="text/css" media="all" href="<{$xoops_themecss}>" />

With this:

<{if 
$xoops_dirname == "news"}>
  <
link rel="stylesheet" type="text/css" media="all" href="<{$xoops_imageurl}>newsstyle.css" />
<{elseif 
$xoops_dirname == "newbb"}>
  <
link rel="stylesheet" type="text/css" media="all" href="<{$xoops_imageurl}>newbbstyle.css" /> 
<{elseif 
$xoops_dirname == "mylinks"}>
  <
link rel="stylesheet" type="text/css" media="all" href="<{$xoops_imageurl}>mylinksstyle.css" /> 
<{else}>
  <
link rel="stylesheet" type="text/css" media="all" href="<{$xoops_themecss}>" />
<{/if}>


Repeat for all themes in use.

This will change the stylesheet used for the each module without caching additional theme templates.

You can also change logo images per module as discussed in this thread: Changing the site LOGO by page changes.

Login

Who's Online

228 user(s) are online (141 user(s) are browsing Support Forums)


Members: 0


Guests: 228


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