Hi all,
How do I get rid of video, sound & files as option on the Keyword Search page?
Regards,
Harvliet
|
Maybe a way to remove them from the database? |
Remove from database table sys_objects_search
Then clear the dolphin cache.
https://www.deanbassett.com |
Thanks for the help man.
Remove from database table sys_objects_search
Then clear the dolphin cache.
|
@ deano92964: Do you by any chance know how to get checkboxes in 2 columns for D7.0.9?
For D7.0.2, mrpowless had this solution. $sDivider = '--'; only puts it horizontal
Old post http://www.boonex.com/forums/?action=goto&my_threads=1#topic/How-do-I-change-checkboxes-display-D7-0-2.htm
==========================
work is done in templates/base/scripts/BxBaseFormView.php
genInputCheckboxSet
$sDivider = '<br />';
change to:
$sDivider = '--';
then see it works in changin
then use this with :
$sOptions .= ($sNewInput . $sDivider); &&
$sCode = <<<BLAH <div $sAttrs> $sOptions </div> BLAH;
to format a new 3row table from it.
have fun...
|
I have a much more complex way of doing it. It's also more flexible. You can control the number of columns and the width.
Origional code from templates\base\scripts\BxBaseFormView.php at about line 937
function genInputCheckboxSet(&$aInput) {
$aAttrs = empty($aInput['attrs']) ? array() : $aInput['attrs'];
// add default className to attributes
$aAttrs['class'] = "form_input_{$aInput['type']}" . (isset($aAttrs['class']) ? (' ' . $aAttrs['class']) : '');
$aAttrs['name'] = $aInput['name'];
// for inputs with labels generate id
if (isset($aInput['label']))
$aAttrs['id'] = $this->getInputId($aInput);
$sAttrs = $this->convertArray2Attrs($aAttrs);
// generate options
$sDivider = isset($aInput['dv']) ? $aInput['dv'] : ' ';
$aCurValues = $aInput['value'] ? (is_array($aInput['value']) ? $aInput['value'] : array($aInput['value'])) : array();
$sOptions = '';
if (isset($aInput['values']) and is_array($aInput['values'])) {
if (count($aInput['values']) > 3 && $sDivider == ' ')
$sDivider = '<br />';
// generate complex input using simple standard inputs
foreach ($aInput['values'] as $sValue => $sLabel) {
// create new simple input
$aNewInput = array(
'type' => 'checkbox',
'name' => $aInput['name'] . '[]',
'value' => $sValue,
'checked' => in_array($sValue, $aCurValues),
'label' => $sLabel,
);
$sNewInput = $this->genInput($aNewInput);
// attach new input to complex
$sOptions .= ($sNewInput . $sDivider);
}
}
// generate element
$sCode = <<<BLAH
<div $sAttrs>
$sOptions
</div>
BLAH;
return $sCode;
}
Change to look like this. I have marked all my changes.
function genInputCheckboxSet(&$aInput) {
$aAttrs = empty($aInput['attrs']) ? array() : $aInput['attrs'];
// add default className to attributes
$aAttrs['class'] = "form_input_{$aInput['type']}" . (isset($aAttrs['class']) ? (' ' . $aAttrs['class']) : '');
$aAttrs['name'] = $aInput['name'];
// for inputs with labels generate id
if (isset($aInput['label']))
$aAttrs['id'] = $this->getInputId($aInput);
$sAttrs = $this->convertArray2Attrs($aAttrs);
// generate options
$sDivider = isset($aInput['dv']) ? $aInput['dv'] : ' ';
$aCurValues = $aInput['value'] ? (is_array($aInput['value']) ? $aInput['value'] : array($aInput['value'])) : array();
$sOptions = '';
if (isset($aInput['values']) and is_array($aInput['values'])) {
if (count($aInput['values']) > 3 && $sDivider == ' ')
$sDivider = '<br />';
// generate complex input using simple standard inputs
// Deano Code Begin // $iColumnWidth = 100; // Width in pixels of each checkbox column. $iNumberOfColumns = 2; // Number of desired checkbox columns. $sStart = '<div style="width: ' . $iColumnWidth . 'px;float: left;">'; $sEnd = '</div>'; $iCurrentCount = 0; // Deano Code End //
foreach ($aInput['values'] as $sValue => $sLabel) { // create new simple input $aNewInput = array( 'type' => 'checkbox', 'name' => $aInput['name'] . '[]', 'value' => $sValue, 'checked' => in_array($sValue, $aCurValues), 'label' => $sLabel, ); $sNewInput = $this->genInput($aNewInput); // attach new input to complex //$sOptions .= ($sNewInput . $sDivider); // Deano Code Begin + Comment out above line// $iCurrentCount ++; if($iCurrentCount >= 2) { $sNextLine = '<div class="clear_both"></div>'; $iCurrentCount = 0; } else { $sNextLine = ''; } $sOptions .= ($sStart . $sNewInput . $sEnd . $sNextLine); // Deano Code End //
}
}
// generate element
$sCode = <<<BLAH
<div $sAttrs>
$sOptions
</div>
BLAH;
return $sCode;
}
https://www.deanbassett.com |
@ deano92964: Thanks a lot man. I appreciate it.
I have a much more complex way of doing it. It's also more flexible. You can control the number of columns and the width.
Origional code from templates\base\scripts\BxBaseFormView.php at about line 937
function genInputCheckboxSet(&$aInput) {
$aAttrs = empty($aInput['attrs']) ? array() : $aInput['attrs'];
// add default className to attributes
$aAttrs['class'] = "form_input_{$aInput['type']}" . (isset($aAttrs['class']) ? (' ' . $aAttrs['class']) : '');
$aAttrs['name'] = $aInput['name'];
// for inputs with labels generate id
if (isset($aInput['label']))
$aAttrs['id'] = $this->getInputId($aInput);
$sAttrs = $this->convertArray2Attrs($aAttrs);
// generate options
$sDivider = isset($aInput['dv']) ? $aInput['dv'] : ' ';
$aCurValues = $aInput['value'] ? (is_array($aInput['value']) ? $aInput['value'] : array($aInput['value'])) : array();
$sOptions = '';
if (isset($aInput['values']) and is_array($aInput['values'])) {
if (count($aInput['values']) > 3 && $sDivider == ' ')
$sDivider = '<br />';
// generate complex input using simple standard inputs
foreach ($aInput['values'] as $sValue => $sLabel) {
// create new simple input
$aNewInput = array(
'type' => 'checkbox',
'name' => $aInput['name'] . '[]',
'value' => $sValue,
'checked' => in_array($sValue, $aCurValues),
'label' => $sLabel,
);
$sNewInput = $this->genInput($aNewInput);
// attach new input to complex
$sOptions .= ($sNewInput . $sDivider);
}
}
// generate element
$sCode = <<<BLAH
<div $sAttrs>
$sOptions
</div>
BLAH;
return $sCode;
}
Change to look like this. I have marked all my changes.
function genInputCheckboxSet(&$aInput) {
$aAttrs = empty($aInput['attrs']) ? array() : $aInput['attrs'];
// add default className to attributes
$aAttrs['class'] = "form_input_{$aInput['type']}" . (isset($aAttrs['class']) ? (' ' . $aAttrs['class']) : '');
$aAttrs['name'] = $aInput['name'];
// for inputs with labels generate id
if (isset($aInput['label']))
$aAttrs['id'] = $this->getInputId($aInput);
$sAttrs = $this->convertArray2Attrs($aAttrs);
// generate options
$sDivider = isset($aInput['dv']) ? $aInput['dv'] : ' ';
$aCurValues = $aInput['value'] ? (is_array($aInput['value']) ? $aInput['value'] : array($aInput['value'])) : array();
$sOptions = '';
if (isset($aInput['values']) and is_array($aInput['values'])) {
if (count($aInput['values']) > 3 && $sDivider == ' ')
$sDivider = '<br />';
// generate complex input using simple standard inputs
// Deano Code Begin // $iColumnWidth = 100; // Width in pixels of each checkbox column. $iNumberOfColumns = 2; // Number of desired checkbox columns. $sStart = '<div style="width: ' . $iColumnWidth . 'px;float: left;">'; $sEnd = '</div>'; $iCurrentCount = 0; // Deano Code End //
foreach ($aInput['values'] as $sValue => $sLabel) { // create new simple input $aNewInput = array( 'type' => 'checkbox', 'name' => $aInput['name'] . '[]', 'value' => $sValue, 'checked' => in_array($sValue, $aCurValues), 'label' => $sLabel, ); $sNewInput = $this->genInput($aNewInput); // attach new input to complex //$sOptions .= ($sNewInput . $sDivider); // Deano Code Begin + Comment out above line// $iCurrentCount ++; if($iCurrentCount >= 2) { $sNextLine = '<div class="clear_both"></div>'; $iCurrentCount = 0; } else { $sNextLine = ''; } $sOptions .= ($sStart . $sNewInput . $sEnd . $sNextLine); // Deano Code End //
}
}
// generate element
$sCode = <<<BLAH
<div $sAttrs>
$sOptions
</div>
BLAH;
return $sCode;
}
|