<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[vldPersonals Forum - Embed adultism.com, xhamster.com videos]]></title>
	<link rel="self" href="http://www.vldpersonals.com/forum/feed/atom/topic/9985/"/>
	<updated>2011-12-27T15:37:34Z</updated>
	<generator>PunBB</generator>
	<id>http://www.vldpersonals.com/forum/topic/9985/embed-adultismcom-xhamstercom-videos/</id>
		<entry>
			<title type="html"><![CDATA[Re: Embed adultism.com, xhamster.com videos]]></title>
			<link rel="alternate" href="http://www.vldpersonals.com/forum/post/48717/#p48717"/>
			<content type="html"><![CDATA[<p>Who has the code for other adult video sites?<br /> thanks</p>]]></content>
			<author>
				<name><![CDATA[jucks721]]></name>
				<uri>http://www.vldpersonals.com/forum/user/2938/</uri>
			</author>
			<updated>2011-12-27T15:37:34Z</updated>
			<id>http://www.vldpersonals.com/forum/post/48717/#p48717</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Embed adultism.com, xhamster.com videos]]></title>
			<link rel="alternate" href="http://www.vldpersonals.com/forum/post/47511/#p47511"/>
			<content type="html"><![CDATA[<p>Thanks for these great sources of adult video.</p>]]></content>
			<author>
				<name><![CDATA[radioact]]></name>
				<uri>http://www.vldpersonals.com/forum/user/554/</uri>
			</author>
			<updated>2011-09-12T03:08:43Z</updated>
			<id>http://www.vldpersonals.com/forum/post/47511/#p47511</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Embed adultism.com, xhamster.com videos]]></title>
			<link rel="alternate" href="http://www.vldpersonals.com/forum/post/47406/#p47406"/>
			<content type="html"><![CDATA[<p>Based on the above mod, this goes for embedding XHamster videos:<br />Changes are in ext.metavideo.php, starting with function vldext_metavideo(). Add:<br /></p><div class="codebox"><pre><code>    elseif ( $params[&#039;type&#039;] == &#039;xhamster&#039; )
    {
        $width = ( isset($params[&#039;width&#039;]) ? $params[&#039;width&#039;] : 510 );
        $height = ( isset($params[&#039;height&#039;]) ? $params[&#039;height&#039;] : 400 );

        if ( $media == &#039;preview&#039; )
        {
            return $preview;
        }
        else
        {
            return &#039;&lt;iframe width=&quot;&#039; . $width . &#039;&quot; height=&quot;&#039; . $height . &#039;&quot; src=&quot;http://xhamster.com/xembed.php?video=&#039; . $video_id . &#039;&quot; frameborder=&quot;0&quot; scrolling=&quot;no&quot;&gt;&lt;/iframe&gt;&#039;;
        }
    }</code></pre></div><p>In function vld_parse_video_url() add:<br /></p><div class="codebox"><pre><code>    elseif ( $type == &#039;xhamster&#039; )
    {
        preg_match(&#039;/\/movies\/([\d]+)\//&#039;, $url, $matches);
        if ( $matches )
        {
            $data = send_remote_request($url);
            preg_match(&quot;/&#039;image&#039;:\s*&#039;(http.*)&#039;/siU&quot;, $data, $tmatches);
            return array($matches[1], ($tmatches[1] ? $tmatches[1] : &#039;&#039;));
        }
        else
        {
            return &#039;http://www.xhamster.com/movies/123456/foo_bar.html&#039;;
        }
    }</code></pre></div><p>In function vld_vendors_list() add:<br /></p><div class="codebox"><pre><code>        &#039;xhamster&#039; =&gt; &#039;XHamster&#039;,</code></pre></div>]]></content>
			<author>
				<name><![CDATA[jensrenner]]></name>
				<uri>http://www.vldpersonals.com/forum/user/9889/</uri>
			</author>
			<updated>2011-09-05T18:38:51Z</updated>
			<id>http://www.vldpersonals.com/forum/post/47406/#p47406</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Embed adultism.com, xhamster.com videos]]></title>
			<link rel="alternate" href="http://www.vldpersonals.com/forum/post/47385/#p47385"/>
			<content type="html"><![CDATA[<p>For embedding adultism.com videos, 3 files have to be modded plus adding another swf-player.<br />Most changes are in ext.metavideo.php:<br />In function vldext_metavideo(), append<br /></p><div class="codebox"><pre><code>    elseif ( $params[&#039;type&#039;] == &#039;adultism&#039; )
    {
        $width = ( isset($params[&#039;width&#039;]) ? $params[&#039;width&#039;] : 550 );
        $height = ( isset($params[&#039;height&#039;]) ? $params[&#039;height&#039;] : 432 );

        if ( $media == &#039;preview&#039; )
        {
            return $preview;
        }
        else
        {
            return &#039;&lt;script type=&quot;text/javascript&quot;&gt;swfobject.embedSWF(&quot;/media/utils/jw_player.swf&quot;, &quot;flashcontent&quot;, &quot;&#039; . $width . &#039;&quot;, &quot;&#039; . $height . &#039;&quot;, &quot;10&quot;, false, {file: &quot;&#039; . $video_id . &#039;&quot;, image: &quot;&#039; . $preview . &#039;&quot;}, {allowfullscreen: &quot;true&quot;}, false);&lt;/script&gt;&lt;div id=&quot;flashcontent&quot;&gt;Embed Fail&lt;/div&gt;&#039;;
        }
    }</code></pre></div><p>In function vld_parse_video_url() append<br /></p><div class="codebox"><pre><code>    elseif ( $type == &#039;adultism&#039; )
    {
        preg_match(&#039;/\/watch\/([\d]+)\//&#039;, $url, $matches);
        if ( $matches )
        {
            $data = send_remote_request(&#039;http://www.adultism.com&#039;, &#039;/watch/&#039;.$matches[1].&#039;/&#039;);
            if (preg_match(&quot;/file:\s*\&quot;(http.*)\&quot;/siU&quot;, $data, $fmatches)) {
                preg_match(&quot;/image:\s*\&quot;(http.*)\&quot;/siU&quot;, $data, $tmatches);
                return array($fmatches[1], $tmatches[1]);
            }
        }
        else
        {
            return &#039;http://www.adultism.com/watch/123456/&#039;;
        }
    }</code></pre></div><p>In function vld_vendors_list() add<br /></p><div class="codebox"><pre><code>        &#039;adultism&#039; =&gt; &#039;Adultism&#039;,</code></pre></div><p>To have the preview picture showing also in the player (before starting the video), change in member_videos_view.tpl<br /></p><div class="codebox"><pre><code>{metavideo:video_id=meta_id,type=video_type}</code></pre></div><p>to<br /></p><div class="codebox"><pre><code>{metavideo:video_id=meta_id,type=video_type,media=&quot;&quot;,preview=video_preview}</code></pre></div><p>Since the video_preview variable is not assigned there, change in file lib.member_videos.php in function show_video()<br /></p><div class="codebox"><pre><code>        if ( !$obj-&gt;type )
        {
            $TEMPLATE-&gt;assign(&quot;video_filename&quot;, &#039;video_&#039; . $obj-&gt;filename);
        }
        else
        {
            $TEMPLATE-&gt;assign(&quot;meta_id&quot;, $obj-&gt;meta_id);
            $TEMPLATE-&gt;assign(&quot;meta_url&quot;, $obj-&gt;meta_url);
        }</code></pre></div><p>to<br /></p><div class="codebox"><pre><code>        if ( !$obj-&gt;type )
        {
            $TEMPLATE-&gt;assign(&quot;video_filename&quot;, &#039;video_&#039; . $obj-&gt;filename);
        }
        else
        {
            $TEMPLATE-&gt;assign(&quot;video_preview&quot;, &#039;video_preview_&#039; . $obj-&gt;preview);
            $TEMPLATE-&gt;assign(&quot;meta_id&quot;, $obj-&gt;meta_id);
            $TEMPLATE-&gt;assign(&quot;meta_url&quot;, $obj-&gt;meta_url);
        }</code></pre></div><p>Last, get jw_player.swf from <a href="http://www.adultism.com/flash/jw_player.swf">http://www.adultism.com/flash/jw_player.swf</a> and upload it to your /media/utils directory. (Existing mediaplayer.swf seems to have some problems with the code ...)<br />For me, it works like a charm!<br />You can see an example (not x-rated <img src="http://www.vldpersonals.com/forum/img/smilies/smile.png" width="15" height="15" alt="smile" /> ) here: <a href="http://www.dehnsucht.info/v2/member/2/videos/view/32-Test/">http://www.dehnsucht.info/v2/member/2/v &#133; w/32-Test/</a></p>]]></content>
			<author>
				<name><![CDATA[jensrenner]]></name>
				<uri>http://www.vldpersonals.com/forum/user/9889/</uri>
			</author>
			<updated>2011-09-04T19:01:50Z</updated>
			<id>http://www.vldpersonals.com/forum/post/47385/#p47385</id>
		</entry>
</feed>
