My long quest to remove sex and age from Dolphin continues. This time, I would like to remove it from messages. When you send or reply to a message, there is a little box with the member's thumbnail pic - which is nice, but next to it are the fields "nickname", "sex", "age" and "from" (city). I would like to keep the last one (city) but change the others to fields I have defined. Is this possible?
-
Rob
|
Sorry about the bump, but someone must know this. What file is that message header in? Can it be changed through templates?
-
Rob
|
Yes I also would be interested in removing sex from field. |
messages_inbox.php and messages_outbox.php
$ret .= ProfileDetails( $senderID );
to:
// $ret .= ProfileDetails( $senderID );
this removes it. theres alot to go thru to change the whole thing sorry I do not have time.
I have video tutorials to help you mrpowless.com |
No prob Darren and quick fix will do for the interim.
-
Thanks.
-
Lorren
-
messages_inbox.php and messages_outbox.php
$ret .= ProfileDetails( $senderID );
to:
// $ret .= ProfileDetails( $senderID );
this removes it. theres alot to go thru to change the whole thing sorry I do not have time.
|
I did this. Let me poke around and see how. I commented out a few lines and left the city in. Standby unless someone beats me to it. |
Yeah I just looked for a few seconds...heh I will post if he doesnt cause I have to do this soon. I have video tutorials to help you mrpowless.com |
Hi Ted,
-
What I think you are referring to is the "chat", which would require that we have the ability to edit flash. I do not have this capability.
-
We were talking about PMs.
-
But thanks for the input...
-
Lorren
-
are you talking on the instant messages?
I know how to remove the age and gender there. I've done it myself: just alter the skins to match the background (#f5f5f5) .
click here to download the .FLAs for the skins.
Sorry if I've misunderstood the issue, though.
T
|
Please do post....
-
I did this. Let me poke around and see how. I commented out a few lines and left the city in. Standby unless someone beats me to it.
|
Thanks Mrpowless, I will try that. The size is set up for 4 fields though, so I am not sure how it will look. A way to add fields we have defined would be great - in my case these will likely be "title" and "organization".
-
Rob
-
p.s. Ted - great suggestion! Getting it out of chat was the next thing I was going to tackle. I should complile my notes on removing sex and age from 6.1.4 now, because I think I am almost there.
|
Apologies, had to run some paperwork up to my son's school and just got back. Now this may be a broader stroke than what you want to take out for Age and Sex but it works for what I'm doing. It's easy to test, just add some rem statements around a couple of lines. I've made a bunch of little tweaks here and there and didn't document them great - so I'm starting to forget what impacts what. Try this...
Go to /inc/profiles.inc.php... and rem out the following lines like I did below and then refresh any pages that had the sex and age displaying. Should be gone. I've gone through about every page to see if it broke anything but it looks like no dependencies on these variables other than displaying them on a page.
/*
$ret .= '<div class="li_word">'._t('_Sex').':</div><div class="li_value">' . $prof_sex . '</div>';
$ret .= '<div class="li_word">'._t('_DateOfBirth').':</div><div class="li_value">' . $prof_age . '</div>';
*/
|
GoAndKnow,
Could you clarify - this will remove age and sex from every page? What about the join form? Remember, Dolphin requires DOB or it doesn't consider that the members even exist. How is this technique different/better than what Mrpowless suggested? What does it look like on the private message form? Is there just a blank area where the age and sex were? Thanks
-
Rob
|
Right, we are both doing something similiar but on different levels. If you go to the profiles page and comment them out it has a wider reach than on a specific page. From what I understand Mr. Powless is a great resource so it might be good to follow his suggestion. I'm an old programmer from the 80's trying to figure out PHP. I understand logic but not syntax, but I'm learning.
It appears that my comment placement only affects the field display. I still have the dob field in the join form so Dolphin can do it's majic in the background.
I posted this on my blog just a few minutes ago so I could include a screenshot too. If you get a chance go out to my blog and take a peek and see what it looks like.
|
It looks ok. Had I known about your "broadstroke" technique I might have started with it. Still would love to get other fields in there, using some variant of the mrpowless technique if anyone wants to take a shot at it.
-
Rob
|
Hey GoAndKnow,
-
Will this work for "Presence" ?
-
Lorren
|
I think the My Presence uses a different call function and I've not looked at that yet. But I really don't care for it on my site so will take a look at how to remove it. It's probably something simple, just tracking it down may take a bit of time. I'm still getting familiar with what is where. If I remember right, I saw some mod on expertzzz that integrates My Presence into a site as a block. If that's the case, you could elect to show or hide the block through your admin panel. Meanwhile, I'll take a look at how to just hide it or if anyone else reading this knows already, please share?
|
But you need to be able to edit Flash...? Ugh.
-
~L
-
Presence is Flash, no?
So my solution (which is, obviously, a cheat) would probably work.
Just change the font of the age and gender to match the background in the skins.
T
|
messages_inbox.php and messages_outbox.php
$ret .= ProfileDetails( $senderID );
to:
// $ret .= ProfileDetails( $senderID );
this removes it. theres alot to go thru to change the whole thing sorry I do not have time.
Darren (aka Mrpowless),
This seemed to have no effect at all. I still have age and sex above the message when I compose a message. Did I do something wrong, or did you misunderstand?
-
Rob
|
Hello there...Im running 6.1.2 and in my members mail box....it doesnt show sex and age....just small pic and nick name....
Check templates/temp_uni/mail_box.html and see if your sex and age are placed there, then just remove it...I hope it helps...
|
No, I don't see it there, but thanks for trying.
Rob
|
Cal Cal, Lets remove the box completely, if you want.....
by commenting //
this line in messages_inbox.php
function PageCompPageMainCode
look for:
$ret .= ProfileDetails( $senderID );
comment it or put out two forward slashes in front of it. //
so it looks like:
// $ret .= ProfileDetails( $senderID );
If its still there you did it wrong. Or your cache is hanging on to it.
Goandknow has it rigt for that spot too by commenting two lines by
/* code */
Its easy to just tell you exactly what to do. But every mod and all other instructions will simply have what I wrote in the beginning. And that format is as follows:
open file
in function ...
find:
Line
change to:
edited line
I hope this clears it up for ya
have fun
I have video tutorials to help you mrpowless.com |
Hi Rob
Open file inc/profiles.inc.php
Find function ProfileDetails( $senderID )
and edit code inside this function to what you will have there
------------------
Will change everything inside the info box on
- Inbox
- Outbox
- Compose and send a message
Ottar.
|
Darren, Ottar - thank you so much - you guys are great. I think I will probably just get rid of it completely, but do you know if there is a way to put fields we have defined in there- or is that to messy? I have fields "full_name". "organization", and "title" - is that possible? Either way, I appreciate your help.
-
Rob
|
It's possible and it very easy to do.
Do you have language strengs on "full_name", "organization" and "title"
Ottar
|
You can try this code:
(No language streng here on full_name" and "organization")
(If you have, change '._t('Full Name').' to '._t('_FullName').' and '._t('Organization').' to '._t('_Organization').'
function ProfileDetails( $senderID ) { global $site; global $aPreValues; global $dir;
$prof_arr = getProfileInfo( $senderID ); $prof_organization = _t( "" . $prof_arr['Organization']); $prof_title = _t( "" . $prof_arr['Title']);
$country = _t( $aPreValues['Country'][$prof_arr['Country']]['LKey'] ); if( isset( $prof_arr['City'] ) and !empty( $prof_arr['City'] ) ) $country .= ", {$prof_arr['City']}"; if ( $prof_arr['Status'] == 'Active' ) { $nick_link = '<a href="' . getProfileLink($senderID) . '" target="_blank">' . $prof_arr['FullName'] . '</a>'; } else { $nick_link = $prof_arr['NickName']; } $ret .= '<div class="prof_details_wrapper">'; $ret .= '<div class="clear_both"></div>'; $ret .= get_member_thumbnail( $senderID, 'left' ); $ret .= '<div class="prof_ditails_block">'; $ret .= '<div class="li_word">'._t('Full Name').':</div><div class="li_value">' . $nick_link . '</div>'; $ret .= '<div class="li_word">'._t('Organization').':</div><div class="li_value">' . $prof_organization .'</div>'; $ret .= '<div class="li_word">'._t('_Title').':</div><div class="li_value">' . $prof_title . '</div>'; $ret .= '<div class="li_word">'._t('_From').':</div><div class="li_value"> ' . $country . '</div>'; $ret .= '</div>'; $ret .= '<div class="clear_both"></div>'; $ret .= '</div>';
return $ret; }
|
Ottar, I have defined fields "full_name", "Organization", and "JTITLE". (I did not use "title" as I implied in the message, because it seemed to be a reserved system name). I'd love to have this if you know how.
-
Rob
-
p.s. Didn't see your post before I replied - I will give this a shot.. Thanks again for your help Ottar.
|
Open cache file on a user and check spelling there to be sure:
$aUser[1]['MaritalStatus']
$aUser[1]['FullName']
What is correct name to this fields!!
|
Hi Ottar,
The name is "full_name" as I said before, amd "Marital_Status" - but why does that last one matter? It was just something I was playing around with - since it is so hard to get rid of social information (like age and sex) I was experimenting with putting some in there, but making it optional.
-
Rob
-
p.s. Didn't see your post before I responded. I will give this a shot. Thanks again for your help Ottar.
|
New code with your fields name:
function ProfileDetails( $senderID ) { global $site; global $aPreValues; global $dir;
$prof_arr = getProfileInfo( $senderID ); $prof_organization = _t( "" . $prof_arr['Organization']); $prof_jtitle = _t( "" . $prof_arr['JTITLE']);
$country = _t( $aPreValues['Country'][$prof_arr['Country']]['LKey'] ); if( isset( $prof_arr['City'] ) and !empty( $prof_arr['City'] ) ) $country .= ", {$prof_arr['City']}"; if ( $prof_arr['Status'] == 'Active' ) { $nick_link = '<a href="' . getProfileLink($senderID) . '" target="_blank">' . $prof_arr['full_name'] . '</a>'; } else { $nick_link = $prof_arr['NickName']; } $ret .= '<div class="prof_details_wrapper">'; $ret .= '<div class="clear_both"></div>'; $ret .= get_member_thumbnail( $senderID, 'left' ); $ret .= '<div class="prof_ditails_block">'; $ret .= '<div class="li_word">'._t('Full Name').':</div><div class="li_value">' . $nick_link . '</div>'; $ret .= '<div class="li_word">'._t('Organization').':</div><div class="li_value">' . $prof_organization .'</div>'; $ret .= '<div class="li_word">'._t('Title').':</div><div class="li_value">' . $prof_jtitle . '</div>'; $ret .= '<div class="li_word">'._t('_From').':</div><div class="li_value"> ' . $country . '</div>'; $ret .= '</div>'; $ret .= '<div class="clear_both"></div>'; $ret .= '</div>';
return $ret; }
|
FANTASTIC Ottar, this worked like a charm! Thanks so much for your help.
-
Rob
|
CALTRADE pointed me here from another thread. Thanks to okweb and others for sharing their code improvements. Very much appreciated.
Arthur
|
I couldn't believe it when I saw this thread. I have spent hours and hours removing sex from all sorts of individual places only to see this broad method. I cant even find those two lines of code or even simillar lines in inc/profiles.inc.php. I even searched the document for "sex" and studied all the lines and could not see anf function that even looked simillar. I don't know PHP really but mine is definately quite different. I have 6.1.4 add free. any answers? |