灰儿 发表于 2012-9-24 11:01:37

DZ X2/X2.5贴内实现:马上注册,结交更多好友,享用更多功能

仿19楼 帖内游客注册提醒/QQ/新浪微博账号登陆 For 7.2/X2/X2.5 精致 简洁

打开主题贴,出现如下提示:
马上注册,结交更多好友,享用更多功能,让你轻松玩转大湖社区(dahu123.com)!



在哪设置啊?还是模板的问题??有单独做的吗?

DZ X2/X2.5实现方法:
打开:template\default\forum\viewthread_node.htm (非默认风格,则修改风格中的viewthread_node.htm)

搜索从下代码:
<!--{ad ad_a_pr/thread/a_pr/3/$postcount}-->在这个代码的===上面===添加:<!--{if !$_G['uid'] && $post['first']}-->
<div id="register-intro" class="register-intro">
<strong>马上注册,结交更多好友,享用更多功能,让你轻松玩转大湖社区。</strong>
<a class="btn_sm" rel="nofollow" href="member.php?mod={$_G}" target="_blank"><span>立即注册</span></a> 已有账号?<a rel="nofollow" href="member.php?mod=logging&action=login">点击登录</a>。您也可以直接<a href="connect.php?mod=login&op=init&referer=index.php&statfrom=login_simple"><img src="static/image/common/qq_login.gif" class="vm" alt="QQ登录" /></a>如需帮助请联系论坛客服QQ:82931570
<span class="reg-close" id="reg-close" onclick="closed()">关闭</span>
</div>
<script type="text/javascript">
function closed(){
$('register-intro').style.display="none";
}
</script>
<!--{/if}--> 第二步:然后添加CSS样式代码,并上传背景图片到空间中
x2.5版本的打开\template\default\common\common.css(非默认风格,则修改风格中的common.css)
在其下面添加:/*游客贴内注册提醒*/
.register-intro {
    background: url("{IMGDIR}/reg_intro_bg.png") no-repeat scroll right
bottom #FFFCE9;
    border: 1px solid #D8E1A9;
    color: #666666;
    float: left;
    font-size: 14px;
    height: 63px;
    margin: 10px auto;
    padding: 15px;
    position: relative;
    width: 733px;
}
.register-intro .reg-close {
    background: url("{IMGDIR}/reg_intro_close.png") no-repeat scroll 0 0 transparent;
    cursor: pointer;
    display: block;
    height: 0;
    overflow: hidden;
    padding-top: 8px;
    position: absolute;
    right: 8px;
    top: 7px;
    width: 7px;
}
.register-intro strong {
    color: #8CA226;
    display: block;
    font-family: "微软雅黑";
    font-size: 16px;
    margin-bottom: 15px;
}
.register-intro a {
    color: #8CA226;
}
.btn_sm{
background:url({IMGDIR}/bg_btn.png) no-repeat 0px 0px;
background-position:0px -204px;
padding-left:5px;
zoom:1;
display:inline-block;
overflow:hidden;
line-height:33px;
height:30px;
font-size:14px;
vertical-align:middle;
}
.btn_sm:hover{
background-position:0px -269px;
}
.btn_sm:hover SPAN{
background-position:right -299px;}
.btn_sm SPAN{
background:url({IMGDIR}/bg_btn.png) no-repeat 0px 0px;
background-position:right -234px;
padding-bottom:0px;
padding-left:5px;
padding-right:10px;
zoom:1;
float:left;
cursor:pointer;
padding-top:0px;
color:#fff;
font-weight:800;
}
第三步:下载压缩包,上传所需图片
将附件中的图片reg_intro_bg.png 和 reg_intro_close.png上传到static\image\common中(非默认风格,则上传至风格图片文件夹内)

**** Hidden Message *****
第四步:非常废话的第四步,小白太多,不说不行
上传相关修改模板、CSS、图片等文件后,在后台更新CSS,刷新页面看效果



灰儿 发表于 2012-9-24 11:40:07

相关链接:
作者:popuppp
演示地址:http://bbs.zmd5.com/驻马店论坛
X2.5 驻马店论坛内的贴内游客注册提示,点击可关闭【实用,精致大方,免费发布】
http://www.discuz.net/forum.php?mod=viewthread&tid=2668237

【ChinaGirl】仿19楼 帖内游客注册提醒/QQ/新浪微博账号登陆 For 7.2/X2/X2.5
http://www.discuz.net/forum.php?mod=viewthread&tid=2617671



罗田论坛提供_最近有人找注册提示美化框,今天就发布在这里
http://www.discuz.net/forum.php?mod=viewthread&tid=2617639

灰儿 发表于 2012-9-24 16:00:21

怎么?每帖都显示,不爽?!只想楼主贴显示?!OK,跟着来,继续高阶修改

打开刚才修改的 viewthread_node.html 文件,查找
<!--{if $_G['uid']}-->


替换为
<!--{if !$_G['uid'] && $post['first']}-->


灰儿 发表于 2012-9-24 16:42:43

DZ X2/X2.5贴内实现:马上注册,结交更多好友,享用更多功能

另一种实现方法:
完全不用修改任何文件,超级简单实现相似效果。还不影响广告位。把下面代码加入后台 论坛/群组 帖内广告。展现方式--代码.
<!--{if !$_G['uid']&&$post['first']}--><div id="register-intro"class="register-intro"><table border="1"width="70%"cellspacing="0"id="table1"cellpadding="0"bgcolor="#FFFFCC"bordercolor="#C0C0C0"height="67"><tr><td align="left"bordercolor="#CCCCFF"><font face="宋体"><strong><font style="font-size: 13pt"color="#996600">马上注册,结交更多好友,享用更多功能,让您轻松玩转</font><font style="font-size: 13pt"><font color="#0000FF"><a target="_blank"style="text-decoration: none">大湖社区</a></font><font color="#996600">。</font></font></strong>您还没有账号?<a rel="nofollow"href="member.php?mod=register"target="_blank"><span><font color="#FF0000">立即注册</font></span></a>。已有账号?<a rel="nofollow"href="member.php?mod=logging&action=login"><font color="#FF0000">点击登录</font></a>。您也可以直接<a href="connect.php?mod=login&op=init&referer=index.php&statfrom=login_simple"><font color="#000000">
页: [1]
查看完整版本: DZ X2/X2.5贴内实现:马上注册,结交更多好友,享用更多功能