Plug in Introduction
This plug-in is through Bangumi API to get Fancy information, so the implementation must register an account on the website and add Fancy animation!!!
The part of obtaining the information content of fan chasing refers to Zimiao haunts Boss's Several APIs of Bangumi and simple tests using PHP calls 。
Plug in download
GitHub: Click to enter
Code cloud: Click to enter
usage method
0. Clone or download plug-ins, remember Change the name of the folder to【 WikimoeBangumi 】 And upload to the server.
1. After installing the plug-in, start it in the background and set the Bangumi account and password. It is recommended that the password should not be your usual password (for security reasons).
2. Next, you need to find the templates for daily posts in the template directory you use.
Here I take the default page.php file of Typecho template as an example.
We will copy a copy of the file named page_bangumi.php
Add at the head of the file
<? php /** *Fan chasing list * * @package custom */ ?>
Then in the output article section
(Here I am <? php $this->content(); ?> )
Add an entry below <? php WikimoeBangumi_Plugin::output(); ?>
After modification, my template file will become
<? php /** *Fan chasing list * * @package custom */ ?> <? php if (!defined('__TYPECHO_ROOT_DIR__')) exit; ?> <? php $this->need('header.php'); ?> <div class="col-mb-12 col-8" id="main" role="main"> <article class="post" itemscope itemtype=" http://schema.org/BlogPosting "> <h1 class="post-title" itemprop="name headline"><a itemprop="url" href="<?php $this->permalink() ?>"><? php $this->title() ?></ a></h1> <div class="post-content" itemprop="articleBody"> <? php $this->content(); ?> <!-- The following is the plug-in mount point --> <? php WikimoeBangumi_Plugin::output(); ?> <!-- The above is the plug-in mount point --> </div> </article> <? php $this->need('comments.php'); ?> </div><!-- end #main--> <? php $this->need('sidebar.php'); ?> <? php $this->need('footer.php'); ?>
3. Next, add an independent page in the background → management → independent page.
At this time, you should find the words "Fan Chasing List" in the right [User defined Template] and use it.
The content and title can be published after proper writing!
4. Visit this page to see the effect!
<Here is the preview point of this site>
matters needing attention
1. At present, this plug-in still relies on jQuery, so if the template does not come with it, you need to introduce it by yourself.