Guest
27 Feb 2014 02:16

Hi Sergey,

seeing as there is no module to display the logged in users subscription information (without having to go to the "Subscriptions" EM Page), what do I need to add to any existing module to pull the subscription info?

I'm looking for the "includes" and/or API calls. What I want to do is add the users "time left", "limit" & "limit left" to the standard Joomla! user profile page (I have this set to display in a "My Account" modal window).

Thanks a lot...

Last Modified: 03 May 2015


Sergey
Total posts: 13,748
27 Feb 2014 07:53

You have to include API file

include_once JPATH_ROOT.'/components/com_emerald/api.php';
$subscr = EmeraldHelper::getUserActiveSubscriptions();

Where $subscr is an array or user active subscriptions. Just shift first array element and use it's ctime and extreme properties for dates and acceess_count to show now many times it was used. And also access_limit to calculate how many times left.


pepperstreet VIP
Total posts: 3,837
05 Mar 2014 00:17

Following... Nice (and obvious) idea to show this info in Profile context. Would like to see this in a CB tab or even CB login module ;-)

Alternative / SQL queries !?

No Emerald API usage, no custom CB plugin, no custom module.
Integration via SQL queries through CB-AutoActions or CB-Query field. This would allow t ocollect the infos from DB tables for current user. Can you provide example queries or some hints?


Sergey
Total posts: 13,748
06 Mar 2014 06:07

pepperstreet Can you provide example queries or some hints?

Unfortunately I am not aware of CB yet. Have тмук worked with it. So I cannot make example of code as I do not know how it works.


pepperstreet VIP
Total posts: 3,837
06 Mar 2014 09:14

Sergey

pepperstreet Can you provide example queries or some hints?

Unfortunately I am not aware of CB yet. Have тмук worked with it. So I cannot make example of code as I do not know how it works.

CB knowledge is just needed for special CB plugin/tab creation. The mentioned alternatives work with custom SQL queries. So, only Emerald table and field relations are of interest.


Sergey
Total posts: 13,748
06 Mar 2014 14:47

Then I simply cannot understand what you are talking about :)


pepperstreet VIP
Total posts: 3,837
06 Mar 2014 16:12

Sergey Then I simply cannot understand what you are talking about :)

NP. I am talking of the same subscription infos mentioned in the initial post.

Guest I want to do is add the users "time left", "limit" & "limit left"

How to "translate" this into SQL queries. So, without using the Emerald API.


pepperstreet VIP
Total posts: 3,837
03 May 2015 23:38

pepperstreet Following... Nice (and obvious) idea to show this info in Profile context. Would like to see this in a CB tab or even CB login module ;-)

Alternative / SQL queries !?

No Emerald API usage, no custom CB plugin, no custom module.

Integration via SQL queries through CB-AutoActions or CB-Query field. This would allow t ocollect the infos from DB tables for current user. Can you provide example queries or some hints?

Maybe obsolete, because of new features in Emerald and CB 2.0 ?!

  • Emerald content plugin has new [PLACEHOLDERS] to show subscription related infos
  • CB 2.0 fields have layouts/templates which can fire content plugins.

(Interesting possibilities. Not tested, yet)


However, an Emerald module for User/Plans Infos would be a nice addition.

Powered by Cobalt