Alfa - Search - GET Method dönüştürücü - 0.1.0
Tarih: 24.09.2006, 10:41
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....
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