Making Group Names Unique????

Now i am either a complete retard and need to start wearing a football helmet... or... there has been one big over site concerning groups.

 

When someone creates a group in 7.2 it seems that there is no check to see if that group name is unique. instead it just adds the date to the end of the name when creating the group. this is a problem. My God could you imagine having hundreds of Donald Trump groups. LoL

 

My question: is there a way to make these unique already in dolphin through the admin section? If there isn't then what coding will i need to add to the BxGroupFormAdd.php to check if the name is unique or not.

 

Thanks for any help

Xavier

Quote · 16 Mar 2016

What should happen if the Group name exists already ?

Paypal email is jeromemingo@gmail.com - http://www.boonex.com/market/posts/modzzz
Quote · 16 Mar 2016

 Can you plz check your inbox

What should happen if the Group name exists already ?

 

Umar Haroon
Quote · 16 Mar 2016

then the date is added to the end of the of the group. 

 

/m/groups/event/browse/gilly3-2016-03-16

 

if you add another then it's the date plus another number and so on

 

gilly3-2016-03-2016-0

 

But when you look in the popular group page they all show up as gilly3

Quote · 16 Mar 2016

 Can you plz check your inbox

What should happen if the Group name exists already ?

 

 

Who needs to check their inbox?

Quote · 16 Mar 2016

not sure what version of dolphin you are using - but i do not get a date at the end of a group - unless there is another group already with the same name - ver 7.3

caredesign.net
Quote · 16 Mar 2016

 A few solutions would be:

a) add a number to it (for simplicity and to keep it short)

b) notification that group name already exists, then prompt for a new group name

c) in some instances, one can make the same group name, but use some other identifier to tell which is which

there are tons of FB groups, pages, ect., with the same name, only difference is the url they're attached to.

 

What should happen if the Group name exists already ?

 

Ultra Newb reporting for duty.
Quote · 16 Mar 2016

YOU GOT IT professor....

 

thats exactly when it happened. Sealed

 

We have figured it out though and have made our own checker inside

BxDolForm.php We added to the class BxDolFormCheckerHelper this function

 

function checkUnique($s){
       
        $conn = new mysqli($DBServer, $DBUser, $DBPass, $DBName);
        // check connection
        if ($conn->connect_error) {
            trigger_error('Database connection failed: '  . $conn->connect_error, E_USER_ERROR);
        }

        $sql = "SELECT id FROM bx_groups_main WHERE Title = '$s'";
        $rs=$conn->query($sql);
        if($rs === false){
            //trigger_error('Wrong SQL: ' . $rs . ' Error: ' . $conn->error, E_USER_ERROR);
            return false;

        if($datarow = $rs->fetch_assoc()){
                return false;
            }else{
                return $this->checkLength($s,3,100);
            }
        }
    }

 

 

 

Inside BxGroupsFormAdd.php around line 249 we changed the checker to call our new one.

 

 'title' => array(
                    'type' => 'text',
                    'name' => 'title',
                    'caption' => _t('_bx_groups_form_caption_title_addform'),
                    'required' => true,
                    'checker' => array (
                        'func' => 'unique',
                        'error' => _t ('_bx_groups_form_err_title'),
                    ),
                    'db' => array (
                        'pass' => 'Xss',
                    ),
                ),

 

Hope this helps. feel free to use it my friends.

Quote · 16 Mar 2016

we did not want the groups to show up with the same name and confuse people. it would give the ability to some retard hater to harass a group.

say Budweiser had a group and it was all dancing beer bottles and oceans of amber waves...... all was good in the land of awesomeness. and many people flocked to to the shores of this epic group. Then Coors the crappiest beer ever made got jealous and created a group with the same name... copied the group avatar and their description. No one could tell the difference at a mere glance. but you opened the Coors clone of Budweiser and was greeted with midgets wearing only leather and ball gags riding bald donkeys doing very odd things.

 

that would be rather disturbing.

 

i want to thank you all for your responses and if you ever are in need of help please message me. and if it within mine or our staffs ability we will help.

 

Xavier

Quote · 16 Mar 2016

using that same analogy - then dont make a website - not trying to be rude - but thats exactly what phishing is - what you described in your coors example. With anything, there comes risk and those trying to hate on you. Even though you have created a nice new code and all - what is to stop coors from seeing that budweiser has not yet started a group - then starts one called budweiser - and still misleads people. In every scenario - there will be a drawback to whatever solution you come up with - sometimes it is better to just let some things as is. I am sure the developers thought about how this is setup a long time ago, and in their infinite wisdom and testing - found it was better for the majority to leave as it is. For me-  it is actually great. There may be an instance where two people have the same topic title - if you look at the page thst shows all the groups - it does say who created the group. so, while coors may create a budweiser page - any smart person could see that coors was the one that created it - not budweiser.

caredesign.net
Quote · 16 Mar 2016

then i would take the Budweiser name away from Coors and give it to Budweiser.  Just because someone else want to be an hater and an antagonist doesn't mean i have to be.

 

But I digress. You, Professor, have been in this game a lot longer than me and i bow to your wisdom and insight. May you have a fine day sir and again thank you for your comments.

Quote · 17 Mar 2016

please do not take my response as a negative one - I am just throwing out how your solution can be bypassed by someone who really wants to cause troubles. Unfortunately - there are too many people out there wanting to do hateful things. I just would hate for you to spend your time looking for a way to accomplish something only to have that thwarted by an idiot.

caredesign.net
Quote · 17 Mar 2016
 
 
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.