档案

Posts Tagged ‘YukiDrive’

Building YukiDrive on Germany Permanent Free VPS EUserv

2020年08月25日 留下评论

The previous blog post introduced the application and configuration method on Germany permanent free VPS EUserv. Today, I will explain how to build YukiDrive for this VPS, which is a file browsing program that supports Onedrive & SharePoint.

上一篇博文介绍了EUserv德国永久免费VPS的申请及配置方法,今天就针对该VPS说明如何搭建YukiDrive,一项支持Onedrive & SharePoint的文件浏览程序。

Originally, I planned to install WordPress again after configuring the VPS, but I felt that there was already a blog space. There was no need to repeat the construction. After carefully reading the “Big Bird Blog” blog posts on “Pagoda Panel”, considering that E5 still needs to be renewed, let’s call the API to build programs. Of course, the most used programs are those related to OneDrive. After referring to the blog post “宝塔面板安装YukiDrive – 支持Onedrive & SharePoint文件浏览程序” carefully, I started trying to build it.

原本在配置好该VPS后打算再安装WordPress,但又觉得已经有了一个博客空间,就不必再重复建设。仔细阅读“大鸟博客”关于“宝塔面板”的博文后,考虑到E5还需要续订,就再调用API搭建程序吧,当然使用最多的还是与OneDrive有关的程序。仔细参考博文“宝塔面板安装YukiDrive – 支持Onedrive & SharePoint文件浏览程序”后开始尝试搭建。

The detailed construction steps will not be repeated here. I will focus on several problems that occurred during the construction process and the solutions that I found out.

详细的搭建步骤这里不再重复,重点说明搭建过程中出现的几个问题及自己摸索出来的解决方案。

The first question: In the fourth step “New Site”, how to set the website to pure static? In fact, setting the “PHP version” to “Pure static” is only needed. How to apply for a certificate to open https? In fact, applying for a Let’s Encrypt certificate and enabling “Force HTTPS” are only needed in SSL.

第一个问题:第四步“新建站点”时,如何将网站设置为纯静态,其实只需要将“PHP版本”设置为“纯静态”即可;如何申请证书开启https,其实只需要在SSL中申请Let’s Encrypt证书并开启“强制HTTPS”即可。

The second question: After unzipping in the fourth step, pay attention to modify the folder name to “YukiDrive”.

第二个问题:第四步解压后,注意修改文件夹名称为“YukiDrive”。

The third question: In the fourth step of “starting the program”, you need to use Linux cd command to jump to the program directory in the SSH connection state before you can enter ./YukiDrive to start execution.

第三个问题:第四步“启动程序”的过程,需要在SSH连接状态下使用Linux的cd命令跳转到程序目录后才可以输入./YukiDrive开始执行。

The fourth question: In the fifth step, when “500 error occurs when jumping to the callback address after authentication”, I directly executed the command and it had no effect. It could be in the “File” manager of the panel under the directory of /etc/pki/tls/, and found the cert.pem file and copied it to the /usr/local/openssl/ directory.

第四个问题:第五步“认证后跳转回调地址出现500错误”时,我直接执行命令并没有效果,可以在面板的“文件”管理器中,在目录/etc/pki/tls/下找到cert.pem文件,复制到/usr/local/openssl/目录下即可。

The fifth question: After clicking “Authentication” in the process of step 5 “Binding Account”, an authentication error of “AADSTS50011: The reply URL specified in the request does not match the reply URLs configured for the application: xxxx-xxxx” appeared. After careful investigation, it was found that the settings on both sides of the redirect URI were inconsistent. One was “your domain name” and the other was “localhost:1273”. My approach was to temporarily modify the redirect URI of the registered application to https://localhost:1273/api/admin/bind/new. Then I clicked “Authentication” and changed the beginning of the address in the browser bar to my domain name.

第五个问题:第五步“绑定账户”过程中点击“认证”后,出现“AADSTS50011: The reply URL specified in the request does not match the reply URLs configured for the application: xxxx-xxxx”的认证错误,经过仔细调查发现重定向URI的两边设置不一致,一边是“你的域名”,一边是“localhost:1273”,我的做法是将注册应用程序的重定向URI临时修改为https://localhost:1273/api/admin/bind/new,点击“认证”后将浏览器栏的地址开头修改为你的域名即可。

My Yuki Drive address is https://www.summersnow2001.tk/#/onedrive. Welcome to visit it!

我的Yuki Drive地址是:https://www.summersnow2001.tk/#/onedrive,欢迎访问!

Reset the Display Mode and Number of Blog Posts Views When Changing the Theme

2020年08月21日 1条评论

前几天因为放置本博客的免费空间突然失联,无法打开,给空间服务商发过服务单告知此事,已经两天了一直没有得到回复,估计免费空间的话不一定会有回复的,但以后务必记得多备份一下空间数据。下面是发给空间服务商的服务单页面截图。

昨天在EUserv德国永久免费VPS上一键安装了WordPress博客程序,并配置好域名后,今天开始就在该空间上撰写博文。关于该空间的申请及其设置可参见博文“EUserv德国永久免费VPS申请与简单使用教程–仅有IPv6网络”和“Euserv免费VPS安装宝塔以及Telegram电报设置基于ipv6的DL访问”。

之前我在该VPS上安装了宝塔面板并继续安装了YukiDrive程序,详细的安装步骤可以进一步参考博文“纯IPV6服务器安装宝塔面板–搭建网站实现IPV4访问/ipv6,ipv4皆可访问”和“宝塔面板安装YukiDrive–支持Onedrive & SharePoint文件浏览程序”。

我的YukiDrive文件浏览程序地址为:

青春路上Yuki Drive

欢迎访问!

之前的博客选用的主题是系统自带的Twenty Seventeen主题,今天我选用的是Twenty Sixteen主题,需要重新设置博文的显示方式与浏览次数。

首先,我希望在首页和分类页面只显示博文的摘要,参考博文“WordPress首页显示文章摘要(主题Twenty Sixteen)”。登陆WordPress后台的外观-主题编辑器,修改该文件代码:template-parts/content.php

将26行开始的下述代码注释掉,或者直接删除:

   the_content(

      sprintf(

         // translators: %s: Post title.

       __( ‘Continue reading<span class=”screen-reader-text”> “%s”</span>’, ‘twentysixteen’ ),

           get_the_title()

         )

    );

更改为:

if(!is_single()) {

        the_excerpt();

        } else {

         the_content(__(‘(more…)’));

             }

接着,我希望在首页和分类页面显示每篇博文的浏览次数,可以先安装WP-PostViews插件,设置好后,在“小工具”里会出现一个“浏览次数”的小工具,可以添加到侧边栏。进入外观-主题编辑器,打开首页模板index.php,找到以下语句:

while ( have_posts() ) :

the_post();

紧接着在下面添加如下语句:

if(function_exists(‘the_views’)) { the_views(); }

就可以在首页显示每篇博文的浏览次数。打开文章归档archive.php,完成上述相同的操作,就可以在分类页面显示每篇博文的浏览次数。打开文章页面single.php,完成上述相同的操作,就可以在打开每篇博文时显示其浏览次数。