Simplified jumpbox 📜 (#815)

* Simplified jumpbox 📜

* Updated

* Update README.md

* Updated

* Update page_header.tpl

* Update functions.php
This commit is contained in:
Roman Kelesidis 2023-11-12 01:05:14 +07:00 committed by GitHub
commit f098041713
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 27 additions and 25 deletions

View file

@ -1012,16 +1012,20 @@ function get_userdata($u, bool $is_name = false, bool $allow_guest = false)
return $u_data;
}
function make_jumpbox($selected = 0)
function make_jumpbox()
{
global $datastore, $template;
global $datastore, $template, $bb_cfg;
if (!$bb_cfg['show_jumpbox']) {
return;
}
if (!$jumpbox = $datastore->get('jumpbox')) {
$datastore->update('jumpbox');
$jumpbox = $datastore->get('jumpbox');
}
$template->assign_vars(['JUMPBOX' => (IS_GUEST) ? $jumpbox['guest'] : $jumpbox['user']]);
$template->assign_vars(['JUMPBOX' => (IS_GUEST) ? DB()->escape($jumpbox['guest']) : DB()->escape($jumpbox['user'])]);
}
// $mode: array(not_auth_forum1,not_auth_forum2,..) or (string) 'mode'