This topic is locked

How to dynamically change Porject Logo with pictures stored in user table

6/19/2023 11:28:38 AM
PHPRunner General questions
J
jacktonghk authorDevClub member

I have project logo stored in my user table, after login, I would like the project logo be changed according to the user. I saw the Labels::setProjectLogo function, but how can it be down with image stored in database? Thanks.
Best regards,
Jack Tong

Sergey Kornilov admin 6/19/2023

It can be done but it will be much more complicated compared to storing images on the hard drive.
You can set 'View as' type of that image field to 'Image', see what kind of code PHPRunner generates to display it and then re-create the same kind of code in your own code in setProjectLogo() function call.

fhumanes 6/20/2023

Hello,
In this article I explain how the logo can be changed using a JavaScript that runs a PHP program that facilitates the information of the logo.
https://fhumanes.com/blog/guias-desarrollo/guia-40-instalar-desarrollo-phprunner-en-multiples-instancias-con-personalizacion/
It can be another alternative to the solution indicated by Sergey.
Greetings,
fernando

J
jacktonghk authorDevClub member 6/20/2023

Thank you both!!