• I have made some improvements to the weather module allowing users to assign which city they wish to display on the menu.
    Just trying to get a tally on who would be interested in this ‘hack’.
    Perogi.

Viewing 15 replies - 1 through 15 (of 17 total)
  • Thread Starter Anonymous

    Guess that is no one.
    less work for me =)

    Thread Starter Anonymous

    I’m interested!! I just installed wordpress on https://yousef.raffah.com and I was hoping to find such a module. Will this module display on the main page or where exactly does it display the weather condition?

    Where can I download this plugin, it would be a great thing for me to add to my site!

    Thread Starter Anonymous

    if you would like to see an example of this hack (for the plugin), visit https://www.perogi.org/ and register, under profile, you will see a dropdown list of cities. Choose one and then visit the front page. You will notice on the right side, the weather of that city (if available).
    That is how it looks! Usually you would set up what city you want on your site but your users wouldn’t be able to change it.
    If you want to get a head start, you will need to have the weather plug in installed and working before you can install this one (that way, if you have any issues, we can limit it to my hack)
    I will finish up the install instructions and set it up so people can download it from my site.
    perogi.
    Warning: I have some pretty explicit instructions but it is NOT as easy to install as a typical plugin. If you are willing to proceed, please post here and I will update when I get the download ready.

    Eh, php is fun and easy, i can handle it, im willing to do it. Just post the link when its ready or you can email me a beta version [email protected]

    Thread Starter Anonymous

    Sorry its taking me so long to get back to you Jordon. Wedding plans are taking up a lot of my free time :-/
    I will try to get an upload asap.
    Thanks for your patience.
    perogi.

    Thread Starter Anonymous

    I’m interested in this script also! This is EXACTLY the hack I was looking for!

    Thread Starter Anonymous

    Thank you AIMJournals.
    I am going to work on this all tomorrow night until I can get the install instructions perfect and then create an upload spot on my site. Hopefully you two do not mind being my guinea pigs =)
    As I stated above, make sure that you already have the weather plugin installed and working. Here is the link for that plugin.
    Weather Plugin
    I will have the upload ready to go by Saturday morning =)
    perogi.

    Thread Starter Anonymous

    OK, cool! At the moment, my host’s MySQL is down, so I can’t install it, but as soon as it gets back up, I’ll install the weather plugin, then on saturday, your plugin! Thanks!
    I don’t mind being a guinea pig… sometimes it can be fun ??

    Thread Starter Anonymous

    I managed to have some time today at the client (they had their quarterly party) so I set up the download.
    I also have a quotes hack ready to go for those who are interested.
    Feedback would be very helpful!
    perogi.
    perogi.org

    Thread Starter Anonymous

    Wow I really like the way that you cannot edit your own posts :-/
    second try: perogi.org

    Thread Starter Anonymous

    Right away I’m noticing that you have to insert a file into MySQL. This file seems to rely on your wp table prefix to be “wp_”
    Here’s what I would do to fix this:
    Either:
    1. Change the file so that it gets the latest updated stations from the website (I’ll try to do this when I’m finished installing this hack…)
    That way, you don’t need to insert anything into MySQL… or:
    2. Change the instructions that say:
    3) In wp-settings.php you will need to add another line to the tableprefixes.
    $tablenoaainfo = $table_prefix . 'noaa_info';
    to say:
    3) In wp-settings.php you will need to add another line to the tableprefixes.
    $tablenoaainfo = 'wp_noaa_info';

    Thread Starter Anonymous

    OK… I was working on selecting the stations from the TXT file URL included with the original Weather Hack readme, and I got some code that works:
    $file = file("https://weather.noaa.gov/data/nsd_cccc.txt");
    join('\n',$file);
    echo "<select name=\"newuser_noaa_id\">\n";
    for($i=0;$i<count($file);$i++) {
    $split2 = explode(";",$file[$i]);
    if($split2[4] != '') {
    echo "<option value=\"".$split2[0]."\">".$split2[3].", ".$split2[4].", ".$split2[5]."</option>\n";
    } else {
    echo "<option value=\"".$split2[0]."\">".$split2[3].", ".$split2[5]."</option>\n";
    }
    }
    echo "</select>";

    As you can see, this code is relativly small and would be MUCH easier to use than the MySQL code… I’m working on implementing this code right now.
    Also, I noticed a mistake in your my-hacks.php:
    $weather_info = $wpdb->get_row("SELECT * FROM $tablenoaainfo WHERE user_noaa_id = '$noaa_id'");
    should be:
    $weather_info = $wpdb->get_row("SELECT * FROM $tablenoaainfo WHERE noaa_id = '$noaa_id'");

    Thread Starter Anonymous

    OK… I got it working without using ANY sql for the stations. I’ll make it a zip and post a link in a sec…

    Thread Starter Anonymous

    OK, here’s my zip if you want to use it:
    https://www.ajblog.uni.cc/user_weather.zip
    It SHOULD work fine. If you have any problems with THIS ZIP (not perogi’s) then please e-mail me at aimjournals at gmail dot com
    Note: I do not take any credit for creating this hack. If you want to thank anyone for this hack, thank perogi, NOT ME! I couldn’t have done this without him.

Viewing 15 replies - 1 through 15 (of 17 total)
  • The topic ‘Anyone interested in a user selected weather modul’ is closed to new replies.