Friends and Groups

Maybe I'm an idiot, but are Dolphin "friends" like Facebook "friends" ...? I can't seem to find the button to "friend" people. I made a second "test" member on my site, but I can't friend it. When browsing members, you can "Fave" someone to add him or her to your "hot list" (whatever that is, I can't find that either). I must be misunderstanding something here ... :-p


Secondly, Dolphin comes "default" as requiring certain fields for group creation. It also comes default as displaying certain fields in the big list of groups. How do I change this? There is no reason for "city" to be required for my groups. I created close to 300 groups last night, in phpMyAdmin so I could circumvent the required "city" field and for some other reasons (takes less time! :-p). However, when I go to "All Groups" on my site, there's a comma after the country is displayed (right before where "city" should be). How can I change how groups administered/displayed?


Thanks!


P.S. What is "My Presence" and how does it play into all of this?

Quote · 22 Aug 2009

Okay, let's take your questions backwards, this will get answered in sections I am sure by more than just me:

 

1.  My Presence:  This is an instant messenger system that enables your members to talk in private conversations with multiple people (note, you can not talk to 20 people in one box, it works much like yahoo without the conferencing option [Hint Boonex])

 

2.  To make someone a friend you need to Befriend them.  Just go to THEIR profile, and directly below the profile photos you will see it in the Actions Field, left column

 

Off to check the exact spot you remove City from the Groups display

Quote · 23 Aug 2009

As far as removing city goes, you didn't ask for a simple item did you.  LOL... Had to check this in a few different areas to make sure the entire thing was removed for you and then make sure it looked complete/professional.  Please note, this takes a lot of steps to complete and it has been done on one of my sites that is highly modified, please check yours and note that if I have something you don't have, don't fret, you'll pick up the basics of it quickly.

 


 

I highly recommend before beginning this you obtain a copy of Notepad++ and download it, as it will enable you to modify the large number of files, do searches for code strings and save all files at one time when your completed.

 

Next recommendation:  Please back-up all of your files before you begin this process, it is a very indepth item and as strange as it sounds, it has over 20 steps, so please back-up the files before you begin in case you make an error or do not like it.

 

This will remove the City Field completely from all parts of Groups, if you want it to remain, do not do this, it is only been because the original post by djdavis1420 on this thread made sense and it appears ridiculous to make a site owner go through phpMyAdmin to input/create a group without city.  This modification will enable that.

 

This item is not availabe to be sold by anyone.  If I find it anywhere I will take legal actions to have it removed and recoup any and all monies made from it plus whatever penalties I can get.  Call me an ass if you like for this statement, but this has to be said since some people think they have a right to sell others work and this isn't even an item that should be sold, it's something that Boonex should of taken care of 20 versions or so ago.

 

If someone would like to take this to the next step of giving the Group Creator the option of selecting whether to include a city in the group create/edit screens or not, then feel free to and I'll provide you with all my notes, it should be a matter of a simple switch being added into the code.  I didn't look to do that and don't have time for it right now!

 

I realize this could be done with a lot less typing, however, we have some newbies here and they do not always know all the places to look for things.  If I just said to comment it out, many would blow up there sites and be back here asking for help to fix them. 

 

Note:  You are searching for what is in Red and only what is in Red.  You are replacing/editing with what is in Green/Teal and only what is in Green/Teal.  Follow the instructions exactly as they are written, if you do not understand please get with me or someone else and we will be happy to help you out vs. you blowing up your site and then we have to dig through multiple files and thousands of lines of code (one file has over 2100 Lines in it and a lot of steps) to figure out the error.  If you would like this but are not comfortable installing it please see me, I'll do it for you for free in order to prevent others from charging you to do this trick.

 


Step 1:

 

Open group.php

 

Locate the following string of code:

 

$_page_cont[$_ni]['city']                = htmlspecialchars_adv( $arrGroup['City'] );

 

Replace it with the following:

 

//$_page_cont[$_ni]['city']                = htmlspecialchars_adv( $arrGroup['City'] );  Commented out to remove city


 

Step 2:

Open inc/groups.inc.php

Locate the following string of code:

'City' => array(
   'Name' => 'City',
   'Caption' => 'City',
   'Type' => 'text',
   'Len' => 64
  ),

Comment it out like this:

//'City' => array(
//   'Name' => 'City',
//   'Caption' => 'City',
//   'Type' => 'text',
//   'Len' => 64
//  ),


 

Step 3:

Locate the following string of code (still in groups.inc.php)

function PageCompGroupsSearchResults( $keyword, $searchby, $categID, $Country, $City, $sortby, $isTopGroupsPage = false )

Replace it with the following:

function PageCompGroupsSearchResults( $keyword, $searchby, $categID, $Country, $sortby, $isTopGroupsPage = false )


Step 4:  (Yes, still in groups.inc.php)

 

Locate the following:

 

 

if( $City )
  $aQueryWhere[] = "UPPER(`Groups`.`City`) LIKE '%{$City}%'";

 

Comment it out as follows:

//if( $City )
 // $aQueryWhere[] = "UPPER(`Groups`.`City`) LIKE '%{$City}%'";


Step 5: (Long ways to go still Last step though for groups.inc.php file)

 

Locate the following

 

 

$aRowTmpl['city']          = htmlspecialchars_adv( $arrGroup['City'] );

Comment it out as follows:

 

//$aRowTmpl['city']          = htmlspecialchars_adv( $arrGroup['City'] );

 


Step 6:  Now we can move on.

 

Open grp.php

 

Locate:

 

$_page_cont[$_ni]['city'] = $sGrpVMCity;

 

Comment it out as follows:

 

//$_page_cont[$_ni]['city'] = $sGrpVMCity;

 


Step 7:  (Still going, this tweak is worse than the energizer bunny)

 

 

Still working in grp.php

Locate the following string:

