A few Questions

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

By MickC - September 20, 2011

Hi guys,

I'm going quite well with this system, I just have a few queries that should be easy to answer.

I have bought CMSB 2.12, CreatePDF plugin, Report Builder, and the Basic Auto template.

A) Most of our Internal staff will be using the admin side of the software, and to make it easier, I want to be able to modify the layout of the Section.

For example, I want to have about 8-10 options under Advanced search, but want them spread out across the top of the section, not one under the other.

I have explored the .php files, and heavily modified the style.css and the SimplAdmin images to reflect our company colors, but cant seem to see where you can alter the layout of the actual section listings

B) in the same area, i have listings that when opened, have "Created by" and "updated by", but i want this to state the users Full name, not the login name. I know how to do it in with the createdBy.fullname for the lsiting itself, but not the other parts of the page.

C)Id like to add the option of making a button to print the reports that the report builder makes, or at least a print button

That's enough for now, im off to the plug-ins forum to get the most out of my 90 days free support [;)]

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/