Advertisement:

Author Topic: Konu Açmadan Arama Yapmak  (Read 13225 times)

Juduras

  • Guest
Konu Açmadan Arama Yapmak
« on: March 28, 2009, 07:11:40 PM »
Çok çok uygun bir kategori bulamadım açmak için ancak paylaşmak istedim basit ama işe yarar bir olay


Görünüm:




1.1.x serisi için

 post.template dosyasında

Bunu bulun ve silin

Code: [Select]
<form action="', $scripturl, '?action=', $context['destination'], ';', empty($context['current_board']) ? '' : 'board=' . $context['current_board'], '" method="post" accept-charset="', $context['character_set'], '" name="postmodify" id="postmodify" onsubmit="submitonce(this);saveEntities();" enctype="multipart/form-data" style="margin: 0;">

bunu bulun ve silin


Code: [Select]
// If the user wants to see how their message looks - the preview table is where it's at!
echo '
<div id="preview_section"', isset($context['preview_message']) ? '' : ' style="display: none;"', '>
<table border="0" width="100%" cellspacing="1" cellpadding="3" class="bordercolor" align="center" style="table-layout: fixed;">
<tr class="titlebg">
<td id="preview_subject">', empty($context['preview_subject']) ? '' : $context['preview_subject'], '</td>
</tr>
<tr>
<td class="post" width="100%" id="preview_body">
', empty($context['preview_message']) ? str_repeat('<br />', 5) : $context['preview_message'], '
</td>
</tr>
</table><br />
</div>';

if ($context['make_event'] && (!$context['event']['new'] || !empty($context['current_board'])))
echo '
<input type="hidden" name="eventid" value="', $context['event']['id'], '" />';

// Start the main table.
echo '
<table border="0" width="100%" align="center" cellspacing="1" cellpadding="3" class="bordercolor">
<tr class="titlebg">
<td>', $context['page_title'], '</td>
</tr>
<tr>
<td class="windowbg">', isset($context['current_topic']) ? '
<input type="hidden" name="topic" value="' . $context['current_topic'] . '" />' : '', '
<table border="0" cellpadding="3" width="100%">';

daha sonra bunu bulun
Code: [Select]
// If an error occurred, explain what happened.
echo '
<tr', empty($context['post_error']['messages']) ? ' style="display: none"' : '', ' id="errors">
<td></td>
<td align="left">
<div style="padding: 0px; font-weight: bold;', empty($context['error_type']) || $context['error_type'] != 'serious' ? ' display: none;' : '', '" id="error_serious">
', $txt['error_while_submitting'], '
</div>
<div style="color: red; margin: 1ex 0 2ex 3ex;" id="error_list">
', empty($context['post_error']['messages']) ? '' : implode('<br />', $context['post_error']['messages']), '
</div>
</td>
</tr>';

üstüne ekleyin
Code: [Select]
// Start the main table.
echo '
<table border="0" width="100%" align="center" cellspacing="1" cellpadding="3" class="bordercolor">
<tr class="titlebg">
<td>', $context['page_title'], '</td>
</tr>
<tr><td class="windowbg">

<table border="0" cellpadding="3" width="100%">


';
//Konu başlığı arama Juduras
if (!isset($context['num_replies']))
{
// Now show the subject box for this post.
echo '
<tr>
<td align="right" style="font-weight: bold;"', isset($context['post_error']['no_subject']) ? ' class="error"' : '', ' id="caption_subject">
Konu Basligini Kontrol Et:
</td>
<td>';

echo'

<form class="floatleft" target="_blank"  id="search_form" action="', $scripturl, '?action=search2" method="post" accept-charset="', $context['character_set'], '">

<input type="text" name="search" size="80" maxlength="80" value="" />&nbsp;
<input type="submit" name="submit"  onclick="showhide(\'aramaSayfasi\');" value="Ara" style="width: 11ex;" />
</form>


</td>
</tr>';
}

echo'
<form action="', $scripturl, '?action=', $context['destination'], ';', empty($context['current_board']) ? '' : 'board=' . $context['current_board'], '" method="post" accept-charset="', $context['character_set'], '" name="postmodify" id="postmodify" onsubmit="submitonce(this);saveEntities();" enctype="multipart/form-data" style="margin: 0;">
', isset($context['current_topic']) ? '
<input type="hidden" name="topic" value="' . $context['current_topic'] . '" />' : '', '
';

