Navigation

Cuteness is justice! From time to time to share some ACG activity records and interesting code station!

Typecho fan tracking statistics plug-in release

Author: Hiroshi · Time: 2018-04-23 21:58:55 · Classification: PHP

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.

#Typecho plug-in #typecho
sidebar
Latest comments
Broad tree
2024-05-21
@Love Chen: There will be discounts, but my traffic is basically only available in 3GB and 20GB, which is not excessive. At present, I have not encountered the loss of connection when using the softbank line on the road.
Fall in love with Chen
2024-05-21
I did it together with my home network. If both of them choose the same one, there are basically discounts. However, softbank felt that the network was a little poor when the tram was on, especially in the section from Guihu to Pingjing on the Wuhan Wuhan Line, which was directly disconnected
Broad tree
2024-05-21
@Lao Zhang's blog: Hahaha, fashion can't be said, but the main thing I like is the sense of steadiness
Lao Zhang's Blog
2024-05-21
It looks very fashionable
Broad tree
2024-05-20
@Zongye Jiami: High score on the dial! 👏
Is exploring

 King of Holy Beast.jpg

 Something to be eulogized

PSN Trophy Card

 PSN Trophy Card

sponsor AD