<?xml version="1.0" encoding="UTF-8"?>
<!-- generator="ARTICLE @ XOOPS powered by FeedCreator" -->
<feed version="0.3" xmlns="http://purl.org/atom/ns#" xml:lang="zh-TW">
    <title>睡蓮‧池水間 :: 文章</title>
    <tagline>文章XML</tagline>
    <link rel="alternate" type="text/html" href="http://waterlily-lsl.com/modules/article/view.article.php/188/c11"/>
    <id>http://waterlily-lsl.com/modules/article/view.article.php/188/c11</id>
    <modified>2012-02-11T21:33:39+02:00</modified>
    <author>
        <name>waterlily at waterlily-lsl dot com</name>
    </author>
    <generator>ARTICLE @ XOOPS powered by FeedCreator</generator>
    <entry>
        <title>用文章發表數取代 Karma</title>
        <link rel="alternate" type="text/html" href="http://waterlily-lsl.com/modules/article/view.article.php/188/c11"/>
        <created>2009-06-23T14:10:15+02:00</created>
        <issued>2009-06-23T14:10:15+02:00</issued>
        <modified>2009-06-23T14:10:15+02:00</modified>
        <id>http://waterlily-lsl.com/modules/article/view.article.php/188/c11</id>
        <author>
            <name>睡蓮</name>
        </author>
        <summary>類別: xoops&lt;br /&gt;來源: (池水間)目前 CBB 的查看帖子權限設定中，除了回覆才可觀看內容外，另還有 karma 積分這一項設定。&lt;br /&gt;&lt;br /&gt;karma 存在的問題是，積分是怎麼計算的？會員又如何知道自己的積分有多少？在會員的個人資訊裡面，是不會有明文標示出您的karma有多少，即使可以知道有多少積分，也都是經由自行換算得來的。&lt;br /&gt;&lt;br /&gt;karma 是要以文章發表數乘以50才得出自己的分數，與其要會員自行玩換算遊戲，不若改以文章發表數來取替 karma。用發表數決定瀏覽權限，較 karma 來的直觀也較方便。&lt;br /&gt;&lt;br /&gt;在過去玩CBB兩年多期間就曾經在karma上作過一點小hack，將之改成發表數，而所hack的CBB版本為 3.08 版，其他版本就沒有測試過，如讀者需hack請先行在非正式站測試。&lt;br /&gt;　&lt;br /&gt;在 modules/newbb/class/karma.php下約 54 行，將下面的橘字部份刪除：&lt;br /&gt;&lt;div class=&quot;xoopsCode&quot;&gt;&lt;p class=&quot;cTitle&quot;&gt;&lt;img class=&quot;icon-l&quot; src=&quot;http://waterlily-lsl.com/themes/waterlilyLSL-GW/img/code-icon1.gif&quot; alt=&quot;&quot;/&gt;&lt;img class=&quot;icon-r&quot; src=&quot;http://waterlily-lsl.com/themes/waterlilyLSL-GW/img/code-icon2.gif&quot; alt=&quot;&quot;/&gt;&lt;/p&gt;&lt;pre&gt;
  function calUserkarma()
    {
        if (!$this-&amp;gt;user) $user_karma = 0;
        else $user_karma = $this-&amp;gt;user-&amp;gt;getVar(&amp;#039;posts&amp;#039;)&lt;span style=&quot;color: #ffac00;&quot;&gt; * 50&lt;/span&gt;;
        return $user_karma;
    } 
&lt;/pre&gt;&lt;/div&gt;&lt;br /&gt;再來於modules/newbb/language/選用的語言/main.php下118行，修改原來的karma用語，下面的橘字是可以修改的地方。&lt;br /&gt;&lt;div class=&quot;xoopsCode&quot;&gt;&lt;p class=&quot;cTitle&quot;&gt;&lt;img class=&quot;icon-l&quot; src=&quot;http://waterlily-lsl.com/themes/waterlilyLSL-GW/img/code-icon1.gif&quot; alt=&quot;&quot;/&gt;&lt;img class=&quot;icon-r&quot; src=&quot;http://waterlily-lsl.com/themes/waterlilyLSL-GW/img/code-icon2.gif&quot; alt=&quot;&quot;/&gt;&lt;/p&gt;&lt;pre&gt;
define(&amp;#039;_MD_KARMA_REQUIREMENT&amp;#039;, &amp;#039;&lt;span style=&quot;color: #ffac00;&quot;&gt;抱歉！您現時有&lt;/span&gt; %s &lt;span style=&quot;color: #ffac00;&quot;&gt;篇發表數，尚未達到本帖的&lt;/span&gt; %s &lt;span style=&quot;color: #ffac00;&quot;&gt;篇才可觀看的要求。&lt;/span&gt;&amp;#039;);
&lt;/pre&gt;&lt;/div&gt;&lt;br /&gt;於modules/newbb/language/選用的語言/main.php下215行，將原來的“Karma積分”改為“發表數”&lt;br /&gt;&lt;div class=&quot;xoopsCode&quot;&gt;&lt;p class=&quot;cTitle&quot;&gt;&lt;img class=&quot;icon-l&quot; src=&quot;http://waterlily-lsl.com/themes/waterlilyLSL-GW/img/code-icon1.gif&quot; alt=&quot;&quot;/&gt;&lt;img class=&quot;icon-r&quot; src=&quot;http://waterlily-lsl.com/themes/waterlilyLSL-GW/img/code-icon2.gif&quot; alt=&quot;&quot;/&gt;&lt;/p&gt;&lt;pre&gt;
define(&amp;#039;_MD_REQUIRE_KARMA&amp;#039;,&amp;#039;&lt;span style=&quot;color: #ffac00;&quot;&gt;發表數&lt;/span&gt;&amp;#039;);
&lt;/pre&gt;&lt;/div&gt;&lt;br /&gt;修改modules/newbb/language/選用的語言/modinfo.php下約153至156行用語，這是顯示於管理後台的CBB偏好設定裡&lt;br /&gt;&lt;div class=&quot;xoopsCode&quot;&gt;&lt;p class=&quot;cTitle&quot;&gt;&lt;img class=&quot;icon-l&quot; src=&quot;http://waterlily-lsl.com/themes/waterlilyLSL-GW/img/code-icon1.gif&quot; alt=&quot;&quot;/&gt;&lt;img class=&quot;icon-r&quot; src=&quot;http://waterlily-lsl.com/themes/waterlilyLSL-GW/img/code-icon2.gif&quot; alt=&quot;&quot;/&gt;&lt;/p&gt;&lt;pre&gt;
define(&amp;quot;_MI_ENABLE_KARMA&amp;quot;, &amp;quot;啟用Karma&amp;quot;);
define(&amp;quot;_MI_ENABLE_KARMA_DESC&amp;quot;, &amp;quot;用戶可以設定某個文章的karma標準。只有達到該標準的成員才能查看此帖。&amp;lt;font color=red&amp;gt;注意！此功能雖可以使用尚未開發完善。&amp;lt;/font&amp;gt;&amp;quot;);

define(&amp;quot;_MI_KARMA_OPTIONS&amp;quot;, &amp;quot;Karma的可選值&amp;quot;);
&lt;/pre&gt;&lt;/div&gt;&lt;br /&gt;可以將上面改成如下&lt;br /&gt;&lt;div class=&quot;xoopsCode&quot;&gt;&lt;p class=&quot;cTitle&quot;&gt;&lt;img class=&quot;icon-l&quot; src=&quot;http://waterlily-lsl.com/themes/waterlilyLSL-GW/img/code-icon1.gif&quot; alt=&quot;&quot;/&gt;&lt;img class=&quot;icon-r&quot; src=&quot;http://waterlily-lsl.com/themes/waterlilyLSL-GW/img/code-icon2.gif&quot; alt=&quot;&quot;/&gt;&lt;/p&gt;&lt;pre&gt;
define(&amp;quot;_MI_ENABLE_KARMA&amp;quot;, &amp;quot;啟用發表數&amp;quot;);
define(&amp;quot;_MI_ENABLE_KARMA_DESC&amp;quot;, &amp;quot;會員可以設定某個文章的發表數標準。只有達到該標準的成員才能查看此帖。&amp;quot;);

define(&amp;quot;_MI_KARMA_OPTIONS&amp;quot;, &amp;quot;發表數的可選值&amp;quot;);
&lt;/pre&gt;&lt;/div&gt;&lt;br /&gt;接下來到管理後台，在CBB偏好設定下，將原來的Karma的可選數值重新設定一下為發表數值後便可以使用了。&lt;br /&gt;</summary>
    </entry>
</feed>