2.0 serisi için ise
bunu bulun ve silin
Code: [Select]
<form action="', $scripturl, '?action=', $context['destination'], ';', empty($context['current_board']) ? '' : 'board=' . $context['current_board'], '" method="post" accept-charset="', $context['character_set'], '" name="postmodify" id="postmodify" onsubmit="', ($context['becomes_approved'] ? '' : 'alert(\'' . $txt['js_post_will_require_approval'] . '\');'), 'submitonce(this);saveEntities();" enctype="multipart/form-data" style="margin: 0;">

yine bunu bulun ve silin
Code: [Select]
// If the user wants to see how their message looks - the preview table is where it's at!
echo '
<div id="preview_section"', isset($context['preview_message']) ? '' : ' style="display: none;"', '>
<table border="0" width="100%" cellspacing="1" cellpadding="3" class="bordercolor" align="center" style="table-layout: fixed;">
<tr class="titlebg">
<td id="preview_subject">', empty($context['preview_subject']) ? '' : $context['preview_subject'], '</td>
</tr>
<tr class="windowbg">
<td class="post" width="100%" id="preview_body">
', empty($context['preview_message']) ? str_repeat('<br />', 5) : $context['preview_message'], '
</td>
</tr>
</table><br />
</div>';

if ($context['make_event'] && (!$context['event']['new'] || !empty($context['current_board'])))
echo '
<input type="hidden" name="eventid" value="', $context['event']['id'], '" />';

// Start the main table.
echo '
<table border="0" width="100%" align="center" cellspacing="1" cellpadding="3" class="bordercolor">
<tr class="titlebg">
<td>', $context['page_title'], '</td>
</tr>
<tr>
<td class="windowbg">', isset($context['current_topic']) ? '
<input type="hidden" name="topic" value="' . $context['current_topic'] . '" />' : '', '
<table border="0" cellpadding="3" width="100%">';


bunu bulun
Code: [Select]
// If an error occurred, explain what happened.
echo '
<tr', empty($context['post_error']['messages']) ? ' style="display: none"' : '', ' id="errors">
<td></td>
<td align="left">
<div style="padding: 0px; font-weight: bold;', empty($context['error_type']) || $context['error_type'] != 'serious' ? ' display: none;' : '', '" id="error_serious">
', $txt['error_while_submitting'], '
</div>
<div class="error" style="margin: 1ex 0 2ex 3ex;" id="error_list">
', empty($context['post_error']['messages']) ? '' : implode('<br />', $context['post_error']['messages']), '
</div>
</td>
</tr>';

Bununla değişin

Code: [Select]
// Start the main table.
echo '
<table border="0" width="100%" align="center" cellspacing="1" cellpadding="3" class="bordercolor">
<tr class="titlebg">
<td>', $context['page_title'], '</td>
</tr>
<tr>
<td class="windowbg">

<table border="0" cellpadding="3" width="100%">';


//Konu başlığı arama Juduras
if (!isset($context['num_replies']))
{
// Now show the subject box for this post.
echo '
<tr>
<td align="right" style="font-weight: bold;"', isset($context['post_error']['no_subject']) ? ' class="error"' : '', ' id="caption_subject">
Konu Basligini Kontrol Et:
</td>
<td>';

echo'

<form class="floatleft" target="_blank"  id="search_form" action="', $scripturl, '?action=search2" method="post" accept-charset="', $context['character_set'], '">

<input type="text" name="search" size="80" maxlength="80" value="" />&nbsp;
<input type="submit" name="submit"  onclick="showhide(\'aramaSayfasi\');" value="Ara" style="width: 11ex;" />
</form>


</td>
</tr>

';
}
// If an error occurred, explain what happened.
echo '
<form action="', $scripturl, '?action=', $context['destination'], ';', empty($context['current_board']) ? '' : 'board=' . $context['current_board'], '" method="post" accept-charset="', $context['character_set'], '" name="postmodify" id="postmodify" onsubmit="', ($context['becomes_approved'] ? '' : 'alert(\'' . $txt['js_post_will_require_approval'] . '\');'), 'submitonce(this);saveEntities();" enctype="multipart/form-data" style="margin: 0;">
', isset($context['current_topic']) ? '
<input type="hidden" name="topic" value="' . $context['current_topic'] . '" />' : '', '
<tr', empty($context['post_error']['messages']) ? ' style="display: none"' : '', ' id="errors">
<td></td>
<td align="left">
<div style="padding: 0px; font-weight: bold;', empty($context['error_type']) || $context['error_type'] != 'serious' ? ' display: none;' : '', '" id="error_serious">
', $txt['error_while_submitting'], '
</div>
<div class="error" style="margin: 1ex 0 2ex 3ex;" id="error_list">
', empty($context['post_error']['messages']) ? '' : implode('<br />', $context['post_error']['messages']), '
</div>
</td>
</tr>';
« Last Edit: March 29, 2009, 06:07:18 PM by Juduras »

