Kryptronic Software Support Forum

You are viewing this forum as a guest. Login to an existing account, or create a new account, to reply to topics and to create new topics.

#1 01-26-2021 15:22:55

Graham
Member
Registered: 09-30-2004
Posts: 960
Website

Adding new line or line breaks in core.notfound system message

Currently if someone tries to go to a page that doesn't exist they get a message saying "The resource could not be found. Please use the menu to continue" (or words to that effect.

I've changed the message core.notfound to something more meaningful (see below), but I want to put a new line or line break in the text to make it more readable.

Sorry, but the item or page you are looking for cannot be found.  It may have been discontinued from our range and thus is no longer available.

Please use the menu to continue or contact us if you want more information.

I've tried using <br/>, but that doesn't work, so is there anything I can use instead?

Last edited by Graham (01-28-2021 06:57:50)

Offline

 

#2 01-27-2021 09:05:40

webmaster
Administrator
From: York, PA
Registered: 04-20-2001
Posts: 19643
Website

Re: Adding new line or line breaks in core.notfound system message

The software was built to support plain text, not HTML in those messages.  To change this, leave your <br /> tag in the message (note where the slash is supposed to be in the tag), then edit {private}/core/CORE/includes/systemmsg.php to support HTML.  In that file, change:

Code:

$msg       = $this->xhtml_encode($this->globals('core.print_message_string'));

To:

Code:

$msg = $this->globals('core.print_message_string');
if (!($this->has_tags($msg))) {$msg = $this->xhtml_encode($msg);}

Nick Hendler

Offline

 

#3 01-30-2021 19:27:38

Graham
Member
Registered: 09-30-2004
Posts: 960
Website

Re: Adding new line or line breaks in core.notfound system message

Thanks, that works fine.

Offline

 

Board footer