Discuz!官方免费开源建站系统

 找回密码
 立即注册

QQ登录

只需一步,快速开始

搜索

手工修改方法 For 弹出式Ajax登录框[Discuz!6.0 通用]

[复制链接]
潇潇冬宇 发表于 2008-4-18 00:48:45 | 显示全部楼层 |阅读模式
插件发布
插件名称: 手工修改方法 For 弹出式Ajax登录框[Discuz!6.0 通用]
插件来源:
适用版本: Discuz! 6.1
语言编码: GBK简体 
最后更新时间:
插件作者: Img
插件简介: 本插件名为:弹出式Ajax登录框,
因为原作没有给出手工修改方法,我用BC对照后把需要改动的代码发出来,很少的
Discuz! 技术支持、功能定制 尽在http://tea.monkeye.cn/
手工修改方法(对照DZ6.0 0904原版)
1、后台升级数据库
INSERT INTO `cdb_settings` (`variable`, `value`) VALUES ('ajaxlogin', '');
2、修改语言文件 templates/default/admincp.lang.php 按格式增加
'settings_ajax_login' => '弹出式Ajax登录窗口:',
'settings_ajax_login_comment' => '设置点击登陆的登陆方式,选“是”则启用Ajax方式登陆,否则采用原本的登陆方式',
也可以在后台修改default模板的语言文件达到相同效果。
3、修改admin/settings.inc.php:
  1. showsetting('settings_index_name', 'settingsnew[indexname]', $settings['indexname'], 'text');
复制代码
下面加入
  1. showsetting('settings_ajax_login', 'settingsnew[ajaxlogin]', $settings['ajaxlogin'], 'radio');//Ken add ajaxlogin begin
复制代码
4、修改templates/default/hearder.html("default"用你使用的风格模板目录代替):
  1. document.write('<a href="frame.php?frameon=no" target="_top" class="frameoff">{lang frameon_flat}<\/a>');
  2. }
  3. </script>
  4. </span>
  5. <!--{/if}-->
复制代码
下面加入
  1. <!--Ken add ajax_login begin-->
  2. <!--{if $_DCACHE['settings']['ajaxlogin'] == 1}-->
  3. <script type="text/javascript">
  4. function ajaxclose(bg,box) {
  5. document.getElementById(box).innerHTML = '';
  6. document.getElementById(box).style.display = 'none';
  7. document.getElementById(bg).style.display = 'none';
  8. }
  9. function ajax_login(bg,box) {
  10. if(!$('ajaxlogin_box_bg')) {
  11. div = document.createElement('div');div.id = 'ajaxlogin_box_outline';
  12. $('append_parent').appendChild(div);
  13. div = document.createElement('div');div.id = 'ajaxlogin_box_bg';
  14. div.style.position = 'absolute';
  15. div.style.padding = 0;
  16. $('append_parent').appendChild(div);
  17. }
  18. $('ajaxlogin_box_bg').style.position = 'absolute';
  19. $('ajaxlogin_box_bg').style.left = div.style.top = '0px';
  20. $('ajaxlogin_box_bg').style.width = '100%';
  21. $('ajaxlogin_box_bg').style.height = document.body.offsetHeight + 'px';
  22. $('ajaxlogin_box_bg').style.background = '#000';
  23. $('ajaxlogin_box_bg').style.display = '';
  24. $('ajaxlogin_box_bg').style.filter = 'progid:DXImageTransform.Microsoft.Alpha(opacity=80,finishOpacity=100,style=0)';
  25. $('ajaxlogin_box_bg').style.opacity = 0.8;
  26. $('append_parent').appendChild($('ajaxlogin_box_bg'));
  27. div = document.createElement('div');div.id = 'ajaxlogin_box';
  28. div.style.position = 'absolute';
  29. div.style.padding = 0;
  30. $('append_parent').appendChild(div);

  31. ajaxget('logging.php?action=login','ajaxlogin_box');

  32. $('ajaxlogin_box').setAttribute( 'ondblclick','ajaxclose("ajaxlogin_box_bg","ajaxlogin_box")');
  33. $('ajaxlogin_box').style.display = '';
  34. $('ajaxlogin_box').style.padding = '8px 8px 0 8px';
  35. $('ajaxlogin_box').style.border = '1px solid #ccc';
  36. $('ajaxlogin_box').style.left = (document.documentElement.scrollWidth - 680)/2 +100 +'px';
  37. $('ajaxlogin_box').style.top = '120px';
  38. $('ajaxlogin_box').style.width = '640px';
  39. $('ajaxlogin_box').style.width = '500px';
  40. $('ajaxlogin_box').style.background = '#fff';
  41. $('ajaxlogin_box').style.zIndex = 999;
  42. $('ajaxlogin_box').innerHTML = '<table width="100%" height="100%" cellspacing="0" cellpadding="0"><tr><td align="center" valign="middle"><img src="' + IMGDIR + '/loading.gif"> 数据读取中,请稍候...</td></tr></table><div style="position:absolute;top:-100000px;visibility:hidden"></div>';
  43. }
  44. </script>
  45. <!--{/if}-->
  46. <!--Ken add ajax_login end-->
