...

View Full Version : LinkedIn button not working for home page posts on internet explorer family



nubirth
07-20-2011, 07:56 PM
Any help regarding the linked in button on this sites home page here:

www.mobileinquirer.com

It works fine on everything but I.E and seriously messes things up...I am lost totally!

Thanks in advance!

<div id="singlepostsocialhome">

<div style="float:left; padding-right: 3px;">
<script type="text/javascript" src="http://platform.linkedin.com/in.js"></script><script type="in/share" data-url="<?php the_permalink(); ?>" data-counter="right"></script>
</div>

<div id="likebutton"><iframe src="http://www.facebook.com/plugins/like.php?href=<?php echo rawurlencode(get_permalink()); ?>&amp;layout=button_count&amp;show_faces=false&amp;width=100&action=like&font=verdana&amp;colorscheme=light&amp;height=21" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:100px; height:21px;" allowTransparency="true"></iframe></div>

<div id="send-plugin"><fb:send href="<?php the_permalink() ?>"></fb:send></div>

<div id="twitter-plugin"><a href="http://twitter.com/share" class="twitter-share-button" data-url="<?php the_permalink() ?>" data-text="<?php the_title(); ?>" data-count="horizontal" data-via="MobileInquirer">Tweet</a><script type="text/javascript" src="http://platform.twitter.com/widgets.js"></script></div>

<div id="google-plugin"><g:plusone size="medium" href="<?php the_permalink() ?>"></g:plusone></div>

</div> <!-- End singlepostsocialhome -->

nubirth
07-20-2011, 07:59 PM
If anyone can work out why the hell my scroll bar is also too wide I would love to know!

Thanks

Fou-Lu
07-21-2011, 12:27 AM
Does PHP generate the output for those echo's into the data-urls, data-text, and urls?
If so, this hasn't a thing to do with PHP. Anything that works in some browsers and not others is typically a client compatibility issue, and not one with the server side technology.

nubirth
07-21-2011, 09:26 AM
I have no idea what PHP does on internet explorer apart form screw everything up when it all works perfectly fine on other browsers!

Not a PHP person hence why I am lost totally.

Fou-Lu
07-21-2011, 03:33 PM
Since its just the one browser, I would expect that its working fine from a PHP point of view, so this will likely be a client issue.
Moving from PHP forum to HTML/CSS forum.

nubirth
07-21-2011, 09:37 PM
Hi there I have been looking all over for 12 hours today and with help from others but still getting nothing sorted, can someone please advise me where I am going wrong with the linked in button (if indeed that is the issue) I have turned off disqus, refreshed the cache on my cache plug-in and also altered loads of code here and there, been all around the houses and now back to square one but very lost still.

www.mobileinquirer.com

The problem AS USUAL! is internet explorer and I imagine the whole family.....

If anyone can advise me I would seriously appreciate that!

Thanks in advance.

nubirth
07-21-2011, 09:57 PM
Debug errors for IE9 says:

Line: 24
Error: Unable to get value of the property 'split': object is null or undefined

Looked this up and messed for hours related it to comment php mark up and disqus, deleted, added, etc etc, nothing...any help?

alykins
07-22-2011, 12:15 AM
can u post all of ur code? need to see line 24 since that's where the error is thrown... also need to see preceding lines in case they are causing the issue

nubirth
07-22-2011, 12:41 AM
Well here goes, its a theme with files all over so here is the source, if you need more specifics please let me know!

nubirth
07-22-2011, 12:42 AM
<?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
<div class="home-blog clear"><!-- Begin home post -->
<div class="home-blog-thumb"><!-- Begin blog post thumbnail -->
<?php if ( in_category ( 'videos' ) ) { // If this is the video category ?>
<?php if ( get_option('wap8_press75_on') == 'true' && p75HasVideo($post->ID) ) { // If the SVE plugin is installed, enabled and has a video ?>
<?php if ( has_post_thumbnail() ) { // Has a featured image been set ?>
<p><?php the_post_thumbnail('thumbnail-search', array('title' => get_the_title())); ?></p>
<p><a class="play-button" href="<?php the_permalink(); ?>" title="<?php the_title_attribute(); ?>"><?php _e('Play Video','periodic'); ?></a></p>
<?php } else { // If no featured image is set ?>
<p><img src="<?php echo get_template_directory_uri(); ?>/images/thumbnails/thumbnail-search.jpg" width="130" height="130" alt="<?php the_title_attribute(); ?>" /></p>
<p><a class="play-button" href="<?php the_permalink(); ?>" title="<?php the_title_attribute(); ?>"><?php _e('Play Video','periodic'); ?></a></p>
<?php } // End featured image condition ?>
<?php } else { // End SVE conditions and Begin YouTube Overlay Conditions ?>
<?php if ( has_post_thumbnail() ) { // Has a featured image been set ?>
<p><?php the_post_thumbnail('thumbnail-search', array('title' => get_the_title())); ?></p>
<p><a class="play-fancybox play-button" href="http://www.youtube.com/watch?v=<?php echo get_post_meta($post->ID, 'YouTube Video ID',true) ?>&amp;feature=player_embedded" title="<?php the_title_attribute(); ?>"><?php _e('Play Video','periodic'); ?></a></p>
<?php } else { // If no featured image is set ?>
<p><img src="<?php echo get_template_directory_uri(); ?>/images/thumbnails/thumbnail-search.jpg" width="130" height="130" alt="<?php the_title_attribute(); ?>" /></p>
<p><a class="play-fancybox play-button" href="http://www.youtube.com/watch?v=<?php echo get_post_meta($post->ID, 'YouTube Video ID',true) ?>&amp;feature=player_embedded" title="<?php the_title_attribute(); ?>"><?php _e('Play Video','periodic'); ?></a></p>
<?php } // End featured image condition ?>
<?php } ?>
<?php } else { // End video conditions ?>
<?php if ( has_post_thumbnail() ) { ?>
<p><a href="<?php the_permalink(); ?>" rel="bookmark" title="<?php the_title_attribute(); ?>"><?php the_post_thumbnail('thumbnail-search', array('title' => get_the_title())); ?></a></p>
<?php } else { ?>
<p><a href="<?php the_permalink(); ?>" rel="bookmark" title="<?php the_title_attribute(); ?>"><img src="<?php echo get_template_directory_uri(); ?>/images/thumbnails/thumbnail-search.jpg" width="130" height="130" alt="<?php the_title_attribute(); ?>" /></a></p>
<?php } ?>
<?php if ( get_option('wap8_blog_star') == 'true' && $commentcount >= $blog_star ) { ?>
<p class="hot-topic"><?php _e('This is currently a hot topic','periodic'); ?></p>
<?php } ?>
<?php } // End all conditions ?>
</div><!-- End blog post thumbnail -->

<div class="home-blog-text"><!-- Begin blog post text -->
<h3><a href="<?php the_permalink(); ?>" rel="bookmark" title="<?php the_title_attribute(); ?>"><?php the_title(); ?></a></h3>
<p><?php the_time('F d, Y'); ?> &#124; <a href="<?php the_permalink(); ?>#comments"><?php comments_number('No Comments', '1 Comment', '% Comments'); ?></a> &#124; <?php if(function_exists('the_views')) { the_views(); } ?></p>
<p><?php the_excerpt(); ?></p>

<div id="singlepostsocialhome">
<span class="linkedInShare"><script type="in/share" data-url="<?php the_permalink(); ?>" data-counter="right"></script></span>

<div id="likebutton"><iframe src="http://www.facebook.com/plugins/like.php?href=<?php echo rawurlencode(get_permalink()); ?>&amp;layout=button_count&amp;show_faces=false&amp;width=100&action=like&font=verdana&amp;colorscheme=light&amp;height=21" scrolling="no" frameborder="0" style="border:none; overflow:hidden; width:100px; height:21px;" allowTransparency="true"></iframe></div>
<div id="send-plugin"><fb:send href="<?php the_permalink(); ?>"></fb:send></div>
<div id="twitter-plugin"><a href="http://twitter.com/share" class="twitter-share-button" data-url="<?php the_permalink(); ?>" data-text="<?php the_title(); ?>" data-count="horizontal" data-via="MobileInquirer">Tweet</a><script type="text/javascript" src="http://platform.twitter.com/widgets.js"></script></div>
<div id="google-plugin"><g:plusone size="medium" href="<?php the_permalink(); ?>"></g:plusone></div>


</div> <!-- End singlepostsocialhome -->
</div> <!-- End home blog text -->
</div> <!-- End home post -->

