Author Topic: Search This Forum&Topic  (Read 167 times)

Offline nuwanda

  • Jr. Member
  • **
  • Posts: 356
  • Gender: Male
Search This Forum&Topic
« on: November 08, 2009, 02:11:48 PM »
hi everyone .
ı did popup like vb in messageindex.
and ı use this code;
Code: [Select]

 
<tr>
<td class="windowbg" title="">
<form action="', $scripturl, '?action=search2" method="post" accept-charset="', $context['character_set'], '" style="margin: 0;">
<div class="normaltext"><input type="text" name="search" value="" size="25" tabindex="1001"/>

<input type="submit" class="button" value="Go" tabindex="1004" /></div>
<input type="hidden" name="advenced" value="0" size="25" tabindex="1001">
</td>
</tr>

but when submit, search in all forum. ı want just a current board ? how do ı ?
alkolikparti.com domainine proje önerebilecek var mı ?

Offline Arantor

  • Customizer
  • Simple Machines Super Hero
  • *
  • Posts: 19,412
  • Gender: Male
  • Through the fire and flames we carry on.
    • World of Thoughts
Re: Search This Forum&Topic
« Reply #1 on: November 08, 2009, 02:14:58 PM »
Before the </td>, you need to add a brd[] parameter in to the <form> (which should also have a </form> with it too)

The bit you would add is - I think - something like this:
Code: [Select]
<input type="hidden" name="brd[1]" value="', $board['id'], '" />
Customizer, SMF Team
My mods [22]
Current to-do list
Developer of Atrinik

No unsolicited PMs, thank you.
Current project:
Writing an OpenSearch integration for SMF.

Quote
Telling me "it doesn't work" is like a blunt pencil: pointless.
Why doesn't it work? What do you expect it to do?

Offline nuwanda

  • Jr. Member
  • **
  • Posts: 356
  • Gender: Male
