Advertisement
Guest User

Untitled

a guest
Nov 10th, 2011
98
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <?php
  2. function load_onhover_js() {
  3. ?>
  4.  
  5. <script type="text/javascript">
  6. function MouseChange( Img , imageSrc )
  7. //img will be the tag name, and imageSrc will be the URL of the image
  8. {
  9. document[Img].src = imageSrc;
  10. }
  11. </script>
  12.  
  13. <?php }
  14. add_action('wp_head', 'load_onhover_js');
  15. function screenshotcomments () {
  16. global $comment;
  17. $commenturl = get_comment_author_url();
  18. $author = get_comment_author();
  19. $urlnohttp = str_replace(array('http://','https://'), '', $commenturl);
  20. if ( empty( $commenturl ) || 'http://' == $url )
  21. $return = $author;
  22. else
  23.  
  24. ?>
  25.  
  26. <script type="text/javascript"><!--
  27. var Img<?php the_ID(); ?>On = new Image();
  28. Img<?php the_ID(); ?>On.src = "http://thirdpart.com/<?php echo $urlnohttp;?>";
  29. var Img<?php the_ID(); ?>Off = new Image();
  30. Img<?php the_ID(); ?>Off.src = "<?php bloginfo('url');?>/wp-content/plugins/pluginame/control_play.png";
  31. </script>
  32.  
  33. <a href="<?php echo $commenturl ?>" onMouseOver="MouseChange( 'Img<?php the_ID(); ?>' , Img<?php the_ID(); ?>On.src )" onMouseOut = "MouseChange( 'Img<?php the_ID(); ?>' , Im<?php the_ID(); ?>Off.src )" ><?php echo $author ?>
  34. <img src="<?php bloginfo('url');?>/wp-content/plugins/pluginname/control_play.png" border="0" name="Img<?php the_ID(); ?>" />
  35. </a>
  36.  
  37. <?php
  38. }
  39. add_filter('get_comment_author_link', 'screenshotcomments');
  40.  
  41. ?>
  42.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement