Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- function load_onhover_js() {
- ?>
- <script type="text/javascript">
- function MouseChange( Img , imageSrc )
- //img will be the tag name, and imageSrc will be the URL of the image
- {
- document[Img].src = imageSrc;
- }
- </script>
- <?php }
- add_action('wp_head', 'load_onhover_js');
- function screenshotcomments () {
- global $comment;
- $commenturl = get_comment_author_url();
- $author = get_comment_author();
- $urlnohttp = str_replace(array('http://','https://'), '', $commenturl);
- if ( empty( $commenturl ) || 'http://' == $url )
- $return = $author;
- else
- ?>
- <script type="text/javascript"><!--
- var Img<?php the_ID(); ?>On = new Image();
- Img<?php the_ID(); ?>On.src = "http://thirdpart.com/<?php echo $urlnohttp;?>";
- var Img<?php the_ID(); ?>Off = new Image();
- Img<?php the_ID(); ?>Off.src = "<?php bloginfo('url');?>/wp-content/plugins/pluginame/control_play.png";
- </script>
- <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 ?>
- <img src="<?php bloginfo('url');?>/wp-content/plugins/pluginname/control_play.png" border="0" name="Img<?php the_ID(); ?>" />
- </a>
- <?php
- }
- add_filter('get_comment_author_link', 'screenshotcomments');
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement