Support Forums

Redirecting an empty search result

This is a discussion on Redirecting an empty search result within the Technical Support forums, part of the Technical Support Forums category; v4.1.10 Developer Custom When a user searches for a listing that would require an advanced search is there a way ...


Go Back   68 Classifieds Forums > Technical Support Forums > Technical Support

Reply
 
Thread Tools Display Modes
Old 11-11-2010, 10:58 AM   #1
Customer
 
phpretard's Avatar
 
Join Date: Sep 2010
Posts: 17
Rep Power: 2
phpretard is on a distinguished road
Default Redirecting an empty search result

v4.1.10 Developer

Custom


When a user searches for a listing that would require an advanced search is there a way to redirect them to the advanced search page instead of the "...click here" to get to the advanced search page?

If I search for "xyz" then " sorry no result..." is displayed...I would like to redirect the user to the advanced search without having to click to go there.
__________________
I guess I must have just blacked out again ... not again!
phpretard is offline   Reply With Quote
Old 11-11-2010, 12:53 PM   #2
All Hands On Deck
 
 
Join Date: Mar 2008
Posts: 2,951
Rep Power: 73
seymourjames is a jewel in the rough
Default

You will need to put a redirect to search.php into a core file (searchresults.php) to do that.
__________________
"The fool doth think he is wise, but the wise man knows himself to be a fool.".

TemplateCodes.com for 68 Classifieds
seymourjames is offline   Reply With Quote
Old 11-11-2010, 04:55 PM   #3
Genius At Work
 
bowers01's Avatar
 
Join Date: May 2008
Location: Geelong, Victoria, Australia
Posts: 1,073
Rep Power: 32
bowers01 is on a distinguished road
Default

you need to put <meta http-equiv="REFRESH" content="0;url=http://www.the-domain-you-want-to-redirect-to.com"></HEAD>

in the showlistings.tpl file in the section of no ads found.
Its not a real neat way of doing it but it should work.
Nick
__________________
Nick Bowers
68c v4.1.10 Developer Custom Template
bowers01 is offline   Reply With Quote
Old 11-11-2010, 06:21 PM   #4
All Hands On Deck
 
 
Join Date: Mar 2008
Posts: 2,951
Rep Power: 73
seymourjames is a jewel in the rough
Default

Not really a good way of doing it if you want or need to keep search engines happy. Better to make a core file change or use a search module.
__________________
"The fool doth think he is wise, but the wise man knows himself to be a fool.".

TemplateCodes.com for 68 Classifieds
seymourjames is offline   Reply With Quote
Old 11-12-2010, 08:09 AM   #5
Customer
 
phpretard's Avatar
 
Join Date: Sep 2010
Posts: 17
Rep Power: 2
phpretard is on a distinguished road
Default

Quote:
Originally Posted by seymourjames
You will need to put a redirect to search.php into a core file (searchresults.php) to do that.

one of these?

Code:
	$class_tpl->assign('getcats', $Categories->getCatTree('', 0));
	$class_tpl->assign('title', $title);
	$class_tpl->assign('zipCode', $zipCode);
	$modules->call_hook('search_end', '');
	$class_tpl->assign('body','search.tpl');
	$class_tpl->display('layout.tpl', 'search');
__________________
I guess I must have just blacked out again ... not again!
phpretard is offline   Reply With Quote
Old 11-12-2010, 01:18 PM   #6
All Hands On Deck
 
 
Join Date: Mar 2008
Posts: 2,951
Rep Power: 73
seymourjames is a jewel in the rough
Default

You will not need to do this now as you will have the global search module.
__________________
"The fool doth think he is wise, but the wise man knows himself to be a fool.".

TemplateCodes.com for 68 Classifieds
seymourjames is offline   Reply With Quote
Reply

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
search result count business Templates, HTML, CSS, and Design Help 7 12-15-2009 06:49 AM
Expired Listings / Empty Search Results seymourjames TemplateCodes 0 10-28-2009 05:39 PM


All times are GMT -4. The time now is 05:32 AM.


Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2011, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0