Login Page - Message_Showing

This public forum is for user-to-user discussions of PHPMaker. Note that this is not support forum.
Post Reply
DGarza
User
Posts: 93

Login Page - Message_Showing

Post by DGarza »

Hi everyone,

I was testing the event Message_Showing, and I realized that when the message appears, it puts it with a small title that depending on the type of message is the title that appears, for example,

if it is type is "success" the title is success, if it is type "warning" the title is warning, etc.

My question is, can I change the title to the message that I want?


arbei
User
Posts: 9384

Post by arbei »

You may change the language phrases in your language files, e.g.

<phrase id="Success" value="Success"/>
<phrase id="Warning" value="Warning"/>

mobhar
User
Posts: 11726

Post by mobhar »

Or, alternatively, you may simply change it from Language_Load server event, for example:

$this->setPhrase("Success", "My Success Message");
$this->setPhrase("Warning", "My Warning Message");

DGarza
User
Posts: 93

Post by DGarza »

mobhar wrote:

Or, alternatively, you may simply change it from Language_Load server event, for example:

$this->setPhrase("Success", "My Success Message");
$this->setPhrase("Warning", "My Warning Message");

I understand, but if I use this event, it will change the message on all pages, right? I just want to change the title in the Login page.


DGarza
User
Posts: 93

Post by DGarza »

arbei wrote:

You may change the language phrases in your language files, e.g.

<phrase id="Success" value="Success"/>
<phrase id="Warning" value="Warning"/>

If I change the value, the title gonna change in all pages? I only want change the title message on Login page.

Actually if there is not a "easy way" to change it, I can change it with Jquery.


mobhar
User
Posts: 11726

Post by mobhar »

DGarza wrote:

I just want to change the title in the Login page.

Then simply put this code in Page_Load server event that belongs to the Login Page:

Language()->setPhrase("Success", "My Success Message");
Language()->setPhrase("Warning", "My Warning Message");

DGarza
User
Posts: 93

Post by DGarza »

mobhar wrote:

Then simply put this code in Page_Load server event that belongs to the Login Page:

Language()->setPhrase("Success", "My Success Message");
Language()->setPhrase("Warning", "My Warning Message");

Thank you very much, that's that I want it


Post Reply