Adddign Traffic Magnet to blog

  • Author
    Posts
  • #548080

    libraryexample
    Member
    Original poster

    I’d like to add a traffic widget (like a weather widget for driving conditions) to our site. The only one I found was at traffic.com, but when I paste it, it won’t display properly. I’m not sure if this is a javascript code or uses iframes, both of which I knwo don’t work in wordpress. Does anyone know why this won’t work or have a better idea?

    the code is:
    <!– START OF TRAFFIC.COM TrafficMagnet –>
    <!– This code generates a Traffic.com TrafficMagnet. –>
    <!– Modifying this code may break the Magnet. –>
    <!– Use of the Traffic.com TrafficMagnet is subject to –>
    <!– the Terms of Use found at magnet.traffic.com. –>
    <!– Copyright 2008 Traffic.com, Inc. –>

    <script>var includebrand = true;</script>

    <!– begin half banner html –>
    <div class=”MagnetContainerDiv234_1″>
    <div class=”magnetMetroHeader234″>
    <div class=”magnetMetroHeader234Padding”>
    <p>Cincinnati Area Traffic</p>
    <div class=”logoMagnetContainerDiv234″>
    <div class=”logo234″>
    <img id=”traffic_logo” src=”http://magnet.traffic.com//images/spacer.gif” alt=”Traffic.com” class=”logo” width=”98″ height=”25″ border=”0″/>
    </div>
    </div>
    <script language=”Javascript” type=”text/javascript” src=”http://magnet.traffic.com/usermagnets/metro51/user1229710/magnet16012/trafficmagnet.js”></script>
    </div>
    </div>
    </div>
    <!– end half banner html –>

    <noscript>
    View real-time Cincinnati area traffic reports
    </noscript>
    <!– END OF TRAFFIC.COM TrafficMagnet –>

    The blog I need help with is: brownmackielibrary.com

    #548227

    timethief
    Member

    Sorry but the software will strip the Javacript out to preserve security on this multi-user blogging platform. These are the restricted codes > http://en.support.wordpress.com/code/

    #548228

    airodyssey
    Member

    ~~timethief :-)
    If you can find a Flash alternative to that traffic gadget, you could insert it through a Gigya shortcode:
    http://wpbtips.wordpress.com/2010/07/22/gigya-shortcode-3-widgets/

    A little word of advice: always insert code between backticks on this forum. Certain tags work (such as “A”) so if you paste the code without backticks, some of the code will not show. Please refer to the instructions at the bottom of the “Leave a reply” box.

    #548235

    libraryexample
    Member
    Original poster

    @airodyssey, where would I find a flash option? Is there a way to convert java scripts to flash? Other than google and mapquest which have embed options using iframes, I can’t find any other traffic widgets other than the one from traffic.com

    #548238

    airodyssey
    Member

    @libraryexample: You can’t convert JavaScript to Flash just like that. I was referring to the fact that either the site you were mentioning might have a Flash alternative (some websites do), or you might have to find another website where the code is Flash, not JavaScript.

    For example, Panos has some examples of Flash-based weather widgets on his website (at the link I gave you) so perhaps there’s the same thing but for traffic somewhere.

    #548241

    libraryexample
    Member
    Original poster

    gotcha. OK thanks. I haven’t been able to find any flash traffic widgets but I’ll keep looking.

    #548243
    #548259

    libraryexample
    Member
    Original poster

    @panaghiotisadam What am I doing wrong? When I click on “get widget” it retrieves a java script code

    #548299

    timethief
    Member

The topic ‘Adddign Traffic Magnet to blog’ is closed to new replies.