This topic is locked

Change project logo after user login

8/10/2024 11:43:42 AM
PHPRunner General questions
J
jacktonghk authorDevClub member

I have a field in the user table which stores the file name of an image. I tried to use the 'After Application Initialized' event but this event is fired before user login. How can I modify project logo after user login? Thanks.

Jack Tong

D
druck281 8/12/2024

I haven't tested this but have you tried using the Labels API to set the logo based on the table value? I know you said the 'AfterAppInit' is fired before login but my thought would be to use the 'BeforeProcess' event on whatever you are using as your landing page to set the logo there. I am curious to see if the new logo would remain once you move to another page or if it would revert to the default.

https://xlinesoft.com/phprunner/docs/setprojectlogo.htm

If it's a small project, you could copy your code to the 'AfterTableInit' for each table but that is obviously not the ideal solution. That's the best I got for now unless someone else can chime in.

fhumanes 8/21/2024

Hello,

To change the logo to the applications I have used the JavaScript library "csi.js".

In this article I explain its use. https://fhumanes.com/blog/guias-desarrollo/guia-40-instalar-desarrollo-phprunner-en-multiples-instancias-con-personalizacion/

It is very simple and very powerful, so not yet being a standard PHPRunner routine, I think it can serve you,

Greetings,
fernando