Offline ოկtђ

  • Sr. Member
  • ****
  • Posts: 858
  • Gender: Male
  • Burak
Re: Konu Açmadan Arama Yapmak
« Reply #1 on: March 29, 2009, 06:03:19 AM »
Güzel bişeymiş.Yapayım işim bitince

Offline grafitus

  • SMF Hero
  • ******
  • Posts: 3,034
    • beratdogan on GitHub
    • beratdogan on LinkedIn
    • @beratdgan on Twitter
Re: Konu Açmadan Arama Yapmak
« Reply #2 on: March 29, 2009, 06:53:07 AM »
Vay güzel fikir.Eline koluna sağlık ;)

Juduras

  • Guest
Re: Konu Açmadan Arama Yapmak
« Reply #3 on: March 29, 2009, 09:47:42 AM »
Basit ama işe yarar bişey beğenmenize sevindim

Offline Özgür

  • SMF Hero
  • ******
  • Posts: 3,924
  • Gender: Male
  • Özgür | jQuery Lover
    • ozgurce on Facebook
    • @ozgurce on Twitter
    • Özgür Yalçın
Re: Konu Açmadan Arama Yapmak
« Reply #4 on: March 29, 2009, 09:59:26 AM »
Güzel düşünce. Aramayı aynı sayfada mı yapıyor? Eğer öyleyse çok harika olur :) değilsede google aramayı oraya entegre edip, aynı sayfada arama yapmasını sağlayabiliriz.

Juduras

  • Guest
Re: Konu Açmadan Arama Yapmak
« Reply #5 on: March 29, 2009, 10:11:10 AM »
yok hayır ben de bilerek aramayı başka sayfaya aktarmıştım konu açarken geri tuşuna bas falan üye zorlanmasın diye ancak oradaki target kodunu kaldırırsanız aynı sayfada arama yapacaktır

Offline Özgür

  • SMF Hero
  • ******
  • Posts: 3,924
  • Gender: Male
  • Özgür | jQuery Lover
    • ozgurce on Facebook
    • @ozgurce on Twitter
    • Özgür Yalçın
Re: Konu Açmadan Arama Yapmak
« Reply #6 on: March 29, 2009, 10:19:42 AM »
Bahsettiğim şey o değil. Konu Açma bölümü kaybolmadan. küçük bir alanda arama yapmasından bahsediyorum (:

Juduras

  • Guest
Re: Konu Açmadan Arama Yapmak
« Reply #7 on: March 29, 2009, 10:23:12 AM »
Anladım aynı sayfada o dediğini yapmak için ajax entegre etmek gerek,ama popup olarak basit bi javascriptle yapabiliriz sanırım bi bakayım

edit:aslında bi daha düşündüm de ajaxa falan gerek yok :) direk iframe ile yapabiliriz heralde


istediğin böyle bişey mi?
http://cembertopu.com
üye adı : demo
şifre: demo
konu açmazsanız sevinirim  ;)


iframe için istediğiniz şekil böyle olmalı
index.template dosyasında bunu bulun
Code: [Select]
</head>
üstüne ekleyin

Code: [Select]

<script language="javascript">
<!--

var state = \'none\';

function showhide(layer_ref) {

if (state == \'block\') {
state = \'none\';
}
else {
state = \'block\';
}
if (document.all) { //IS IE 4 or 5 (or 6 beta)
eval( "document.all." + layer_ref + ".style.display = state");
}
if (document.layers) { //IS NETSCAPE 4 or below
document.layers[layer_ref].display = state;
}
if (document.getElementById &&!document.all) {
hza = document.getElementById(layer_ref);
hza.style.display = state;
}
}
//-->
</script>

ilk mesajda post.template dosyasında üstüne ekleyin ve değiştirin dediğimiz kodların yerine

1.1.x için bunu ekleyin
Code: [Select]
// Start the main table.
echo '
<table border="0" width="100%" align="center" cellspacing="1" cellpadding="3" class="bordercolor">
<tr class="titlebg">
<td>', $context['page_title'], '</td>
</tr>
<tr><td class="windowbg">

<table border="0" cellpadding="3" width="100%">


