nican VIP
Total posts: 392
07 Март 2014 14:50

I am not sure if this is already possible, but after investgating emerald option I think not

there is of course the possibility to display a field content only if the user or the record author does have a certain subscription

but I can'f find an option to HIDE a field content if the visitor or the record author has a certain subscription

why this would be useful?

for example to display ads inside the records, and if you don't want to see them than you have to purchase a subscription, or also to display a "record field" displaying other users records below an author full record, and if the author doesn't want this records field to be displaied than he has to purchase a subscription

am I missing something and this is already possible?

thank you

Последние изменения: 11 Март 2014


Sergey
Total posts: 13,748
10 Март 2014 07:06

oloccina am I missing something and this is already possible?

Yes it is possible.

include_once JPATH_ROOT.'/components/com_emerald/api.php';
if(!EmeraldApi::hasSubscription(array(1,2,4), '', $item->user_id, FALSE, false))
{
    // show ads
}

nican VIP
Total posts: 392
10 Март 2014 14:05

perfect! :-)

will this code work also if inserted in module?


Sergey
Total posts: 13,748
11 Март 2014 06:54

Anywhere in Joomla if Emerald is installed.

Работает на Cobalt