hulud

Вывод значений Cimy User Extra Fields

драсьте!
экстренно нужна помощь в довольно простом деле, в котором я ламер.
надо вывести в отдельном файле (предположим, authors.php) отдельные поля, созданные при помощи Cimy User Extra Fields.
предположим, это я нахожу в одном из readme:

<!--FUNCTIONS USEFUL FOR YOUR THEMES OR TEMPLATES: [Function get_cimyFieldValue] This function given a field name and a user id returns the content inserted by that user in that field, if user id or field name is wrong then it returns NULL. Remember that first you have to enable it via options page.---!>

USAGE:
$value = get_cimyFieldValue($user_id, $field_name);

<!--EXAMPLE: If you put the example just inside an existing loop you shouldn't add it again, just use get_cimyFieldValue call and echo call.---!>

if (have_posts()) {
    while (have_posts()) {
        the_post();

        $value = get_cimyFieldValue(get_the_author_ID(), 'MY_FIELD');

        if ($value != NULL)
            echo $value;
        else
            echo "Error!";

        /* if you are inside an existing loop remember this breaks after the first iteration! */
        break;
    }
}


<!--[Function get_cimyFields] This function returns an array containing all extra fields defined by the admin ordered by the order defined in the option page, if there are no fields an empty array is returned.---!>

USAGE:
$allFields = get_cimyFields();

EXAMPLE:
$allFields = get_cimyFields();

if (count($allFields) > 0) {
    foreach ($allFields as $field) {
        echo "ID: ".$field['ID']." \n";
        echo "F_ORDER: ".$field['F_ORDER']." \n";
        echo "NAME: ".$field['NAME']." \n";
        echo "TYPE: ".$field['TYPE']." \n";
        echo "VALUE: ".$field['VALUE']." \n";
        echo "LABEL: ".$field['LABEL']." \n";
        echo "DESCRIPTION: ".$field['DESCRIPTION']." \n";

        echo "RULES: ";
        print_r($field['RULES']);
        echo "\n\n";
    }
}

заменяю на свои переменные, вставляю это все, мне выдает ошибку:
Fatal Error: Call to undefined function: get_cimyfieldvalue() in y:\home\localhost\www\authors.php on line 5

подскажите, что надо сделать, а точнее, как надо прописать код, чтобы был какой-то толк?

Anonymous
Отправить
Ответ на: