MyBB Community Forums

Full Version: default friendly redirect pages to off
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
How do you set "Show friendly redirect pages" in User CP unchecked by default for new registrations? 

Tornado Mitr

ACP > General Configuration > Friendly Redirect Pages.

You can turn them off fully there.
yeah i know. But i need to have it done in user cp as set that way.

I already have friendly  redirect pages set to off.

I am using the inline messages plugin which uses the friendly redirect checkbox value to switch to turn inline messages on or off.  So if redirect messages is checked, this popup msg is off, if it is unchecked, it is on. And i would like to default this to on...but by default

EDIT:
I just realized an easier way to explain it would be if i want the user to have the option to turn them off for themselves, but default it in their user cp to something other than what is now
You will probably need to make a core code edit - usercp.php

Approx line 988

if(isset($user['showredirect']) && $user['showredirect'] != 0)
{
$showredirectcheck = "checked=\"checked\"";
}
else
{
$showredirectcheck = "";
}

Change to:

if(isset($user['showredirect']) && $user['showredirect'] == 1)
{
$showredirectcheck = "checked=\"checked\"";
}
else
{
$showredirectcheck = "";
}

Edit: although if you set redirect pages to off from ACP, then the logic will set the option to unchecked for new registrations.
(2016-11-14, 06:49 PM)Ashley1 Wrote: [ -> ]You will probably need to make a core code edit - usercp.php

Approx line 988

if(isset($user['showredirect']) && $user['showredirect'] != 0)
{
$showredirectcheck = "checked=\"checked\"";
}
else
{
$showredirectcheck = "";
}

Change to:

if(isset($user['showredirect']) && $user['showredirect'] == 1)
{
$showredirectcheck = "checked=\"checked\"";
}
else
{
$showredirectcheck = "";
}

when i change this file, and make a new account, the user cp is still checked for redirect pages option.
See my edit on the previous post
Quote:although if you set redirect pages to off from ACP, then the logic will set the option to unchecked for new registrations.
hmm...then this seems like an impossible endless loop

wait i read that wrong. The redirect pages are off. But its always checked by default.
(2016-11-14, 07:17 PM)metulburr Wrote: [ -> ]
Quote:although if you set redirect pages to off from ACP, then the logic will set the option to unchecked for new registrations.
hmm...then this seems like an impossible endless loop

wait i read that wrong. The redirect pages are off. But its always checked by default.

If that's the case maybe the plugin you are using is interfering - i don't fully follow how that works