目前我已经把dedecms和discuz整合成功,会员能同步登录和退出。
但问题是,我想在dedecms页面上做登录和注册弹框,点击弹出框使用discuz的登录和注册弹框进行登录或注册,登录成功后返回discuz会员资料(信息啊 头像啊 什么的一堆)。
求问具体怎么做?
度娘了很久,网上资料很少,也说不清楚。
回复讨论(解决方案)
没碰到过这种要求...
不过你可以试试showWindow('login', ‘member.php?mod=logging&action=login’),链接你得改一下,还要引入discuz的common.js和样式(应该是common.css)
我没试过,不一定成功,还有就是,你既然能同步登录和退出了,你为何不在dedecms这边做个弹出框,自己用uc登录,你的dedecms和discuz是两个应用,是独立的,并不建议这样调用,uc接口就是用来解决多应用共用一个用户数据的问题
没碰到过这种要求...
不过你可以试试showWindow('login', ‘member.php?mod=logging&action=login’),链接你得改一下,还要引入discuz的common.js和样式(应该是common.css)
我没试过,不一定成功,还有就是,你既然能同步登录和退出了,你为何不在dedecms这边做个弹出框,自己用uc登录,你的dedecms和discuz是两个应用,是独立的,并不建议这样调用,uc接口就是用来解决多应用共用一个用户数据的问题
直接用dedecms的登陆框是可行的,但是除了有cookie,还有会员资料对不上的问题。用dedecms登录,他提供的是这边的会员信息,比如discuz那边积分才2分,dede这边已经100多分了;dede会员中心和discuz会员中心也不一致。所以要调用discuz那边的信息,这也是很古怪的问题。按我原来的理解,不管登录哪个系统,会员信息应该是一致的,不知道为啥dede这边搞蒙了。
所以打算不用dedecms的会员系统,直接全部使用discuz的会员系统。这样就消除各种参数上的差异了。
没碰到过这种要求...
不过你可以试试showWindow('login', ‘member.php?mod=logging&action=login’),链接你得改一下,还要引入discuz的common.js和样式(应该是common.css)
我没试过,不一定成功,还有就是,你既然能同步登录和退出了,你为何不在dedecms这边做个弹出框,自己用uc登录,你的dedecms和discuz是两个应用,是独立的,并不建议这样调用,uc接口就是用来解决多应用共用一个用户数据的问题
直接用dedecms的登陆框是可行的,但是除了有cookie,还有会员资料对不上的问题。用dedecms登录,他提供的是这边的会员信息,比如discuz那边积分才2分,dede这边已经100多分了;dede会员中心和discuz会员中心也不一致。所以要调用discuz那边的信息,这也是很古怪的问题。按我原来的理解,不管登录哪个系统,会员信息应该是一致的,不知道为啥dede这边搞蒙了。
所以打算不用dedecms的会员系统,直接全部使用discuz的会员系统。这样就消除各种参数上的差异了。
试了下,效果不是很好,首先是showWindow()函数失效,猜测是没有获取到div的id。直接整个页面跳转到登录页,登陆后程序找不到from页面,只能报错。
难啊难。
你只能自己做个登录框,后台用uc_user_login执行同步登录
你只能自己做个登录框,后台用uc_user_login执行同步登录
这个难搞 研究来研究去 使用dedecms+discuz 其实和单独使用discuz差不多,就是在处理自定义表单这些扩展性功能上辛苦一些
Thedifferencebetweenunset()andsession_destroy()isthatunset()clearsspecificsessionvariableswhilekeepingthesessionactive,whereassession_destroy()terminatestheentiresession.1)Useunset()toremovespecificsessionvariableswithoutaffectingthesession'soveralls

Stickysessionsensureuserrequestsareroutedtothesameserverforsessiondataconsistency.1)SessionIdentificationassignsuserstoserversusingcookiesorURLmodifications.2)ConsistentRoutingdirectssubsequentrequeststothesameserver.3)LoadBalancingdistributesnewuser

PHPoffersvarioussessionsavehandlers:1)Files:Default,simplebutmaybottleneckonhigh-trafficsites.2)Memcached:High-performance,idealforspeed-criticalapplications.3)Redis:SimilartoMemcached,withaddedpersistence.4)Databases:Offerscontrol,usefulforintegrati

Session in PHP is a mechanism for saving user data on the server side to maintain state between multiple requests. Specifically, 1) the session is started by the session_start() function, and data is stored and read through the $_SESSION super global array; 2) the session data is stored in the server's temporary files by default, but can be optimized through database or memory storage; 3) the session can be used to realize user login status tracking and shopping cart management functions; 4) Pay attention to the secure transmission and performance optimization of the session to ensure the security and efficiency of the application.

PHPsessionsstartwithsession_start(),whichgeneratesauniqueIDandcreatesaserverfile;theypersistacrossrequestsandcanbemanuallyendedwithsession_destroy().1)Sessionsbeginwhensession_start()iscalled,creatingauniqueIDandserverfile.2)Theycontinueasdataisloade

Absolute session timeout starts at the time of session creation, while an idle session timeout starts at the time of user's no operation. Absolute session timeout is suitable for scenarios where strict control of the session life cycle is required, such as financial applications; idle session timeout is suitable for applications that want users to keep their session active for a long time, such as social media.

The server session failure can be solved through the following steps: 1. Check the server configuration to ensure that the session is set correctly. 2. Verify client cookies, confirm that the browser supports it and send it correctly. 3. Check session storage services, such as Redis, to ensure that they are running normally. 4. Review the application code to ensure the correct session logic. Through these steps, conversation problems can be effectively diagnosed and repaired and user experience can be improved.

session_start()iscrucialinPHPformanagingusersessions.1)Itinitiatesanewsessionifnoneexists,2)resumesanexistingsession,and3)setsasessioncookieforcontinuityacrossrequests,enablingapplicationslikeuserauthenticationandpersonalizedcontent.


Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

SublimeText3 Linux new version
SublimeText3 Linux latest version

MinGW - Minimalist GNU for Windows
This project is in the process of being migrated to osdn.net/projects/mingw, you can continue to follow us there. MinGW: A native Windows port of the GNU Compiler Collection (GCC), freely distributable import libraries and header files for building native Windows applications; includes extensions to the MSVC runtime to support C99 functionality. All MinGW software can run on 64-bit Windows platforms.

SAP NetWeaver Server Adapter for Eclipse
Integrate Eclipse with SAP NetWeaver application server.

mPDF
mPDF is a PHP library that can generate PDF files from UTF-8 encoded HTML. The original author, Ian Back, wrote mPDF to output PDF files "on the fly" from his website and handle different languages. It is slower than original scripts like HTML2FPDF and produces larger files when using Unicode fonts, but supports CSS styles etc. and has a lot of enhancements. Supports almost all languages, including RTL (Arabic and Hebrew) and CJK (Chinese, Japanese and Korean). Supports nested block-level elements (such as P, DIV),

Dreamweaver CS6
Visual web development tools
