Loading...
 
Skip to main content

History: 크레딧

Source of version: 2 (current)

Copy to clipboard
            {syntax type="markdown"  editor="wysiwyg"} {BOX()}Translation of this page is incomplete.{BOX}

# 크레딧

{maketoc title=""} 
((Tiki6|티키6))에서 소개된 크레딧은 티키 사용자로 하여금 크레딧의 상이한 저장된 값 유형들을 보유하도록 하는 한 방법입니다. 이는 점수, 토큰, 시간, 분, 어떤 사용 회수, 기타 등등이 될 수 있습니다. 이 기능은 각 사용자에 대하여 크레딧을 추가하고 사용할 API 와 함께 제공됩니다.

Somehow, it implies having the ability to define and use multiple currencies within a single Tiki site, similarly to what can be achieved with ((Community Currencies)) linked to a ((CCLite)) server, which allows using those multiple currencies with other sites (intertrading), sites which can be powered by Tiki or other CMS/Softwares, such as Joomla, Drupal, Elgg, etc.

## Credit Details

Credits have a few characteristics:

- Credits have expiry dates and validity periods.
- Admins can configure different credit types and you can have different credit types for different sites

## Admin Credits

- The admin panel for this feature is at **tiki-admin_credits.php**
     {img fileId="326" rel="box[g]" class=reflect}

- You also need to define which TUC types are allowed in the tiki site, through "**Admin home > Payments > Tiki User Credits**" (tiki-admin.php?page=payment): 
     {img fileId="327" rel="box[g]" class=reflect align=center}

- Credits are used in the order of the earliest expiration date. Credits with no expiration date are used last.


Some definitions (useful for the admin panel):

{REMARKSBOX(type="note",title="Admin panel details",close="n",width="100%")}

**Static Level Credits**
: These are credits such as "storage" where the credit is **not** permanently used up when they are used. Instead, they can be restored. e.g. the user has used 500/2000 mb of storage.

**Scaling divisor**
: This is used to reduce the length of the bar shown in ((Module credits)) for a certain credit type. For example, some credits may have units in the thousands when others are in tens. The former will end up having a very long bar compared to the other credit unless the divisor is set to a larger number.

**Expiration date**
: If there is no expiration date, the credits last forever until they are used.

**A Plan**
: A block of credits that have an expiration date can be considered a plan, especially if they are created with fixed intervals, e.g. monthly plans.{REMARKSBOX}

## Add credits to users

You add credits to users through tiki-admin_credits.php?userfilter=username (being username the name of the user; which you can type in the username search bo{img fileId="328" rel="box[g]" class=reflect}

An admin can also set that a user has already consumed some of that set of allocated credits:

{img fileId="329" rel="box[g]" class=reflect}

And a report on the historical usage can be shown also:

{img fileId="330" rel="box[g]" class=reflect}

## Use Credits

You can pay invoices of Tiki ((Payments)) using ((Tiki User Credits)).

The credits that a user has left can be seen at any time by means of the module ((Module credits)):

{img fileId="331" rel="box[g]" class=reflect}

## Developer Tips


You could make use of functions in [http://sourceforge.net/p/tikiwiki/code/HEAD/tree/trunk/lib/credits/creditslib.php|lib/credits/creditlib]:

function useCredits to use up credits and function addCredits to add credits for users. Also use getCredits to get a user's credit information, and getScaledCredits which extends getCredits with more human readable information.



{DIV(class=titlebar)}alias{DIV}


(alias(Credit)) | (alias(TUC)) | (alias(TUCs)) | (alias(Tiki User Credit)) | (alias(TikiUserCredit)) | (alias(TikiUserCredits)) | (alias(Tiki User Credits))