Change Search Events ?

How do I change the "Select events to show" search?  Right now you have two choices in searching... "Show All Events" and "Show Events by Country".  I would like to remove the "Show Events by Country" or replace it with Search by keyword.

Any ideas on how to accomplish this?

Quote · 2 Aug 2008

Admin --> Builders --> Navigation Menu Builder --> Events

 

This is were all your drop down options are stored.

 

You'll also possibly need to edit the events.php

Quote · 2 Aug 2008

I didn't see any of what I am asking for in the areas that you suggested?

Quote · 2 Aug 2008

Try again and scroll to the right. You'll see Events Block and all the extensions for that Block which become links in the Main Navigation Menu Drop-Down including search.

Quote · 3 Aug 2008

Sorry, what I meant was I see the areas that you are speaking of... but... I don't see any of the things that I am speaking of in those areas.... such as...the choice on the search of "Show Events by Country".  It is not on any of the blocks nor is it on the events.php page?

I would like to remove that option.

Quote · 3 Aug 2008

I also would like to REMOVE or CHANGE the SEARCH BY COUNTRY.

I looked at the events.php...not so sure that this is the file to edit/change.

Can we get some direction here? Thanks.

Admin --> Builders --> Navigation Menu Builder --> Events

This is were all your drop down options are stored.

You'll also possibly need to edit the events.php

***************************************************************************/

require_once( 'inc/header.inc.php' );
require_once( BX_DIRECTORY_PATH_INC . 'design.inc.php' );
require_once( BX_DIRECTORY_PATH_INC . 'prof.inc.php' );
require_once( BX_DIRECTORY_PATH_INC . 'utils.inc.php' );
require_once( BX_DIRECTORY_PATH_INC . 'profiles.inc.php' );
require_once( BX_DIRECTORY_PATH_INC . 'sdating.inc.php' );
require_once( BX_DIRECTORY_PATH_INC . 'images.inc.php' );


require_once( BX_DIRECTORY_PATH_CLASSES . 'BxDolEvents.php' );

// --------------- page variables and login

$_page['name_index'] = 55;
$_page['css_name'] = 'sdating.css';
$_page['extra_css'] = $oTemplConfig -> sCalendarCss;
$_page['extra_js'] = $oTemplConfig -> sTinyMceEditorJS;

check_logged();

$_page['header'] = _t("_sdating_h");
$_page['header_text'] = _t("_sdating_h");

$oEvents = new BxDolEvents();
if ($logged['admin'])
$oEvents->bAdminMode = TRUE;

$_ni = $_page['name_index'];
$_page_cont[$_ni]['page_main_code'] = PageCompPageMainCode();

function PageCompPageMainCode() {
global $oEvents;
$bEventCreating = (getParam('enable_event_creating') == 'on');
$sRetHtml = '';
$sRetHtml .= $oEvents -> PrintCommandForms();

switch ( $_REQUEST['action'] ) {
//print functions
case 'show':
$sRetHtml .= $oEvents->PageSDatingShowEvents();
break;
case 'show_info':
$sRetHtml .= $oEvents->PageSDatingShowInfo();
break;
case 'show_part':
$sRetHtml .= $oEvents->PageSDatingShowParticipants();
break;
case 'search':
$sRetHtml .= $oEvents->PageSDatingShowForm();
$sRetHtml .= $oEvents->PageSDatingShowEvents();
break;
case 'search_by_tag':
$sRetHtml .= $oEvents->ShowSearchResult();
break;
case 'calendar':
$sRetHtml .= $oEvents->PageSDatingCalendar();
break;

/*case 'select_match':
$sRetHtml .= $oEvents->PageSDatingSelectMatches();
break;*/

//forms of editing
case 'new':
if ($bEventCreating) {
if (isset($_POST['event_save'])) {
$aPostAdv = $oEvents -> FillPostEventArrByPostValues();
$aErr = $oEvents -> CheckEventErrors( $aPostAdv );
if( empty( $aErr ) ) {
$add_res = $oEvents->SDAddEvent();
$_REQUEST['event_id'] = mysql_insert_id();
$sRetHtml .= $oEvents->PageSDatingShowInfo();
} else {
$sRetHtml .= $oEvents->PageSDatingNewEventForm(-1, $aErr);
}
} else {
$sRetHtml .= $oEvents->PageSDatingNewEventForm(-1);
}
} else
$sRetHtml .= '';
break;
case 'edit_event':
$iEventID = (int)($_POST['EditEventID']);
$sRetHtml .= $oEvents->PageSDatingNewEventForm($iEventID);
break;

//non safe functions
case 'event_save':
$iEventID = (int)($_POST['EditedEventID']);
$aPostAdv = $oEvents -> FillPostEventArrByPostValues();
$aErr = $oEvents -> CheckEventErrors( $aPostAdv );
if( empty( $aErr ) ) {
$add_res = $oEvents->SDAddEvent($iEventID);//like update
$_REQUEST['event_id'] = $iEventID;
$sRetHtml .= $oEvents->PageSDatingShowInfo();
} else {
$sRetHtml .= $oEvents->PageSDatingNewEventForm($iEventID, $aErr);
}
break;
case 'delete_event':
$sRetHtml .= $oEvents->PageSDatingDeleteEvent();
$sRetHtml .= $oEvents->PageSDatingShowEvents();
break;
default:
$sRetHtml .= $oEvents->PageSDatingShowEvents();
}
return $sRetHtml;
}

PageCode();

?>

Quote · 8 Aug 2008

i have searched the file BxDolEvents.php - if i were looking to get rid of the country search i would first get rid of the country itself on this file. there are 112 instances of where its calling for the "Country" so this is where i would start looking first and just try commenting out all the occurrences of where its calling for country if you want to. backup the original file, so if things go awry, then all you have to do is restore the file and try again.

