Changing original source code

  • Author
  • #1092348


    I have pasted a code for a weather widget from that widget’s web site (YoWindow) in the Text widget format as instructed by WordPress/YoWindow). The widget comes up in my sidebar with scroll bars, yet the width that is missing from the widget is no more than the width of the scroll bars, thus why scroll bars? In right clicking the site to “view source” you can see that WordPress has changed the code I pasted (and can edit) from YoWindow. Several suggestions have been made for changing the WordPress source code (line 639) but I do not know how to do that. Can someone tell me how to edit the WordPress source code (line 639)? Also any other suggestions to eliminate the scroll bars?

    The blog I need help with is



    The main part of the code you get from YoWindow is a gigya shortcode. The gigya shortcode is always translated by WP into the appropriate iframe code. If the result isn’t ok, then you’ve made some mistake in your selections or in the Text widget itself. Start by opening the widget and making sure the option “Automatically add paragraphs” is not checked. If that doesn’t correct the issue, paste the code here between backticks so we can see what’s wrong.



    Automatically add paragraphs was not checked.
    the code I pasted from YoWindow:

    “<div style=”line-height:0;”>[gigya src="" width="170" height="150" allowfullscreen="true" wmode="opaque" bgcolor ="#FFFFFF" flashvars="location_id=gn:4148411&location_name=Boca%20Raton&time_format=12&unit_system=us&background=#FFFFFF&copyright_bar=false"]<div style=”width:170px;font-size:12px;font-family:Arial, Helvetica, sans-serif;”><span style=”float:left;”></span><span style=”float:right;color:#888888;”>NWS</span></div></div>”



    1) To display code correctly here, you need to enclose it in backticks (see note on “Allowed markup”).

    2) The widget has moved a bit to the left in relation to the regular sidebar content, and the links have moved a bit to the left in relation to the widget, because divs in the theme you’re using have a default 9px padding. You need to turn this:
    <div style="line-height:0;">
    <div style="padding:0;">
    and this:
    <div style="width:170px;font-size:12px;font-family:Arial, Helvetica, sans-serif;">
    <div style="width:170px;font-size:12px;font-family:Arial, Helvetica, sans-serif;padding:0;">
    You also need to add this at the end, to cancel the wrap around effect of the float left/right span tags:
    <div style="clear:both;"></div>

    3) These corrections will place the content correctly, but I’m afraid they won’t eliminate the scrollbars. I experimented with various dimensions in a post, and it seems that the widget has a minimum width and height below which you get the scrollbars. Minimum seems to be around 250×180. And the scrollbars seem to be browser related: I’m seeing them in Firefox but not in Safari no matter how small I make the widget.



    A couple of comments before I do what you suggest, which does not eliminate the scroll bars, which is my problem. I have been on a YoWindow Forum which generated these comments.

    1. It’s strange you mention the scrollbars are browser related because that was mentioned. I use only IE9, as do most of my friends. We see the scrollbars. I switched to Firefox and did not see the scrollbars, as one user suggested, who had the same experience. The problem comes back in that we are all IE users.

    2. Another user suggested that you could not use the 170 width, 150 hight frame border i.e. ” frameborder=”0″ width=”170″ height=”150″ with the same dimensions on items within the frame, i.e. “swf&width=170&height=150&#038”. That’s why I was trying to change the WordPress code.

    3. Another user suggested code inserts to eliminate the scrollbars, but it also eliminates the part of the widget under the scrollbars, which does not solve the problem.

    I would appreciate your inputs on these comments before I go ahead and make the changes you suggest, especially when I must point out this is only one port, Boca Raton. When I’m on a cruise and posting articles I have to add two or three ports and change them about every other day. We will hit as many as 20 ports on a cruise, meaning I would have to alter the code as you suggest 20 times and still have scrollbars???????? Let’s look close at the browser problem and see if there is permanent code to make it work on all browsers without scroll bars, like it does for us on Firefox. Thanks for your support, Gary



    You’re welcome.

    First of all I think you should know that I’m not just another volunteer here when it comes to these matters. The creator of the widget incorporated the gigya shortcode in his site thanks to these posts of mine:

    “I would have to alter the code as you suggest 20 times”?
    You don’t have to alter the whole code all the time: you can add my suggestions once, then change only the location ID and name.
    “I switched to Firefox and did not see the scrollbars.”
    In case you’re wondering why I do see them, I’m Mac user so I’m not using the same version of Firefox.
    “Another user suggested that you could not use […] the same dimensions […]”
    That’s how the shortcode always translates. If that user’s suggestion was correct, there would be scrollbars no matter what the size or the widget, but I’m not seeing any scrollbars in my 280×194 version of the widget – or in the other widget posts I’ve published:
    “That’s why I was trying to change the WordPress code.”
    You can’t.
    And you can’t change how browsers work either. So, unless I’m missing something, and unless the creator of the widget changes its design, the only things you can do is switch to a theme with a wider sidebar or use a different weather widget.

The topic ‘Changing original source code’ is closed to new replies.