WordPress.org

Support

Support » Plugins and Hacks » Hacks » Basic script addition to my site

Basic script addition to my site

  • chieflorenzo

    @chieflorenzo

    Hi, I did post similar the other day but have had no reply. It really should be very easy to do, and I’ve managed to make it work on a local installation running on MAMP. I’ve got the below code that I want to put into a post or a page in my wordpress installation, and it just doesn’t seem to display the Flash-enabled map on my live installation.

    Below is the sample code, and it works fully as an html page uploaded (example at http://www.convexum.com/glympse.htm), but not when embedded into my blog.

    I added the Script tags bit to the header.php file of my template between the <head> </head> tags, and I put the div tag and its content into the HTML view of the page or post.

    Here’s hoping someone can help, and here’s the html example code from the developer’s site:

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
    <title>Glympse - Twitter Integration Example</title>
    
    <!-- Start of required <script> includes -->
    <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4/jquery.min.js" type="text/javascript"></script>
    <script type="text/javascript" src="http://a1.glympse.com/javascripts/swfobject.standalone.js"></script>
    <script type="text/javascript" src="http://a1.glympse.com/javascripts/jquery.glympser.js"></script>
    <!-- End of required <script> includes -->
    
    <script type="text/javascript">
    	/*
    	 * This can be placed arbitrarily in your page (after the above <script> includes), or within other
    	 * jQuery.ready() calls, if your page utilizes this type of functionality.
    	 */
    	jQuery("document").ready(function()
    	{
    		// Insert the Glympser in <div id="glympserContent">
    		$("#glympserContent").glympser( {  idTwitter: "Glympse_Fan"     // Twitter id to follow
    										  //,idTicket: "SetMe!"         // Glympse ticket id to follow (unused if idTwitter is set)
    										  ,w: 640                       // Width of Glympser window
    										  ,h: 440                       // Height of Glympser window
    										  ,mapType: "normal"            // Normal street view
    										//,mapType: "satellite"         // Overhead satellite view
    										  ,zoom: 13                     // Default zoom level
    										 });
    	});
    
    </script>
    </head>
    
    <body bgcolor="#ffffff">
    <div id="glympserContent">
    	<h1>Incompatible Adobe Flash player</h1>
    	<p><a href="http://www.adobe.com/go/getflashplayer">Get the latest Adobe Flash player</a></p>
    </div>
    </body>
    </html>
Viewing 2 replies - 1 through 2 (of 2 total)
  • kkarpieszuk

    @kkarpieszuk

    you embed html document (with doctype and everything ellse) into another html document? wrong, you destroy DOM of this file.

    second:
    also write ‘jquery wordpress’ and at first place you will what you need to change

    kkarpieszuk

    @kkarpieszuk

    also write ‘jquery wordpress’

    i mean write in google 🙂

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Basic script addition to my site’ is closed to new replies.