<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Horse的博客&#187; Discuz</title>
	<atom:link href="http://www.mahoupao.net/index.php/tag/discuz/feed" rel="self" type="application/rss+xml" />
	<link>http://www.mahoupao.net</link>
	<description>马后炮化工</description>
	<lastBuildDate>Mon, 12 Apr 2010 04:48:29 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>修改Discuz 注册文件防注册机</title>
		<link>http://www.mahoupao.net/index.php/2010/03/09/%e4%bf%ae%e6%94%b9discuz-%e6%b3%a8%e5%86%8c%e6%96%87%e4%bb%b6%e9%98%b2%e6%b3%a8%e5%86%8c%e6%9c%ba.html</link>
		<comments>http://www.mahoupao.net/index.php/2010/03/09/%e4%bf%ae%e6%94%b9discuz-%e6%b3%a8%e5%86%8c%e6%96%87%e4%bb%b6%e9%98%b2%e6%b3%a8%e5%86%8c%e6%9c%ba.html#comments</comments>
		<pubDate>Tue, 09 Mar 2010 08:35:11 +0000</pubDate>
		<dc:creator>horse</dc:creator>
				<category><![CDATA[计算机]]></category>
		<category><![CDATA[Discuz]]></category>

		<guid isPermaLink="false">http://www.mahoupao.net/?p=72</guid>
		<description><![CDATA[论坛最讨厌的就是有注册机来注册，然后发表一大堆垃圾广告，相信广大站长们都各有妙招来对付。改为邀请码注册，虽然是封杀了广告贴，但好多人也跟着不能注册了，邀请码不方便得到，论坛人气大大下 降。
思来想去，想了一个相对比较好的方法，注册还是需要邀请码，另外单独做一张网页，把邀请码全部从数据库里读出来，想注册的就用一个， 这样注册就没多大问题了。当然，如果是人为的来注册发贴，那有可能就防不住了，这方法只能防住注册机来注册，我想，这样应该能减少90%的垃圾广告了吧！
废话不多说，想看效果的到论坛（http://bbsmahoupao.com），下面开始具体操作！
第一步：新建显示邀请码的网页，并传到论坛根目录下（文件名：invit_code.php）
代码如下：

 程序代码

&#60;body&#62;
&#60;br /&#62;
&#60;table width=&#8221;600&#8243; border=&#8221;0&#8243;  align=&#8221;center&#8221; cellpadding=&#8221;0&#8243; cellspacing=&#8221;0&#8243;&#62;
&#60;tr&#62;
&#60;td&#62;&#60;/td&#62;
&#60;td align=&#8221;center&#8221;&#62;&#60;font color=&#8221;#FF0000&#8243;&#62;无邀请码时，请联系QQ：10101840  &#60;/td&#62;
&#60;/tr&#62;
&#60;/table&#62;
&#60;br/&#62;
&#60;table width=&#8221;250&#8243; border=&#8221;0&#8243; align=&#8221;center&#8221; cellpadding=&#8221;0&#8243; cellspacing=&#8221;1&#8243; bgcolor=&#8221;#E3E3E3&#8243;&#62;
&#60;tr&#62;
&#60;td height=&#8221;25&#8243; align=&#8221;center&#8221; bgcolor=&#8221;#F7F7F7&#8243;&#62;邀请码&#60;font color=&#8221;#FF0000&#8243;&#62;( 随意复制一条即可 )&#60;/font&#62;&#60;/td&#62;
&#60;/tr&#62;
&#60;tr&#62;
&#60;td bgcolor=&#8221;#FFFFFF&#8221;&#62;
&#60;?php
$dbh = mysql_connect(&#8216;localhost&#8217;,'UserName&#8217;,'password&#8217;);
mysql_select_db(&#8216;dataname&#8217;);
$query = &#8220;Select `invitecode`,`status` FROM `cdb_invites` where `status` = 1 or `status` = 3 &#8220;;
$res = mysql_query($query, $dbh);
$err = mysql_error();
if($err){
echo &#8220;数据库连接出错，请检查！&#8221;
}
$number = 1;
while($row = mysql_fetch_row($res)){
echo &#8220;&#60;font color=#FF0000&#62;邀请码&#8221;.$number.&#8221;: &#60;/font&#62;&#8221;.$row[0];
echo &#8220;&#60;br/&#62;&#8221;;
$number [...]]]></description>
		<wfw:commentRss>http://www.mahoupao.net/index.php/2010/03/09/%e4%bf%ae%e6%94%b9discuz-%e6%b3%a8%e5%86%8c%e6%96%87%e4%bb%b6%e9%98%b2%e6%b3%a8%e5%86%8c%e6%9c%ba.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Discuz7.2，7.1友情链接间距修改方法</title>
		<link>http://www.mahoupao.net/index.php/2010/02/02/discuz7%e5%8f%8b%e6%83%85%e9%93%be%e6%8e%a5%e9%97%b4%e8%b7%9d%e4%bf%ae%e6%94%b9%e6%96%b9%e6%b3%95.html</link>
		<comments>http://www.mahoupao.net/index.php/2010/02/02/discuz7%e5%8f%8b%e6%83%85%e9%93%be%e6%8e%a5%e9%97%b4%e8%b7%9d%e4%bf%ae%e6%94%b9%e6%96%b9%e6%b3%95.html#comments</comments>
		<pubDate>Tue, 02 Feb 2010 02:45:43 +0000</pubDate>
		<dc:creator>horse</dc:creator>
				<category><![CDATA[闲言碎语]]></category>
		<category><![CDATA[Discuz]]></category>
		<category><![CDATA[vps]]></category>
		<category><![CDATA[风格]]></category>

		<guid isPermaLink="false">http://www.mahoupao.net/?p=41</guid>
		<description><![CDATA[DZ默认的首页友情链接的间距非常大，默认的模版中一行也只能放置8个，非常难看。所以在后台找到了修改友情链接间距的方法，
在默认模版中的css_script.htm (teamplates/default/css_script.htm) 中对文字友情链接有这样的一段定义：
.forumtxtlink li { float: left; margin-right: 5px; width: 8em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
直接把width: 8em和 overflow: hidden 全部删除。
就可以实现紧凑型的友情链接了。
效果预览：http://bbs.mahoupao.com/index.php

	你还可能感兴趣的相关文章:
	
	发表第一篇文章 (0)
	修改Discuz 注册文件防注册机 (0)
	为什么要使用VPS主机 (0)
	wordpress 在 lighttpd 上的 URL 伪静态设置 (0)


]]></description>
		<wfw:commentRss>http://www.mahoupao.net/index.php/2010/02/02/discuz7%e5%8f%8b%e6%83%85%e9%93%be%e6%8e%a5%e9%97%b4%e8%b7%9d%e4%bf%ae%e6%94%b9%e6%96%b9%e6%b3%95.html/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
