• Welcome to PHPVIBE Forums. Please log in.

[ Video Sharing CMS v4 ] Upload video from twitch

Started by mihai,

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

mihaiTopic starter

Is there a way that we can upload videos from twitch///Share them like youtube videos///
  •  

Marius P.


Piece of cake  :)
This:
http://www.twitch.tv/ducksauce


would become :

<iframe src="http://www.twitch.tv/ducksauce/embed" frameborder="0" scrolling="no" height="378" width="620"></iframe>



Not testing it, but it should work:


Open lib/class.providers.php and find




'peteava',



after it add
'twitch',



find:


break;
case 'docs.google.com':



replace it with:




break;
case 'twitch':
$videoId = $this->getVideoId(".tv/");
if ($videoId != null) {
                      $embedCode .= '<iframe src="http://www.twitch.tv/' . $videoId . '/embed"  frameborder="0" scrolling="no" allowfullscreen="true" width="' . $this->width . '" height="' . $this->height . '"  ></iframe>';
                  $embedCode .= _ad('1');
              } else {
                      $embedCode = INVALID_URL;
                  }
break;
case 'docs.google.com':
Happy with my help? Buy me a coffee.
Please, always use the search before opening a new topic! We're all here on our (limited) free time! Make sure you help yourself too!
  •  

mihaiTopic starter

                  break;
case 'vine':
$videoId = $this->getVideoId("/v/");
if ($videoId != null) {
$embedCode .= '<iframe class="vine-embed" src="https://vine.co/v/'.$videoId.'/embed/simple?audio=1" width="' . $this->width . '" height="' . $this->height . '" frameborder="0"></iframe><script async src="//platform.vine.co/static/scripts/embed.js" charset="utf-8"></script>';
             $embedCode .= _ad('1');
} else {
                      $embedCode = INVALID_URL;
                  }
            break;
              case 'facebook':
                  $videoId = $this->getVideoId("v=", "&");
                  if (empty($videoId)) {
                      $videoId = $this->getVideoId("v/");
                  }
                  if ($videoId != null) {
                      $embedCode .= '<iframe src="https://www.facebook.com/video/embed?video_id=' . $videoId . '" type="application/x-shockwave-flash" allowfullscreen="true" width="' . $this->width . '" height="' . $this->height . '"  frameborder="0"></iframe>';
                  $embedCode .= _ad('1');
  } else {
                      $embedCode = INVALID_URL;
                  }
                  break;
case 'twitch':
$videoId = $this->getVideoId(".tv/");
if ($videoId != null) {
                      $embedCode .= '<iframe src="http://www.twitch.tv/' . $videoId . '/embed"  frameborder="0" scrolling="no" allowfullscreen="true" width="' . $this->width . '" height="' . $this->height . '"  ></iframe>';
                  $embedCode .= _ad('1');
              } else {
                      $embedCode = INVALID_URL;
                  }
                  break;
  case 'docs.google.com':
                  $videoId = str_replace('/edit','/preview',$this->link);
                  if ($videoId != null) {
                      $embedCode .= '<iframe src="' . $videoId . '" width="' . $this->width . '" height="' . $this->height . '"  frameborder="0"></iframe>';
                  $embedCode .= _ad('1');
  } else {
                      $embedCode = INVALID_URL;
                  }
                  break
 
              case 'youtube':
                  $videoId = $this->getVideoId("v=", "&");
                  if ($videoId != null) {
                      $choice = get_option('youtube-player');
                      if ($choice < 2) {
                          $embedCode .= "<iframe width=\"" . $this->width . "\" height=\"" . $this->height . "\" src=\"http://www.youtube.com/embed/" . $videoId . "?&amp;title=&amp;html5=1&amp;iv_load_policy=3&amp;modestbranding=1&amp;nologo=1&amp;vq=large&amp;autoplay=1&amp;ps=docs\" frameborder=\"0\" allowfullscreen=\"true\"></iframe>";
                      $embedCode .= _ad('1');
  } elseif ($choice == 3) {
  $embedCode = $this->evplayer($videoId,thumb_fix($video->thumb),thumb_fix(get_option('player-logo')));
                  }


White page after i added what did you said:)
  •  

Marius P.

Enable error reporting and let me know the error, I've written it directly on forum.
But I don't see any coding issue. Give me an error from index.php error_reporting turned from 0 to E_ALL
Happy with my help? Buy me a coffee.
Please, always use the search before opening a new topic! We're all here on our (limited) free time! Make sure you help yourself too!
  •  

mihaiTopic starter

Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING, expecting ')' in /var/www/vhosts/gamevide.com/httpdocs/lib/class.providers.php on line 73
  •  

Marius P.

I assume you're looking into the wrong place and have added the first part really bad.

'peteava','twitch',
Happy with my help? Buy me a coffee.
Please, always use the search before opening a new topic! We're all here on our (limited) free time! Make sure you help yourself too!
  •  

mihaiTopic starter

ustream',
              'liveleak',
              'livestream',
              'vplay',
              'facebook',
              'localfile',
              'localimage',
              'peteava'
              'twitch',
              'vk',
  'vine',
              'telly',
              'putlocker',
              'gametrailers',
  'docs.google.com'

SOMETHING WRONG HERE???

LINE 73= 'twitch',
  •  

Marius P.

Paste the entire array :)
Wait, I see the error, you've missing a , before the 'twitch'.



PS: Daca toate sunt despartite prin virgula, chiar si in exemplul meu, la tine de ce nu sunt ?  ;)
Happy with my help? Buy me a coffee.
Please, always use the search before opening a new topic! We're all here on our (limited) free time! Make sure you help yourself too!
  •  

mihaiTopic starter

  •  

 

Similar topics (7)

Important Announcement: PHPVibe Video Sharing CMS End of Life

Started by Marius P.


Replies: 1
Views: 41800

Problem with image upload .jpg

Started by xxxronaldxxx


Replies: 10
Views: 2399

unpublished issue when upload Image

Started by sandeepkaler


Replies: 1
Views: 1825

upload to jwplayer8

Started by popohkgg


Replies: 0
Views: 2177

How to Stop Sharing on other website

Started by HPR


Replies: 2
Views: 2232

SSL la phpvibe si upload

Started by tweky94


Replies: 30
Views: 29462

Upload dont work :(

Started by syntax


Replies: 6
Views: 7465