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

Jam
Jam Jan 3 '13
I already change the status message- now i want to make it more customize by adding username at the end of the status message- see attached below- please help me
Attachments:
  status update.jpg (17.81Kb)
Alia Team
Alia Jan 3 '13
Jam, this is custom code modification. Unfortunately I can not help you with this. May be other forum members will have an answer.
Jam
Jam Jan 4 '13
am okay thanks- wish someone will help me here
Alia Team
Alia Jan 8 '13
Topic was moved from General Questions.
Nirmalya Ghosh
Nirmalya Ghosh Jan 8 '13
Can't this be edited in the languages?

I mean can this be done by adding {$username} after "Can you share something...".

I don't exactly know what to add. Maybe "{$username}" or "{$User Name}" or something else but I couldn't exactly get it to work.

Any help on this?


Jam
Jam Jan 8 '13
we have same problem Nirmalya- wish someone will help us- i have tried to put {$username} it  doesn't work at all

Purusothaman Ramanujam
Putting {$username} in the language strings requires corresponding changes in php files too.

As suggested by Paul, change the code directly, by getting the username of the user.
Nirmalya Ghosh
Nirmalya Ghosh Jan 8 '13
Can anybody please tell us in details which php files do we need to modify and how?

If not in details, then a little bit info will also do!

Michael I.
Michael I. Jan 9 '13
Where exactly you want to have usernames to be displayed? I need more details to guide you in a right way. But Paul and Purusothaman have already given you a correct answer.
Jam
Jam Jan 9 '13
i want to put user name after status message sir Michael I.
Nirmalya Ghosh
Nirmalya Ghosh Jan 9 '13
Like this one "What have you to say, Micheal?"

In the newsfeed share status.

Jam
Jam Jan 9 '13
yope that's what i want too Michael I- wish you can help me
Michael I.
Michael I. Jan 10 '13
You can do this in /ow_plugins/newsfeed/components/UpdateStatus.php
Jam
Jam Jan 10 '13
okay thanks Michael I- can you tell me what particular field or the code to edit? what code we need to add so that we can get it work---
Purusothaman Ramanujam

Quote from Michael I. 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}?

The Forum post is edited by Purusothaman Ramanujam Jan 11 '13
Jam
Jam Jan 11 '13
thanks a lot Purusothaman- i will try to change- hope it will work well thanks and Keep Up!...
Purusothaman Ramanujam
Let me know how it goes..
Jam
Jam Jan 12 '13
now it workins sir- thanks a lot Purusothaman- can you help me on my site slow uploading page- and even do a comment can't work
Dean L
Dean L Feb 10 '13
I'm using this on my site too - Thanks for sharing the mod :-)
Purusothaman Ramanujam
Welcome mate.
Pages: 1 2 3 4 »
This topic is sticky