Forums: default profile picture phprunner 9.8 - Forums

Jump to content

Page 1 of 1
  • You cannot start a new topic
  • This topic is locked

default profile picture phprunner 9.8 default profile picture Rate Topic: -----

#1 User is offline   kouba 

  • Member
  • PipPip
  • Group: Members
  • Posts: 11
  • Joined: 27-March 18

Posted 19 July 2018 - 09:07 PM

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
0

#2 User is offline   John 

  • Advanced Member
  • PipPipPip
  • Group: Members
  • Posts: 538
  • Joined: 02-December 05

Posted 21 July 2018 - 12:09 AM

View Postkouba, on 19 July 2018 - 05:07 PM, said:

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.
0

Page 1 of 1
  • You cannot start a new topic
  • This topic is locked