PHP JSON генерация страниц под ForkPlayer — различия между версиями

Материал из Браузер Fork - Wiki
Перейти к: навигация, поиск
(Метка: visualeditor-switched)
(Метка: visualeditor)
 
Строка 1: Строка 1:
 
В playlist_url ссылки на страницы  
 
В playlist_url ссылки на страницы  
В stream_url на видеофайлы, moonwalk iframe видео плеер и т.д.
+
В stream_url на видеофайлы, moonwalk iframe видео плеер и т.д.<blockquote><?php</blockquote><blockquote>$_CH[]=["title"=>"1 c","playlist_url"=>"","stream_url"=>"","description"=>""];             
 +
$_CH[]=["title"=>"2 c","playlist_url"=>"","stream_url"=>"","description"=>""];
 +
$_CH[]=["title"=>"3 c","playlist_url"=>"","stream_url"=>"","description"=>""];</blockquote><blockquote>$_PL["background_image"]=$sitebackground;</blockquote><blockquote>$_PL["icon"]=$siteicon;</blockquote><blockquote>$_PL["channels"]=$_CH;</blockquote><blockquote>if(!empty($sitechbkg)) $_PL["style"]["site"]["channels"]["default"]["background"]="none";
 +
</blockquote><blockquote>if(!empty($sitecolor)) {
 +
$_PL["style"]["site"]["channels"]["default"]["color"]=$sitecolor;
 +
$_PL["style"]["site"]["infoList"]["color"]=$sitecolor;</blockquote><blockquote>}</blockquote><blockquote>if(!empty($sitechbkg)) $_PL["style"]["site"]["channels"]["selected"]["background"]="none $sitechbkg";
 +
if(!empty($sitechcolor)) $_PL["style"]["site"]["channels"]["selected"]["color"]=$sitechcolor;</blockquote><blockquote>print json_encode($_PL);</blockquote>
  
<?php
 
$_CH[]=["title"=>"1 c","playlist_url"=>"","stream_url"=>"","description"=>""];             
 
$_CH[]=["title"=>"2 c","playlist_url"=>"","stream_url"=>"","description"=>""];
 
$_CH[]=["title"=>"3 c","playlist_url"=>"","stream_url"=>"","description"=>""]; 
 
  
$_PL["background_image"]=$sitebackground;
+
   
$_PL["icon"]=$siteicon;
+
 
+
<br />
$_PL["channels"]=$_CH;
 
 
if(!empty($sitechbkg)) $_PL["style"]["site"]["channels"]["default"]["background"]="none";
 
if(!empty($sitecolor)) {
 
$_PL["style"]["site"]["channels"]["default"]["color"]=$sitecolor;
 
$_PL["style"]["site"]["infoList"]["color"]=$sitecolor;
 
}
 
 
if(!empty($sitechbkg)) $_PL["style"]["site"]["channels"]["selected"]["background"]="none $sitechbkg";
 
if(!empty($sitechcolor)) $_PL["style"]["site"]["channels"]["selected"]["color"]=$sitechcolor;
 
 
print json_encode($_PL);
 

Текущая версия на 21:05, 19 февраля 2019

В playlist_url ссылки на страницы

В stream_url на видеофайлы, moonwalk iframe видео плеер и т.д.

<?php

$_CH[]=["title"=>"1 c","playlist_url"=>"","stream_url"=>"","description"=>""];

$_CH[]=["title"=>"2 c","playlist_url"=>"","stream_url"=>"","description"=>""];

$_CH[]=["title"=>"3 c","playlist_url"=>"","stream_url"=>"","description"=>""];

$_PL["background_image"]=$sitebackground;

$_PL["icon"]=$siteicon;

$_PL["channels"]=$_CH;

if(!empty($sitechbkg)) $_PL["style"]["site"]["channels"]["default"]["background"]="none";

if(!empty($sitecolor)) {

$_PL["style"]["site"]["channels"]["default"]["color"]=$sitecolor;

$_PL["style"]["site"]["infoList"]["color"]=$sitecolor;

}

if(!empty($sitechbkg)) $_PL["style"]["site"]["channels"]["selected"]["background"]="none $sitechbkg"; if(!empty($sitechcolor)) $_PL["style"]["site"]["channels"]["selected"]["color"]=$sitechcolor;

print json_encode($_PL);