SMFHacks.com
** Home Forum Index Hacks Products Login Register Search
Welcome, Guest. Please login or register.
May 23, 2012, 11:26:24 pm

Login with username, password and session length
Members
Total Members: 10070
Latest: pipattra
Stats
Total Posts: 28683
Total Topics: 4976
Online Today: 94
Online Ever: 2482
(April 09, 2011, 07:02:45 pm)
Users Online
Users: 1
Guests: 51
Total: 52
+ 
|-+ 
| |-+ 
| | |-+ 
| | | |-+ 
0 Members and 2 Guests are viewing this topic. « previous next »
Pages: [1] Go Down Print
Author Topic: Forum Search Box  (Read 1738 times)
gibbs
Newbie
*
Offline Offline

Posts: 33

Using SMF Gallery and Classifieds


View Profile
« on: November 14, 2008, 09:57:12 am »

Dear support,

When I visit the home page to my forum, is there a way of making the Forum Search box include classified listings? Whenever I search, it just shows results from the forum and not the classifieds.

If that is not going to be possible, can you possibly suggest a code alteration I can make to the forum code to make the forum search box actually the Classifieds search box instead?

Basically, I need people to search the classifieds more than the forum itself as my site is primarily a classified ad site.

Thank you in advance for you help.
Logged
gibbs
Newbie
*
Offline Offline

Posts: 33

Using SMF Gallery and Classifieds


View Profile
« Reply #1 on: November 21, 2008, 04:43:59 pm »

Just wondering if anyone has any ideas please? cheers.
Logged
gibbs
Newbie
*
Offline Offline

Posts: 33

Using SMF Gallery and Classifieds


View Profile
« Reply #2 on: November 22, 2008, 10:49:35 am »

Well if anyone else is trying to do the same, I have managed to at least remove the default forum search in order to force users to use the classifieds search. I edited the index.template.php and removed the following code at Line 351:

Code:
<form action="', $scripturl, '?action=search2" method="post" accept-charset="', $context['character_set'], '" style="margin: 0;">
<a href="', $scripturl, '?action=search;advanced"><img src="'.$settings['images_url'].'/filter.gif" align="middle" style="margin: 0 1ex;" alt="" /></a>
<input type="text" name="search" value="" style="width: 190px;" />&nbsp;
<input type="submit" name="submit" value="', $txt[182], '" style="width: 11ex;" />
<input type="hidden" name="advanced" value="0" />';

// Search within current topic?
if (!empty($context['current_topic']))
echo '
<input type="hidden" name="topic" value="', $context['current_topic'], '" />';

// If we're on a certain board, limit it to this board ;).
elseif (!empty($context['current_board']))
echo '
<input type="hidden" name="brd[', $context['current_board'], ']" value="', $context['current_board'], '" />';

echo '
</form>
Logged
Pages: [1] Go Up Print 
« previous next »
Jump to:  

Recent
[Today at 05:17:53 pm]

[May 21, 2012, 08:54:11 am]

[May 20, 2012, 11:06:52 am]

[May 20, 2012, 05:58:11 am]

[May 19, 2012, 06:16:58 pm]

[May 19, 2012, 05:42:37 pm]

[May 18, 2012, 03:08:38 pm]

[May 17, 2012, 06:07:46 pm]

[May 17, 2012, 02:22:07 pm]

[May 17, 2012, 12:38:16 pm]
Random Picture
Donate to SMFHacks.com
Help Support the SMFHacks.com mod making.
Powered by SMF 1.1.16 | SMF © 2006-2011, Simple Machines LLC
TinyPortal v0.9.7 © Bloc
SMF and SimpleMachines are registered trademarks of Simple Machines. SMFHacks.com is not affiliated with nor endorsed by Simple Machines.
Page created in 0.193 seconds with 18 queries.