Skip to content

Latest commit

 

History

History
114 lines (100 loc) · 2.38 KB

多等級節點.md

File metadata and controls

114 lines (100 loc) · 2.38 KB

多等級節點:

路徑:/resources/views/material/user/node.tpl

<p class="card-heading">VIP用户节点</p>
{$id=1000}
{foreach $node_prefix as $prefix => $nodes}
{if $node_isv6[$prefix] == 0 && $node_class[$prefix]==1}
{$id=$id+1}
{foreach $nodes as $node}
……忽略中間代碼……
{/foreach}
{/if}
{/if}
{/foreach}
</div>
</div>
</div>
{/if}
{/foreach}

往下複製一份

<p class="card-heading">超級VIP用户节点</p>
{$id=1000}
{foreach $node_prefix as $prefix => $nodes}
{if $node_isv6[$prefix] == 0 && $node_class[$prefix]==2}
{$id=$id+1}
{foreach $nodes as $node}
……忽略中間代碼……
{/foreach}
{/if}
{/if}
{/foreach}
</div>
</div>
</div>
{/if}
{/foreach}

以上修改重點:

<p class="card-heading">超級VIP用户节点</p>(顯示名稱)

{if $node_isv6[$prefix] == 0 && $node_class[$prefix]==2}([$prefix]==2為等級2節點)

用戶中心顯示:

路徑:/resources/views/material/user/index.tpl

<p><dt>帐号等级</dt>
{if $user->class!=0}
<dd><i class="icon icon-md t4-text">stars</i>&nbsp;VIP</dd>
{else}
<dd><i class="icon icon-md t4-text">stars</i>&nbsp;免费</dd>
{/if}
</p>

修改為:

<p><dt>帐号等级</dt>
{if $user->class==1}
<dd><i class="icon icon-md t4-text">stars</i>&nbsp;VIP</dd>
{elseif $user->class==2}
<dd><i class="icon icon-md t4-text">stars</i>&nbsp;超級VIP</dd>
{elseif $user->class==3}
<dd><i class="icon icon-md t4-text">stars</i>&nbsp;超級超級VIP</dd>
{elseif $user->class==4}
<dd><i class="icon icon-md t4-text">stars</i>&nbsp;宇宙超級無敵VIP</dd>
………以此類推………
{elseif $user->class==99}
<dd><i class="icon icon-md t4-text">stars</i>&nbsp;宇宙超級超級超級無敵VIP</dd>
{else}
<dd><i class="icon icon-md t4-text">stars</i>&nbsp;免費用戶</dd>
{/if}
</p>

首頁顯示:

路徑:/resources/views/material/index.tpl

<p>用户:<code>{$user->user_name}</code>
等级:{if $user->class!=0}
<code>VIP</code>
{else}
<code>免费</code>
{/if}

修改為:

<p>用户:<code>{$user->user_name}</code>
等级:{if $user->class==1}
<code>VIP</code>
{elseif $user->class==2}
<code>超級VIP</code>
{elseif $user->class==3}
<code>超級超級VIP</code>
{elseif $user->class==4}
<code>宇宙超級無敵VIP</code>
……以此類推……
{elseif $user->class==99}
<code>宇宙超級超級超級無敵VIP</code>
{else}
<code>免费</code>
{/if}