alx VIP
Total posts: 11
17 Авг 2018 21:39

Hello! How can I hide some module (e.g. ads) for paid-users?

Последние изменения: 20 Авг 2018


pepperstreet VIP
Total posts: 3,837
18 Авг 2018 21:31

Hello alx, to my knowledge you have 2 ways to solve this:

A.) Restrict module display through J! core ACL and usergroups. You might know the respective module parameters.
EMERALD has a special ACTION to move a user to/from a certain usergroup:
http://www.mintjoomla.com/download/joomla-3/item/34-actions/269-change-user-group.html

B.) Use the EMERALD plugin syntax to show/hide certain elements on your site:
http://docs.mintjoomla.com/en/emerald/restrict-anything
You might use the plugin syntax in your main template, overrides, alt-layouts, module chrome... be creative ;)
and you might also use it in a custom HTML module. Do not forget to enable the custom HTML parameter "Prepare Content"!
Additionally you would have to enable and use the J! core loadmodule plugin. Then load your "Ads/WhatEver" module inside your Custom HTML module. To restrict the display, you would have to surround it by the mentioned EMERALD plugin systax.

Hope this helps.


alx VIP
Total posts: 11
19 Авг 2018 23:52

Great help! Thank you, Pepperstreet!


pepperstreet VIP
Total posts: 3,837
20 Авг 2018 18:11

alx Great help! Thank you, Pepperstreet!

You're most welcome. :)


BTW, you might have minor issues with the CustomHTML module method. I guess, there might be a small issue to remove the complete module output... I mean, to get a total empty module. So Joomla would collapse and hide the area completely. Why? Because your custom HTML area might add PARAGRAPH tags around your Emerald syntax. So, if you still get an unwanted empty module or position... you should check out the browser page source for empty/surrounding tags.

Not sure what's the best way to prevent this, probably turn off the WYSIWYG editor in module, or create a default override, or even module chrome in modules.php

Although I could be wrong with my concerns ;) Try for yourself...

Работает на Cobalt