Re: Search This Forum&Topic
« Reply #2 on: November 08, 2009, 02:35:37 PM »
not work Arantor .
all results are "No results found" :(
alkolikparti.com domainine proje önerebilecek var mı ?

Offline Arantor

  • Customizer
  • Simple Machines Super Hero
  • *
  • Posts: 19,412
  • Gender: Male
  • Through the fire and flames we carry on.
    • World of Thoughts
Re: Search This Forum&Topic
« Reply #3 on: November 08, 2009, 02:37:45 PM »
Hmm.

Try this and let me know if you get any errors in the error log:
Code: [Select]
<input type="hidden" name="brd[', $board['id'], ']" value="1" />
Customizer, SMF Team
My mods [22]
Current to-do list
Developer of Atrinik

No unsolicited PMs, thank you.
Current project:
Writing an OpenSearch integration for SMF.

Quote
Telling me "it doesn't work" is like a blunt pencil: pointless.
Why doesn't it work? What do you expect it to do?

Offline nuwanda

  • Jr. Member
  • **
  • Posts: 356
  • Gender: Male
Re: Search This Forum&Topic
« Reply #4 on: November 08, 2009, 02:43:00 PM »
just this
 
Quote

8: Undefined index: 300
.../MessageIndex.template.php (eval?)  Line: 126

but search in all forum again.
alkolikparti.com domainine proje önerebilecek var mı ?

Offline Arantor

  • Customizer
  • Simple Machines Super Hero
  • *
  • Posts: 19,412
  • Gender: Male
  • Through the fire and flames we carry on.
    • World of Thoughts
Re: Search This Forum&Topic
« Reply #5 on: November 08, 2009, 02:47:53 PM »
Hmm, that shouldn't generate that error. In fact I don't see how it could.

Please install Disable Template Eval, tick the box it gives you. This will reveal the true location of the error (which is presently being masked) which we can investigate from there.
Customizer, SMF Team
My mods [22]
Current to-do list
Developer of Atrinik

No unsolicited PMs, thank you.
Current project:
Writing an OpenSearch integration for SMF.

Quote
Telling me "it doesn't work" is like a blunt pencil: pointless.
Why doesn't it work? What do you expect it to do?

Offline nuwanda

  • Jr. Member
  • **
  • Posts: 356
  • Gender: Male
Re: Search This Forum&Topic
« Reply #6 on: November 08, 2009, 02:59:00 PM »
oh ..nothing to do with it .a other option.
 
Code: [Select]

echo'<tr><td class="windowbg"><a href="' . $scripturl . '?action=markasread;sa=board;board=' . $context['current_board'] . '.0;sesc=' . $context['session_id'] . '" alt="' . $txt[300] . '">',$txt['mark_board_read'],'</a></td></tr>';
alkolikparti.com domainine proje önerebilecek var mı ?

Offline Arantor

  • Customizer
  • Simple Machines Super Hero
  • *
  • Posts: 19,412
  • Gender: Male
  • Through the fire and flames we carry on.
    • World of Thoughts
Re: Search This Forum&Topic
« Reply #7 on: November 08, 2009, 03:02:18 PM »
Ah, $txt[300] is the text for "Mark this board as read". Should be in the language file.

As for the search thing, try this:
Code: [Select]
<input type="hidden" name="board" value="', $board['id'], '" />

EDIT: Hang on though. That's a 1.1 style language string, but you seem to be running 2.0. Replace $txt[300] with $txt['mark_board_read'].
« Last Edit: November 08, 2009, 03:05:39 PM by Arantor »
Customizer, SMF Team
My mods [22]
Current to-do list
Developer of Atrinik

No unsolicited PMs, thank you.
Current project:
Writing an OpenSearch integration for SMF.

Quote
Telling me "it doesn't work" is like a blunt pencil: pointless.
Why doesn't it work? What do you expect it to do?

Offline nuwanda

  • Jr. Member
  • **
  • Posts: 356
  • Gender: Male
Re: Search This Forum&Topic
« Reply #8 on: November 08, 2009, 03:08:53 PM »
no problem ..
 
 now I using
Code: [Select]

<div class="tborder" id="threadsearch_menu" style="display:none">
 
  <table cellpadding="4" cellspacing="1" border="0">
  <tr>
   <td class="catbg">',$txt['setf'],'</td>
  </tr>
  <tr>
   <td class="windowbg" title="">
<form action="', $scripturl, '?action=search2" method="post" accept-charset="', $context['character_set'], '" style="margin: 0;">
    <div class="normaltext"><input type="text" name="search" value="" size="25" tabindex="1001"/>
   
   <input type="submit" class="button" value="Go" tabindex="1004" /></div>
   <input type="hidden" name="advenced" value="0"  size="25" tabindex="1001">
   
</td>
  </tr>
 
   <tr>   <td class="catbg"><a href="', $scripturl, '?action=search;advanced" accesskey="4" rel="nofollow">adv. search</a></td>
  </tr>
  </table>
  </form>
 </div>';

ı added before </td> .
Code: [Select]

<input type="hidden" name="board" value="', $board['id'], '" />

Code: [Select]

<div class="tborder" id="threadsearch_menu" style="display:none">
 
  <table cellpadding="4" cellspacing="1" border="0">
  <tr>
   <td class="catbg">',$txt['setf'],'</td>
  </tr>
  <tr>
   <td class="windowbg" title="">
<form action="', $scripturl, '?action=search2" method="post" accept-charset="', $context['character_set'], '" style="margin: 0;">
    <div class="normaltext"><input type="text" name="search" value="" size="25" tabindex="1001"/>
   
   <input type="submit" class="button" value="Go" tabindex="1004" /></div>
   <input type="hidden" name="advenced" value="0"  size="25" tabindex="1001">
<input type="hidden" name="board" value="', $board['id'], '" />
</td>
  </tr>
 
   <tr>   <td class="catbg"><a href="', $scripturl, '?action=search;advanced" accesskey="4" rel="nofollow">adv. search</a></td>
  </tr>
  </table>
  </form>
 </div>';

but search all forum again...
alkolikparti.com domainine proje önerebilecek var mı ?

Offline Arantor

  • Customizer
  • Simple Machines Super Hero
  • *
  • Posts: 19,412
  • Gender: Male
  • Through the fire and flames we carry on.
    • World of Thoughts
Re: Search This Forum&Topic
« Reply #9 on: November 08, 2009, 03:13:27 PM »
Change advenced to advanced; that might help with it.
Customizer, SMF Team
My mods [22]
Current to-do list
Developer of Atrinik

No unsolicited PMs, thank you.
Current project:
Writing an OpenSearch integration for SMF.

Quote
Telling me "it doesn't work" is like a blunt pencil: pointless.
Why doesn't it work? What do you expect it to do?

Offline nuwanda

  • Jr. Member
  • **
  • Posts: 356
  • Gender: Male
Re: Search This Forum&Topic
« Reply #10 on: November 08, 2009, 03:18:26 PM »
:( :( no, sir .
ı'm searching a board but, result are other boards :S
alkolikparti.com domainine proje önerebilecek var mı ?

Offline Arantor

  • Customizer
  • Simple Machines Super Hero
  • *
  • Posts: 19,412
  • Gender: Male
  • Through the fire and flames we carry on.
    • World of Thoughts
Re: Search This Forum&Topic
« Reply #11 on: November 08, 2009, 03:21:24 PM »
OK, try going back to:
Code: [Select]
<input type="hidden" name="brd[', $board['id'], ']" value="1" />
Customizer, SMF Team
My mods [22]
Current to-do list
Developer of Atrinik

No unsolicited PMs, thank you.
Current project:
Writing an OpenSearch integration for SMF.

Quote
Telling me "it doesn't work" is like a blunt pencil: pointless.
Why doesn't it work? What do you expect it to do?

Offline nuwanda

  • Jr. Member
  • **
  • Posts: 356
  • Gender: Male
Re: Search This Forum&Topic
« Reply #12 on: November 09, 2009, 09:34:22 AM »
:(
I added messageindex. can you see ?
 
start with ;
Code: [Select]

<div class="tborder" id="threadsearch_menu" style="display:none">
alkolikparti.com domainine proje önerebilecek var mı ?

Offline Arantor

  • Customizer
  • Simple Machines Super Hero
  • *
  • Posts: 19,412
  • Gender: Male
  • Through the fire and flames we carry on.
    • World of Thoughts
Re: Search This Forum&Topic
« Reply #13 on: November 09, 2009, 09:35:51 AM »
What theme is that from, and what other mods have you got (so I know I won't get anything else messing about first)
Customizer, SMF Team
My mods [22]
Current to-do list
Developer of Atrinik

No unsolicited PMs, thank you.
Current project:
Writing an OpenSearch integration for SMF.

Quote
Telling me "it doesn't work" is like a blunt pencil: pointless.
Why doesn't it work? What do you expect it to do?

Offline nuwanda

  • Jr. Member
  • **
  • Posts: 356
  • Gender: Male
Re: Search This Forum&Topic
« Reply #14 on: November 09, 2009, 09:39:24 AM »
custom theme. haven't mod.
alkolikparti.com domainine proje önerebilecek var mı ?

Offline Arantor

  • Customizer
  • Simple Machines Super Hero
  • *
  • Posts: 19,412
  • Gender: Male
  • Through the fire and flames we carry on.
    • World of Thoughts
Re: Search This Forum&Topic
« Reply #15 on: November 09, 2009, 09:41:07 AM »
Hmm. All I did was look at the original code as used in SMF itself since it defaults to searching only a board while you're in the message index, though I was looking at 2.0 RC2 template code rather than 2.0 RC1.2.
Customizer, SMF Team
My mods [22]
Current to-do list
Developer of Atrinik

No unsolicited PMs, thank you.
Current project:
Writing an OpenSearch integration for SMF.

Quote
Telling me "it doesn't work" is like a blunt pencil: pointless.
Why doesn't it work? What do you expect it to do?

Offline nuwanda

  • Jr. Member
  • **
  • Posts: 356
  • Gender: Male
Re: Search This Forum&Topic
« Reply #16 on: November 09, 2009, 09:47:34 AM »
ah ..thank you :)
ı came from school yet. I downloading now.before  I must upgrading theme for rc2 :D
thank you .
alkolikparti.com domainine proje önerebilecek var mı ?