Profile Notes

Hello all,

Just wondered if there is a mod or anything that would allow members to make notes on another members profile that only the member making the note can see.

Examples: Note: Met this person in St Louis,
                            This person was rude
                            This Guy is Awesome!

Just little notes that help a person remember another without the other person being able to see what is been said.

I use this note system an a lot of other social sites like mine and find it extremely helpful.

Any help would be awesome.

Mel

Quote · 17 May 2013

i have a similar issue. Basically, i created a form which has the open field for entering the notes, and is only visible to the person who wrote them - see image below.

Only drawback is that the person who the profile belongs to can also see the empty block - albeit not the info that was posted. But they could use the same field to keep any personal notes for whatever that they want to keep.

persnotes.png · 47.4K · 164 views
caredesign.net
Quote · 17 May 2013

A touch confused here, but I think this would work fine if I follow you right.

basicly, all profiles would have a small blank window on their profiles called "personal notes". when Member A looks at Member B's profile, they will see this empty box.

Member A can add a note into that box and save it, and Member B nor any other member can see that note accept Member A.

Then when Member B Looks at his own profile, he can add notes about himself or what ever he likes, and only he can see those notes.

If this is correct, This is exactly what I want.

Can you help me set this up?

Mel

Quote · 17 May 2013

 

i have a similar issue. Basically, i created a form which has the open field for entering the notes, and is only visible to the person who wrote them - see image below.

Only drawback is that the person who the profile belongs to can also see the empty block - albeit not the info that was posted. But they could use the same field to keep any personal notes for whatever that they want to keep.

Is this something you can share?  Perhaps we can add the bit that will check to see if the profile owner is viewing the page and if so, don't show the block.

Geeks, making the world a better place
Quote · 17 May 2013

This can be achieved with the Global Notes mod. Apart from Profiles, it also allows leaving Notes in other sections such as Events etc.

Hello all,

Just wondered if there is a mod or anything that would allow members to make notes on another members profile that only the member making the note can see.

Examples: Note: Met this person in St Louis,
                            This person was rude
                            This Guy is Awesome!

Just little notes that help a person remember another without the other person being able to see what is been said.

I use this note system an a lot of other social sites like mine and find it extremely helpful.

Any help would be awesome.

Mel

 

Paypal email is jeromemingo@gmail.com - http://www.boonex.com/market/posts/modzzz
Quote · 17 May 2013

Global notes does too much for me and opens a lot of doors for member I don't want opened.

Quote · 17 May 2013

@ - exactly

@GG - here is the code I am using, but your thoughts on making the block only show if the person viewing the profile is not the actual owner would be great. In my usage, I have it setup dependent on membership levels. Only staff level members can view the block, where client members can not. And the staff members can only see their own notes, not the notes of another staff member.

 

  $client = $_GET['ID'];
    $input_by = $_COOKIE['memberID'];
   
  // Perform an statndard SQL query:
$rNote = mysql_query("SELECT * FROM personal_notes WHERE client_id = '$client' AND input_by = '$input_by' ORDER BY note_id DESC LIMIT 1");
// We are going to use the "$row" method for this query. This is just my preference.
while ($row = mysql_fetch_array($rNote)) {
    $pNote = $row["note"];
    }