<div class="home-blog-cat"><!-- Begin post categories -->
<p><?php _e('Written by: '); ?><?php the_author(); ?></p>
<p><?php _e('Posted in: ','periodic'); ?> <?php the_category(', '); ?></p>
</div><!-- End post categories -->

<?php endwhile; ?>

<?php if ( function_exists( 'wp_pagenavi' ) ) { ?>
<div class="pagination"><!-- Begin pagination -->
<?php wp_pagenavi(); ?>
</div><!-- End pagination -->
<?php } else { ?>
<div class="pagination"><!-- Begin pagination -->
<div class="default-paging">
<p class="alignleft"><?php next_posts_link(__('&laquo; Older Articles','periodic')) ?></p>
<p class="alignright"><?php previous_posts_link(__('Newer Articles &raquo;','periodic')) ?></p>
</div>
</div><!-- End pagination -->
<?php } ?>

<?php endif; wp_reset_query(); ?>

nubirth
07-22-2011, 12:43 AM
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

<html <?php language_attributes(); ?>>

<head>
<meta http-equiv="Content-Type" content="<?php bloginfo( 'html_type' ); ?>; charset=<?php bloginfo( 'charset' ); ?>" />

<title><?php wp_title( '&#124;', true, 'right' ); ?><?php bloginfo( 'name' ); ?> &#124; <?php bloginfo( 'description' ); ?></title>
<!-- Favicon -->
<?php if ( get_option('wap8_favicon') != '' ) { ?><link href="<?php echo( stripslashes ( get_option('wap8_favicon') ) );?>" rel="shortcut icon" /><?php } ?>

<!-- Core Stylesheet -->
<link rel="stylesheet" id="periodic-core" href="<?php bloginfo( 'stylesheet_url' ); ?>" type="text/css" media="screen" />

<!-- Pingback -->
<link rel="pingback" href="<?php bloginfo( 'pingback_url' ); ?>" />

<?php
if ( is_singular() ) wp_enqueue_script( 'comment-reply' );

if ( get_option( 'wap8_show_twitter' ) == 'true' && is_singular() ) wp_enqueue_script( 'twitter-platform-script' );

if ( get_option( 'wap8_show_gbuzz' ) == 'true' && is_singular() ) wp_enqueue_script( 'gbuzz-button-script' );

if ( get_option( 'wap8_show_digg' ) == 'true' && is_singular() ) wp_enqueue_script( 'digg-share' );

wp_head(); // delete this and your world will come to an end ?>

<!-- Social Networks -->




<script type="text/javascript">

var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-23773789-1']);
_gaq.push(['_trackPageview']);