复制代码
修改
  1. <li<!--{if $BASESCRIPT == 'logging.php'}--> class="current"<!--{/if}-->><a href="$link_login">{lang login}</a></li>
复制代码
  1. <li<!--{if $BASESCRIPT == 'logging.php'}--> class="current"<!--{/if}-->><!--{if $_DCACHE['settings']['ajaxlogin'] == 0}--><a href="$link_login"><!--{else}--><a href="#" onClick="ajax_login('ajaxlogin_bg','ajaxlogin_box')"><!--{/if}-->{lang login}</a></li><!--Ken add ajax_login-->
复制代码
5、修改根目录下logging.php:
修改
  1. include template('login');
复制代码
  1. //Ken add ajaxlogin begin
  2. if(!$inajax) {
  3. include template('login');
  4. } else {
  5. include template('login_ajax');
  6. }
  7. //Ken add ajaxlogin end
复制代码
6、上传剩余新增文件;
7、登录论坛后台,进入基本设置--〉弹出式Ajax登录窗口,设置喜欢的登陆方式
  ————手工修改完成:) ————
插件信息(原贴由Open-花发布https://discuz.dismall.com/thread-851609-1-2.html
本插件名为:弹出式Ajax登录框,
Discuz! 技术支持、功能定制  尽在
http://tea.monkeye.cn/
本插件技术支持地址http://tea.monkeye.cn/viewthread.php?tid=749&extra=page%3D1(此处提供技术支持与插件更新)
弹出式Ajax登录框演示地址:http://www.open-hua.com/index.php (点登入即可看见)


前台演示
1.jpg (12.71 KB)
2008-2-14 22:57

后台演示


[ 本帖最后由 潇潇冬宇 于 2008-4-18 02:18 编辑 ]
zhenyusen 发表于 2008-4-18 02:13:43 | 显示全部楼层
顶了
回复

使用道具 举报

crysun 发表于 2008-4-18 06:14:13 | 显示全部楼层
很好试了
展示下
http://www.jz10.net
回复

使用道具 举报

daxingplay 发表于 2008-4-18 07:09:40 | 显示全部楼层
我也装成功了,一大早起来弄的,大家看看吧!http://bbs.ojpal.com

真是好东西啊!!!
回复

使用道具 举报

e_zailai 发表于 2008-4-18 08:19:07 | 显示全部楼层
很好      试一下!!!!!!!!
回复

使用道具 举报

31558770 发表于 2008-4-18 09:18:37 | 显示全部楼层
这个一定要收藏 嘿嘿
回复

使用道具 举报

lihao677 发表于 2008-4-18 10:47:06 | 显示全部楼层
这个很好很不错···
有QQ网站登录的感觉···
回复

使用道具 举报

len4090 发表于 2008-4-18 11:10:15 | 显示全部楼层
不错啊:) :)
回复

使用道具 举报

lihao677 发表于 2008-4-18 15:25:20 | 显示全部楼层
我安装之后无法打开后台!!!
能否告知下·····
回复

使用道具 举报

4410118 发表于 2008-4-18 15:32:36 | 显示全部楼层
:victory:
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

手机版|小黑屋|Discuz! 官方站 ( 皖ICP备16010102号 )star

GMT+8, 2024-9-21 11:23 , Processed in 0.117465 second(s), 25 queries , Gzip On.

Powered by Discuz! X3.4

Copyright © 2001-2023, Tencent Cloud.

快速回复 返回顶部 返回列表