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.