Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

The method of dreaming and invoking the current member information on any page

2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/02 Report--

This article mainly introduces the method of weaving dreams to call the current member information on any page, which has a certain reference value and can be used for reference by friends who need it. I hope you will learn a lot after reading this article. Next, let the editor take you to learn about it.

Dream weaving how to call the current member information on any page?

Dream-weaving DEDECMS calls current member information on any page

Recommended study: dream weaving cms

In the past few days, I have been studying the various functions of dede, and I have tried to get some of them. Today, when I encounter the need to call the member number, that is, the value of Midi, Baidu has checked it and there are many ways:

{dede:memberinfos} you can use mid= "" to call a member's information

By default, this method can only call mid=1, that is, the information of the webmaster, and the use of invalid students is not invalid, but it is officially disabled by default. You only need to comment out about 62 lines of include/taglib/memberinfos.lib.php, (mine is 62 lines) if ($row ['matt']) = = 10) return "; but this method still can not call the midvalue.

After looking it up for a long time, I suddenly found that I could emulate the ajax framework call at the top of the template, my code:

/ * this paragraph is the default * / function CheckLogin () {var taget_obj = document.getElementById ('_ userlogin'); myajax = new DedeAjax (taget_obj,false,false,''); myajax.SendGet2 ("/ member/ajax_loginsta.php"); DedeXHTTP = null;} / * this paragraph is filled in by yourself * / function CheckInfo () {var taget_obj = document.getElementById ('_ userinfo') / * the name here must be the same as the ID value used in the called page * / myajax = new DedeAjax (taget_obj,false,false,''); myajax.SendGet2 ("/ member/ajax_loginuser.php"); / * you can copy the above loginsta and fill in the required information on the php page. Finally, remember to change the name. * / DedeXHTTP = null;}

Call page:

CheckInfo ()

Add: call midvalue: it must be filled in on the ajax_loginuser.php page.

Thank you for reading this article carefully. I hope it will be helpful for everyone to share the method of weaving dreams and calling the current member information on any page. At the same time, I also hope that you can support us, pay attention to the industry information channel, and find out if you have any problems. detailed solutions are waiting for you to learn!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report