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 Remove item from Chat UI | Forum

Kevin
Kevin Nov 15 '16
When clicking on the user icon in Chat that you would like to chat with, it displays their username and gender. Where in the code would I remove the reference to gender, so only username is displayed?

Thanks.
Attachments:
  IMG_0350.PNG (200Kb)
dave Leader
dave Nov 16 '16
Hi Kevin,  i found where the gender is loaded into the array which is later passed to js for that display.  However, this system php function appears to be used by more than one process and if you take it away here it will affect anything else that uses it.  Is that what you want to do?


Also understand that this is not permanent, every update you will need to make the change over again.


If this is what you want then go to 


ow_plugins/mailbox/bol/conversation_service_php  and go to line number 2791 you will see this code


      $qs[] = 'sex';


and just change it to (notice its not '' but ' ' there is a space in there)


      $qs[] = ' '; //was sex


and save your file, if your using cloudflare you will need to go into cloudflare and purge that file from the cache, then control f5 to refresh your page and then it will show only name.  


You may not have to do all that however, im still looking to see what onView is about and see if there is a admin flag option set for that.  So hold on a few min before you do anything.  





The Forum post is edited by dave Nov 16 '16
dave Leader
dave Nov 16 '16
OK found a new way, all you have to do is go into the admin->users->profile questions and edit the gender item and unselect the box "On Profile View"  and then save it and go back to the site side open up the chat and hit control f5 and it should now show just the name.  If not close the chat change pages then control f5, sometimes it take a min for the change to show up. 


That means that other users cannot see their gender from their profile OK...  and also that you dont have to edit any code. ;)


UPDATE: appears to be the checkmark for the on profile edit option not the view option in questions that does this. 

The Forum post is edited by dave Nov 16 '16
ross Team
ross Nov 16 '16
Topic was moved from General Questions.
Kevin
Kevin Nov 16 '16
Dave - thanks! I will go with the easy way of removing it from the profile questions.

Ross - thanks for moving topic. First question;)
Kevin
Kevin Nov 16 '16
I removed the Profile question. It correctly no longer asks on sign-up, when looking at a profile, or on the members page.

However I have two existing accounts in my admin and a test user. It still shows in Chat.

Looks like I may also need to make the code change. I will first do a test after adding a third test account to see if the issue is that the first two users still have a value in the database.
--------
Since the username is already shown in the Chat interface next to their icon, in my case the pop up window after clicking on the user icon in Chat (even with only username) is redundant. Would it be easier in code to somehow just return from the code utilized after a click on the icon- so nothing happens? If so do you know where that would be?
The Forum post is edited by Kevin Nov 16 '16
dave Leader
dave Nov 16 '16
it could be a cache issue, i found i had to do a hard fresh on the page and chat a few times to get it to show up.  Also you might try the checkmark  on edit too.  I thought it was profile but it might be on edit.  As i said i tried several dif ways and i finally got it to work so it might be one of the other. 
Kevin
Kevin Nov 16 '16
Ok will try several Chat after on edit.
dave Leader
dave Nov 16 '16
Also dont forget if your using cloudflare youll need to purge that cache too
Kevin
Kevin Nov 16 '16
Success! Turned off all options for the field using Edit.
Thanks
dave Leader
dave Nov 16 '16
ahh ok so it was the edit profile option... sorry about that... glad you got it working.. or not working in this case lol..  


your welcome