Title: [Plugin: WordPress Video Plugin] Adding Zshare Player
Last modified: August 19, 2016

---

# [Plugin: WordPress Video Plugin] Adding Zshare Player

 *  [DivaythFyr](https://wordpress.org/support/users/divaythfyr/)
 * (@divaythfyr)
 * [15 years, 3 months ago](https://wordpress.org/support/topic/plugin-wordpress-video-plugin-adding-zshare-player/)
 * Since this player is not included amongst the other 63 players, I tried adding
   it myself, but it did not work. Fatal error.
 *     ```
       // Zshare code
   
       define("Zshare_WIDTH", 622);
       define("Zshare_HEIGHT", 440);
       define("Zshare_REGEXP", "/\[zshare (:print:+)\]/");
       define("Zshare_TARGET", "<iframe src="http://www.zshare.net/videoplayer/player.php?SID=###URL###&iframewidth=622&iframeheight=395&width=622&height=360" border="0" frameborder="0" height="438" scrolling=\"no\" width="622"></iframe>");
   
       function tutv_plugin_callback($match)
       {
               $output = Zshare_TARGET;
               $output = str_replace("###URL###", $match[1], $output);
               return ($output);
       }
   
       function zshare_plugin($content)
       {
               return (preg_replace_callback(Zshare_REGEXP, 'Zshare_plugin_callback', $content));
       }
   
       add_filter('the_content', 'Zshare_plugin');
       add_filter('the_content_rss', 'Zshare_plugin');
       add_filter('comment_text', 'Zshare_plugin');
       add_filter('the_excerpt', 'Zshare_plugin');
       ```
   
 * Is there a way for this to work, or a reason for why it doesn’t?

Viewing 7 replies - 1 through 7 (of 7 total)

 *  Thread Starter [DivaythFyr](https://wordpress.org/support/users/divaythfyr/)
 * (@divaythfyr)
 * [15 years, 3 months ago](https://wordpress.org/support/topic/plugin-wordpress-video-plugin-adding-zshare-player/#post-1912156)
 * By the way, awesome plug-in.
 *  Thread Starter [DivaythFyr](https://wordpress.org/support/users/divaythfyr/)
 * (@divaythfyr)
 * [15 years, 3 months ago](https://wordpress.org/support/topic/plugin-wordpress-video-plugin-adding-zshare-player/#post-1912205)
 * I have created a 4shared one:
 *     ```
       // 4Shared code by Divayth Fyr
   
       define("four_WIDTH", 622); // default width
       define("four_HEIGHT", 440); // default height
       define("four_REGEXP", "/\[4S (<a href="http://codex.wordpress.org/:print:">:print:</a>+)\]/");
       define("four_TARGET", "<object width=\"###WIDTH###\" height=\"###HEIGHT###\"><param name=\"movie\" value=\"http://www.4shared.com/embed/###URL###\" /><param name=\"allowScriptAccess\" value=\"always\" /><param name=\"allowFullScreen\" value=\"true\" /><embed src=\"http://www.4shared.com/embed/###URL###\" type=\"application/x-shockwave-flash\" width=\"###WIDTH###\" height=\"###HEIGHT###\" allowScriptAccess=\"always\" allowFullScreen=\"true\"></embed></object>");
   
       function four_plugin_callback($match)
       {
       	$tag_parts = explode(" ", rtrim($match[0], "]"));
       	$output = four_TARGET;
       	$output = str_replace("###URL###", $tag_parts[1], $output);
       	if (count($tag_parts) > 2) {
       		if ($tag_parts[2] == 0) {
       			$output = str_replace("###WIDTH###", four_WIDTH, $output);
       		} else {
       			$output = str_replace("###WIDTH###", $tag_parts[2], $output);
       		}
       		if ($tag_parts[3] == 0) {
       			$output = str_replace("###HEIGHT###", four_HEIGHT, $output);
       		} else {
       			$output = str_replace("###HEIGHT###", $tag_parts[3], $output);
       		}
       	} else {
       		$output = str_replace("###WIDTH###", four_WIDTH, $output);
       		$output = str_replace("###HEIGHT###", four_HEIGHT, $output);
       	}
       	return ($output);
       }
       function four_plugin($content)
       {
       	return (preg_replace_callback(four_REGEXP, 'four_plugin_callback', $content));
       }
   
       add_filter('the_content', 'four_plugin');
       add_filter('the_content_rss', 'four_plugin');
       add_filter('comment_text', 'four_plugin');
       add_filter('the_excerpt', 'four_plugin');
       ```
   
 * However, I’m still having trouble with the Zshare one.
 * This is a normal Zshare embed:
 *     ```
       <iframe src="http://www.zshare.net/videoplayer/player.php?SID=dl042&FID=75007216&FN=Cowboy%20Bebop%20Episode%206%20English%20Subbed.flv&iframewidth=622&iframeheight=395&width=622&height=360" border="0" frameborder="0" height="438" scrolling="no" width="622"></iframe>
       ```
   
 * I really need this since 90% of the videos I embed use one these embeds, and 
   it’s a pain to manually change three width tags each time..
 *  Thread Starter [DivaythFyr](https://wordpress.org/support/users/divaythfyr/)
 * (@divaythfyr)
 * [15 years, 3 months ago](https://wordpress.org/support/topic/plugin-wordpress-video-plugin-adding-zshare-player/#post-1912234)
 * I any help at all would be great..
 * Novamov is a similar iframe embed:
 * _[Code moderated as per the [Forum Rules](http://codex.wordpress.org/Forum_Welcome).
   Please use the [pastebin](http://wordpress.pastebin.com/)]_
 *  Plugin Author [daburna](https://wordpress.org/support/users/daburna/)
 * (@daburna)
 * [15 years, 3 months ago](https://wordpress.org/support/topic/plugin-wordpress-video-plugin-adding-zshare-player/#post-1912253)
 * Thanks DivaythFyr! I will try your code and then integrate it.
 *  Thread Starter [DivaythFyr](https://wordpress.org/support/users/divaythfyr/)
 * (@divaythfyr)
 * [15 years, 3 months ago](https://wordpress.org/support/topic/plugin-wordpress-video-plugin-adding-zshare-player/#post-1912263)
 * Is there any place I could get help on this issue?
 *  Thread Starter [DivaythFyr](https://wordpress.org/support/users/divaythfyr/)
 * (@divaythfyr)
 * [15 years, 3 months ago](https://wordpress.org/support/topic/plugin-wordpress-video-plugin-adding-zshare-player/#post-1912280)
 * Could anyone help at all?
 *  Thread Starter [DivaythFyr](https://wordpress.org/support/users/divaythfyr/)
 * (@divaythfyr)
 * [15 years, 3 months ago](https://wordpress.org/support/topic/plugin-wordpress-video-plugin-adding-zshare-player/#post-1912317)
 * Well, if anyone gets a chance to figure it out, great.

Viewing 7 replies - 1 through 7 (of 7 total)

The topic ‘[Plugin: WordPress Video Plugin] Adding Zshare Player’ is closed to new
replies.

 * ![](https://s.w.org/plugins/geopattern-icon/wordpress-video-plugin.svg)
 * [Wordpress Video Plugin](https://wordpress.org/plugins/wordpress-video-plugin/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/wordpress-video-plugin/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/wordpress-video-plugin/)
 * [Active Topics](https://wordpress.org/support/plugin/wordpress-video-plugin/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/wordpress-video-plugin/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/wordpress-video-plugin/reviews/)

 * 7 replies
 * 2 participants
 * Last reply from: [DivaythFyr](https://wordpress.org/support/users/divaythfyr/)
 * Last activity: [15 years, 3 months ago](https://wordpress.org/support/topic/plugin-wordpress-video-plugin-adding-zshare-player/#post-1912317)
 * Status: not resolved