//ShowGroup($groupID, $_ni);

   list($iNameIndex, $sHeader, $sHeaderT, $sMainCode, $sGrpBrd, $sGrpLCat, $sGrpLCreated, $sGrpLLocation, $sGrpLMemberCount, $sGrpLCreator, $sGrpLAbout, $sGrpLType, $sGrpLTypeHelp, $sGrpVImage, $sGrpVGalLink, $sGrpVCreatorThumb, $sGrpVCreatorLink, $sGrpVCat, $sGrpVCatLink, $sGrpVType, $sGrpVCreated, $sGrpVCountry, $sGrpVCity, $sGrpVMCount, $sGrpVAbout, $sGrpVDesc, $sGrpVStatus, $sGrpVActions, $sGrpVMembers, $sGrpVForum) = $oGroups->GenGroupMainPage($groupID, $memberID);

 

 

Replace it with (we're going to remove $sGrpVCity,

//ShowGroup($groupID, $_ni);

   list($iNameIndex, $sHeader, $sHeaderT, $sMainCode, $sGrpBrd, $sGrpLCat, $sGrpLCreated, $sGrpLLocation, $sGrpLMemberCount, $sGrpLCreator, $sGrpLAbout, $sGrpLType, $sGrpLTypeHelp, $sGrpVImage, $sGrpVGalLink, $sGrpVCreatorThumb, $sGrpVCreatorLink, $sGrpVCat, $sGrpVCatLink, $sGrpVType, $sGrpVCreated, $sGrpVCountry, $sGrpVMCount, $sGrpVAbout, $sGrpVDesc, $sGrpVStatus, $sGrpVActions, $sGrpVMembers, $sGrpVForum) = $oGroups->GenGroupMainPage($groupID, $memberID);


 

Step 8:  (Boonex should of made this item a choice and not required field, Gawd is this long and getting longer Next time ask for something simple like adding Video to Groups... LOL)

 

Open:  inc/classes/BxDolGroups.php  (This is the next to last file, stay in it until I tell you to switch to templates/tmpl_{tmpl}/page_71.html that won't be for awhile now, lots of changes to this file)

 

Locate the following string of code:

 

Step 8 is cancelled on proofreading this, I repeated and included in step 9 and I'm to lazy to renumber all of this.


Step 9:

 

Locate in inc/classes/BxDolGroups.php

 

function GenCategoryPage($bHiddenSearchForm = false) {
  $sForm = '';
  $sResults = '';

 

 list($sKeyword, $sSearchby, $iCategID, $sCountry, $sCityVal, $sSortby, $sKeywordDB, $sSearchbyDB, $sCategIDDB, $sCountryDB, $sCityDB, $sSortbyDB) = $this->CollectBrowseParams();

  $sForm = $this->GenSearchForm($sKeyword, $sSearchby, $iCategID, $sCountry, $sCityVal, $sSortby, $bHiddenSearchForm);

  if( $sKeywordDB or $sCategIDDB or $sCountryDB or $sCityVal )

   $sResults = $this->PageCompGroupsSearchResults( $sKeywordDB, $sSearchbyDB, $sCategIDDB, $sCountryDB, $sCityDB, $sSortbyDB );

  return array($sForm, $sResults);
 }

 

Replace with:

 

function GenCategoryPage($bHiddenSearchForm = false) {
  $sForm = '';
  $sResults = '';

  list($sKeyword, $sSearchby, $iCategID, $sCountry, $sSortby, $sKeywordDB, $sSearchbyDB, $sCategIDDB, $sCountryDB, $sSortbyDB) = $this->CollectBrowseParams();

  $sForm = $this->GenSearchForm($sKeyword, $sSearchby, $iCategID, $sCountry, $sSortby, $bHiddenSearchForm);

  if( $sKeywordDB or $sCategIDDB or $sCountryDB )

   $sResults = $this->PageCompGroupsSearchResults( $sKeywordDB, $sSearchbyDB, $sCategIDDB, $sCountryDB, $sSortbyDB );

  return array($sForm, $sResults);
 }

  

 


 

Step 10:  Stay in inc/classes/BxDolGroups.php

 

Locate:

 

function CollectBrowseParams() {
  global $aPreValues;

  // get search params
  $sKeyword  = $_REQUEST['keyword'];
  $sSearchby = $_REQUEST['searchby'];
  $sCountry  = $_REQUEST['Country'];
  $sCityVal     = $_REQUEST['City'];
  $sSortby   = $_REQUEST['sortby'];
  // [END] get search params

  if (isset($_REQUEST['categUri'])) {
   $sUri = process_db_input($_REQUEST['categUri']);
   $iCategID = (int)db_value("SELECT `ID` FROM `GroupsCateg` WHERE `Uri`='{$sUri}'");
  } else {
   $iCategID = (int)$_REQUEST['categID'];
  } 

  // check search params
  unset( $sKeywordDB );
  unset( $sSearchbyDB );
  unset( $sCategIDDB );
  unset( $sCountryDB );
  unset( $sCityDB );
  unset( $sSortbyDB );

  if( isset($sKeyword) and strlen($sKeyword) ) {
   $sKeyword = trim( $sKeyword );
   if( strlen( $sKeyword ) )
    $sKeywordDB = strtoupper( process_db_input( $sKeyword ) );
   $sKeyword = process_pass_data( $sKeyword );
  }

  if( $sSearchby == 'name' or $sSearchby == 'keyword' )
   $sSearchbyDB = $sSearchby;
  else
   $sSearchbyDB = $sSearchby = 'keyword';

  $sCategIDDB = $iCategID = (int)$iCategID;

  if( isset( $sCountry ) and isset( $aPreValues['Country'][$sCountry] ) )
   $sCountryDB = $sCountry;
  else
   $sCountry = '';

  if( isset($sCityVal) and strlen($sCityVal) ) {
   $sCityVal = trim( $sCityVal );
   if( strlen( $sCityVal ) )
    $sCityDB = strtoupper( process_db_input( $sCityVal ) );
   $sCityVal = process_pass_data( $sCityVal );
  }

  if( $sSortby == 'Name' or $sSortby == 'membersCount' or $sSortby == 'created' )
   $sSortbyDB = $sSortby;
  else
   $sSortbyDB = $sSortby = 'membersCount';
  // [END] check search params

  $aRes = array($sKeyword, $sSearchby, $iCategID, $sCountry, $sCityVal, $sSortby, $sKeywordDB, $sSearchbyDB, $sCategIDDB, $sCountryDB, $sCityDB, $sSortbyDB);
  return $aRes;
 }

 

 

Replace the entire function with the following:

 

function CollectBrowseParams() {
  global $aPreValues;

  // get search params
  $sKeyword  = $_REQUEST['keyword'];
  $sSearchby = $_REQUEST['searchby'];
  $sCountry  = $_REQUEST['Country'];
  //$sCityVal     = $_REQUEST['City'];
  $sSortby   = $_REQUEST['sortby'];
  // [END] get search params

  if (isset($_REQUEST['categUri'])) {
   $sUri = process_db_input($_REQUEST['categUri']);
   $iCategID = (int)db_value("SELECT `ID` FROM `GroupsCateg` WHERE `Uri`='{$sUri}'");

  } else {

   $iCategID = (int)$_REQUEST['categID'];
  } 

  // check search params
  unset( $sKeywordDB );
  unset( $sSearchbyDB );
  unset( $sCategIDDB );
  unset( $sCountryDB );
  //unset( $sCityDB );
  unset( $sSortbyDB );

  if( isset($sKeyword) and strlen($sKeyword) ) {
   $sKeyword = trim( $sKeyword );

   if( strlen( $sKeyword ) )
    $sKeywordDB = strtoupper( process_db_input( $sKeyword ) );
   $sKeyword = process_pass_data( $sKeyword );
  }

  if( $sSearchby == 'name' or $sSearchby == 'keyword' )
   $sSearchbyDB = $sSearchby;

  else

   $sSearchbyDB = $sSearchby = 'keyword';

  $sCategIDDB = $iCategID = (int)$iCategID;

  if( isset( $sCountry ) and isset( $aPreValues['Country'][$sCountry] ) )
   $sCountryDB = $sCountry;

  else

   $sCountry = '';

  //if( isset($sCityVal) and strlen($sCityVal) ) {
  // $sCityVal = trim( $sCityVal );
  // if( strlen( $sCityVal ) )
  //  $sCityDB = strtoupper( process_db_input( $sCityVal ) );
  // $sCityVal = process_pass_data( $sCityVal );
  //}

  

if( $sSortby == 'Name' or $sSortby == 'membersCount' or $sSortby == 'created' )
   $sSortbyDB = $sSortby;

  else

   $sSortbyDB = $sSortby = 'membersCount';
  // [END] check search params

  $aRes = array($sKeyword, $sSearchby, $iCategID, $sCountry, $sSortby, $sKeywordDB, $sSearchbyDB, $sCategIDDB, $sCountryDB, $sSortbyDB);

  return $aRes;
 }


 

Step 11 (Moving on through inc/classes/BxDolGroups.php)  What?  It's got over 2100 lines of code in it and 52 references towards city!

 

Locate:

 

//PageCompGroupsSearchForm
 function GenSearchForm( $sKeyword, $sSearchby, $iCategID, $sCountry, $sCityVal, $sSortby, $bHiddenSearchForm = false ) {
  global $aPreValues;
  global $site;

  $sKeywordC = _t('_Keyword');
  $sSearchByC = _t('_Search by');
  $sByGrpNameC = _t('_by group name');
  $sByKeywC = _t('_by keyword');
  $sCategoryC = _t('_Category');
  $sAnyC = _t('_Any');
  $sCountryC = _t('_Country');
  $sCityC = _t('_City');
  $sSortByC = _t('_Sort by');
  $sByGrpNameC = _t('_by group name');
  $sByPopularC = _t('_by popular');
  $sByNewestC = _t('_by newest');
  $sSearchC = _t('_Search');
  $sEnterParamsC = _t('_Please select at least one search parameter');

  $sUnbrKeyw = $this->unbreak_js( str_replace( '\'','\\\'', str_replace( '\\','\\\\',$sKeyword ) ) );
  $sUnbrCity = $this->unbreak_js( str_replace( '\'','\\\'', str_replace( '\\','\\\\',$sCityVal ) ) );

  $sJSCode = <<<EOF
<script type="text/javascript">
 var keyword  = '{$sUnbrKeyw}';
 var searchby = '{$sSearchby}';
 var categID  = '{$iCategID}';
 var Country  = '{$sCountry}';
 var City     = '{$sUnbrCity}';
 var sortby   = '{$sSortby}';

 function checkSearchForm() {
  _form = document.forms.groups_search_form;
  if( !_form )
   return false;

  if( !_form.keyword.value && !_form.categID.value && !_form.Country.value && !_form.City.value ) {
   alert( '{$sEnterParamsC}' );
   return false;
  }
 }
</script>
EOF;

 

 

Replace it with:  (Trying to cut down the steps on this file)

 

 //PageCompGroupsSearchForm
 function GenSearchForm( $sKeyword, $sSearchby, $iCategID, $sCountry, $sSortby, $bHiddenSearchForm = false ) {
  global $aPreValues;
  global $site;

  $sKeywordC = _t('_Keyword');
  $sSearchByC = _t('_Search by');
  $sByGrpNameC = _t('_by group name');
  $sByKeywC = _t('_by keyword');
  $sCategoryC = _t('_Category');
  $sAnyC = _t('_Any');
  $sCountryC = _t('_Country');
  //$sCityC = _t('_City');
  $sSortByC = _t('_Sort by');
  $sByGrpNameC = _t('_by group name');
  $sByPopularC = _t('_by popular');
  $sByNewestC = _t('_by newest');
  $sSearchC = _t('_Search');
  $sEnterParamsC = _t('_Please select at least one search parameter');

  $sUnbrKeyw = $this->unbreak_js( str_replace( '\'','\\\'', str_replace( '\\','\\\\',$sKeyword ) ) );
  //$sUnbrCity = $this->unbreak_js( str_replace( '\'','\\\'', str_replace( '\\','\\\\',$sCityVal ) ) );

  $sJSCode = <<<EOF
<script type="text/javascript">
 var keyword  = '{$sUnbrKeyw}';
 var searchby = '{$sSearchby}';
 var categID  = '{$iCategID}';
 var Country  = '{$sCountry}';
 var sortby   = '{$sSortby}';

 function checkSearchForm() {
  _form = document.forms.groups_search_form;
  if( !_form )
   return false;

  if( !_form.keyword.value && !_form.categID.value && !_form.Country.value ) {
   alert( '{$sEnterParamsC}' );
   return false;
  }
 }
</script>
EOF;

 


 

Step 12 (You guessed it, same file, different string:  inc/classes/BxDolGroups.php)

 

Locate the following (It's right below what you just did)

 

  /*$bNoFilter = false;
  if (isset($_REQUEST['categID']) && isset($_REQUEST['nf']) && (int)$_REQUEST['nf'] == 1) $bNoFilter = true;
  if ($bNoFilter == true) $sDisplayStyle='style="display:none"';
  if ($bNoFilter == true) $sNFelement = '<input type="hidden" name="nf" value="1" />';*/

  $sKeyword = htmlspecialchars_adv($sKeyword);
  $sCity = htmlspecialchars_adv($sCityVal);

 

 

Comment out the very last line so it looks like this:

 

  /*$bNoFilter = false;
  if (isset($_REQUEST['categID']) && isset($_REQUEST['nf']) && (int)$_REQUEST['nf'] == 1) $bNoFilter = true;
  if ($bNoFilter == true) $sDisplayStyle='style="display:none"';
  if ($bNoFilter == true) $sNFelement = '<input type="hidden" name="nf" value="1" />';*/

  $sKeyword = htmlspecialchars_adv($sKeyword);
  //$sCity = htmlspecialchars_adv($sCityVal);

 


Step 13 (just hang out some more in inc/classes/BxDolGroups.php)

 

Locate:

 

if ($bHiddenSearchForm == true) {
   $sRetHtml = <<<EOF
 <form action="{$site['url']}{$this->sCurrFile}?action=categ" method="get" name="groups_search_form" onsubmit="return checkSearchForm();">
  <input type="hidden" id="keyword" name="keyword" value="" />
  <input type="hidden" name="searchby" value="name" id="searchby_name" />
  <input type="hidden" name="searchby" value="keyword" id="searchby_keyword" />
  <input type="hidden" id="categID" name="categID" value="{$iCategID}" />
  <input type="hidden" id="Country" name="Country" value="" />
  <input type="hidden" id="City" name="City" value="" />
  <input type="hidden" name="sortby" value="Name" id="sortby_Name" />
  <input type="hidden" name="sortby" value="membersCount" id="sortby_membersCount" />
  <input type="hidden" name="sortby" value="created" id="sortby_created" />
  <input type="hidden" name="hidden_mode" value="1" />
  <input type="hidden" name="page" value="1" />
  <input type="hidden" value="search" id="action" name="action" />
  <!-- <input type="submit" value="{$sSearchC}" class="groups_search_labelfor" /> -->
 </form>
EOF;

 

Replace it with: (We deleted one line here)

 

if ($bHiddenSearchForm == true) {
   $sRetHtml = <<<EOF
 <form action="{$site['url']}{$this->sCurrFile}?action=categ" method="get" name="groups_search_form" onsubmit="return checkSearchForm();">
  <input type="hidden" id="keyword" name="keyword" value="" />
  <input type="hidden" name="searchby" value="name" id="searchby_name" />
  <input type="hidden" name="searchby" value="keyword" id="searchby_keyword" />
  <input type="hidden" id="categID" name="categID" value="{$iCategID}" />
  <input type="hidden" id="Country" name="Country" value="" />
  <input type="hidden" name="sortby" value="Name" id="sortby_Name" />
  <input type="hidden" name="sortby" value="membersCount" id="sortby_membersCount" />
  <input type="hidden" name="sortby" value="created" id="sortby_created" />
  <input type="hidden" name="hidden_mode" value="1" />
  <input type="hidden" name="page" value="1" />
  <input type="hidden" value="search" id="action" name="action" />
  <!-- <input type="submit" value="{$sSearchC}" class="groups_search_labelfor" /> -->
 </form>
EOF;


Step 14:

 

Keeping with tradition, let's stay in inc/classes/BxDolGroups.php

 

Locate the following:

 

<div class="groups_search_row">
   <div class="groups_search_label">{$sCityC}:</div>
   <div class="groups_search_value">
    <input type="text" id="City" name="City" class="groups_search_text" value="{$sCity}" />
   </div>
   <div class="clear_both"></div>
  </div>

 

Delete the entire section.  It is only for city and you will need to remove it.

 

 


 

Step 15:

 

inc/classes/BxDolGroups.php   (yeah, we're still in it.  Told you it was a long adjustment to do this trick)

 

Locate:

 

function GenGroupMainPage($iGroupID, $iMemberID) {
  global $logged;
  global $site;
  global $aPreValues;

  //$bPermalink = getParam('permalinks_groups') == 'on' ? true : false;

  //ret vals
  $iNameIndex = 71;
  $sHeader = '';
  $sHeaderT = '';
  $sMainCode = '';

  $sGrpBrd = '';
  $sGrpLCat = '';
  $sGrpLCreated = '';
  $sGrpLLocation = '';
  $sGrpLMemberCount = '';
  $sGrpLCreator = '';
  $sGrpLAbout = '';
  $sGrpLType = '';
  $sGrpLTypeHelp = '';

  $sGrpVImage = '';
  $sGrpVGalLink = '';
  $sGrpVCreatorThumb = '';
  $sGrpVCreatorLink = '';
  $sGrpVCat = '';
  $sGrpVCatLink = '';
  $sGrpVType = '';
  $sGrpVCreated = '';
  $sGrpVCountry = '';
  $sGrpVCity = '';
  $sGrpVMCount = '';
  $sGrpVAbout = '';
  $sGrpVDesc = '';
  $sGrpVStatus = '';
  $sGrpVActions = '';
  $sGrpVMembers = '';
  $sGrpVForum = '';

 

Replace with: (we're commenting the line with city in it)

 

function GenGroupMainPage($iGroupID, $iMemberID) {
  global $logged;
  global $site;
  global $aPreValues;

  //$bPermalink = getParam('permalinks_groups') == 'on' ? true : false;

  //ret vals
  $iNameIndex = 71;
  $sHeader = '';
  $sHeaderT = '';
  $sMainCode = '';

  $sGrpBrd = '';
  $sGrpLCat = '';
  $sGrpLCreated = '';
  $sGrpLLocation = '';
  $sGrpLMemberCount = '';
  $sGrpLCreator = '';
  $sGrpLAbout = '';
  $sGrpLType = '';
  $sGrpLTypeHelp = '';

  $sGrpVImage = '';
  $sGrpVGalLink = '';
  $sGrpVCreatorThumb = '';
  $sGrpVCreatorLink = '';
  $sGrpVCat = '';
  $sGrpVCatLink = '';
  $sGrpVType = '';
  $sGrpVCreated = '';
  $sGrpVCountry = '';
  //$sGrpVCity = '';
  $sGrpVMCount = '';
  $sGrpVAbout = '';
  $sGrpVDesc = '';
  $sGrpVStatus = '';
  $sGrpVActions = '';
  $sGrpVMembers = '';
  $sGrpVForum = '';

 


 

Step 16

 

in inc/classes/BxDolGroups.php

 

Locate:

 

$sGrpVMCity = htmlspecialchars_adv( $aGroupInfo['City'] );

 

Comment it out so it looks like this:

 

//$sGrpVMCity = htmlspecialchars_adv( $aGroupInfo['City'] );

 

 


 

Step 17:

 

inc/classes/BxDolGroups.php  (You never knew there was so much to groups did you.  LOL)

 

Locate:

 

return array($iNameIndex, $sHeader, $sHeaderT, $sMainCode, $sGrpBrd, $sGrpLCat, $sGrpLCreated, $sGrpLLocation, $sGrpLMemberCount, $sGrpLCreator, $sGrpLAbout, $sGrpLType, $sGrpLTypeHelp, $sGrpVImage, $sGrpVGalLink, $sGrpVCreatorThumb, $sGrpVCreatorLink, $sGrpVCat, $sGrpVCatLink, $sGrpVType, $sGrpVCreated, $sGrpVCountry, $sGrpVCity, $sGrpVMCount, $sGrpVAbout, $sGrpVDesc, $sGrpVStatus, $sGrpVActions, $sGrpVMembers, $sGrpVForum);

 

Replace it with:

 

return array($iNameIndex, $sHeader, $sHeaderT, $sMainCode, $sGrpBrd, $sGrpLCat, $sGrpLCreated, $sGrpLLocation, $sGrpLMemberCount, $sGrpLCreator, $sGrpLAbout, $sGrpLType, $sGrpLTypeHelp, $sGrpVImage, $sGrpVGalLink, $sGrpVCreatorThumb, $sGrpVCreatorLink, $sGrpVCat, $sGrpVCatLink, $sGrpVType, $sGrpVCreated, $sGrpVCountry, $sGrpVMCount, $sGrpVAbout, $sGrpVDesc, $sGrpVStatus, $sGrpVActions, $sGrpVMembers, $sGrpVForum);

 


 

 

Step 18:

 

inc/classes/BxDolGroups.php

 

Locate:

 

function getDefaultGroupEditArr() {
  $aFields = array(
   'Name' => array(
    'Name' => 'Name',
    'Caption' => 'Group name',
    'Type' => 'text',
    'Len' => 64
   ),
   'categID' => array(
    'Name' => 'categID',
    'Caption' => 'Category',
    'Type' => 'dropdown'
   ),
   'open_join' => array(
    'Name' => 'open_join',
    'Caption' => 'Open join',
    'Type' => 'bool',
    'Value' => true,
    'HelpIndex' => 1
   ),
   'hidden_group' => array(
    'Name' => 'hidden_group',
    'Caption' => 'Hidden group',
    'Type' => 'bool',
    'Value' => false,
    'HelpIndex' => 2
   ),
   'members_post_images' => array(
    'Name' => 'members_post_images',
    'Caption' => 'Members can post images',
    'Type' => 'bool',
    'Value' => true,
    'HelpIndex' => 3
   ),
   'members_invite' => array(
    'Name' => 'members_invite',
    'Caption' => 'Members can invite',
    'Type' => 'bool',
    'Value' => true,
    'HelpIndex' => 4
   ),
   'Country' => array(
    'Name' => 'Country',
    'Caption' => 'Country',
    'Type' => 'dropdown'
   ),
   'City' => array(
    'Name' => 'City',
    'Caption' => 'City',
    'Type' => 'text',
    'Len' => 64
   ),
   'About' => array(
    'Name' => 'About',
    'Caption' => 'About group',
    'Type' => 'text',
    'Len' => 255
   ),
   'Desc' => array(
    'Name' => 'Desc',
    'Caption' => 'Group description',
    'Type' => 'html'
   )
  );
  return $aFields;
 }

 

Replace it with:

 

 function getDefaultGroupEditArr() {
  $aFields = array(
   'Name' => array(
    'Name' => 'Name',
    'Caption' => 'Group name',
    'Type' => 'text',
    'Len' => 64
   ),
   'categID' => array(
    'Name' => 'categID',
    'Caption' => 'Category',
    'Type' => 'dropdown'
   ),
   'open_join' => array(
    'Name' => 'open_join',
    'Caption' => 'Open join',
    'Type' => 'bool',
    'Value' => true,
    'HelpIndex' => 1
   ),
   'hidden_group' => array(
    'Name' => 'hidden_group',
    'Caption' => 'Hidden group',
    'Type' => 'bool',
    'Value' => false,
    'HelpIndex' => 2
   ),
   'members_post_images' => array(
    'Name' => 'members_post_images',
    'Caption' => 'Members can post images',
    'Type' => 'bool',
    'Value' => true,
    'HelpIndex' => 3
   ),
   'members_invite' => array(
    'Name' => 'members_invite',
    'Caption' => 'Members can invite',
    'Type' => 'bool',
    'Value' => true,
    'HelpIndex' => 4
   ),
   'Country' => array(
    'Name' => 'Country',
    'Caption' => 'Country',
    'Type' => 'dropdown'
   ),
   //'City' => array(
   // 'Name' => 'City',
   // 'Caption' => 'City',
   // 'Type' => 'text',
   // 'Len' => 64
   //),
   'About' => array(
    'Name' => 'About',
    'Caption' => 'About group',
    'Type' => 'text',
    'Len' => 255
   ),
   'Desc' => array(
    'Name' => 'Desc',
    'Caption' => 'Group description',
    'Type' => 'html'
   )
  );
  return $aFields;
 }

 

 


 

Step 19:

 

Moving forward there inc/classes/BxDolGroups.php (Are your hands tired... Mine are by now...)

 

Locate:

 

function PageCompGroupsSearchResults( $sKeyword, $sSearchby, $iCategID, $sCountry, $sCityVal, $sSortby, $isTopGroupsPage = false ) {
  global $oTemplConfig;
  global $site;
  global $tmpl;
  global $aPreValues;

 

 

Replace with:

 

function PageCompGroupsSearchResults( $sKeyword, $sSearchby, $iCategID, $sCountry, $sSortby, $isTopGroupsPage = false ) {
  global $oTemplConfig;
  global $site;
  global $tmpl;
  global $aPreValues;

 

 


 

Step 20:  Dang, 20 steps and we are still going:

 

inc/classes/BxDolGroups.php

 

Locate: (Look around line 1800 for this to start)

 

if( $iCategID )
   $aQueryWhere[] = "`Groups`.`categID`='{$iCategID}'";

  if( $sCountry )
   $aQueryWhere[] = "`Groups`.`Country`='{$sCountry}'";

  if( $sCityVal )
   $aQueryWhere[] = "UPPER(`Groups`.`City`) LIKE '%{$sCityVal}%'";

  $aQueryWhere[] = "`Groups`.`status` = 'Active'";

  $sQueryWhere = "WHERE (" . implode( ") AND (", $aQueryWhere ) . ")";

  if( $isTopGroupsPage )
   $SRdbTitle = _t( '_Top Groups' );
  else
   $SRdbTitle = _t( '_Groups search results' ); //SearchResultDesignBoxTitle

  $arrNum = db_arr( "SELECT COUNT(`ID`) FROM `Groups` {$sQueryWhere}" );

 

Replace with:

 

if( $iCategID )
   $aQueryWhere[] = "`Groups`.`categID`='{$iCategID}'";

  if( $sCountry )
   $aQueryWhere[] = "`Groups`.`Country`='{$sCountry}'";

  //if( $sCityVal )
   //$aQueryWhere[] = "UPPER(`Groups`.`City`) LIKE '%{$sCityVal}%'";

  $aQueryWhere[] = "`Groups`.`status` = 'Active'";

  $sQueryWhere = "WHERE (" . implode( ") AND (", $aQueryWhere ) . ")";

  if( $isTopGroupsPage )
   $SRdbTitle = _t( '_Top Groups' );
  else
   $SRdbTitle = _t( '_Groups search results' ); //SearchResultDesignBoxTitle

  $arrNum = db_arr( "SELECT COUNT(`ID`) FROM `Groups` {$sQueryWhere}" );

 


 

Step 21:

 

inc/classes/BxDolGroups.php  (okay, we broke line 1900, we're getting there)

 

Locate the following:

 

<script type="text/javascript" language="javascript">
 function switchGroupsSearchPage(page) {
  _form = document.forms.groups_search_form;
  if( !_form )
   return false;

  _form.keyword.value = keyword;
  _form.categID.value = categID;
  _form.Country.value = Country;
  _form.City.value    = City;

  for( i = 0; i < _form.searchby.length; i ++ )
   if( _form.searchby[i].value == searchby )
    _form.searchby[i].checked = true;

  for( i = 0; i < _form.sortby.length; i ++ )
   if( _form.sortby[i].value == sortby )
    _form.sortby[i].checked = true;

  _form.page.value = page;

  _form.submit();
  return true;
 }
</script>

 

 

Replace it with:

 

 

<script type="text/javascript" language="javascript">
 function switchGroupsSearchPage(page) {
  _form = document.forms.groups_search_form;
  if( !_form )
   return false;

  _form.keyword.value = keyword;
  _form.categID.value = categID;
  _form.Country.value = Country;

  for( i = 0; i < _form.searchby.length; i ++ )
   if( _form.searchby[i].value == searchby )
    _form.searchby[i].checked = true;

  for( i = 0; i < _form.sortby.length; i ++ )
   if( _form.sortby[i].value == sortby )
    _form.sortby[i].checked = true;

  _form.page.value = page;

  _form.submit();
  return true;
 }
</script>

 

 


 

Step 22:

Still bumping & grinding through inc/classes/BxDolGroups.php

Locate the following section (around line 1936)

$aRowTmpl['group_name']    = "<a class=\"actions\" href=\"{$sGroupLink}\">".$sGroupName."</a>";
    $aRowTmpl['group_about']   = htmlspecialchars_adv( $aGroupInfo['About'] );
    $aRowTmpl['category']      = "<a href=\"{$sCategLink}\">".htmlspecialchars_adv( $aGroupInfo['categName'] )."</a>";
    $aRowTmpl['members_count'] = $aGroupInfo['membersCount'];
    //$aRowTmpl['created']       = date( $date_format_php, strtotime( $aGroupInfo['created'] ) );
    $aRowTmpl['created']       = LocaledDataTime($aGroupInfo['created_UTS']);
    $aRowTmpl['group_type']    = _t( ( ( (int)$aGroupInfo['open_join'] and !(int)$aGroupInfo['hidden_group'] ) ? '_Public group' : '_Private group' ) );
    $aRowTmpl['country']       = _t( $aPreValues['Country'][ $aGroupInfo['Country'] ]['LKey'] );
    $aRowTmpl['city']          = htmlspecialchars_adv( $aGroupInfo['City'] );

 

 

Comment out the last line so it looks like this:

$aRowTmpl['group_name']    = "<a class=\"actions\" href=\"{$sGroupLink}\">".$sGroupName."</a>";
    $aRowTmpl['group_about']   = htmlspecialchars_adv( $aGroupInfo['About'] );
    $aRowTmpl['category']      = "<a href=\"{$sCategLink}\">".htmlspecialchars_adv( $aGroupInfo['categName'] )."</a>";
    $aRowTmpl['members_count'] = $aGroupInfo['membersCount'];
    //$aRowTmpl['created']       = date( $date_format_php, strtotime( $aGroupInfo['created'] ) );
    $aRowTmpl['created']       = LocaledDataTime($aGroupInfo['created_UTS']);
    $aRowTmpl['group_type']    = _t( ( ( (int)$aGroupInfo['open_join'] and !(int)$aGroupInfo['hidden_group'] ) ? '_Public group' : '_Private group' ) );
    $aRowTmpl['country']       = _t( $aPreValues['Country'][ $aGroupInfo['Country'] ]['LKey'] );
//$aRowTmpl['city']          = htmlspecialchars_adv( $aGroupInfo['City'] );


 

Step 23:

 

Guess what?  We're done with inc/classess/BxDolGroups.php Gawd did that feel like I was writing the entire Dolphin script there for awhile.  Okay, now we can move on and get rid of that pesky little comma that has been driving you nuts.

 

templates/tmpl_{tmpl}/page_71.html

 

Locate the following:

 

<div class="group_info_row">__location_l__: <b>__country__, __city__</b></div>

 

 

Remember that pesky little comma that has been driving you nuts?  Well, here is where we dump that also (along with the word city from your page once and for all (this dumps it on the page the members sees.

 

Replace that line with this:

 

<div class="group_info_row">__location_l__: <b>__country__ </b></div>


Now you can go save all your files and begin testing your site out.  This was completed on Dolphin 6.1.6 and has been tested there only.  I can not comment on whether this will work on any other Dolphin versions. 

 

Again, if you need help, please contact me.  I am busy, but I will be happy to help you out and a short wait for an item like this (it's not a do or die item) is much better than a blown up site if you make a mistake and it has to be hunted down.  Good Luck and enjoy.

 

Quote · 23 Aug 2009

Wow, thank you so much. I'll work on this now and let you know when I am successful. I am backing up my files by FTP to my computer.

 

By the way, would you happen to know the MySQL code to clear the contents of a COLUMN in a MySQL database without actually deleting the column?

 

Thanks again for all of your help!!!

 

djd

Quote · 24 Aug 2009

Sorry to be a bother, but in the first step, you refer to group.php. Do you mean grp.php? That's all I can find in the root directory.

Also, the line you say to search for ($_page_cont[$_ni]['city'] = htmlspecialchars_adv( $arrGroup['City'] );) is not found. I see the following line:

$_page_cont[$_ni]['city'] = $sGrpVMCity;

Thanks :-)

EDIT:: I see that what I am referring to is Step 6 of your walkthrough. I'll try to locate group.php.

Quote · 24 Aug 2009

Hmmm, I really don't want to be a bother, but I was just pondering this situation for a moment and stumbled upon a (possibly) simpler way of doing this. While your solution will definitely be implemented on one of my websites, the groups on my other website will never ever need to display a "Location." They are groups that focus on subject matter material only. The groups are for discussion of abstract ideas, which cannot be pinned down in a specific location. Also, members cannot create groups, since there are only a finite number of subjects to be discussed on my site, so (in my case, at least) we don't really have to worry about code related to location on the "Create Group" page. While I do very very much appreciate your response to this, might it not be easier to simply just remove "Location" from being displayed in the various group areas (browse groups, search groups, all groups, and the individual group profile), disabling "City" and "Country" as required fields using phpMyAdmin, and just commenting out the lines in the "Create Group" file that displays the fields for "City" and "Country"? I'm not a PHP guru in the slightest, but for those of us who only have the beginnings of knowledge of PHP, this does seem much easier. If you're not up to this, I'd totally understand and, again, really appreciate your effort. I can work through your walkthrough a couple times to remove "City" and "Country," but removing the "Location" field seems a bit simpler. Also, I can follow your walkthrough once, and just set "Country" to my website's name. *shrugs* :-P

I found out why I couldn't "friend" anyone. In my ignorance, I had removed the "Actions" block from the Profile Page Builder, not realizing what it was. Thanks!! :-)

Now, is there any way to make put a column in the Page Builder above two columns of smaller size. In Excel terms, I'd like cells A1 and A2 merged into one cell above separate cells B1 and B2. I really do hope this is possible...

The questions just keep on coming... What's the difference between "Fave" and "Befriend?" How do I disable the "Get E-Mail" functionality of the "Actions" block? I definitely do NOT want to share people's contact information. To be completely honest, I can't even believe this is offered as an option. Is there a way to disable various items of the "Actions" block?

Lastly, any reason why the first character of a member's user name gets capitalized in his/her profile's header? Any ideas on how to change that? (Sorry to bombard you with questions... )

Quote · 24 Aug 2009

 

Sorry to be a bother, but in the first step, you refer to group.php. Do you mean grp.php? That's all I can find in the root directory.

 

Also, the line you say to search for ($_page_cont[$_ni]['city'] = htmlspecialchars_adv( $arrGroup['City'] );) is not found. I see the following line:

 

$_page_cont[$_ni]['city'] = $sGrpVMCity;

 

Thanks :-)

 

 

EDIT:: I see that what I am referring to is Step 6 of your walkthrough. I'll try to locate group.php.

 All of my sites I currently have are heavily modified, so I have a group.php file, you will not though in yours so you can disregard the part that refers to group.php

 

Also, you may find a couple of other areas that this applies to.

 

Moving on, disabling Location is going to require you to do a search for Country and remove all of that also, it will work identical pretty much to the means I gave you for removing city, commenting out php, removing java/html type coding that doesn't want to comment out easily.  I know you can comment it out, but my brain is farting on if it's <!-- or what that does it.  I'm pretty sure that is the code out for css now that I look at it.  Told you I was brain farting at the moment.

 

I can work up the files to remove the entire location if you need them for a base dolphin install, no need to mess with the SQL tables via phpMyAdmin.  If you remove the query in the php files then the field in the table is not an issue.  However, if you remove the field in the table and NOT in the php files then you will get db_res_query errors like crazy, that's why I did it the way I did. 

 

The difference between befriend and fave is Friends show up and you can communicate with them, check out bffdomain (you'll have to join to see it) and you will notice all the things friends can do communications wise.  Just add me as a friend, I'll confirm it and then you'll see it works very well with tons of items in regards to e-mail/comments/photos and so on.  Favorites does not have that ability.

 

To remove the Get E-Mail from the Actions box, simply go into your Admin Panel => Settings => Advanced Settings and look for this:

 

Anonymous mode (no contact information)

 

Make sure there is a check mark in the box,  click the submit button (first one at the bottom, you'll see 2 of them) and that will remove the get e-mail from the actions box.

 

For the other items you want removed from the Actions box, please create a different thread to help people search better in the future.  Plus, it keeps it organized that way when people are trying to follow what is going on in a thread.

 

Also, for your extra table, create a new thread, and it can be dealt with also.  That is a custom template/tables question and it will take some room to explain it, perhaps OKWeb or Mrpowless will jump in on that one even.

 

In closing, do not try to remove just location, as it will create issues all over your groups section if it's not done fully in all files.  It took me about 3 1/2 hours to fully create and write up the instructions for getting the city out, as I had to check all pages that apply to groups for errors and make sure it was out everywhere for uniformity.

Quote · 24 Aug 2009

 

Wow, thank you so much. I'll work on this now and let you know when I am successful. I am backing up my files by FTP to my computer.

 

By the way, would you happen to know the MySQL code to clear the contents of a COLUMN in a MySQL database without actually deleting the column?

 

Thanks again for all of your help!!!

 

djd

 In phpMyAdmin you can go to a specific table and then the structure and you will see a trash can that if you hover over it says to empty.  That will empty out the contents of that field/column without deleting it.

Quote · 24 Aug 2009

Thanks for your swift responses. I've disabled the "Get E-mail" function and cleared the column in my MySQL database.

Again, I'd like to reiterate how thankful I am for your walkthrough and for the time you spent writing it. I hope you don't think that I am not going to use it, because I most definitely will. Like I said, it will prove very useful for one of my sites, but the other needs something more. The reason why I was thinking about removing "Location" is because, even though the groups currently have no city or country, the group profiles still show "Location: , ".

As for the other issues, I will have to write up some posts addressing them at some point tomorrow. It's quite late now, and work comes too early in the morning.

Again, thank you very much for all of your help!

djd

Quote · 24 Aug 2009

When one user friends another, how is the other user notified that their is an outstanding friend request? I just tried between two test users and didn't see anything clearly.

Thanks!

Quote · 26 Aug 2009

On your My Account page, inside of Contacts you should see it, or at your contacts.php page it will show up, on friends.php and so on.  PM me, I have a little trick for it that you might like that makes it much easier.

 

 

Quote · 26 Aug 2009

Awesome! Works perfectly. There is only one thing (slightly related). When a member logs in, they see "Homepage" (which has links like "Join Now!"). Obviously, if they've already logged in, they're already members. In which file do I change index.php to member.php, so that a user is directed to their account (not homepage) upon log-in?

Thanks! :-)

Quote · 26 Aug 2009

 

Awesome! Works perfectly. There is only one thing (slightly related). When a member logs in, they see "Homepage" (which has links like "Join Now!"). Obviously, if they've already logged in, they're already members. In which file do I change index.php to member.php, so that a user is directed to their account (not homepage) upon log-in?

Thanks! :-)

 Okay, what did you change for that to happen?  By default dolphin will normally go to the member.php page on a login if the member has not requested another link prior to logging in.  At any rate, index.php and many other files have an if logged else function on them that makes it so the Join Now is not seen by a logged in member (though Admin would see it on a D6 site).  So, I'm wondering exactly how you've disabled your Hello_Member function here if your seeing the Join Now/Login items when your logged in as a member (not as Admin)

 

 

Quote · 26 Aug 2009

I really haven't the slightest idea. Is there any sort of change log? When I hover over the log-in button, my status bar says it points to member.php. When I click the log-in button, in the URL, I see /member.php for about a second before it redirects to, simply put, /(no additional direction).

Quote · 26 Aug 2009

It seems I fixed this in a roundabout way...

I changed the top member block to have a log-in form (per instructions here). Now, when I log-in, I'm taken to the correct page. Not exactly how I was planning on solving this, but hey, it works for me!

Quote · 27 Aug 2009
 
 
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.