Hi!

I'm trying to list on a page all the subscriptions of a user (page : users/username).
I found in the documentation the function 'subscriptions_taxonomy_page_taxa' that 'Returns a list of taxonomy subscriptions.'. I think this will do the trick! But I got a problem. :p

First point : Will this function render a form with all the checkboxes and submit button? (I just need a simple list of subscribed content)
Second point : When I call the function with $user (the admin) and $form (a drupal_get_form on 'subscriptions_taxonomy_taxa_form'), it triggers the following error :
Fatal error: Cannot use string offset as an array in sites/all/modules/subscriptions/subscriptions_taxonomy.module on line 234
I tried calling it with subscriptions_taxonomy_page_taxa($user, 'subscriptions_taxonomy_taxa_form'); instead of the drupal_get_form variable, but it doesn't work either... :/

What do I do wrong? Am I looking at the right function, considering what I want to do? Thanks for any help!

(Link to the function documentation : http://drupalcontrib.org/api/drupal/contributions%21subscriptions%21subs...)

Comments

salvis’s picture

Status: Active » Fixed

This function returns the form for the user/%/subscriptions/taxa page.

Look at the code where the function is called, then you'll see what parameters it expects and what to do with the return value.

Cymo’s picture

Thanks for the quick answer!

Then apparently it's not exactly what I'm looking for. What would be the best solution to display a simple ul>li list of a user subscriptions?

salvis’s picture

The best and proper way to do it would be to implement views support. We're longing to have that for ages...

The quick and dirty way is to read the {subscriptions} table.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.