Hi Greg,
If your using the get_records function to return your search results, you can use the keywords search field format to return parts of words. You can read more on it here:
http://www.interactivetools.com/docs/cmsbuilder/viewer_search.html
Here is an example of how you might implement it:
===============================================
<?php header('Content-type: text/html; charset=utf-8'); ?>
<?php
/* STEP 1: LOAD RECORDS - Copy this PHP code block near the TOP of your page */
// load viewer library
$libraryPath = 'cmsAdmin/lib/viewer_functions.php';
$dirsToCheck = array('C:/wamp/www/','','../','../../','../../../');
foreach ($dirsToCheck as $dir) { if (@include_once("$dir$libraryPath")) { break; }}
if (!function_exists('getRecords')) { die("Couldn't load viewer library, check filepath in sourcecode."); }
// load records from 'blog' search has been set to true.
list($blogRecords, $blogMetaData) = getRecords(array(
'tableName' => 'blog',
'loadUploads' => true,
'allowSearch' => true,
));
?>
=======================================================
<!-- This search form will return any entries which contain the searched word in the title. -->
<form action="?" method="get" >
<input type="text" name="title_keyword" value="" />
<input type="submit" name="submit" value="Search!" />
</form>
<!-- display all/search results -->
<!-- STEP2: Display Records (Paste this where you want your records to be listed) -->
<h1>Blog - List Page Viewer</h1>
<?php foreach ($blogRecords as $record): ?>
Record Number: <?php echo htmlencode($record['num']) ?><br/>
Title: <?php echo htmlencode($record['title']) ?><br/>
Date: <?php echo date("D, M jS, Y g:i:s a", strtotime($record['date'])) ?><br/><!-- For date formatting codes see: http://www.php.net/date -->
Content: <?php echo $record['content']; ?><br/>
jhgjhg (value): <?php echo $record['jhgjhgjhgjhg'] ?><br/>
jhgjhg (label): <?php echo $record['jhgjhgjhgjhg:label'] ?><br/>
_link : <a href="<?php echo $record['_link'] ?>"><?php echo $record['_link'] ?></a><br/>
<!-- STEP 2a: Display Uploads for field 'uploads' (Paste this anywhere inside STEP2 to display uploads) -->
<!-- Upload Fields: extension, thumbFilePath, isImage, hasThumbnail, urlPath, width, height, thumbUrlPath, thumbWidth, thumbHeight, info1, info2, info3, info4, info5 -->
Uploads:
<blockquote>
<?php foreach ($record['uploads'] as $index => $upload): ?>
Upload Url: <?php echo $upload['urlPath'] ?><br/>
<!-- Uploads: Copy the tags from below that you want to use, and erase the ones you don't need.
Thumb Url: <?php echo $upload['thumbUrlPath'] ?><br/><br/>
Download Link: <a href="<?php echo $upload['urlPath'] ?>">Download <?php echo $upload['filename'] ?></a><br/><br/>
Image Tags:<br/>
<img src="<?php echo $upload['urlPath'] ?>" width="<?php echo $upload['width'] ?>" height="<?php echo $upload['height'] ?>" alt="" />
<img src="<?php echo $upload['thumbUrlPath'] ?>" width="<?php echo $upload['thumbWidth'] ?>" height="<?php echo $upload['thumbHeight'] ?>" alt="" /><br/>
info1 (Title) : <?php echo htmlencode($upload['info1']) ?><br/>
info2 (Caption) : <?php echo htmlencode($upload['info2']) ?><br/><br/>
Extension: <?php echo $upload['extension'] ?><br/>
isImage: <?php if ($upload['isImage']): ?>Yes<?php else: ?>No<?php endif ?><br/>
hasThumbnail: <?php if ($upload['hasThumbnail']): ?>Yes<?php else: ?>No<?php endif ?><br/>
<hr/>
// end uploads comment tag -->
<?php endforeach ?>
</blockquote>
<!-- STEP2a: /Display Uploads -->
<hr/>
<?php endforeach ?>
===============================
Thanks
Greg
Greg Thomas
PHP Programmer - interactivetools.com