';
//Konu başlığı arama Juduras
if (!isset($context['num_replies']))
{
// Now show the subject box for this post.
echo '
<tr>
<td align="right" style="font-weight: bold;"', isset($context['post_error']['no_subject']) ? ' class="error"' : '', ' id="caption_subject">
Konu Basligini Kontrol Et:
</td>
<td>';

echo'

<form class="floatleft" target="iFrameadi"  id="search_form" action="', $scripturl, '?action=search2" method="post" accept-charset="', $context['character_set'], '">

<input type="text" name="search" size="80" maxlength="80" value="" />&nbsp;
<input type="submit" name="submit"  onclick="showhide(\'aramaSayfasi\');" value="Ara" style="width: 11ex;" />
</form>


</td>
</tr>

<tr><td colspan="2">
<iframe name="iFrameadi" id="aramaSayfasi" style="display:none;" width="100%" height="400"  scrolling="yes" frameborder="0"></iframe>
</td></tr>
';
}

echo'
<form action="', $scripturl, '?action=', $context['destination'], ';', empty($context['current_board']) ? '' : 'board=' . $context['current_board'], '" method="post" accept-charset="', $context['character_set'], '" name="postmodify" id="postmodify" onsubmit="submitonce(this);saveEntities();" enctype="multipart/form-data" style="margin: 0;">
', isset($context['current_topic']) ? '
<input type="hidden" name="topic" value="' . $context['current_topic'] . '" />' : '', '
';

2.0 için de bunu ekleyin
Code: [Select]
// Start the main table.
echo '
<table border="0" width="100%" align="center" cellspacing="1" cellpadding="3" class="bordercolor">
<tr class="titlebg">
<td>', $context['page_title'], '</td>
</tr>
<tr>
<td class="windowbg">

<table border="0" cellpadding="3" width="100%">';


//Konu başlığı arama Juduras
if (!isset($context['num_replies']))
{
// Now show the subject box for this post.
echo '
<tr>
<td align="right" style="font-weight: bold;"', isset($context['post_error']['no_subject']) ? ' class="error"' : '', ' id="caption_subject">
Konu Basligini Kontrol Et:
</td>
<td>';

echo'

<form class="floatleft" target="iFrameadi"  id="search_form" action="', $scripturl, '?action=search2" method="post" accept-charset="', $context['character_set'], '">

<input type="text" name="search" size="80" maxlength="80" value="" />&nbsp;
<input type="submit" name="submit"  onclick="showhide(\'aramaSayfasi\');" value="Ara" style="width: 11ex;" />
</form>


</td>
</tr>
<tr><td colspan="2">
<iframe name="iFrameadi" id="aramaSayfasi" style="display:none;" width="100%" height="400"  scrolling="yes" frameborder="0"></iframe>
</td></tr>
';
}
// If an error occurred, explain what happened.
echo '
<form action="', $scripturl, '?action=', $context['destination'], ';', empty($context['current_board']) ? '' : 'board=' . $context['current_board'], '" method="post" accept-charset="', $context['character_set'], '" name="postmodify" id="postmodify" onsubmit="', ($context['becomes_approved'] ? '' : 'alert(\'' . $txt['js_post_will_require_approval'] . '\');'), 'submitonce(this);saveEntities();" enctype="multipart/form-data" style="margin: 0;">
', isset($context['current_topic']) ? '
<input type="hidden" name="topic" value="' . $context['current_topic'] . '" />' : '', '
<tr', empty($context['post_error']['messages']) ? ' style="display: none"' : '', ' id="errors">
<td></td>
<td align="left">
<div style="padding: 0px; font-weight: bold;', empty($context['error_type']) || $context['error_type'] != 'serious' ? ' display: none;' : '', '" id="error_serious">
', $txt['error_while_submitting'], '
</div>
<div class="error" style="margin: 1ex 0 2ex 3ex;" id="error_list">
', empty($context['post_error']['messages']) ? '' : implode('<br />', $context['post_error']['messages']), '
</div>
</td>
</tr>';
« Last Edit: March 29, 2009, 06:12:16 PM by Juduras »

Offline agguvenligi

  • Semi-Newbie
  • *
  • Posts: 74
  • Gender: Male
    • Online Gamers Platform
Re: Konu Açmadan Arama Yapmak
« Reply #8 on: April 05, 2009, 10:24:22 AM »
Çok güzel bir paylaşım olmuş teşekkürler kısa zamanda deneyeceğim .
Gerçeği aramak onu bulmaktan daha kıymetlidir...
____________________________________
Online Oyuncular | Yeni Private Serverlar | Gsm Destek | Dizin

Offline DarkMan-X

  • Jr. Member
  • **
  • Posts: 157
Re: Konu Açmadan Arama Yapmak
« Reply #9 on: April 20, 2009, 06:40:38 PM »
bende konu başlıklarını bulmuyor usta ustelik konu forumda mevcut hic bir konu bulunamadı diyor kulandıgım smf 2.0 olmadı bende ama guzel bir uygulama ama