Fin
Adding more than one city
  • Envoyé: 14.02.2004, 21:21
    Invité
    rang:
    1
    enregistré depuis:
     décembre 2003
    Status:
    hors ligne
    dernière visite:
    06.03.05
    Messages:
    0
    Hi,
    I would like to add more that one city, either in one sideblock or in the center block.
    Can this be done?
    Having only one city per block is not enough for me.

    Thanks,
    Brenzef
  • Envoyé: 14.02.2004, 21:32
       
    vedrine
    rang:
    Site Admin Site Admin
    enregistré depuis:
     décembre 2003
    Status:
    hors ligne
    dernière visite:
    09.10.08
    Messages:
    266
    Hello,
    I had this idea only 2 days ago (never think of it before) !!! So I'm working on it. My intention is to make a new block where you choose the city when you create the block. By running several instances of this block you will be able to display as many cities as you want (after that, with nuclei blocks or autotheme or Xanthia, or some utility like these you can put these blocks were you want, not only on left or right column)
    So the only left problem is to code the block. I will give info as soon as I can.
  • Envoyé: 14.02.2004, 22:29
       
    vedrine
    rang:
    Site Admin Site Admin
    enregistré depuis:
     décembre 2003
    Status:
    hors ligne
    dernière visite:
    09.10.08
    Messages:
    266
    As you can see on right column I have a first release of the "cityweather" block as I call it wich permit to choose the city.
    It seems to work well but I need to modify the module also because if you click on the "detailed forecast" link you don't get the weather forecast of the choosen city.
    So there is still work but you get the idea of how it will work.
    Please feel fre to post suggestions or features request.

    For now I will go to bed.
    Jean-Michel
    In fact It was only 3 lines of code so I did it. Good night icon_lol icon_lol
  • Envoyé: 15.02.2004, 13:55
    Invité
    rang:
    1
    enregistré depuis:
     décembre 2003
    Status:
    hors ligne
    dernière visite:
    06.03.05
    Messages:
    0
    Hi Jean-Michel,
    Thanks foer the quick response.....

    I'll get the point. It looks nice, but it takes a lot of space.
    What about having the option to add more cities in the centerblock.
    With or without much details.
    Or even a Sideblock with just the city and temperature configurable by the user.
    Dunno if i ask much, but these are ideas rising up in my mind.
    Brenzef
  • Envoyé: 15.02.2004, 13:55
    Invité
    rang:
    1
    enregistré depuis:
     décembre 2003
    Status:
    hors ligne
    dernière visite:
    06.03.05
    Messages:
    0
    AnonymousHi Jean-Michel,
    Thanks for the quick response.....

    I'll get the point. It looks nice, but it takes a lot of space.
    What about having the option to add more cities in the centerblock.
    With or without much details.
    Or even a Sideblock with just the city and temperature configurable by the user.
    Dunno if i ask much, but these are ideas rising up in my mind.
    Brenzef
  • Envoyé: 15.02.2004, 19:48
       
    vedrine
    rang:
    Site Admin Site Admin
    enregistré depuis:
     décembre 2003
    Status:
    hors ligne
    dernière visite:
    09.10.08
    Messages:
    266
    Hello let me explain my thinking :
    To modify the module itself would be a lot of work as it has been build (several years ago and by another developper than me) from the beginning to only show the weather of only ONE city.
    And my main reason to do a block rather than modify the module itself (the display that you see in the "centerblock" is the mdule output) is that I plan to port it to the new template of postnuke (pnRender) because I think it is THE solution.
    I don't know if you have already tried some templated modules like postCalendar or PageSetter but I think it's wonderfull because all the "working code" is in the php file and webmasters are not expected to modify it but all the "formatting code" is in HTML files called templates and nearly anybody can modify a template in Dreamweaver or another HTML editor seeing visualy the result on screen.
    So when the weather module will use templates, you will be able to modify completely the display of the block or module yourself (for instance only display temperature if you want) !!
    More, If you use Xanthia (the new theme system of PostNuke 0.8 that is already available in 0.7.2.6) you can do wonderfull things as
    - put the display of a module (the centerblock as you call it) in a block (a sideblock) !!
    - have differents page layouts for each module if you want
    - have a layout completely different of the classic "3 columns" layout.
    In the meantime, here is my solution :
    it would be rather easy to add options to the block so that you can display/hide separately with checkboxes :
    - temp
    - weather icon
    - wind direction
    - wind speed
    - feels like
    - detailed forecast link
    so the webmaster can have a shorter block
    (and it will be selectable on a block by block basis)
    So I will do that tomorrow icon_rolleyes
    And as pnRender and Xanthia are already installed on this website, later I will try to show you that I can put 4 or 8 cities in blocks on the same page (don't know if the time to fetch 4 or 8 forecast from weather.com will be long or not, but lets try it !!!) icon_lol
  • Envoyé: 16.02.2004, 16:40
     
    Brenzef
    enregistré depuis:
     février 2004
    Status:
    hors ligne
    dernière visite:
    16.02.04
    Messages:
    1
    I do use 0.7.2.6 postnuke, but did not know Xanthia is that nice. I use the "Calendar" module and indeed it is configurable by HTML pages. Since i know some HTML modification was rather easy.
    Also the pnRender function was unknown to me, but it now is....
    PostNuke really gets exciting does it!

    Anyway, I really appeciate the effort you are putting in the weather module.
    Looking forward to see the results.

    As i see the "things" you can do with PHP I should really learn it myself.
    Thanks,
    Brenzef
Réponse rapide
 
  • Options
Code:
Couleur de la police:  
Taille de la police: