Simple Machines Community Forum

SMF Support => Türkçe Bölümü (Turkish) => Language Specific Support => İpuçları ve Hileler => Topic started by: Juduras on March 28, 2009, 07:11:40 PM

Title: Konu Açmadan Arama Yapmak
Post by: Juduras 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:(https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fimg24.imageshack.us%2Fimg24%2F1541%2Fsadt.png&hash=2b56b3ea8ddb39750b996e919801176037ffe4cd)




1.1.x serisi için

post.template dosyasında

Bunu bulun ve silin

<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


// 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
// 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
// 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
<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
// 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
// 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

// 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>';
Title: Re: Konu Açmadan Arama Yapmak
Post by: ოկtђ on March 29, 2009, 06:03:19 AM
Güzel bişeymiş.Yapayım işim bitince
Title: Re: Konu Açmadan Arama Yapmak
Post by: grafitus on March 29, 2009, 06:53:07 AM
Vay güzel fikir.Eline koluna sağlık ;)
Title: Re: Konu Açmadan Arama Yapmak
Post by: Juduras on March 29, 2009, 09:47:42 AM
Basit ama işe yarar bişey beğenmenize sevindim
Title: Re: Konu Açmadan Arama Yapmak
Post by: Özgür 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.
Title: Re: Konu Açmadan Arama Yapmak
Post by: Juduras 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
Title: Re: Konu Açmadan Arama Yapmak
Post by: Özgür 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 (:
Title: Re: Konu Açmadan Arama Yapmak
Post by: Juduras 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  ;)
(https://www.simplemachines.org/community/proxy.php?request=http%3A%2F%2Fimg5.imageshack.us%2Fimg5%2F2733%2Fasdcjq.png&hash=00555977b7bfad0961b556f25a5f1243bef61a30)

iframe için istediğiniz şekil böyle olmalı
index.template dosyasında bunu bulun
</head>

üstüne ekleyin



<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
// 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
// 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>';
Title: Re: Konu Açmadan Arama Yapmak
Post by: agguvenligi on April 05, 2009, 10:24:22 AM
Çok güzel bir paylaşım olmuş teşekkürler kısa zamanda deneyeceğim .
Title: Re: Konu Açmadan Arama Yapmak
Post by: DarkMan-X 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