News:

Want to get involved in developing SMF, then why not lend a hand on our github!

Main Menu

Konu Açmadan Arama Yapmak

Started by Juduras, March 28, 2009, 07:11:40 PM

Previous topic - Next topic

Juduras

Ç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

<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>';

ოկtђ

Güzel bişeymiş.Yapayım işim bitince

grafitus

Vay güzel fikir.Eline koluna sağlık ;)

Juduras

Basit ama işe yarar bişey beğenmenize sevindim

Özgür

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.
So Long

Juduras

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

Özgür

Bahsettiğim şey o değil. Konu Açma bölümü kaybolmadan. küçük bir alanda arama yapmasından bahsediyorum (:
So Long

Juduras

#7
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
</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>';

agguvenligi

Çok güzel bir paylaşım olmuş teşekkürler kısa zamanda deneyeceğim .
Gerçeği aramak onu bulmaktan daha kıymetlidir...
____________________________________
Dodge Check Engine Light | Yeni Private Serverlar | Gsm Destek

DarkMan-X

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

Advertisement: