PlayTube优化

普度币 2022-3-8 4245

怎样才能把<script src= "https://player.twitch.tv/js/embed/v1.js"></script>
这个代码删除,好烦啊,不删掉加载个页面需要8秒。求删除教程。


我的演示删掉了,大概是在这里,你找找看。
Script\themes\default\layout\container.html

我也是用宝塔装了ffmpeg,但是后台提示FFmpeg binary does not exist on path: /usr/bin/ffmpeg
这个路径明明没错……心塞,还有的mp4传上去后播放不了,不知道什么情况
有知道朋友麻烦分享下经验,感谢


php函数删除shell_exec /usr/bin/ffmpeg 就好了,


为这个伪静态也不能用,首页404


添加一行rewrite ^/$ /index.php?link1=home ;首页才不404



后台的汉化呢?

去Script\admin-panel\pages目录,编辑每一个目录内的文件为中文,就可以了。工作量还是比较大的,我弄过一次,就放弃了。












Nginx伪静态规则



官方给的规则不能使用,研究了一下,给一个可用的伪静态规则。

# nginx configurationlocation / {  if (!-e $request_filename){    rewrite ^/$ /index.php?link1=home;
  }  if (!-e $request_filename){    rewrite ^/aj/([^/.]+)/?$ /ajax.php?type=$1&first=$2;    rewrite ^/aj/([^/.]+)/([^/.]+)/?$ /ajax.php?type=$1&first=$2;    rewrite ^/aj/([^/.]+)/([^/.]+)/([^/.]+)/?$ /ajax.php?type=$1&first=$2&second=$3;
  }  rewrite ^/@([^\/]+)(\/|)$ /index.php?link1=timeline&id=$1;  if (!-e $request_filename){    rewrite ^/([^\/]+)(\/|)$ /index.php?link1=$1;
  }
}location /reset {  rewrite ^/reset-password/([^\/]+)(\/|)$ /index.php?link1=reset-password&code=$1;
}location /confirm {  rewrite ^/confirm/(.*)/(.*)$ /index.php?link1=confirm&code=$1&email=$2;
}location /api {  rewrite ^/api/v(([0-9])([.][0-9]+))(\/|)$ /api.php?v=$1;
}location /admin {  rewrite ^/admin-cp$ /admincp.php;  rewrite ^/admin-cp/(.*)$ /admincp.php?page=$1;
}location /admin-cdn/ {  alias /admin-panel/;
}location /videos {  rewrite ^/videos/category/(.*)/rss(\/|)$ /index.php?link1=videos&page=category&id=$1&feed=rss;  rewrite ^/videos/category/(.*)$ /index.php?link1=videos&page=category&id=$1;  rewrite ^/videos/(.*)/rss(\/|)$ /index.php?link1=videos&page=$1&feed=rss;  rewrite ^/videos/(.*)$ /index.php?link1=videos&page=$1;
}location /articles {  rewrite ^/articles(\/|)$ /index.php?link1=articles;  rewrite ^/articles/category/(\d+)(\/|)$ /index.php?link1=articles&category_id=$1;  rewrite ^/articles/read/(.*)(\/|)$ /index.php?link1=read&id=$1;
}location /edit {  rewrite ^/edit-video/(.*)?$ /index.php?link1=edit-video&id=$1;
}location /watch {  rewrite ^/watch/([^\/]+)(\/|)?$ /index.php?link1=watch&id=$1;  rewrite ^/watch/([^\/]+)/list/([^\/]+)(\/|)?$ /index.php?link1=watch&id=$1&list=$2;
}location /embed {  rewrite ^/embed/(.*)?$ /index.php?link1=embed&id=$1;
}location /resend {  rewrite ^/resend/(.*)/(.*)?$ /index.php?link1=resend&id=$1&u_id=$2;
}location /redirect {  rewrite ^/redirect/(.*)?$ /index.php?link1=redirect&id=$1;
}location /settings {  rewrite ^/settings/(.*)/(.*)$ /index.php?link1=settings&page=$1&user=$2;  rewrite ^/settings/(.*)$ /index.php?link1=settings&page=$1;
}location /terms {  rewrite ^/terms/([^\/]+)(\/|)$ /index.php?link1=terms&type=$1;
}location /go_pro {  rewrite ^/go_pro(\/|)$ /index.php?link1=go_pro;
}location /ads {  rewrite ^/ads(\/|)$ /index.php?link1=ads;  rewrite ^/ads/create(\/|)$ /index.php?link1=create_ads;  rewrite ^/ads/edit/(\d+)(\/|)$ /index.php?link1=edit_ads&id=$1;
}location /contact {  rewrite ^/contact-us(\/|)$ /index.php?link1=contact;
}









最新回复 (0)
    • 普度社会大学
      2
          
返回
######
免责声明:本站内容资源源于网络,如有侵权请发邮件告知我们,我们将会在24小时内处理。