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

[Solution Available] How to remove user links from User Wall Widget in a Group for a specific user role? | Forum

Guna Apr 14 '15
I need to display group wall posts with no user link on avatar images in a group page.

How to do that?

In html, we have the below code.

  {decorator name='avatar_item' data=$comment.avatar}

I tried the below code

{decorator name='avatar_item' data=$comment.avatar|strip_tags}

to remove links from this. But this didn't work. Anybody know about it?

The Forum post is edited by Guna May 27 '15
dave Leader
dave Apr 14 '15
Hi can  you please share a screen shot of what you need to change so we are clear, thanks :)
Guna Apr 15 '15
Thanks for the quick reply dave

When you visit http://demo.oxwall.org/groups/2 to see the posts related to the group,

The post author's profile url will open when you click on author's avatar.

I am customizing this page. I do not want to show other user's url for a specific user role (Free user role). Free users can't interact with others.

If this is not understandable, please ask. 

If the image is not visible, find the attachment

The Forum post is edited by Guna Apr 15 '15
  Oxwall Group.jpg (652Kb)
Arie Apr 15 '15
what you can do is check the user roll with a if $user_role == '' { ... }{else}{ ... }
but maybe there is a function in Oxwall core that will do the trick also..

But i think you should do this in the newsfeed and not the group plugin based on your attachment.
Guna Apr 15 '15
Thanks Arie for the reply.

I tried to check as you said.

But for this customization, it didn't work.

In Group Newsfeed page template, to display avatar with user url, we have the below code.

In ow_system_plugins/base/components/comments_list.php, data regarding avatar image is showing below.

$userAvatarArrayList = empty($this->staticData['avatars']) ? $this->avatarService->getDataForUserAvatars($this->userIdList) : $this->staticData['avatars'];

The Forum post is edited by Guna Apr 15 '15
Daisy Team
Daisy Apr 27 '15

You need to add an exception for the user info data in /ow_plugins/newsfeed/components/feed_item.php file.

Find the getUserInfo function and add the following exception:

 if ( !OW::getUser()->isAuthorized("bla", "bla") )
            $user["url"] = null;
Guna May 25 '15
Thanks Daisy.

It works. Make this topic as solved.

ali Apr 11 '23
В Арт Академи в София, децата могат да се научат на различни техники за рисуване, керамика, крафт с полимерна глина и много други изкуствени дейности. През последните години, училището се е утвърдило като един от най-добрите центрове за изкуство за деца в София. Една от големите предимства на Арт Академи е, че децата не само могат да се забавляват, но и да учат много полезни умения като търпение, точност и творческо мислене. Децата могат да се развиват в своите умения и да изразят своята индивидуалност. В Арт Академи има и опитни учители, които ще насочат децата и ще им помогнат да развият своя талант. Всички материали и оборудване, необходими за изкуството, са на разположение в училището. Арт Академи
kalvindarwan Dec 21 '23
Our side window replacement experts will get the job done efficiently and professionally and make sure that you can drive again with intact and sturdier side windows. Rocklin Fence Company