cpredirect() : Developer defined timeout
Set message timeout to specified length.
The current timeout of one second may be to quick for a user to read the
message. This mod will not affect any current plugins or core code.
In mybb_root/admin/adminfunctions.php, find the line:
PHP Code:
function cpredirect($url, $message=\"\")
Replace with:
PHP Code:
function cpredirect($url, $message=\"\", $timeout=100)
In the same function, find the line:
PHP Code:
echo \" timerID = setTimeout(\"redirect();\", 100);\\n\";
Replace with:
PHP Code:
echo \" timerID = setTimeout(\"redirect();\", \".$timeout.\");\\n\";
You can now set the message timeout via the $timeout argument. The
following example sets the timeout to three seconds.
PHP Code:
cpredirect( \'mybb_file.php?\' . SID . \'&action=mybb_page\', $lang->message, 300 );