Including upload info fields in multisearch results

12 posts by 2 authors in: Forums > CMS Builder
Last Post: July 13, 2020   (RSS)

By gkornbluth - July 13, 2020 - edited: July 13, 2020

Wow!

Thanks again Daniel, for a very complete, and complex response.

A few small changes and your suggestions worked perfectly...

For the info Fields:

<?php if ($record['tablename'] == 'uploads'): ?>
<?php $uploadRecord = mysql_get('uploads', $record['_summary']); ?>

<?PHP $uploadRecord['info1'] = preg_replace("/[\"]/", "''", $uploadRecord['info1'] ); ?>
<?PHP $uploadRecord['info2'] = preg_replace("/[\"]/", "''", $uploadRecord['info2'] ); ?>
<?PHP $uploadRecord['info3'] = preg_replace("/[\"]/", "''", $uploadRecord['info3'] ); ?>
<?PHP $uploadRecord['info4'] = preg_replace("/[\"]/", "''", $uploadRecord['info4'] ); ?>
<?PHP $uploadRecord['info5'] = preg_replace("/[\"]/", "''", $uploadRecord['info5'] ); ?>

<br> <div align='center' style='font-size:1.4em; vertical-align:top; text-align:left;' class='text_font' ><?php echo($uploadRecord['info1']) ?> <?php echo($uploadRecord['info2']) ?> <?php echo($uploadRecord['info3']) ?> <?php echo($uploadRecord['info4']) ?> <?php echo($uploadRecord['info5']) ?></div>

And for the title link:

<?php
$originRecord = mysql_get($uploadRecord['tableName'], $uploadRecord['recordNum']);
if (!empty( $originRecord['title'] )) {
$title = $originRecord['title'];
}
if (empty( $originRecord['title'] )) {
echo '(Sorry, This Title Is Empty)';
}
?><br><span class="navigation_font" style="font-size:1.4em">This image can be found in </span><a href="gallery_detail.php?<?php echo $originRecord['num'] ?>"><span class="navigation_font" style="font-size:1.2em; text-decoration:underline"><?php echo $title ?></span></a>

Thanks again.

Best,

Jerry Kornbluth

The first CMS Builder reference book is now available on-line!







Take advantage of a free 3 month trial subscription, only for CMSB users, at: http://www.thecmsbcookbook.com/trial.php