Select Privacy Level Defaults To Public IMO Flaw

I have been examining the privacy files on Dolphin.  Dolphin has a design flaw in my opinion; privacy set as public by default in the select box; members hit submit without changing and bam, photos on the home page that shouldn't be there.

I see that it creates the select options from the privacy groups, including the ones the members create.  If just adding the first select option as a null value with the title "You Must Select A Privacy Setting" or some such text; and not have it defaulting to public.  If nothing else it should default to "me only"; however, then you have members complaining that no one can see their photos.  No, it should be forced to be selected; this makes the members responsible for selecting a privacy setting and keeps photos that should not be on the home page off the home page.  And if they do show up, then I can sanction the member.

So, anyone played with this yet?

Geeks, making the world a better place
Quote · 29 Jan 2013

You should make a formal complaint

My opinions expressed on this site, in no way represent those of Boonex or Boonex employees.
Quote · 29 Jan 2013

Whoa, let's not get carried away here.. 2 formal complaints in 24 hours and the Kazakhstan better business bureau will launch a full scale investigation! 

 

On a serious note, I thought your suggestion about making the default a null value sounded easy enough but after an hour I gave up looking. 

BoonEx Certified Host: Zarconia.net - Fully Supported Shared and Dedicated for Dolphin
Quote · 29 Jan 2013

 

You should make a formal complaint

 Are you going to dust off your formal? ;-)

Geeks, making the world a better place
Quote · 29 Jan 2013

The title of a forum post, as you know, only allows a certain amount of characters; so I could not enter Design Flaw; however, I figure readers would understand what type of flaw after reading the contents of the post.  I try to enter a title that illustrates the contents of the post.  It is a design flaw for the reason I stated; I had to remove the public photos block from the home page because images that should not be public were showing up.  It is not that the members are being malicious; the default privacy setting is pubic and they over look changing it and just hit the submit button.

The code is not flawed, Boonex just did not think about the situation I outlined.  I studied the code and I see how they merge the different arrays for privacy groups.  What I did not find was the location of the default privacy group; Of course I was getting tired last night.  I looked in the database but may have overlooked it if they are stored there.  From what I understood, the default privacy group is the first one to be pulled and included in the select form.  If nothing else, if I could add a null privacy to the top of the list, that might solve my problem if the code rejects a null privacy setting.

I was hoping that others who have worked more with the privacy settings might could speed things up.  Not asking for a fish; however, a rod and reel would be nice Smile

Geeks, making the world a better place
Quote · 29 Jan 2013

For my social site that entails a wide range of cultures and society from which my members belong; this is a very serious problem and I am sure the solution is easy once I have the understanding of how all this works.

Now, I noticed that the first selection in my drop down is "Me Only" (I have all the privacy groups selected in the backend).  Yet, the default is Public.  So, one thing is to change the default privacy group that appears in the select field.  More ideal is to have a "NULL" privacy group with that group set to the default selections.

Now, I have yet to find how all this is set up in Dolphin.  I see a privacy_defaults table in the database but on my test site is is empty, contains no rows.  So that table must get populated otherwise.

What does these two entries under privacy in the backend mean and what do they control because I saw no change in the select drop down?

Enable 'Default Values':

Enable 'Default' group:

Geeks, making the world a better place
Quote · 29 Jan 2013

Shake a stick in the rain, this is important.  I don't mind my members uploading boobies but I don't want them on the home page!

Geeks, making the world a better place
Quote · 29 Jan 2013

If I brought a premium license, does that grant me access to the developers "How the bleeding heck did you do this bloody privacy selection thing?"

Geeks, making the world a better place
Quote · 30 Jan 2013

can you change something in inc/classes/BxDolPrivacy.phpdefine('BX_DOL_PG_DEFAULT', '1');define('BX_DOL_PG_NOBODY', '2');define('BX_DOL_PG_ALL', '3');define('BX_DOL_PG_MEMBERS', '4');define('BX_DOL_PG_FRIENDS', '5');define('BX_DOL_PG_FAVES', '6');define('BX_DOL_PG_CONTACTS', '7');define('BX_DOL_PG_HIDDEN', '8');

ManOfTeal.COM a Proud UNA site, six years running strong!
Quote · 30 Jan 2013

 like make this define('BX_DOL_PG_ALL', '3'); last in list?

ManOfTeal.COM a Proud UNA site, six years running strong!
Quote · 30 Jan 2013

What I want to do is to define a NULL group; I don't want a group set as a default.  Let's say I set "me only" as the default.  Then people will forget to change it if they want the photo to be for "friends" and then will be complaining how their friends can not see their photo.  Believe me, I have worked on social sites enough to know how people are.  So how I can I not have any group selected?  If I was hand coding the html, I would simply do

<option value="">Please Select A Privacy Group</option>

Of course if the person hits submit, it needs to put up the red flag.

Geeks, making the world a better place
Quote · 30 Jan 2013

I added this:

 

         array_unshift ($aValues, _t('Please select a group'));

 

To BxDolPrivacy.php and I thought I had hit it but there are two problems.. even though it's first on the list I can't figure out how to get Dolphin to display it automatically instead of the default (public). The second problem is it works great when you go to create an album, if you don't select one of the other options you get the little red circle.. that's great BUT if you click "Upload" and create an album as part of the upload process it lets you pick "Please select a group" as the privacy setting and then that album seems to be stuck in limbo. If you want to play around with it I stuck it under this line:

 

        $aValues = array_merge($aValues, $aDynamicGroups);

BoonEx Certified Host: Zarconia.net - Fully Supported Shared and Dedicated for Dolphin
Quote · 30 Jan 2013

Thanks, I appreciate the effort.

Geeks, making the world a better place
Quote · 30 Jan 2013

When I chose upload, it let me create the album and evidently set the viewing level to public since the photo showed up on the home page in the public photos block.

 

Edit: When I go to edit the album, it shows "Please select a group" as the current setting.

Geeks, making the world a better place
Quote · 30 Jan 2013

HTML for preselected option:

<option value="thisone" selected>This One</option>

In XHTML, attribute minimization is forbidden, and the selected attribute must be defined as <option selected="selected">.

Geeks, making the world a better place
Quote · 30 Jan 2013

 What is wrong with boobies?  You have seen the privacy settings in the account section yes?  And the defaults? 

Shake a stick in the rain, this is important.  I don't mind my members uploading boobies but I don't want them on the home page!

 

Csampson
Quote · 30 Jan 2013

Page code shows this:

<div class="input_wrapper input_wrapper_select " ><select class="form_input_select bx-def-font" name="AllowAlbumView"><option value="0" >Please select a group</option> 
<option value="2" >Me Only</option>
<option value="3" selected="selected">Public</option>
<option value="4" >Members</option>
<option value="5" >Friends</option>
<option value="6" >Faves</option>
<option value="7" >Contacts</option></select></div>
Geeks, making the world a better place
Quote · 30 Jan 2013

 

 What is wrong with boobies?  You have seen the privacy settings in the account section yes?  And the defaults? 

Shake a stick in the rain, this is important.  I don't mind my members uploading boobies but I don't want them on the home page!

 

There is nothing wrong with boobies; but grandma might not appreciate seeing them on the home page.  As I said, I don't mind the members uploading T&As, I just need to make sure they are not on the home page.

Geeks, making the world a better place
Quote · 30 Jan 2013

OK, progress.  That selected="selected" is hard coded in several places.  For the Photo Albums (and maybe other areas as I have not checked), it is in the template

