+ Antworten
Ergebnis 1 bis 2 von 2

Thema: PonyML Karma Punktesys

  1. #1
    Neu an Board
    Registriert seit
    08.05.2008
    Beiträge
    39
    Bedankte sich
    1
    Erhielt 0 Danksagungen
    in 0 Beiträgen

    Standard PonyML Karma Punktesys

    Wie und wo schreibe ich dieses in PonyML

    The karma package has a number of calls built in which should make it easier to award and remove points.

    To manually add/remove points, you can use the CLASS_karma class and the functions addPoints() and remPoints().

    Parameters are:

    addPoints($userid, $points, $description) or remPoints($userid, $points, $description)

    eg.

    require_once( $mosConfig_absolute_path .
    '/components/com_karma/karma.class.php' );
    CLASS_karma::addPoints($my->id, 2, "Description goes here");

    To get a point equivalent from a custom configuration point, you can use the getConfig() function.

    Parementers are:

    getConfig($name)

    eg.

    $points = CLASS_karma::getConfig("custom1")

    *****Just be aware that if you are working this code into a mambot that they process user id differently so you will
    need to use a code like this:

    global $mainframe,$my;
    require_once( $mainframe->getCfg('absolute_path') . '/components/com_karma/karma.class.php' );
    $points = CLASS_karma::getConfig("#FIELDNAMEHERE#");
    CLASS_karma::addPoints($my->id, $points, "##DESCRIPTION HERE##");

  2. #2
    Gehört zum Inventar Avatar von deejey
    Registriert seit
    22.04.2006
    Ort
    HH
    Beiträge
    9.309
    Bedankte sich
    509
    Erhielt 1.791 Danksagungen
    in 1.583 Beiträgen

    Standard

    das können sicher erfahrene Leute für dich herausfinden
    Kein Support über PM; Ignoriermodus aktiv bei "dringend", "schnell", "eilt", denn: Zeit ist relativ

+ Antworten

Lesezeichen

Berechtigungen

  • Neue Themen erstellen: Nein
  • Themen beantworten: Nein
  • Anhänge hochladen: Nein
  • Beiträge bearbeiten: Nein