Keyword

Display information for specific user ID

  • shannon briggs
  • shannon briggs's Avatar Topic Author
  • Offline
  • New Member
More
2 weeks 3 days ago #174662 by shannon briggs
shannon briggs created the topic: Display information for specific user ID
I would like to display specific user information (name, description) for a specific K2 user.

I guess it would be something like this:

if (userID == 123) {
echo <name or description associated with that userID>;
}

all help appreciated.

Please Log in or Create an account to join the conversation.

  • Fotis
  • Fotis's Avatar
  • Away
  • Administrator
  • JoomlaWorks Support Team
More
2 weeks 3 days ago #174675 by Fotis
Fotis replied the topic: Display information for specific user ID
I need to know where you want this data retrieved. Is it inside some K2 component view or module, is it in the template or some other extension?

If you use & love K2, please take a moment to add your review and rate it
at the Joomla Extensions Directory: extensions.joomla.org/extension/k2/


IMPORTANT: Please search the forum before posting a question!

JoomlaWorks Support Team Member

Please Log in or Create an account to join the conversation.

  • shannon briggs
  • shannon briggs's Avatar Topic Author
  • Offline
  • New Member
More
2 weeks 3 days ago #174688 by shannon briggs
shannon briggs replied the topic: Display information for specific user ID

Fotis wrote: I need to know where you want this data retrieved. Is it inside some K2 component view or module, is it in the template or some other extension?


It is to be used in a search results page, which uses a K2 Category layout.
Here is an example:
odemanagement.com/jak2filter?category_id=18,313,314,316&created_by=270&issearch=1&ordering=zdate&theme=media

As you can see, I've created a temporary solution in the right sidebar, using a very cumbersome set of php conditionals triggering a K2Users modules for each author. I'm hoping I can get rid of the modules, and just call the information I need for each user directly within the K2 categories template override I've made.

Please Log in or Create an account to join the conversation.

  • Fotis
  • Fotis's Avatar
  • Away
  • Administrator
  • JoomlaWorks Support Team
More
2 weeks 3 days ago #174689 by Fotis
Fotis replied the topic: Display information for specific user ID
JA K2 Filter is a component and as such it should have a template override. Can you upload just the template here?

If you use & love K2, please take a moment to add your review and rate it
at the Joomla Extensions Directory: extensions.joomla.org/extension/k2/


IMPORTANT: Please search the forum before posting a question!

JoomlaWorks Support Team Member

Please Log in or Create an account to join the conversation.

  • shannon briggs
  • shannon briggs's Avatar Topic Author
  • Offline
  • New Member
More
2 weeks 3 days ago #174694 by shannon briggs
shannon briggs replied the topic: Display information for specific user ID

Fotis wrote: JA K2 Filter is a component and as such it should have a template override. Can you upload just the template here?


The JA K2 Filter uses a K2 category layout to display the search results - so there isn't really any template override outside of a K2 template override.

In any case, I guess I'm looking for a solution that can be used where, and not restricted to a particular override/template.

Essentially I just need to call information from the database about a specific user. I have the user ID (Which I extract from the URL of the search results in this case). Can I do something like print_r to display an array for a specific user? It's pretty easy to do in Wordpress. Hoping it's not too many extra steps in Joomla.

Hope that makes sense.

Please Log in or Create an account to join the conversation.

  • Fotis
  • Fotis's Avatar
  • Away
  • Administrator
  • JoomlaWorks Support Team
More
2 weeks 2 days ago #174708 by Fotis
Fotis replied the topic: Display information for specific user ID
The author info is then included on each "item" block (which is rendered in category_item.php). Or directly on the foreach loop that prints out the results if they use the "generic.php" override which is also used in K2 for search results (do a <?php var_dump($item->author); ?> somewhere inside the foreach loop to see what is returned).

So the data is there, but because it's in a loop, I need to understand what you want to retrieve exactly and WHERE do you want to display that extra info.

A URL would also help.

If you use & love K2, please take a moment to add your review and rate it
at the Joomla Extensions Directory: extensions.joomla.org/extension/k2/


IMPORTANT: Please search the forum before posting a question!

JoomlaWorks Support Team Member

Please Log in or Create an account to join the conversation.


Powered by Kunena Forum