Home >CMS Tutorial >PHPCMS >How to call member avatar in phpcms v9 template

How to call member avatar in phpcms v9 template

藏色散人
藏色散人Original
2020-02-04 10:23:162827browse

How to call member avatar in phpcms v9 template

How to call member avatar in phpcms v9 template?

Calling phpcms member avatar:

This is the code: {get_memberavatar($r['userid'],1,45)}

As long as userid can be called, this code can be used anywhere: homepage, column page, article page.

Here I use get to call the userid field in the member table.

  {pc:get sql="select * from v9_member order by regdate desc" num="6"} /*这里就可以获取到userid并且安装注册顺序了排列*/
  {loop $data $r}
  <img src="{get_memberavatar($r[userid],1,90)}" width="55" height="55" alt="{$r[username]}" target="_blank" /> /*这里可以按照自己的要求来设计显示样式。*/
  {/loop}
  {/pc}

PHP Chinese website, a large number of free PHPCMS tutorials, welcome to learn online!

The above is the detailed content of How to call member avatar in phpcms v9 template. For more information, please follow other related articles on the PHP Chinese website!

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