1 sayfadan 1. sayfa

Alfa - Search - GET Method dönüştürücü - 0.1.0

İletiTarih: 24.09.2006, 10:41
sabri ünal
mod arama sayfalarındaki post metoduyla yapılan işlemleri get metoduyla değiştiririr..

benim tahminimce arama sayfalarının google türevlerinde daha çok çıkmasına sebep olabilir, modun amacı anlaşılamadı ve yeni kullanıcıların kullanmaları tavsiye edilmez....

Kod: Tümünü seç
##############################################################
## MOD Title: Search - GET Method
## MOD Author: Noobarmy < noobarmy@phpbbmodders.com > (Anthony Chu) http://phpbbmodders.com
## MOD Description: Switches the method of the search function to GET rather then POST
## MOD Version: 0.1.0
##
## Installation Level: Easy
## Installation Time: 5 Minutes
## Files To Edit: 2
##      search.php
##      templates/subSilver/search_body.tpl
##
## Included Files: 0
##
## License: http://opensource.org/licenses/gpl-license.php GNU General Public License v2
##############################################################
## For security purposes, please check: http://www.phpbb.com/mods/
## for the latest version of this MOD. Although MODs are checked
## before being allowed in the MODs Database there is no guarantee
## that there are no security problems within the MOD. No support
## will be given for MODs not found within the MODs Database which
## can be found at http://www.phpbb.com/mods/
##############################################################
## Author Notes:
##
##############################################################
## MOD History:
##
##
##############################################################
## Before Adding This MOD To Your Forum, You Should Back Up All Files Related To This MOD
##############################################################

#
#-----[ OPEN ]------------------------------------------
#
search.php

#
#-----[ FIND ]------------------------------------------
#
$show_results = ( isset($HTTP_POST_VARS['show_results']) ) ? $HTTP_POST_VARS['show_results'] : 'posts';
$show_results = ($show_results == 'topics') ? 'topics' : 'posts';

if ( isset($HTTP_POST_VARS['search_terms']) )
{
   $search_terms = ( $HTTP_POST_VARS['search_terms'] == 'all' ) ? 1 : 0;
}
else
{
   $search_terms = 0;
}

if ( isset($HTTP_POST_VARS['search_fields']) )
{
   $search_fields = ( $HTTP_POST_VARS['search_fields'] == 'all' ) ? 1 : 0;
}
else
{
   $search_fields = 0;
}

$return_chars = ( isset($HTTP_POST_VARS['return_chars']) ) ? intval($HTTP_POST_VARS['return_chars']) : 200;

$search_cat = ( isset($HTTP_POST_VARS['search_cat']) ) ? intval($HTTP_POST_VARS['search_cat']) : -1;
$search_forum = ( isset($HTTP_POST_VARS['search_forum']) ) ? intval($HTTP_POST_VARS['search_forum']) : -1;

$sort_by = ( isset($HTTP_POST_VARS['sort_by']) ) ? intval($HTTP_POST_VARS['sort_by']) : 0;

if ( isset($HTTP_POST_VARS['sort_dir']) )
{
   $sort_dir = ( $HTTP_POST_VARS['sort_dir'] == 'DESC' ) ? 'DESC' : 'ASC';
}

#
#-----[ REPLACE WITH ]------------------------------------------
#
$show_results = ( isset($HTTP_POST_VARS['show_results']) ) ? $HTTP_POST_VARS['show_results'] : 'posts';
$show_results = ($show_results == 'topics') ? 'topics' : 'posts';

if ( isset($HTTP_POST_VARS['search_terms']) )
{
   $search_terms = ( $HTTP_POST_VARS['search_terms'] == 'all' ) ? 1 : 0;
}
else
{
   $search_terms = 0;
}

if ( isset($HTTP_POST_VARS['search_fields']) )
{
   $search_fields = ( $HTTP_POST_VARS['search_fields'] == 'all' ) ? 1 : 0;
}
else
{
   $search_fields = 0;
}

$return_chars = ( isset($HTTP_GET_VARS['return_chars']) ) ? intval($HTTP_GET_VARS['return_chars']) : 200;

$search_cat = ( isset($HTTP_GET_VARS['search_cat']) ) ? intval($HTTP_GET_VARS['search_cat']) : -1;
$search_forum = ( isset($HTTP_GET_VARS['search_forum']) ) ? intval($HTTP_GET_VARS['search_forum']) : -1;

$sort_by = ( isset($HTTP_GET_VARS['sort_by']) ) ? intval($HTTP_GET_VARS['sort_by']) : 0;

if ( isset($HTTP_GET_VARS['sort_dir']) )
{
   $sort_dir = ( $HTTP_GET_VARS['sort_dir'] == 'DESC' ) ? 'DESC' : 'ASC';
}

#
#-----[ FIND ]------------------------------------------
#
   if ( isset($HTTP_POST_VARS['search_username']) )
   {
      username_search($HTTP_POST_VARS['search_username']);

#
#-----[ REPLACE WITH ]------------------------------------------
#
   if ( isset($HTTP_GET_VARS['search_username']) )
   {
      username_search($HTTP_GET_VARS['search_username']);

#
#-----[ OPEN ]------------------------------------------
#
templates/subSilver/search_body.tpl

#
#-----[ FIND ]------------------------------------------
#
method="POST"

#
#-----[ REPLACE WITH ]------------------------------------------
#
method="GET"

#
#-----[ SAVE/CLOSE ALL FILES ]------------------------------------------
#
# EoM

Re: Alfa - Search - GET Method dönüştürücü - 0.1.0

İletiTarih: 25.12.2007, 01:46
NEFRİT
sabri ünal post metodu ile get metodunun arasındaki fark ney ki yani üstte ne anlatmak istediğini anladım anladım da get in post komutundan ne üstünlüğü var yada farkı onu bilmiyom :lol:

her zaman dedim bi php kitabı alayım diye ama amannnn ne gerek var sabri var burada maşallah php kütüphanesi :D

ne diyorlardı php librlary miydi :roll:

Re: Alfa - Search - GET Method dönüştürücü - 0.1.0

İletiTarih: 25.12.2007, 22:24
polibo06
NEFRİT yazdı:sabri ünal post metodu ile get metodunun arasındaki fark ney ki yani üstte ne anlatmak istediğini anladım anladım da get in post komutundan ne üstünlüğü var yada farkı onu bilmiyom :lol:

her zaman dedim bi php kitabı alayım diye ama amannnn ne gerek var sabri var burada maşallah php kütüphanesi :D

ne diyorlardı php librlary miydi :roll:


post ve get php e veritabanı ile köprü kurmamızı sağlar...

ikiside aynı görevi yapmasına rağmen arasındaki fark ne diye soracak olursan?

get ile kullanıldığında adres satırında kelime veya değiştken görünür. Postta böyle bir şey olmaz....

anlatım biraz eksik oldu ama idare et :? ;-)

Re: Alfa - Search - GET Method dönüştürücü - 0.1.0

İletiTarih: 30.03.2008, 18:47
NEFRİT
polibo06 sen bu işi biliyorsun anladım yani inernet explorer ın arama çubuğunda araan kelime çıkıyor sanırım şöle ;

search.php?nefrit=ARANAN-KELİME

gibi oluyor değil mi :razz: