Bottom
changing the style(sheet) of the weather block
  • Posted: 10.06.2004, 10:47
    Invité
    rank:
    1
    registered:
     December 2003
    Status:
    offline
    last visit:
    06.03.05
    Posts:
    0
    Hi,

    I've managed to set up the weather module with my site and it is working great.

    The only problem is the fontsize is too big..

    Where can I change it?
    (I want to use an absolute font size too, like, 12px or so)
  • Posted: 11.06.2004, 06:56
       
    vedrine
    rank:
    Site Admin Site Admin
    registered:
     December 2003
    Status:
    offline
    last visit:
    09.10.08
    Posts:
    266
    Hello,
    I don't understand clearly if you want to change the block or the module display.
    For the block there is no style used in the code (as most blocks) so it should use the same style as all the others blocks. But maybe the problem is in your theme because there is no style for blocks. Did you use AutoTheme or Xanthia ? if yes adding a style statement to your block templates should do the job.
    If your problem is with the module display and not the block, all the forecast display is in the function weather_user_forecast in the pnuser.php file. So adding a style directive in one or several of the $output->Text should work if you know PHP and HTML.
    But look on this site. Block and module fonts are the same as the ones of the theme and I didn't modify anything, so I still think this is a problem in your theme not in the weather module.
  • Posted: 12.06.2004, 12:21
    Invité
    rank:
    1
    registered:
     December 2003
    Status:
    offline
    last visit:
    06.03.05
    Posts:
    0
    mmm, ok thanks for the information..
    I'm using a lightly modified version of the ultralight theme.
    And I guess there is no style for (custom) blocks, because in my random image (from photoshare) the fonts are equally big.

    I'll have a look into it .. but additional information is always welcome!

    thanks

    http://www.mechelencc.be is the site btw..
  • Posted: 12.06.2004, 12:42
       
    vedrine
    rank:
    Site Admin Site Admin
    registered:
     December 2003
    Status:
    offline
    last visit:
    09.10.08
    Posts:
    266
    of course if you prefer not to modify your theme it is possible to add some style directive to the block display directly, for the weather block make the folowing changes in modules/weather/pnblocks/weather.php
    change :
    Code
    $row[] = "<strong>"._TEMPERATURE."</strong>: $temperature";
    to :
    Code
    $row[] = "<span class=\"pn-normal\"><strong>"._TEMPERATURE."</strong>: $temperature</span>";
    change :
    Code
    $output->text( "<strong>"._HUMIDITY."</strong>: ".$humidity."<br>
               <strong>"._WIND."</strong>: $wind_dir $wind_speed<br><b>"._FEEL."</b>: $real
                <BR><STRONG>"._BARO."</STRONG>:<BR>$baro");
    to :
    Code
    $output->text( "<span class=\"pn-normal\"><strong>"._HUMIDITY."</strong>: ".$humidity."<br>
               <strong>"._WIND."</strong>: $wind_dir $wind_speed<br><b>"._FEEL."</b>: $real
                <BR><STRONG>"._BARO."</STRONG>:<BR>$baro</span>");

    you can use any other style than pn-normal in your CSS stylesheet but I took this one as it is the one used by some other blocks (polls, ...)
Quick reply
 
  • Options
Code:
Font color:  
Font size: