This topic is locked

default profile picture phprunner 9.8

7/19/2018 5:07:23 PM
PHPRunner General questions
K
kouba author

Hi,
I am trying to have a default picture when someone didn't upload his avatar.

I added this code in the "before record add" as follow:
if($values["imageURL"]==NULL)
$values["imageURL"]= "'[{\"name\":\"...mydefaultimage'";
But it seems not working, as i am having the screenshot below.
PS: i used advanced features of image/file to have just thumbnail displayed.
for the sake of test, my image url is in fact another imageURL copy from the database field, (therefore, i expected the same image).
Thanks for any advice.
the screenshot link: https://paste.pics/c60551b8556a2c8756a2b07392f9cc7f

lefty 7/20/2018



Hi,
I am trying to have a default picture when someone didn't upload his avatar.

I added this code in the "before record add" as follow:
if($values["imageURL"]==NULL)
$values["imageURL"]= "'[{\"name\":\"...mydefaultimage'";
But it seems not working, as i am having the screenshot below.
PS: i used advanced features of image/file to have just thumbnail displayed.
for the sake of test, my image url is in fact another imageURL copy from the database field, (therefore, i expected the same image).
Thanks for any advice.
the screenshot link: https://paste.pics/c...6a2b07392f9cc7f


Thumbnails add a th_ before the file name. . If you use multiupload you need to check here as I believe random characters are added to filename to avoid collisions . See this link . You also need to have GD library installed on your server for thumbnails. If you are storing in database / binary then you need to see the bottom of the previous link and need another field setup for thumbnails.