A few Questions

2 posts by 2 authors in: Forums > CMS Builder
Last Post: September 20, 2011   (RSS)

Re: [MickC] A few Questions

By Jason - September 20, 2011

Hi,

A) The markup that outputs the "Advanced Search" options is output in cmsAdmin/lib/menus/default/list.php. You'll see this code (I've highlighted the parts that are outputting the labels and HTML

<?php
$searchFields = getSearchFieldLabelsAndHTML();
foreach ($searchFields as $labelAndHTML):
list($searchFieldLabel, $searchFieldHTML) = $labelAndHTML;

$searchFieldClass = @$searchFieldClass ? 'secondarySearchField' : 'primarySearchField';
$isFirstSearchField = ($searchFieldClass == 'primarySearchField');
$searchFieldStyle = ($isFirstSearchField || @$_REQUEST['showAdvancedSearch']) ? '' : 'display: none';
?>
<tr class="<?php echo $searchFieldClass ?>" style="<?php echo $searchFieldStyle ?>">
<td><?php echo $searchFieldLabel ?> &nbsp;</td>
<td>
<?php echo $searchFieldHTML ?> &nbsp;
<?php if ($isFirstSearchField && count($searchFields) > 1): ?>
<span class="hideShowSecondarySearchFields" style="<?php if (@$_REQUEST['showAdvancedSearch']) { echo 'display: none'; } ?>"><a href="#" onclick="return toggleAdvancedSearchOptions();"><?php et('advanced search &gt;&gt;'); ?></a></span>
<span class="hideShowSecondarySearchFields" style="<?php if (!@$_REQUEST['showAdvancedSearch']) { echo 'display: none'; } ?>"><a href="#" onclick="return toggleAdvancedSearchOptions();"><?php et('&lt;&lt; basic search'); ?></a></span>
<?php endif ?>
</td>
</tr>
<?php endforeach ?>


It's important to note that any changes made to this will be overwritten if you upgrade your version of CMS Builder in the future.

B) You can actually change that to display any field in the accounts table. If you open up cmsAdmin/lib/menus/default/edit_functions.php and look around line 77 you should see this line:

$usernameField = 'username'; // change this to 'username' to show usernames

If you want to use fullname instead, change the line like this:

$usernameField = 'fullname'; // change this to 'username' to show usernames

C) This would take some customization of the report builder plugin. The easiest and quickest solution would be to use the "Export as CSV" button. You can then view the report in an application like Excel and print from there.

Hope this helps get you started.
---------------------------------------------------
Jason Sauchuk - Project Manager
interactivetools.com

Hire me! Save time by getting our experts to help with your project.
http://www.interactivetools.com/consulting/