
Disable image/link posting for unregistered user? (Design/Themes)
Hello,
I'm prepared to make the changes to the code myself.
The posting is parsed by the BBCodeParser-Class using the function html_format, here and here. A possible modification of the html_format may be the following, which adds an additional argument:
function html_format($string, $userType) { //... }
Dependent on the argument $userType
you can enanble/disable the parser, e.g,
function html_format($string, $userType) { //... if($settings['bbcode_img']==1 && $userType > 0) { //... } }
If you changed the signature of the function, you have to modify the function all. Instead of using html_format($txt)
you should use
html_format($txt, isset($_SESSION[$settings['session_prefix'] . 'user_type']) ? $_SESSION[$settings['session_prefix'] . 'user_type'] : -1)
in posting.inc.php.
Beside the adjusted php sources, you have to modify the SMARTY code, to restrict the buttons.
/Micha
--
applied-geodesy.org - OpenSource Least-Squares Adjustment Software for Geodetic Sciences
Complete thread:
- Disable image/link posting for unregistered user? -
AlmostAnonymous,
2019-02-15, 17:46
- Disable image/link posting for unregistered user? -
Micha,
2019-02-16, 10:05
- Disable image/link posting for unregistered user? -
AlmostAnonymous,
2019-02-20, 19:26
- Disable image/link posting for unregistered user? - Micha, 2019-02-21, 07:03
- Disable image/link posting for unregistered user? -
AlmostAnonymous,
2019-02-20, 19:26
- Disable image/link posting for unregistered user? -
Micha,
2019-02-16, 10:05