17 Posts
cladellas
7 years ago
2
Topic

Hi, I'm trying to save the value of a field as the value of the intro or fulltext image of articles , to show it in joomla,

To save the value of a field in the intro image field, it is saved as other fields or with JSON it works differently?

$ref_st_1 = "images/intro/" . $fields['reference'] . ".jpg";
$table = $fields['art_image_intro']->storage_table;
$name = $fields['art_image_intro']->storage_field;
$config['storages'][$table][$name] = $ref_st_1;

Get a VIP membership
4229 Posts
Kadministrator
7 years ago
0
Level 1

Hi,

you should set it's value the same way as for any other field, actual storage should be taken care of by the storage plugin.

You are missing $fields[''art_image_intro']->value = $ref_st_1; in your code.

17 Posts
cladellas
7 years ago
0
Level 1

Hello, I'm trying to save the value in another field and the value is saved well, when I save the value in the field image intro or fulltext the values are not saved:

The value of the reference is stored in the fieldtest field:

$ref_st_1 = "images/intro/1234.jpg";
$fields['art_image_intro']->value = $ref_st_1;
$table = $fields['fieldtest']->storage_table;
$name = $fields['fieldtest']->storage_field;
$config['storages'][$table][$name] = $ref_st_1;

The reference in intro or in fulltext is not saved:

$ref_st_1 = "images/intro/1234.jpg";
$fields['art_image_intro']->value = $ref_st_1;
$table = $fields['art_image_fulltext']->storage_table;
$name = $fields['art_image_fulltext']->storage_field;
$config['storages'][$table][$name] = $ref_st_1;

Does not store in the field art_image_intro,

Thanks,

Get a Book for SEBLOD