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

how to put username in Status | Forum

Joe Coon
Joe Coon Aug 21 '14
Hello, guys this was covered in the first part of this thread by Purusothaman Ramanujam.
You can do this in /ow_plugins/newsfeed/components/UpdateStatus.php

Just a correction.. Its update_status.php actually.

Change the below line 
$field->setInvitation( OW::getLanguage()->text('newsfeed', 'status_field_invintation') );

to

$userName = BOL_UserService::getInstance()->getDisplayName(OW::getUser()->getId());
$field->setInvitation( OW::getLanguage()->text('newsfeed', 'status_field_invintation',array('userName'=>$userName)) );

And then in your language page, change text for the keystatus_field_invintation.

What’s happening? to What’s happening {$userName}?

Now if this don't work try {$username} instead. It seems that is what I had to do and it now works for me.
Sprintally®
Sprintally® Aug 22 '14
bug in mobile version 
Patricia Zorrilla Leader
Patricia Zorrilla Aug 29 '14

If you have installed the plugin attachments

http://www.oxwall.org/store/item/246 ;

you have to make the same change in the file 

misite/ow_plugins/attachments/components/overwriten/newsfeed_status.php

on line 126

Tess Franklin
Tess Franklin Aug 30 '14
Thank You! I've been trying to figure out why this wasn't working for me...
That did the trick :)
Quote from Patricia Zorrilla Bcn

If you have installed the plugin attachments

http://www.oxwall.org/store/item/246 ;

you have to make the same change in the file 

misite/ow_plugins/attachments/components/overwriten/newsfeed_status.php

on line 126


Karargaht
Karargaht Sep 13 '14

Quote from Edward Azahar bug in mobile version 
same, the mobile has a problem.
James
James Nov 2 '14
Works great on my site. Only problem I have is after I did it I found out I was not allowing people to post to our newsfeed. Only to there Wall.. Opps but does work great. Thank you Purusothaman Ramanujam
Rahul Bhatt
Rahul Bhatt Nov 11 '14
I want to display logged in user name in dashboard like welcome [Username]


How can I achieve this?

Kяuncн Leader
Kяuncн Dec 11 '14

Quote from Rahul Bhatt I want to display logged in user name in dashboard like welcome [Username]


How can I achieve this?


Quote Username in Oxwall Status Update Box
Harry
Harry Dec 18 '14
I've tried this and only recently got past the box showing anything other than the variable name of $username, but now all I can get is this ( and the language key actually DOES exist ).  See attached.
Attachments:
  newsfeed.png (15Kb)
Kяuncн Leader
Kяuncн Dec 18 '14

Quote from Harry I've tried this and only recently got past the box showing anything other than the variable name of $username, but now all I can get is this ( and the language key actually DOES exist ).  See attached.

Can't attach a .png image, please re-upload as a .jpg
Was your site on dev mode and did you clear the script cache?

Sample:

The Forum post is edited by Kяuncн Dec 18 '14
Bethel Goka
Bethel Goka Jan 1 '15
Hi Purusothaman and guys, i've tried all this: i edited the newsfeed.xml file in the langs zip folder and the update_status.php file but, no changes are showing on the website. I have dev mode enabled, any ideas? Thanks in advance
Harry
Harry Jan 2 '15
I erred in that I copied and pasted code rather than typing it in; so the single quotes around the $username were not recognized as such, so when I corrected that it all began to flow.  But, some of my sites still have issues and some are ok, so I'm satisfied that its them and not the code.
Daisy Team
Daisy Jan 22 '15
For Oxwall 1.7.2 please find the solution here: http://www.oxwall.org/forum/topic/16842?page=1#post-132185
James
James Apr 12 '15
When I do this I get the PHP error saying "Parse error: syntax error, unexpected '>' in /srv/disk3/**************/oxwall/ow_plugins/newsfeed/components/update_status.php on line 202"
The Forum post is edited by James Apr 12 '15
dave Leader
dave Apr 12 '15
James that means you have an error in your code.  Please post your code you added and let me look at it, thanks 
James
James Apr 12 '15
Hm, never mind. I seemed to have just typed it in wrong.
Darryl B Leader
Darryl B Jun 4 '15

Quote from Joe Coon Hello, guys this was covered in the first part of this thread by Purusothaman Ramanujam.
You can do this in /ow_plugins/newsfeed/components/UpdateStatus.php

Just a correction.. Its update_status.php actually.

Change the below line 
$field->setInvitation( OW::getLanguage()->text('newsfeed', 'status_field_invintation') );

to

$userName = BOL_UserService::getInstance()->getDisplayName(OW::getUser()->getId());
$field->setInvitation( OW::getLanguage()->text('newsfeed', 'status_field_invintation',array('userName'=>$userName)) );

And then in your language page, change text for the keystatus_field_invintation.

What’s happening? to What’s happening {$userName}?

Now if this don't work try {$username} instead. It seems that is what I had to do and it now works for me.

Works in 1.7.4. Since it shows in the newsfeed on the main page, and the profile page; I changed the language key from What’s happening? to Hey {$userName} Share something with us.
To make it easy to find the line of code to change; use "ctrl F" to open a find box, paste the line of code you want to search for, and click on "find next". It will take you straight to it no matter what line it was moved to.



dave Leader
dave Jun 9 '15
Joe, first you need to start a new topic please, as this has nothing to do with the topic at hand.  :)


Then you need to go to pages in admin and at the bottom of the appropriate page, for example profile page there is a check box that says allow users to edit this page, uncheck that box and i should take that bar away from users view. 


Again please start a new topic rather than post on a topic that has no reference.  thanks

joe rovito
joe rovito Jun 10 '15
ya no box for that page


Carlos Pires Corrente
Hi! When it changes to mobile it shows "What’s happening {$userName}?" exactly like that with no user name...
Pages: « 1 2 3 4 »
This topic is sticky