(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();

</script>
</head>

<body <?php body_class(); ?>>

<div id="angles"><!-- Begin site content -->
<div id="utility-banner" class="clear"><!-- Begin Utility Banner -->
<div class="inner-wrapper"><!-- Begin inner wrapper -->
<?php
if ( function_exists( 'wp_nav_menu' ) ) {
wp_nav_menu(
array(
'theme_location' => 'utility-menu',
'fallback_cb' => 'periodic_page_menu',
'menu_class' => 'header-menu'
)

);
}
else {
periodic_page_menu();
}
?>

<ul class="socialize">
<?php if ( get_option('wap8_facebook') != '' ) { ?><li><a class="get-facebook" href="<?php echo( stripslashes ( get_option('wap8_facebook') ) );?>" title="<?php _e('Follow us on Facebook','periodic'); ?>"><?php _e('Facebook','periodic'); ?></a></li><?php } ?>
<?php if ( get_option('wap8_twitter_user') != '' ) { ?><li><a class="get-twitter" href="http://twitter.com/<?php echo( stripslashes ( get_option('wap8_twitter_user') ) );?>" title="<?php _e('Follow us on Twitter','periodic'); ?>"><?php _e('Twitter','periodic'); ?></a></li><?php } ?>
<li><a class="get-feed" href="<?php echo( stripslashes ( get_option('wap8_feed') ) );?>" title="<?php _e('Subscribe to our RSS Feed','periodic'); ?>"><?php _e('Subscribe to our Feed','periodic'); ?></a></li>
</ul>
</div><!-- End inner wrapper -->
</div><!-- End Utility Banner -->




<div id="masthead" class="clear"><!-- Begin masthead -->
<div class="inner-wrapper"><!-- Begin inner wrapper -->
<h1 class="headertitle">Mobile Inquirer - Mobile News - Mobile Technology News - Smart Phone News - Tablet News - Reviews and Analysis</h1>

<?php if ( get_option('wap8_logo') != '' ) { ?>
<p class="logo"><a href="<?php echo home_url(); ?>" title="<?php bloginfo('name'); ?>"><img src="<?php echo( stripslashes ( get_option('wap8_logo') ) );?>" alt="<?php bloginfo('name'); ?>" /></a></p>
<?php } else { ?>
<p class="logo-text"><a href="<?php echo home_url(); ?>" title="<?php bloginfo('name'); ?>"><?php bloginfo('name'); ?></a></p>
<?php } ?>
<?php if ( get_option('wap8_banner') != '' ) { ?>
<div class="masthead-banner">
<?php echo( stripslashes ( get_option('wap8_banner') ) );?>
</div>
<?php } ?>

<div id="frontsocialinks">
<a class="facebookhomelink" href="https://www.facebook.com/pages/Mobile-Inquirer/160735673991706" TARGET="_blank" alt="Join Us On Facebook"><img src="/wp-content/themes/MobileInquirer-child/images/Facebook-Like-Button.gif"></a>
<a class="twitterhomelink" href="http://twitter.com/#!/mobileinquirer" TARGET="_blank" alt="Join Us On Twitter"><img src="/wp-content/themes/MobileInquirer-child/images/twitter_follow.png"></a>
<a class="writerlink" href="http://www.mobileinquirer.com/contribute-as-a-writer/" alt="Write For Us"><img src="/wp-content/themes/MobileInquirer-child/images/writeforus.png"></a>
</div>

<!-- <div class="socialheader">
<a href="http://twitter.com/MobileInquirer" class="twitter-follow-button" data-show-count="false">Follow @MobileInquirer</a>
<script src="http://platform.twitter.com/widgets.js" type="text/javascript"></script>
</div>
-->



</div><!-- End inner wrapper -->
</div><!-- End masthead -->

<?php if ( get_option('wap8_pop_show') == 'true' ) { locate_template( '/includes/stickyposts.php', true, true ); } ?>

<?php if ( get_option('wap8_728banner') != '' ) { ?>
<div class="inner-wrapper">
<div id="banner-728"><!-- Begin 728x90 leaderboard banner ad -->
<?php echo( stripslashes ( get_option('wap8_728banner') ) );?>
</div><!-- End 728x90 leaderboard banner ad -->
</div>
<?php } ?>

<div id="megaMenu" class="clear"><!-- Begin Main Navigation -->
<?php
if ( function_exists( 'wp_nav_menu' ) ) {
wp_nav_menu(
array(
'theme_location' => 'main-menu',
'fallback_cb' => 'periodic_category_menu'
)

);
}
else {
periodic_category_menu();
}
?>
</div><!-- End MEGA MENU NAMED MENU -->

nubirth
07-22-2011, 12:44 AM
<div id="footer"><!-- Begin Footer -->
<div id="footer-columns" class="clear"><!-- Begin footer columns -->
<div class="footer-column">
<!-- Begin widgetized footer column 1 -->
<?php dynamic_sidebar( 'footer-column-one' ); ?>
<!-- End widgetized fooyer column 1 -->
</div>

<div class="footer-column">
<!-- Begin widgetized footer column 2 -->
<?php dynamic_sidebar( 'footer-column-two' ); ?>
<!-- End widgetized fooyer column 2 -->
</div>

<div class="footer-column">
<!-- Begin widgetized footer column 3 -->
<?php dynamic_sidebar( 'footer-column-three' ); ?>
<!-- End widgetized fooyer column 3 -->
</div>
</div><!-- End footer columns -->

<div id="copyright" class="clear"><!-- Begin copyright -->
<div class="alignleft">
<p><?php _e('Copyright &#169;','periodic'); ?> <?php echo date('Y'); ?> <a href="<?php echo home_url(); ?>" title="<?php bloginfo('name'); ?>"><?php bloginfo('name'); ?></a>.</p>
</div>

<div class="alignright">
<p><a class="scroll-top" href="#" title="<?php _e('Back to Top','periodic'); ?>"><?php _e('Back to Top','periodic'); ?></a></p>
</div>
</div><!-- End copyright -->
</div><!-- End Footer -->
</div><!-- End site content -->
<?php wp_footer(); ?>
<?php if ( get_option('wap8_analytics_code') != '' ) { ?>
<?php echo( stripslashes ( get_option('wap8_analytics_code') ) );?>
<?php } ?>

<script type="text/javascript" src="http://apis.google.com/js/plusone.js"></script>
<script type="text/javascript" src="http://platform.twitter.com/widgets.js"></script>
<script src="http://connect.facebook.net/en_US/all.js#xfbml=1"></script>
<script type="text/javascript" src="http://platform.linkedin.com/in.js"></script>

</body>

</html>

nubirth
07-22-2011, 12:44 AM
Sorry that is MIDDLE - HEADER - FOOTER in order!

nubirth
07-22-2011, 12:56 AM
To note:

I have taken the minified cache off from javascript so the line will not be 24 now.

Now line 924:

url = nodes[i].parentNode.href.split('#' , 1)

Its all nonsense I have been to a disqus thread that stated to do various things:

http://wordpress.org/support/topic/plugin-disqus-comment-system-minor-bug-in-javascript-code

Plus others but none of the advice works:

nubirth
07-22-2011, 12:57 AM
The disqus PHP:

// if someone has a better hack, let me know
// prevents duplicate calls to count.js
$_HAS_COUNTS = false;

function dsq_output_loop_comment_js($post_ids = null) {
global $_HAS_COUNTS;
if ($_HAS_COUNTS) return;
$_HAS_COUNTS = true;
if (count($post_ids)) {
?>
<script type="text/javascript">
// <![CDATA[
var disqus_shortname = '<?php echo strtolower(get_option('disqus_forum_url')); ?>';
var disqus_domain = '<?php echo DISQUS_DOMAIN; ?>';
(function () {
var nodes = document.getElementsByTagName('span');
for (var i = 0, url; i < nodes.length; i++) {
if (nodes[i].className.indexOf('dsq-postid') != -1) {
nodes[i].parentNode.setAttribute('data-disqus-identifier', nodes[i].getAttribute('rel'));
url = nodes[i].parentNode.href.split('#', 1);
if (url.length == 1) { url = url[0]; }
else { url = url[1]; }
nodes[i].parentNode.href = url + '#disqus_thread';
}
}
var s = document.createElement('script'); s.async = true;
s.type = 'text/javascript';
s.src = 'http://' + disqus_domain + '/forums/' + disqus_shortname + '/count.js';
(document.getElementsByTagName('HEAD')[0] || document.getElementsByTagName('BODY')[0]).appendChild(s);
}());
//]]>
</script>
<?php
}
}

function dsq_output_footer_comment_js() {
if (!dsq_can_replace()) return;
if (get_option('disqus_cc_fix') != '1') return;
?>
<script type="text/javascript">
// <![CDATA[
var disqus_shortname = '<?php echo strtolower(get_option('disqus_forum_url')); ?>';
var disqus_domain = '<?php echo DISQUS_DOMAIN; ?>';
(function () {
var nodes = document.getElementsByTagName('span');
for (var i = 0, url; i < nodes.length; i++) {
if (nodes[i].className.indexOf('dsq-postid') != -1) {
nodes[i].parentNode.setAttribute('data-disqus-identifier', nodes[i].getAttribute('rel'));
url = nodes[i].parentNode.href.split('#', 1);
if (url.length == 1) url = url[0];
else url = url[1]
nodes[i].parentNode.href = url + '#disqus_thread';
}
}
var s = document.createElement('script'); s.async = true;
s.type = 'text/javascript';
s.src = 'http://' + disqus_domain + '/forums/' + disqus_shortname + '/count.js';
(document.getElementsByTagName('HEAD')[0] || document.getElementsByTagName('BODY')[0]).appendChild(s);
}());
//]]>
</script>
<?php
}

alykins
07-22-2011, 01:08 AM
unfortanutaly (spelling**) I do not know the "answer" but it seems to be a syntax error in your javascript... split() is a javascript method

nubirth
07-22-2011, 01:20 AM
It all works fine without this code:



<!-- <span class="linkedInShare"><script type="in/share" data-url="<?php the_permalink(); ?>" data-counter="right"></script></span> -->

nubirth
07-22-2011, 01:22 AM
Ah yes its an oddity thanks for your time though but I am so stumped....I can leave it off but I really want it on...and in all honesty I want to know what it is, is it linked in or something else!

God knows!

Cheers



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum