Provide zblog template_zblog them_wordpress template download and customization

Zblogphp determines whether the user logs in

Tianxing Studio 2016-10-21 13:24 Zblogphp Tutorial six thousand three hundred and ninety-nine 0 Comments


along with zblogphp More and more powerful, users have more and more personalized needs. lately Tianxing Studio Frequently, users need to set zblog PHP member center.

How to build a simple membership center? Please refer to: https://www.txcstx.com/post/922.html

Today, this article will share how zblogphp judges that a user has logged in on the front page. If a user has logged in, the user name will be displayed. If a user has not logged in, the "Welcome to Register and Login" button will be displayed.

Ps: This tutorial is an advanced tutorial. If you don't know how to modify the theme Template For basic knowledge, please search for "theme modification" on this site first, and then toss about this after learning the basic knowledge.

The codes are as follows:

 {if $user.ID>0} <!-- Judge whether the user ID is greater than 0 (the registered user ID will be greater than 0... --> Welcome: {$zbp ->user ->StaticName}<-- Here is the content displayed after the user logs in --> {else} <a href="{$host}? Reg">Register</a><-- Here is the content displayed when the user has not logged in --> {/if}

If you want to toss other tags, please refer to the official wiki interface: https://wiki.zblogcn.com/doku.php?id=zblogphp:development:theme:template


Can't find a tutorial that can solve your problem?

You can try to search or ask questions directly online. We also provide charging technical support. If you need it, you can contact us online.

Online questions Online Service

welcome you Comment: Cancel Reply

 Please fill in the verification code
  • Latest articles
  • Hot article ranking
  • Most Comments
Label aggregation
  • Sign in
  • Registered account Forgot your password?
  • register
  • Already have an account? Direct login Forgot your password?
  • Social account login