$aForm = array(
            'form_attrs' => array(
                'name'     => 'form_notes',
                'method'   => 'post',
            ),

            'params' => array (
              
                      'db' => array(
                    'table' => 'personal_notes', // table name
                    'key' => 'notes_id', // key field name
                    'uri' => '', // uri field name
                    'uri_title' => '', // title field to generate uri from
                    'submit_name' => 'submit_notes_form', // some filed name with non empty value to determine if the for was submitted,
                                                       // in most cases it is submit button name
                ),
                'csrf' => array(
                      'disable' => true, //if it wasn't set or has some other value then CSRF checking is enabled for current form, take a look at sys_security_form_token_enable to disable CSRF checking completely.
                )
              ),
'inputs' => array (
        'header1' => array(
            'type' => 'hidden',
        ),
        'Client' => array(
            'type' => 'hidden',
            'name' => 'client_id',
            'value' => $client,
                      'db' => array (
                        'pass' => 'Xss', 
                    ),
        ),
        'Note' => array(
            'type' => 'text',
            'name' => 'note',
            'caption' => _t("_Notes"),
                      'db' => array (
                        'pass' => 'Xss', 
                    ),
        ),
                'header1_end' => array(
                    'type' => 'block_end'
                ),
        'submit_send' => array(
            'type' => 'submit',
            'name' => 'submit_notes_form',
            'value' => _t("Update Personal Note"),
        ),
    )
);

        $oForm = new BxTemplFormView ($aForm);
        $oForm->initChecker();

        if ($oForm->isSubmittedAndValid ()) {

            // add additional vars to database, in this case creation date field is added
            $aValsAdd = array (
            'input_by' => $_COOKIE['memberID'],
            );
if ($oForm->insert ($aValsAdd)) {
              
$sStatusText = '_Save Note successful';
            }
        }
                if($sStatusText)
            $sStatusText = MsgBox(_t($sStatusText), 3);

        return array($sStatusText . $oForm->getCode(), array(), array(), false);

caredesign.net
Quote · 17 May 2013

So this doesn't work like I said above right?

 

Quote · 17 May 2013

it would be exactly as you said,

caredesign.net
Quote · 17 May 2013

would you be willing to help me install these changes then, I'm extremely confused at the moment.

Quote · 17 May 2013

 

but your thoughts on making the block only show if the person viewing the profile is not the actual owner would be great.

 If this is a php block than that would be simple. One trick to keep in mind. PHP blocks do not show up if no content is returned. So if you want the block to not be displayed if the owner is viewing their own profile then right after this.

  $client = $_GET['ID'];
    $input_by = $_COOKIE['memberID'];

You add this.

If($client == $input_by) return;

So basically if the profile being viewed is the same member as the member thats logged in. IE: Owner viewing own profile.

Then you return nothing which prevents the PHP block from showing up.


https://www.deanbassett.com
Quote · 17 May 2013

again deanos - you are a genius.

caredesign.net
Quote · 17 May 2013

I have been out in the gardens working and took a break to come in.  So the answer has already been given; great.

Geeks, making the world a better place
Quote · 17 May 2013

@deanos - one small issue I ran into, and do not know why. First off, my code is based on a new php page so my variables are set a certain way in which the username the user ID and the client_id are all the same thing. So I created a php block on the profiles page to try it out for future reference.

What I did notice, using your additional code in a php block on the profile page, i ran into a problem. In the URL it shows as mydomain.com/myusername. Something is going on with the ID number. So doing the check doesnt work because the ID of the user viewing the profile is always a number, but the Id in the url - is wording, not numerical.

So I looked at the profiles,php page and saw the variables eing used there, and even duplicating the same variables did not work. I got a blank for the id of the profile being viewed.

Example. profile.php has these variables

$profileID = getID( $_GET['ID'] );
$memberID = getLoggedId();

so i used those variables $profileID and $memberID) instead of my own and instead of the user ID I got nothing - but it should be taking the Username and getting the ID number based on that.

THis test was done on 7.0.9

caredesign.net
Quote · 17 May 2013

I did not notice your code was wrong when i looked at it. So let me explain.

This in a php block will work if and only if the php block in on the profile page.

$profileID = getID( $_GET['ID'] );
$memberID = getLoggedId();
echo $profileID . '<br>';
echo $memberID . '<br>';

$profileID will contain the ID of the member whos profile is being viewed.
$memberID will contain the logged in members ID.

The fact that a name is passed on the url does not matter. Dolphin takes care of that.

I just tested this code in a php block on my test sites and it works perfectly. I have used this in the past as well and never had a problem.

https://www.deanbassett.com
Quote · 17 May 2013
 
 
Below is the legacy version of the Boonex site, maintained for Dolphin.Pro 7.x support.
The new Dolphin solution is powered by UNA Community Management System.