2016-02-18, 08:36:41
(2016-02-18, 05:02:53)Carlos Wrote: Here's a way to add News Manager to the Custom Landing Page dropdown selector in the Multi User plugin (v1.8.2):Hi Carlos
- Install and activate the sa hook components plugin
- Create a component named hook_footer and paste this:
Code:<?php if (basename($_SERVER['PHP_SELF']) == 'load.php' && isset($_GET['id']) && $_GET['id'] == 'user-managment') { ?>
<script>
$('select[id="userland"]').append($('<option>', {
text: 'News Manager',
value: 'load.php?id=news_manager'
}));
</script>
<?php } ?>
Works for me on Firefox and Chrome, but I'm not sure it will work in all browsers. (The Multi User plugin is incorrectly rendering multiple selects with same css id and name.)
I've used your quick fix of manually editing the user xml file which works a treat for my user to only edit News.
I also tried you other method of using sa hook plugin, but I got an error trying to save the component with your code (above). I've had trouble in the past with mod_sec not liking some components in the past on my current host, so I'm wondering if that's what stopped it working.