Line 81 :         $sEventCountry    = process_db_input( $_POST['event_country'] );
Line 81 :         $sEventCountry    = process_db_input( $_POST['event_country'] );
Line 95 :             'City' => $sEventCity, 'Country' => $sEventCountry, 'Place' => $sEventPlace, 'Event start' => $sEventStart,
Line 95 :             'City' => $sEventCity, 'Country' => $sEventCountry, 'Place' => $sEventPlace, 'Event start' => $sEventStart,
Line 185 :                 case 'Country':
Line 250 :         $sEventCountry = process_db_input( $_POST['event_country'] );
Line 250 :         $sEventCountry = process_db_input( $_POST['event_country'] );
Line 369 :                         `Country` = '{$sEventCountry}',
Line 369 :                         `Country` = '{$sEventCountry}',
Line 410 :                         `Country` = '{$sEventCountry}',
Line 410 :                         `Country` = '{$sEventCountry}',
Line 466 :         $sCommonSelectSQL = "DISTINCT `SDatingEvents`.`ID`, `Title`, `EntryUri`, `Description`, `StatusMessage`, `Country`, `City`, `Place`, `PhotoFilename`, `Tags`, ";
Line 478 :             case 'country':
Line 479 :                 // queries for showing 'by country'
Line 488 :                         AND `SDatingEvents`.`Country` = '". process_db_input($_REQUEST['show_events_country']) ."'
Line 488 :                         AND `SDatingEvents`.`Country` = '". process_db_input($_REQUEST['show_events_country']) ."'
Line 496 :                         AND `Country` = '". process_db_input($_REQUEST['show_events_country']) ."'
Line 496 :                         AND `Country` = '". process_db_input($_REQUEST['show_events_country']) ."'
Line 608 :                 $sCountry = ($aResSQL['Country']!='') ? _t($aPreValues['Country'][$aResSQL['Country']]['LKey']) : '';
Line 608 :                 $sCountry = ($aResSQL['Country']!='') ? _t($aPreValues['Country'][$aResSQL['Country']]['LKey']) : '';
Line 608 :                 $sCountry = ($aResSQL['Country']!='') ? _t($aPreValues['Country'][$aResSQL['Country']]['LKey']) : '';
Line 608 :                 $sCountry = ($aResSQL['Country']!='') ? _t($aPreValues['Country'][$aResSQL['Country']]['LKey']) : '';
Line 661 :             {$sPlaceC}: <div class="clr3">{$sCountry}{$sCity}{$sPlace}</div>
Line 772 :         $sCountryC = _t('_Country');
Line 772 :         $sCountryC = _t('_Country');
Line 818 :                 `Country`,
Line 1053 :         $sCountryPic = _t($aPreValues['Country'][$aEventData['Country']]['LKey']);
Line 1053 :         $sCountryPic = _t($aPreValues['Country'][$aEventData['Country']]['LKey']);
Line 1053 :         $sCountryPic = _t($aPreValues['Country'][$aEventData['Country']]['LKey']);
Line 1228 :             {$sCountryC}: <div class="clr3">{$sCountryPic}</div>
Line 1228 :             {$sCountryC}: <div class="clr3">{$sCountryPic}</div>
Line 1468 :         $sShowEventsByCountryC = _t('_Show events by country');
Line 1468 :         $sShowEventsByCountryC = _t('_Show events by country');
Line 1478 :         $sCountryDisabled = 'disabled="disabled"';
Line 1480 :         if ( $_REQUEST['show_events'] == 'country' ) {
Line 1481 :             $aShow['country'] = process_pass_data($_REQUEST['show_events_country']);
Line 1481 :             $aShow['country'] = process_pass_data($_REQUEST['show_events_country']);
Line 1482 :             $sCountryDisabled = '';
Line 1498 :         $sCountryChk = ($_REQUEST['show_events'] == 'country') ? 'checked="checked"' : '';
Line 1498 :         $sCountryChk = ($_REQUEST['show_events'] == 'country') ? 'checked="checked"' : '';
Line 1500 :         $sCountryOptions = '';
Line 1501 :         $sSelCountry = isset($aShow['country']) ? $aShow['country'] : $aMemberData['Country'];
Line 1501 :         $sSelCountry = isset($aShow['country']) ? $aShow['country'] : $aMemberData['Country'];
Line 1501 :         $sSelCountry = isset($aShow['country']) ? $aShow['country'] : $aMemberData['Country'];
Line 1501 :         $sSelCountry = isset($aShow['country']) ? $aShow['country'] : $aMemberData['Country'];
Line 1502 :         foreach ( $aPreValues['Country'] as $key => $value ) {
Line 1503 :             $sCountrySelected = ( $sSelCountry == $key ) ? 'selected="selected"' : '';
Line 1503 :             $sCountrySelected = ( $sSelCountry == $key ) ? 'selected="selected"' : '';
Line 1504 :             $sCountryOptions .= "<option value=\"{$key}\" ". $sCountrySelected ." >". _t($value['LKey']) ."</option>";
Line 1504 :             $sCountryOptions .= "<option value=\"{$key}\" ". $sCountrySelected ." >". _t($value['LKey']) ."</option>";
Line 1513 :             document.getElementById('show_events_select_id').disabled = !(document.getElementById('show_events_country_id').checked);
Line 1528 :                     <input type="radio" name="show_events" id="show_events_country_id" value="country" style="vertical-align: middle;" onClick="javascript: updateShowControls();"  {$sCountryChk} />
Line 1528 :                     <input type="radio" name="show_events" id="show_events_country_id" value="country" style="vertical-align: middle;" onClick="javascript: updateShowControls();"  {$sCountryChk} />
Line 1528 :                     <input type="radio" name="show_events" id="show_events_country_id" value="country" style="vertical-align: middle;" onClick="javascript: updateShowControls();"  {$sCountryChk} />
Line 1529 :                     &nbsp;<label for="show_events_country_id">{$sShowEventsByCountryC}</label>
Line 1529 :                     &nbsp;<label for="show_events_country_id">{$sShowEventsByCountryC}</label>
Line 1532 :                     <select class="no" name="show_events_country" id="show_events_select_id" {$sCountryDisabled} >{$sCountryOptions}</select>
Line 1532 :                     <select class="no" name="show_events_country" id="show_events_select_id" {$sCountryDisabled} >{$sCountryOptions}</select>
Line 1532 :                     <select class="no" name="show_events_country" id="show_events_select_id" {$sCountryDisabled} >{$sCountryOptions}</select>
Line 1602 :         $sCountryFilter = 'all';
Line 1603 :         $sRCalendarCountry = isset($_REQUEST['calendar_country']) ? $_REQUEST['calendar_country'] : $aMemberData['Country'];
Line 1603 :         $sRCalendarCountry = isset($_REQUEST['calendar_country']) ? $_REQUEST['calendar_country'] : $aMemberData['Country'];
Line 1603 :         $sRCalendarCountry = isset($_REQUEST['calendar_country']) ? $_REQUEST['calendar_country'] : $aMemberData['Country'];
Line 1603 :         $sRCalendarCountry = isset($_REQUEST['calendar_country']) ? $_REQUEST['calendar_country'] : $aMemberData['Country'];
Line 1604 :         $sRCalendarCountry = ($sRCalendarCountry=='') ? 'all' : $sRCalendarCountry ;
Line 1604 :         $sRCalendarCountry = ($sRCalendarCountry=='') ? 'all' : $sRCalendarCountry ;
Line 1604 :         $sRCalendarCountry = ($sRCalendarCountry=='') ? 'all' : $sRCalendarCountry ;
Line 1605 :         if ( $sRCalendarCountry == 'all' ) {
Line 1606 :             $sCountryFilter = '';
Line 1609 :             $sCountryFilter = 'AND `Country` = \''. process_db_input($sRCalendarCountry) . '\'';
Line 1609 :             $sCountryFilter = 'AND `Country` = \''. process_db_input($sRCalendarCountry) . '\'';
Line 1609 :             $sCountryFilter = 'AND `Country` = \''. process_db_input($sRCalendarCountry) . '\'';
Line 1624 :                             {$sCountryFilter}
Line 1658 :         $sShowEventsByCountryC = _t('_Show events by country');
Line 1658 :         $sShowEventsByCountryC = _t('_Show events by country');
Line 1673 :         $sCalSel = ( $sRCalendarCountry == 'all' ) ? 'selected="selected"' : '';
Line 1675 :         foreach ( $aPreValues['Country'] as $key => $value ) {
Line 1676 :             $sCalKeySel = ( $sRCalendarCountry == "{$key}" ) ? 'selected="selected"' : '';
Line 1681 :         $sCalendarCountry = (isset($_REQUEST['calendar_country'])) ? '&amp;calendar_country='. process_pass_data($_REQUEST['calendar_country']) : '';
Line 1681 :         $sCalendarCountry = (isset($_REQUEST['calendar_country'])) ? '&amp;calendar_country='. process_pass_data($_REQUEST['calendar_country']) : '';
Line 1681 :         $sCalendarCountry = (isset($_REQUEST['calendar_country'])) ? '&amp;calendar_country='. process_pass_data($_REQUEST['calendar_country']) : '';
Line 1681 :         $sCalendarCountry = (isset($_REQUEST['calendar_country'])) ? '&amp;calendar_country='. process_pass_data($_REQUEST['calendar_country']) : '';
Line 1682 :         $sCalendarPrevHref = $_SERVER['PHP_SELF']."?action=calendar&amp;month={$iPrevMonth}-{$iPrevYear}".$sCalendarCountry;
Line 1684 :         $sCalendarNextHref = $_SERVER['PHP_SELF']."?action=calendar&amp;month={$iNextMonth}-{$iNextYear}".$sCalendarCountry;
Line 1740 :     <form id="calendarCountryForm" action="{$_SERVER['PHP_SELF']}" method="get" style="margin: 0px;">
Line 1743 :         {$sShowEventsByCountryC}&nbsp;
Line 1744 :         <select class="no" name="calendar_country" onchange="javascript: document.forms['calendarCountryForm'].submit();" style="vertical-align: middle;">{$sCalendarOptions}</select>
Line 1744 :         <select class="no" name="calendar_country" onchange="javascript: document.forms['calendarCountryForm'].submit();" style="vertical-align: middle;">{$sCalendarOptions}</select>
Line 1816 :         $sMemberCountry = ($this->bAdminMode) ? getParam( 'default_country' ) : $aMemberData['Country'];
Line 1816 :         $sMemberCountry = ($this->bAdminMode) ? getParam( 'default_country' ) : $aMemberData['Country'];
Line 1816 :         $sMemberCountry = ($this->bAdminMode) ? getParam( 'default_country' ) : $aMemberData['Country'];
Line 1821 :         $sCountryC = _t('_Country');
Line 1821 :         $sCountryC = _t('_Country');
Line 1847 :             $sSelectedCountry = $aEvent['Country'];
Line 1847 :             $sSelectedCountry = $aEvent['Country'];
Line 1848 :             $sSitySrc = $site['flags'].strtolower($sSelectedCountry);
Line 1876 :             $sSelectedCountry = isset($_POST['event_country']) ? $_POST['event_country'] : $sMemberCountry;
Line 1876 :             $sSelectedCountry = isset($_POST['event_country']) ? $_POST['event_country'] : $sMemberCountry;
Line 1876 :             $sSelectedCountry = isset($_POST['event_country']) ? $_POST['event_country'] : $sMemberCountry;
Line 1876 :             $sSelectedCountry = isset($_POST['event_country']) ? $_POST['event_country'] : $sMemberCountry;
Line 1877 :             $sSitySrc = $site['flags'].strtolower($sSelectedCountry);
Line 1889 :         foreach ( $aPreValues['Country'] as $key => $value ) {
Line 1890 :             $sSC = ($sSelectedCountry == $key) ? 'selected="selected"' : '';
Line 1901 :         var vElem = document.getElementById('event_country_id');
Line 2053 :         <td class="form_label">{$sCountryC}:</td>
Line 2055 :             <select class="form_select" name="event_country" id="event_country_id" onchange="javascript: changeFlag(this.value);">
Line 2055 :             <select class="form_select" name="event_country" id="event_country_id" onchange="javascript: changeFlag(this.value);">
Line 2157 :             $sCountry = ($aResSQL['Country']!='') ? _t($aPreValues['Country'][$aResSQL['Country']]['LKey']) : '';
Line 2157 :             $sCountry = ($aResSQL['Country']!='') ? _t($aPreValues['Country'][$aResSQL['Country']]['LKey']) : '';
Line 2157 :             $sCountry = ($aResSQL['Country']!='') ? _t($aPreValues['Country'][$aResSQL['Country']]['LKey']) : '';
Line 2157 :             $sCountry = ($aResSQL['Country']!='') ? _t($aPreValues['Country'][$aResSQL['Country']]['LKey']) : '';
Line 2203 :             {$sPlaceC}: <div class="clr3">{$sCountry}{$sCity}{$sPlace}</div>

i hated to post this long of a post to show source, but hopefully those of you who have to trudge through this will find forgiveness in your heart for me. i suppose i coulda just posted the line numbers?

oh well shoot me.

later,
DosDawg

When a GIG is not enough --> Terabyte Dolphin Technical Support - Server Management and Support
Quote · 9 Aug 2008

Hey Dawg...thanks....!! Laughing

Quote · 9 Aug 2008

>> i suppose i coulda just posted the line numbers?

Or just told them to seach the file for 'country' and delete all the lines with it in it  .....

Quote · 9 Aug 2008

Hey dom,

-

Did you implement this, DosDawg's solution? Did it work ok or were there any "tricks" involved?

-

~~ Lorren

-

How do I change the "Select events to show" search?  Right now you have two choices in searching... "Show All Events" and "Show Events by Country".  I would like to remove the "Show Events by Country" or replace it with Search by keyword.

Any ideas on how to accomplish this?

Quote · 7 Sep 2008
 
 
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.