/templates/scripts/BxBaseFormView.php

        // generate options
        $sCurValue = $aInput['value'];
        $sOptions = '';

        if (isset($aInput['values']) and is_array($aInput['values'])) {
            foreach ($aInput['values'] as $sValue => $sTitle) {
                if(is_array($sTitle)) {
                    $sValue = $sTitle['key'];
                    $sTitle = $sTitle['value'];
                }
                $sValueC = htmlspecialchars_adv($sValue);
                $sTitleC = htmlspecialchars_adv($sTitle);

                $sSelected = ((string)$sValue === (string)$sCurValue) ? 'selected="selected"' : '';

                $sOptions .= <<<BLAH
                   <option value="$sValueC" $sSelected>$sTitleC</option>
BLAH;

remove the selected="selected" and we are in business.  Of course I don't know about the upload thingy yet.

 

in design.inc.php we have this

/**
 * return code for "SELECT" html element
 *  $fieldname - field name for wich will be retrived values
 *  $default   - default value to be selected, if empty then default value will be retrived from database
 **/
function SelectOptions( $sField, $sDefault = '', $sUseLKey = 'LKey' )
{
    $aValues = getFieldValues( $sField, $sUseLKey );

    $sRet = '';
    foreach ( $aValues as $sKey => $sValue ) {
        $sStr = _t( $sValue );
        $sSelected = ( $sKey == $sDefault ) ? 'selected="selected"' : '';
        $sRet .= "<option value="$sKey" $sSelected>$sStr</option>n";
    }

    return $sRet;
}

Geeks, making the world a better place
Quote · 30 Jan 2013

On clicking on the Upload button, that form must not be doing a check; best guess I have without looking at code.

Geeks, making the world a better place
Quote · 30 Jan 2013

 

$sSelected = ((string)$sValue === (string)$sCurValue) ? 'selected="selected"' : '';

 Not exactly hard coded. Perhaps your not fully understanding what that does.

$sSelected will be assigned either selected="selected" or '' depending on the result of ((string)$sValue === (string)$sCurValue)

So perhaps $sValue or $sCurValue does not have the values expected so the results end up incorrect.

In anycase, it's not hard coded as you put it.


https://www.deanbassett.com
Quote · 30 Jan 2013

 That's what I was thinking too. So now we just need to find the check in the regular album creation and stick it in the upload process album creation too. Probably sounds easier that it is. 

 

On clicking on the Upload button, that form must not be doing a check; best guess I hav

e without looking at code.

 

BoonEx Certified Host: Zarconia.net - Fully Supported Shared and Dedicated for Dolphin
Quote · 30 Jan 2013

Dean, the problem is that Dolphin does not give us control over this.  In one script it is checking and if the value is null it pulls from the database.  However, basically the code is written so there is always a value selected; that is the nature of the options tag if you don't code in a null value.  So when a user hits submit what ever is the pre-selected value; and Boonex decided that should be public (think about this on a dating site where privacy is more of a concern), or whatever is first in the list is what is selected.  I deal with users and believe me, this is a real concern.

What it is doing is making sure that a value is preselected; if you don't have selected="selected" being added to the markup, then no value will be preselected; which is what I want.  As per the W3C specifications on the select tag:

<option value="thisone" selected>This One</option> In XHTML, attribute minimization is forbidden, and the selected attribute must be defined as <option selected="selected">

if you don't have a null value, then the first value in the options list is selected by default.  I want to force my members to be proactive and choose a privacy level at all times.  Yes, it might add a bit of a nuisance for my members to have to select each time; and it is only once for the album, not the photos uploaded to the album, but given the wide range of users I have, it has to be done.

Yes, I know what the code is doing, I am simply "breaking" the code a bit to keep a situation from occurring.  Dolphin is a great Social CMS but there are a lot of little things like this default to public privacy that does need to be changed.  The best way to know these things is to actually build a social network and deal with a thousand members or more on a daily basis; which is what I am doing. 

Geeks, making the world a better place
Quote · 30 Jan 2013

 

Kazakhstan

Kyrgyzstan.  And BoonEx is an Australian company.

BoonEx Certified Host: Zarconia.net - Fully Supported Shared and Dedicated for Dolphin
Quote · 30 Jan 2013

 RE:

 I want to force my members to be proactive and choose a privacy level at all times.

Sounds like an excellent recipe for an incredibly annoying user experience.  If you actually convince Boonex that this is a good idea, I'll kiss a mule's ass on the front page of the New York Times.

My opinions expressed on this site, in no way represent those of Boonex or Boonex employees.
Quote · 30 Jan 2013

GG if FB in all its wisdom did not address this issue at the demise of several people's job along the way, why do you think it is a task you must accomplish?  

Let's review!  If you have an option to allow public pictures on your home page

how will you deal with idiots who post boobies on purpose?  

Why don't you remove the option being possibly seen at all if you must control the thought patterns and actions of your end users and are concerned about grandma finding out that her princess has ventured into the dark side?  If a person has 2 options how can you control which one they will do?

IOW they pic public and they are bobbies?  So you recoded the option to make them choose but unless you are going to choose for them what have you done?  You can lead a horse to water but you can't make him choose private!  As a control person you can only stop the entire post from being there.  IOW no matter what they choose it will not appear? 

Csampson
Quote · 30 Jan 2013

 

 RE:

 I want to force my members to be proactive and choose a privacy level at all times.

Sounds like an excellent recipe for an incredibly annoying user experience.  If you actually convince Boonex that this is a good idea, I'll kiss a mule's ass on the front page of the New York Times.

I could care less if Boonex thinks it is a good idea or if you, HL, thinks it is a good idea.  You don't have to implement it on your site.  This is about my site and I want it in place because users are lazy, if it is set to me only, they won't change it to friends and then whine about their friends can not see their photos.  If I set it to members only then they whine about their photos are being shown to others.  This only has to be done ONE time per album and then they can upload a hundred photos and never see it again.

Geeks, making the world a better place
Quote · 31 Jan 2013

@csampson1:

When it has happened, it has been by accident, the person involved just did not understand; as I said, with it preselected, one can hit submit and post photos as public when you don't intend to.  You will be surprised at how easy it is for the human eye to miss content on a web page.  When I go to them they apologise and told me that it was not on purpose and I believe them.  This will actually help my users to properly set their privacy levels.

FaceSucks, on the other hand, does not care about the members, they are well, not sure if I can say what they are here.  They are about money.  OK, will stop before I go into my FaceSucks rant again LOL.

Geeks, making the world a better place
Quote · 31 Jan 2013

@mscott

Privacy Check for the Upload pop-up (which is a pseudo modal box).  In BxDolFilesModule.php  find the following and add the bits in red.  The options we added has a value of "0" for the privacy group.

    function actionUpload($sAction = '')
    {
        if (!empty($sAction)) {
            $aRes = array('status' => 'Fail', 'error_msg' => _t('_sys_txt_sbs_error_occured'));
            $iAlbumId = (int)$_GET['album'];
            if (!$iAlbumId) {
                $sTitle = clear_xss($_GET['title']);
                $sAllowAlbumView = $_GET['AllowAlbumView'];
                if (!empty($sTitle)) {
                    $aNew = array(
                        'caption' => $sTitle,
                        'AllowAlbumView' => $_GET['AllowAlbumView'],
                        'owner' => $this->_iProfileId,
                    );
                    if ($sAllowAlbumView != 0){
                    $iAlbumId = $this->oAlbums->addAlbum($aNew);
                    } else
                      $aRes['error_msg'] = _t('You need to select a privacy group', 1);
                } else
                    $aRes['error_msg'] = _t('_title_min_lenght', 1);
            }

 Of course language keys are needed instead of hard coding the messages.

Geeks, making the world a better place
Quote · 2 Feb 2013

Cool. Something told me it might be in the main file module but I could never find it. 

 

@Nathan, the programmers aren't in Australia are they? 

BoonEx Certified Host: Zarconia.net - Fully Supported Shared and Dedicated for Dolphin
Quote · 2 Feb 2013

works the way i like it
http://www.boonex.com/forums/?action=goto&my_threads=1#topic/Please-select-by-defualt-.htm

Quote · 2 Feb 2013

I noticed this breaks the yellow keys privacy thing; you click on the keys and nothing happens.  Will need to investigate why the yellow keys stop working.

Geeks, making the world a better place
Quote · 3 Feb 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.