点击广告连接才可注册(后台开关版) FOR DZ2.5 SP1
有两种选择(显示三个图片广告连接)/在第二楼(只显示一个图片广告连接)
---------------------------------------------------------------------------------------------------------
插件名称:点击广告连接才可注册开关版 (显示三个图片广告连接)
适用版本:Discuz!2.5/Discuz!2.5 SP1
作 者:VAIOVR
技术支援:http://dev.freediscuz.net/dev/
安装方法:简单
发表日期:21/07/2005
更新日期:22/07/2005
演 示:图片演示
修改文件:/admin/settings.php
/templates/default/admincp.lang.php
/templates/default/templates.lang.php
/templates/default/register.htm
插件功能:显示三个图片广告连接,有后台控制开关,当没有广告的时候可以关闭,使用HTML代码来管理论坛的广告进行广告链接设置,方便其他管理员来操作。
----------------------------------------------------------------------------------------------------------
1.进入后台管理界面
升级数据库
- INSERT INTO cdb_settings VALUES ('register_advoff', '1');
- INSERT INTO cdb_settings VALUES ('register_adv1', '图片广告连接1');
- INSERT INTO cdb_settings VALUES ('register_adv2', '图片广告连接2');
- INSERT INTO cdb_settings VALUES ('register_adv3', '图片广告连接3');
复制代码
2.修改文件admin/settings.php
找到:
- showsetting('settings_bbrulestxt', 'settingsnew[bbrulestxt]', $settings['bbrulestxt'], 'textarea');
复制代码
在下面添加:
- //----Register Advert Start--------------------------------------------------------------------
- showtype('settings_register_adv');
- showsetting('settings_register_advoff', 'settingsnew[register_advoff]', $settings['register_advoff'], 'radio');
- showsetting('settings_register_adv1', 'settingsnew[register_adv1]',
- $settings['register_adv1'], 'textarea');
- showsetting('settings_register_adv2', 'settingsnew[register_adv2]',
- $settings['register_adv2'], 'textarea');
- showsetting('settings_register_adv3', 'settingsnew[register_adv3]',
- $settings['register_adv3'], 'textarea');
- //----Register Advert End----------------------------------------------------------------------
复制代码
3.修改文件/templates/default/register.htm
查找:
- <center>
- <input type="submit" name="rulesubmit" value="{lang agree}" style="height: 23px">
- <input type="button" name="return" value="{lang disagree}" style="height: 23px" onclick="javascript:history.go(-1);">
- </form>
- </center>
复制代码
替换为:
- <!--Register Advert Start-->
- <!--{if $register_advoff}-->
- <script language="Javascript">
- <!--
- function will() {
- if (event.srcElement.tagName=='A'||event.srcElement.tagName=='IMG') {
- window.focus();
- SetCookie("myLove", "ffff**You");
- oUrl.style.display = "";
- yAd.style.display = "none";
- }
- }
- function GetCookie (name) {
- var arg = name + "=";
- var alen = arg.length;
- var clen = document.cookie.length;
- var i = 0;
- while (i < clen) {
- var j = i + alen;
- if (document.cookie.substring(i, j) == arg)
- return getCookieVal (j);
- i = document.cookie.indexOf(" ", i) + 1;
- if (i == 0) break;
- }
- return null;
- }
- function getCookieVal (offset) {
- var endstr = document.cookie.indexOf (";", offset);
- if (endstr == -1)
- endstr = document.cookie.length;
- return unescape(document.cookie.substring(offset, endstr));
- }
- function SetCookie (name, value) {
- document.cookie = name + "=" + escape (value)
- }
- //-->
- </script>
- <center>
- <div id="yAd">
- <table class="tableborder" cellspacing="0" cellpadding="0" border="0" width="{TABLEWIDTH}" align="center">
- <tr><td>
- <table border="0" cellspacing="{BORDERWIDTH}" cellpadding="{TABLESPACE}" width="100%">
- <tr>
- <td class="header">{lang register_adv_step}</td>
- </tr>
- <tr bgcolor="{ALTBG1}"><td width="100%">{lang register_adv_step_1}</td>
- </tr>
- <tr bgcolor="{ALTBG2}"><td width="100%" align="center">$register_adv1</td>
- </tr>
- <tr bgcolor="{ALTBG1}"><td width="100%">{lang register_adv_step_2}</td>
- </tr>
- <tr bgcolor="{ALTBG2}"><td width="100%" align="center">$register_adv2</td>
- </tr>
- <tr bgcolor="{ALTBG1}"><td width="100%">{lang register_adv_step_3}</td>
- </tr>
- <tr bgcolor="{ALTBG2}"><td width="100%" align="center"><base target="_blank" onclick="javascript:will()">$register_adv3</td>
- </tr>
- <tr bgcolor="{ALTBG1}"><td>{lang register_adv_step_end}</td>
- </tr>
- </table></td></tr></table>
- </div>
- <div id="oUrl" style="display:'none'">
- <table align=center border=0 cellPadding=0 cellSpacing=1 style="WORD-BREAK: break-all" width="100%">
- <TBODY>
- <tr>
- <td>
- <center>
- <input type="submit" name="rulesubmit" value="{lang agree}" style="height: 23px">
- <input type="button" name="return" value="{lang disagree}" style="height: 23px" onclick="javascript:history.go(-1);">
- </center>
- </td></tr>
- </TBODY>
- </table>
- </div>
- </center>
- <!--{else}-->
- <center>
- <input type="submit" name="rulesubmit" value="{lang agree}" style="height: 23px">
- <input type="button" name="return" value="{lang disagree}" style="height: 23px" onclick="javascript:history.go(-1);">
- </center>
- <!--{/if}-->
- <script language="javascript">
- if (get_cookie('xinsoft') !='') {
- oUrl.style.display = "";
- yAd.style.display = "none";
- }
- else{
- oUrl.style.display = "none";
- yAd.style.display = "";
- }
- </script>
- <!--Register Advert End-->
复制代码
4.打开语言包/templates/default/templates.lang.php
查找:
- 'allow_newsletter' => '同意接收论坛通知 (Email 或短消息)',
复制代码
在下面添加:
- //--Register Advert Start--------------------------------------------------------------------
- 'register_adv_step' => '为支持论坛建设发展,请您先点击广告后再注册',
- 'register_adv_step_1' => '第一步,点击下面图片广告连接',
- 'register_adv_step_2' => '第二步,点击下面图片广告连接',
- 'register_adv_step_3' => '第三步,点击下面图片广告连接',
- 'register_adv_step_end' => '按提示操作完成点击,即可马上获得会员注册地址',
- //--Register Advert End----------------------------------------------------------------------
复制代码
5.打开语言包/templates/default/admincp.lang.php
查找:
- 'settings_bbrulestxt_comment' => '注册许可协议的详细内容',
复制代码
在下面添加:
- //--Register Advert Start--------------------------------------------------------------------
- 'settings_register_advoff' => '注册页面的广告连接显示开关',
- 'settings_register_advoff_comment' => '选择(否)将关闭,注册页面将不再显示广告连接,可直接注册',
- 'settings_register_adv' => '注册广告',
- 'settings_register_adv1' => '图片广告连接1',
- 'settings_register_adv1_comment' => '请填入注册时需点击的第一个图片广告连接,支持HTML代码<br><br>输入方法演示:[a href="<font color="#FF0000">http://xxxxxxx/</font>">[img border="0" src="<font color="#FF0000">http://xxxxxxx.gif</font>"></a><br>把<font color="#FF0000">[</font>a href和<font color="#FF0000">[</font>img前面的<font color="#FF0000">[</font>换成<font color="#FF0000"><</font>,然后连接网址和图片网址换成广告网址即可',
- 'settings_register_adv2' => '图片广告连接2',
- 'settings_register_adv2_comment' => '请填入注册时需点击的第二个图片广告连接,支持HTML代码<br><br>输入方法演示:[a href="<font color="#FF0000">http://xxxxxxx/</font>">[img border="0" src="<font color="#FF0000">http://xxxxxxx.gif</font>"></a><br>把<font color="#FF0000">[</font>a href和<font color="#FF0000">[</font>img前面的<font color="#FF0000">[</font>换成<font color="#FF0000"><</font>,然后连接网址和图片网址换成广告网址即可',
- 'settings_register_adv3' => '图片广告连接3',
- 'settings_register_adv3_comment' => '请填入注册时需点击的第三个图片广告连接,支持HTML代码<br><br>输入方法演示:[a href="<font color="#FF0000">http://xxxxxxx/</font>">[img border="0" src="<font color="#FF0000">http://xxxxxxx.gif</font>"></a><br>把<font color="#FF0000">[</font>a href和<font color="#FF0000">[</font>img前面的<font color="#FF0000">[</font>换成<font color="#FF0000"><</font>,然后连接网址和图片网址换成广告网址即可',
- //--Register Advert End---------------------------------------------------------------------
复制代码
6. 操作方法:
注册许可协议一定要打开否则无效
系统设置->注册设置
选择注册页面的广告连接显示开关及修改广告链接修改内容即可.
[ 本帖最后由 vaiovr 于 2005-7-22 09:42 编辑 ] |