Need help? Check out our Support site, then


widget woes........

  1. Oh dear.....
    I am trying to place a widget I found online here: (http://www.calculatorcat.com/moon_phases/daily_moon_phases.phtml) into a text widget on my blog. (I use Connectiona) The first time I did it, the widget went way pass the margins of the sidebar and looked ridiculous. The next few times I did it, the widget was cut in half and only part of it was visible. I have done nothing to the code and have followed the directions implicitly. I have tried it using Javascript, and not using Javascript, according to the directions at the website. Can anyone help me? The widget is a lunar phase clock.

  2. If it is just an html code then it would be allowed. WordPress.com will strip out any javascript for security purposes. Without creating a massive post with code, can you use the backticks and give us an idea what code you have to put in?

    Trent

  3. ...whoa...way in over my head here! what's a backtick? i really don't know anything at all about code other that finding something like font, color, center etc. However, it seems to me to be basic html that links back to the original site since it is a 'clock'. My first post gives the webaddress of the site. .........................

    hmm, this may be 'too much' for this forum......I hate to be a pain!

  4. The back tick is just the keyboard key to the left of the 1. If you place code with a backtick before it and another right after it, the forums won't try and execute the code! That is all I was meaning! If it is just html, is it in your page right now?

    Trent

  5. hope i did this right! here's the code.........the widget is on my page..bottom right...but it's only half of what it should be........thanks so much for your help!

    <!-- // Begin Current Moon Phase HTML (c) CalculatorCat.com // -->EDITED OUT BY TRENT<!-- // end moon phase HTML // -->

  6. I will edit the code out so no one can see it now. Problem is that it is trying to embed flash, which is a no-no here as well. I am afraid it will not work for you. Sorry!

    Trent

  7. okay then........thanks! It's good to understand what went wrong! Namaste.

  8. I am trying to add this widget onmy blog http://sandeshrokade.wordpress.com

    Can someone help me please. I do not see any option to upload this widget on this blog in administration wizard.

    http://www.crazylittleworld.com/winlivestatus-widget.zip

    Thanks your help

  9. I don't think anyone is going to click on a link to a zip file. Can you post the code here between backticks so we can look at it, rather than just downloading some file from somewhere we don't know?

  10. here is the code:
    Description: A WordPress plugin to display Messenger status. See the readme for details on how to use.
    Version: 2.0
    Author: Abdul Mueid
    Author URI: http://crazylittleworld.com
    */
    // Begin Main Function
    function status_main() {
    if ( !function_exists('register_sidebar_widget') )
    return;

    // This saves options and prints the widget's config form.
    function winlivestatus_control() {
    $options = $newoptions = get_option('winlivestatus');
    if ( $_POST['status-submit'] ) {
    $newoptions['title'] = strip_tags(stripslashes($_POST['status-title']));
    $newoptions['uid'] = strip_tags(stripslashes($_POST['status-uid']));
    }
    if ( $options != $newoptions ) {
    $options = $newoptions;
    update_option('winlivestatus', $options);
    }
    ?>
    <div style="text-align:right">
    <label for="status-title" style="line-height:35px;display:block;"><?php _e('Widget Title:', 'widgets'); ?> <input type="text" id="status-title" name="status-title" value="<?php echo wp_specialchars($options['title'], true); ?>" /></label>
    <label for="status-uid" style="line-height:35px;display:block;"><?php _e('User ID:', 'widgets'); ?> <input type="text" id="status-uid" name="status-uid" value="<?php echo wp_specialchars($options['uid'], true); ?>" /></label>
    <input type="hidden" name="status-submit" id="status-submit" value="1" />
    </div>
    <?php
    }
    //The function doing the dirty work
    function winlivestatus($args) {

    extract($args);
    $options = (array) get_option('winlivestatus');
    $title = $options['title'];
    if ( !isset($title) ) {
    $title = "WLM Status";
    }

    echo $before_widget . $before_title . $options['title'] . $after_title;

    //Get the data
    $data = file_get_contents("http://www.bencastricum.nl/msn/status.php/".$options['uid'].".xml");
    $test = 0;

    //Distinguish the status and output an image

    if (preg_match("/\bNLN\b/i", $data) && $test == 0) {
    $status = Online;
    echo "
    <img src='".get_settings('siteurl')."/wp-content/plugins/winlivestatus/online.gif' alt='$status' />";
    echo "
    <b>Status:</b> ".$status;
    $test = 1;
    }

    if (preg_match("/\bFLN\b/i", $data) && $test == 0) {
    $status = "Offline";
    echo "
    <img src='".get_settings('siteurl')."/wp-content/plugins/winlivestatus/offline.gif' alt='$status' />";
    echo "
    <b>Status:</b> ".$status;
    $test = 1;
    }

    if (preg_match("/\bBRB\b/i", $data) && $test == 0) {
    $status = "Be Right Back";
    echo "
    <img src='".get_settings('siteurl')."/wp-content/plugins/winlivestatus/brb.gif' alt='$status' />";
    echo "
    <b>Status:</b> ".$status;
    $test = 1;
    }

    if (preg_match("/\bPHN\b/i", $data)&& $test == 0) {
    $status = "On The Phone";
    echo "
    <img src='".get_settings('siteurl')."/wp-content/plugins/winlivestatus/phone.gif' alt='$status' />";
    echo "
    <b>Status:</b> ".$status;
    $test = 1;
    }

    if (preg_match("/\bLUN\b/i", $data) && $test == 0) {
    $status = "Out To Lunch";
    echo "
    <img src='".get_settings('siteurl')."/wp-content/plugins/winlivestatus/lunch.gif' alt='$status' />";
    echo "
    <b>Status:</b> ".$status;
    $test = 1;
    }

    if (preg_match("/\bBSY\b/i", $data) && $test == 0) {
    $status = "Busy";
    echo "
    <img src='".get_settings('siteurl')."/wp-content/plugins/winlivestatus/busy.gif' alt='$status' />";
    echo "
    <b>Status:</b> ".$status;
    $test = 1;
    }

    if (preg_match("/\bAWY\b/i", $data)&& $test == 0) {
    $status = "Away";
    echo "
    <img src='".get_settings('siteurl')."/wp-content/plugins/winlivestatus/away.gif' alt='$status' />";
    echo "
    <b>Status:</b> ".$status;
    $test = 1;
    }
    echo $after_widget;
    }

    // Tell Dynamic Sidebar about our widget and its control
    register_sidebar_widget(array('WinLiveStatus', 'widgets'), 'winlivestatus');
    register_widget_control(array('WinLiveStatus', 'widgets'), 'winlivestatus_control');
    }
    add_action('widgets_init', 'status_main');
    ?>

  11. And the instructions given in readme to use these are here. however I do not see plugin option in wordpress blog.

    /*
    Plugin Name: WinLiveStatus
    Plugin URI: http://crazylittleworld.com/plugins/winlivestatus/
    Description: A WordPress widget plugin to display Windows Live Messenger status.
    Version: 2.0
    Author: Abdul Mueid
    Author URI: http://crazylittleworld.com
    License: GPL
    */

    ==============
    Usage Instructions
    ==============

    1. Add the bot to your contact list. More information about adding the bot can be found here: http://bencastricum.nl/msn/help.php
    2. Upload the "winlivestatus" folder to your plugins folder (/wp-content/plugins).
    3. Activate the plugin from WordPress Administration.
    4. Go to Presentation->Sidebar Widgets from the Admin Panel and drag-drop the widget on the sidebar.
    5. Open the config window and enter the User ID (UID) provided by the bot and a Widget Name.
    6. Hit the Save Changes button.. You're good to go!

  12. You cant upload widgets to WP.com. You can however post some widget code in texxt boxes on your side bar

  13. Okay, there's your problem in the first sentence: "A WordPress plugin".

    We don't install plugins on WordPress.com blogs. They only work on blogs that are hosted elsewhere and use WordPress.org software. You can read more about this in the sticky thread at the very top of the forums marked "Read Me First".

  14. When you see 'wordpress' they usually talking about the version of wordpress found at http://wordpress.org If they're talking about wordpress.com, they'll usually state so specifically.

    Unless your Technorati of course.

Topic Closed

This topic has been closed to new replies.

About this Topic