自己的博客,干什么都想在自己的这片小天地中,平时也爱看看电影啥的,就想着加一个直播源进来。
因为了解的也不多,不会自制直播源。索性把别人的直接拿来用好了。
方法也很简单,首先在usr/themes/handsome/
新建一个独立页面,取名为tv.php
,然后将内容复制进去:
<?php
/**
* 电视
*
* @package custom
*/
?>
<?php if (!defined('__TYPECHO_ROOT_DIR__')) exit; ?>
<?php $this->need('component/header.php'); ?>
<!-- aside -->
<?php $this->need('component/aside.php'); ?>
<!-- / aside -->
<!-- <div id="content" class="app-content"> -->
<a class="off-screen-toggle hide"></a>
<main class="app-content-body <?php echo Content::returnPageAnimateClass($this); ?>">
<div class="hbox hbox-auto-xs hbox-auto-sm">
<!--文章-->
<div class="col center-part">
<!--标题下的一排功能信息图标:作者/时间/浏览次数/评论数/分类-->
<?php echo Content::exportPostPageHeader($this,$this->user->hasLogin()); ?>
<div class="wrapper-md" id="post-panel">
<!--正文顶部的部件,如“返回首页”-->
<?php echo Content::BreadcrumbNavigation($this, $this->options->rootUrl); ?>
<!--博客文章样式 begin with .blog-post-->
<div id="postpage" class="blog-post">
<article class="single-post panel">
<!--文章页面的头图-->
<?php echo Content::exportHeaderImg($this); ?>
<!--文章内容-->
<div id="post-content" class="wrapper-lg" style="padding:0px">
<iframe width="100%" scrolling="no" height="600" align="middle" frameborder="no"
src="https://tv.bingdou.net/live.html" hspace="0" vspace="0" marginheight="0"
marginwidth="0" name="tv">
</iframe>
</div>
</article>
</div>
<ins class="adsbygoogle"
style="display:block; text-align:center;"
data-ad-layout="in-article"
data-ad-format="fluid"
data-ad-client="ca-pub-7091244773968239"
data-ad-slot="2255651533"></ins>
<script>
(adsbygoogle = window.adsbygoogle || []).push({});
</script>
<!--评论-->
<?php $this->need('component/comments.php') ?>
</div>
</div>
</div>
<script>
try {
$("[data-morphing]").fancyMorph({
hash : 'morphing'
});
}catch (e){
}
<?php if ((@in_array('autoReadMode',$this->options->featuresetup))): ?>
$("#morphing").click();
<?php endif; ?>
</script>
</main>
<?php echo Content::returnReadModeContent($this,$this->user->hasLogin()); ?>
<!-- footer -->
<?php $this->need('component/footer.php'); ?>
<!-- / footer -->
然后在独立页面新建电视页面,模板选择电视就可以啦!
去看看吧!
应管局要求,此博客不可有影视内容,故将此页面下架
其中的直播源也可以自己寻找合适的替换。