MyBB Community Forums

Full Version: Friendly Redirection
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Can the Friendly Redirection pages be switched off for things like searches and new posts being made - but kept for anything else such as password reset confirmations etc.

Thanks
you can try using this method (see also other posts on that thread & keep backup of original files)
Thanks .m. - I will look into that.
I didn't spot that one.
Thanks
I actually edited this plugin for 1.6: http://mybbhacks.zingaburga.com/showthread.php?tid=264

<?php

if(!defined('IN_MYBB'))
	die('This file cannot be accessed directly.');

$plugins->add_hook('search_do_search_process', 'searchautoredir_run');
$plugins->add_hook('search_do_search_end', 'searchautoredir_run');
$plugins->add_hook('member_do_login_end', 'searchautoredir_run');

function searchautoredir_info()
{
	return array(
		'name'			=> 'Search Auto-redirect',
		'description'	=> 'Very simple plugin which disables the friendly redirect pages for searching.',
		'website'		=> 'http://mybbhacks.zingaburga.com/',
		'author'		=> 'ZiNgA BuRgA',
		'authorsite'	=> 'http://zingaburga.com/',
		'version'		=> '1.0',
		'compatibility'	=> '1*',
		'guid'			=> ''
	);
}

function searchautoredir_run()
{
	global $mybb;
	$mybb->settings['redirects'] = ($mybb->version_code >= 1400 ? 0 : 'no');
}
?>

I added a hook so it would run on login; you can do that for other hooks too I guess.