Multisearch.php results links

12 posts by 4 authors in: Forums > CMS Builder
Last Post: June 9, 2011   (RSS)

By rishi_143 - June 2, 2011

Hi,
Helping a friend out in adding search to his CMSB website.
I have managed to get the multisearch to display results,
but the links in the results are just looping back to multisearch.php

I used the standard code, only modified the tables n fieldnames.

Any help is greatly appreciated.

ps: CMSB 1.26
the actual webdesigner has disappeared (after charging a bomb) so m trying to figure this out for my friend.

Thanx in advance.

Re: [rishi_143] Multisearch.php results links

By Jason - June 2, 2011

Hi,

Would you be able to attach a copy of the code you're using and provide a link to where we can see the problem in action? If you don't want to post this information in the forum, you can send it in an email to support@interactivetools.com.

Hope this helps.
---------------------------------------------------
Jason Sauchuk - Project Manager
interactivetools.com

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

Re: [rishi_143] Multisearch.php results links

By Jason - June 3, 2011

Hi,

It looks like the issue is with the value of "viewerUrl" :

$searchTables['electrical_inst'] = array(
'viewerUrl' => 'multiSearch.php',
'titleField' => 'title',
'summaryField' => 'content',
'searchFields' => array('title','content'),
);

$searchTables['news'] = array(
'viewerUrl' => 'multiSearch.php',
'titleField' => 'title',
'summaryField' => 'summary',
'searchFields' => array('title','summary','content'),
);


You can change the value of viewerUrl from "multiSearch.php" to the page that you want to link to for of the sections your searching.

Hope this helps
---------------------------------------------------
Jason Sauchuk - Project Manager
interactivetools.com

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

Re: [Jason] Multisearch.php results links

By zip222 - June 3, 2011

This multisearch is really cool. I knew this existed but hadn't given it a try until. fairly easy to implement. Question though...

If I want my title fields to be more descriptive, how would I go about doing that. For example, I want the titles in the results to look this:

Portfolio / Interactive / Project Title

"Project Title" is only thing that I can pull from the CMS. The other text would need to prepended to the titleFields. I would be searching multiple tables at the same time, each requiring a unique set of prepended text.

Re: [Jason] Multisearch.php results links

By rishi_143 - June 4, 2011

Hi,

It looks like the issue is with the value of "viewerUrl" :

$searchTables['electrical_inst'] = array(
'viewerUrl' => 'multiSearch.php',
'titleField' => 'title',
'summaryField' => 'content',
'searchFields' => array('title','content'),
);

$searchTables['news'] = array(
'viewerUrl' => 'multiSearch.php',
'titleField' => 'title',
'summaryField' => 'summary',
'searchFields' => array('title','summary','content'),
);


You can change the value of viewerUrl from "multiSearch.php" to the page that you want to link to for of the sections your searching.

Hope this helps


Hi Jason,
Thanx for solving my problem,
Just one thing - what must the viewer URL be, just a container page or the details page of that section eg: elect_instDetail.php

Thanx again

Re: [rishi_143] Multisearch.php results links

By Jason - June 5, 2011

Hi,

The viewerUrl page is the page where you will view the details of a specific record.

For example, if you use a file called newsDetails.php to view an individual news record, you would probably what to use this as your viewerUrl for the news section.

Hope this helps
---------------------------------------------------
Jason Sauchuk - Project Manager
interactivetools.com

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

Re: [Jason] Multisearch.php results links

By rishi_143 - June 6, 2011

Hey Jason,
Works perfect, thanx alot for your patience and prompt replies.
I will surely recommend CMSB to my other friends n clients.

Thanx again,

Rishi

Re: [zip222] Multisearch.php results links

By zip222 - June 7, 2011

I think this question got lost in the shuffle. My own fault for trying to hijack the thread :)

Help?

Re: [zip222] Multisearch.php results links

By Jason - June 8, 2011

Hi,

Sorry for the delay there.

You can modify the title while you're outputting your records:

<!-- STEP2: Display Record List -->
<?php foreach ($searchRows as $record): ?>
<a href="<?php echo $record['_link'] ?>">Add Extra Text Here<?php echo $record['_title'] ?></a><br/>
<?php if ($record['_summary']): ?>
<?php echo $record['_summary'] ?><br/>
<?php else: ?>
No description available for page.<br/>
<?php endif ?>
<a href="<?php echo $record['_link'] ?>" style="color: #008000"><?php echo $record['_link'] ?></a><br/><br/>
<?php endforeach ?>
<!-- /STEP2: Display Record List -->


Hope this helps
---------------------------------------------------
Jason Sauchuk - Project Manager
interactivetools.com

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