We build. You grow.

Get best community software here

Start a social network, a fan-site, an education project with oxwall - free opensource community software

Need Help With Profile [Solution Available] | Forum

John
John May 2 '14
The About Me widget in Oxwall is appalling. I've asked for advice on this and I've been told "That's the way it is!"

I'm not a programmer and I can't figure out how to make the thing half decent.

The box completely strips every trace of HTML as can be seen from the following screen shots

In edit mode you can put in paragraph breaks but nothing else:

But when the user views your profile, all they see is this garbled mess:


I'd just be happy to have paragraph breaks. Can anyone help me do this?

Regards

John



The Forum post is edited by Alia May 6 '14
Alia Team
Alia May 6 '14
One way around this is editing ow_system_plugins/base/components/about_me_widget.php

Original code:

            $this->assign('ownerMode', false);
            $content = htmlspecialchars($content);
            $content = UTIL_HtmlTag::autoLink($content);
            $this->assign('contentText', $content);


Custom code:

            $this->assign('ownerMode', false);
            $content = htmlspecialchars($content);
            $content = UTIL_HtmlTag::autoLink($content);
            $content = nl2br($content);
            $this->assign('contentText', $content);


----------------------------------------------------------------------------------------------
About nl2br:

"(PHP 4, PHP 5)

nl2brInserts HTML line breaks before all newlines in a string".

More info: http://docs.php.net/manual/en/function.nl2br.php


NOTE: all custom code modifications will be erased if you update the software in future. Keep track of what and where you are editing, so that you can apply the changes after update again.


John
John May 6 '14
Hi Aliia,

Many thanks for your detailed solution to my previously vexing problem. Your code snippet worked perfectly and I can now use Oxwall for two projects I've been wanting to start.

Golly, gosh. it was just one line of code, but what a huge difference it has made to my site! I can't thank you enough, but please, get them to add it to the Core in 1.61. It will make a lot of silent people very happy!

Thanks also for the support information.

Very well done and 10/10.

John