|
|
Forum moderator: bigblog |
uCoz Community General Information First Steps with uCoz Informers - How to change $MESSAGE$ length? (How can I change the $MESSAGE$'s code output length?) |
Informers - How to change $MESSAGE$ length? |
Hello uCoz Community!
I can't seem to figure this out. I want to change the $MESSAGE$'s code max-length. You can do that with the title in the advanced settings for the informer, but there doesn't appear to be any way to change the message's length. I currently fixed it with CSS, but I would want the normal way (if there is a way). (So it also displays ... at the end of it etc.) Post edited by nitroretroofficial - Wednesday, 2016-05-18, 10:57 PM
|
This might help you. It limits 150 characters of $MESSAGE$ length:
Code <?if(len($MESSAGE$)>150)?><?substr($MESSAGE$,0,150)?> <?else?>$MESSAGE$<?endif?> Replace 150 with the number of characters you need for the text. The code truncates the text if there are more than 150 characters, otherwise leaves it as it is. Post edited by khen - Thursday, 2016-05-19, 4:36 AM
|
Thanks khen! It's better than the CSS solution.
|
nitroretroofficial, khen, is correct. The best option is to use the substring function.
Assuming this problem is solved I'm going to lock this thread. Jack of all trades in development, design, strategy.
Working as a Support Engineer. Been here for 13 years and counting. |
| |||
| |||