Home  >  Article  >  Backend Development  >  新手请教两个小白问题(Typecho)

新手请教两个小白问题(Typecho)

WBOY
WBOYOriginal
2016-06-06 20:36:58722browse

1.如何获取当前用户的信息,比如说邮箱,登录名。
2.如何给插件弄一个页面(非后台设置),类似于emlog域名后缀?plugin=demo这种?

本人小白一个,初次接触Typecho。
求教各位大神回答,非常感谢!!

回复内容:

1.如何获取当前用户的信息,比如说邮箱,登录名。
2.如何给插件弄一个页面(非后台设置),类似于emlog域名后缀?plugin=demo这种?

本人小白一个,初次接触Typecho。
求教各位大神回答,非常感谢!!

  1. $this->user->screenName() $this->user->mail();
  2. 增加页面需要增加路由,可看我写的这个插件:https://github.com/typecho-fans/plugins/blob/master/Update/Plugin.php#L23

既然是小白就多看看别人写的东西,特别是第一个官方主题都能找到怎么用好么...

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn