Fin
changing the style(sheet) of the weather block
  • Envoyé: 10.06.2004, 10:47
    Invité
    rang:
    1
    enregistré depuis:
     décembre 2003
    Status:
    hors ligne
    dernière visite:
    06.03.05
    Messages:
    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)
  • Envoyé: 11.06.2004, 06:56
       
    vedrine
    rang:
    Site Admin Site Admin
    enregistré depuis:
     décembre 2003
    Status:
    hors ligne
    dernière visite:
    06.07.08
    Messages:
    260
    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.
  • Envoyé: 12.06.2004, 12:21
    Invité
    rang:
    1
    enregistré depuis:
     décembre 2003
    Status:
    hors ligne
    dernière visite:
    06.03.05
    Messages:
    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..
  • Envoyé: 12.06.2004, 12:42
       
    vedrine
    rang:
    Site Admin Site Admin
    enregistré depuis:
     décembre 2003
    Status:
    hors ligne
    dernière visite:
    06.07.08
    Messages:
    260
    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, ...)
Réponse rapide
 
  • Options
Code:
Couleur de la police:  
Taille de la police: