Posted in: xenforo

在vbb中,如何使新用户12个小时后发贴

本程序只是设为12小时,实际自已而定。
修改vbb的newthread.php文件:
把下面这一段放在require(“./global.php”);下面:
//12小时内不能发贴
$empirer=$DB_site->query_first(“select joindate from user where userid=’$bbuserinfo[userid]'”);
$time12=time()-$empirer[joindate];

if($time12<=12*3600)
{
?>
<script language=javascript>
alert(“在刚注册的12小时内您无权发贴!谢谢合作。”);history.go(-1);
</script>
<?
exit();
}

Posted in: xenforo

在主题的第一帖后面显示一个广告条

近期在vbulletin中国官方的论坛看到一个很实用的广告加入方法,所以转贴下来,一是为了防止以后用时找不到,另外就是为了方便大家,原贴地址:http://forum.vbulletin-china.cn/showthread.php?t=228

全文如下:

管理面板->风格与模版->风格管理->« » 按钮->帖子块模版->postbit 或 postbit_legacy (根据您选择的帖子布局选择)

在模版最下方的位置添加下面代码中的蓝色部分:

</if>

<if condition=”$post[‘userid’] AND $show[‘member’]”>

<tr><td class=”vbmenu_option”><a href=”profile.php?$session[sessionurl]do=addlist&amp;userlist=buddy&amp;u=$post[userid]”><phrase 1=”$post[username]”>$vbphrase[add_x_to_buddy_list]</phrase></a></td></tr>

</if>

</table>

</div>

<!– / post $post[postid] popup menu –>

<if condition=”$post[postcount] == 1″>

<div style=”padding: $stylevar[cellpadding]px 0px 0px 0px”>

<table class=”tborder” cellpadding=”$stylevar[cellpadding]” cellspacing=”$stylevar[cellspacing]” border=”0″ width=”100%” align=”center”>

<tr>

<td class=”thead” align=”left”>赞助商链接</td>

</tr>

<tr>

<td class=”alt1″ align=”center”>

广告条代码放置于此

</td>

</tr>

</table>

</div>

</if>

将上面代码中红色的部分替换为您的广告条代码。

还有几个变体供您将广告条显示在不同位置。您只需将上面的代码中的“if”部分替换为下述的代码。

Back to Top