New Menu - show picture worng

image

I have a picture in sec_users, I put in global variabl ebut shows in worng way.
Any rcomendation? size, type , etc

regards
Ramiro

Hi Ramiro

It seems that it only works with images that are on the server. So I download the image to tmp and use it with a global variable.

OnAplicationInit

datos_usuario();

PHP Method datos_usuario

[usr_picture] = β€˜β€™;
$check_sql = β€œSELECT name, email, picture FROM sec_users WHERE login=’” . [usr_login] ."’";
sc_lookup(rs, $check_sql);

if (isset({rs[0][0]})) // Row found
{
[usr_name] = {rs[0][0]};
[usr_email] = {rs[0][1]};
[usr_picture] = {rs[0][2]};
}
else // No row found
{
[usr_name] = β€˜β€™;
[usr_email] = β€˜β€™;
[usr_picture] = β€˜β€™;
}

if([usr_picture] != β€œβ€)
{
file_put_contents(’…/_lib/tmp/’. [usr_login], [usr_picture]);
[usr_picture]= β€˜β€¦/_lib/tmp/’. [usr_login];
}

On user Menu, I used the global variables to show picture, name and description

Bye

1 Like

so how dows sc knows in which folder to look for the picture if the picture is stored in a folder like β€˜/afb/profiel_afbeelding’

can’t seem to get this working

tried this

if([usr_afb] != β€˜β€™)
{
file_put_contents(’…/_lib/file/afb/profiel_afbeelding/’. [usr_login], [usr_afb]);
[usr_afb]= β€˜β€¦/_lib/file/afb/profiel_afbeelding/’. [usr_login];
}