CakePHP模态窗口示例 [英] CakePHP Modal Window Example

查看:150
本文介绍了CakePHP模态窗口示例的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用cakephp,我试图实现一个模态窗口登录和singup,类似于Digg.com加入Digg! - 登录。有没有人知道一个图书馆/插件/教程/ screencast或有什么实现登录模式在CakePHP?

I'm using cakephp and I'm trying to implement a modal-window for login and singup, similar to the one in Digg.com "Join Digg! - Login". Does anyone knows about a library/plugin/tutorial/screencast or what ever to achieve a "login modal" in CakePHP?

顺便说一句,我已经工作所有的注册和验证过程,我只需要一个模态的例子,我该怎么办?

By the way I already have working all the registration and authentication process, I just need the a modal example, how can I do that?

谢谢!

推荐答案

Digg上的弹出框是在JavaScript中实现的。看起来他们可能有自己的代码。一个看起来非常相似的简单替代方法是 Fancybox 。您可以将登录信息设置为自己的页面,并将其显示在Fancybox弹出式窗口中的iframe中。

The popup on Digg is implemented in JavaScript. It looks like they might have their own code for it. One easy alternative that looks very similar is Fancybox. You can set up your login as its own page and show it in an iframe inside Fancybox's popup.

如果您查看Fancybox文档,

If you look through the Fancybox documentation, you'll find you can hook onto various open/close events which you might use (for example) to reload the main page for the newly authenticated user.

还有其他流行的lightboxJS实现,可以使用(例如)重新载入主页的各种打开/关闭事件。如果Fancybox不适合你的需要。

There are other popular "lightbox" JS implementations out there if Fancybox doesn't suit your needs.

你可能不需要很多CakePHP的魔法来使这个工作—或者,你已经实现你需要的魔法。

You probably don't need a lot of CakePHP magic to make this work—or rather, you've already implemented the magic you DO need.

这篇关于CakePHP模态窗口示例的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