Keyword

Exclude data when loading the mod_k2_users

  • Gerben
  • Gerben's Avatar Topic Author
  • Offline
  • Senior Member
More
10 years 7 months ago #125266 by Gerben
Hi Support,

I run a website with k2 and it haves a lot of users with even more specific user information.
When loading the mod_k2_users all this user information is loading from the database what takes loading time and all the information i need is the name.
Does somebody nows where i can change this so only the name field is being called from the databases and not all the information.

Somebody having some tips for me?

Cheers in advance,
Geppie

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

  • Kannan Naidu Venugopal
  • Kannan Naidu Venugopal's Avatar
  • Offline
  • Platinum Member
  • Aham Brahmasmi
More
10 years 7 months ago #125267 by Kannan Naidu Venugopal
Replied by Kannan Naidu Venugopal on topic Re: Exclude data when loading the mod_k2_users
Under the mod_k2_users settings -> Display options - you can hide the rest and only show the name.

For user (author) pages -> You can configure at K2 Parameters - Layout & view options for user (author) pages

K2 Rocks \m/

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

  • Gerben
  • Gerben's Avatar Topic Author
  • Offline
  • Senior Member
More
10 years 7 months ago #125268 by Gerben
Hi Kannan,

Yes i now that but if you make a var_dump the entire information is there.
The parameters are only for showing the information not for exclude them of being called from the database.

Do you now a solution?

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

  • Kannan Naidu Venugopal
  • Kannan Naidu Venugopal's Avatar
  • Offline
  • Platinum Member
  • Aham Brahmasmi
More
10 years 7 months ago #125269 by Kannan Naidu Venugopal
Replied by Kannan Naidu Venugopal on topic Re: Exclude data when loading the mod_k2_users
Hi Gerben,

You mean just do the query for the name and not the rest ? I don't think it's possible :) but i could be wrong.

K2 Rocks \m/

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

  • Gerben
  • Gerben's Avatar Topic Author
  • Offline
  • Senior Member
More
10 years 7 months ago #125270 by Gerben
Hi Kannan,

That's exactly what i mean :D
Must be possible but i can't find the query from where it's getting the user data.
If i find this query i can change the * to only username

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

More
10 years 7 months ago #125271 by Lefteris
Replied by Lefteris on topic Re: Exclude data when loading the mod_k2_users
@Gerben

You don't need to do this. If your site is slow this is not the reason for sure.

JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

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

  • Gerben
  • Gerben's Avatar Topic Author
  • Offline
  • Senior Member
More
10 years 7 months ago #125272 by Gerben
@lefteris

I know it for sure because i made some extra fields in the database for the user.
one of those fields has a value that the user can upload a crop of a image.
This image is stored as data:image/png;base64, in the database.

In the beginning i had 50 users and then it was no problem but now i have more then 300 users.
So the query from the database is pulling all this information at once and then the database crashes.
So i need to exclude this extra field :)

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

More
10 years 7 months ago #125273 by Lefteris
Replied by Lefteris on topic Re: Exclude data when loading the mod_k2_users
You need to hack some code. I suggest that you make a new module based on the core mod_k2_users. Otherwise you will lose your changes in future updates. The file that is generating the query is /modules/mod_k2_users/helper.php. Since you want just the name change line 61 to:
$query = "SELECT users.name,users.email, users.id AS UID FROM #__users AS users

Of course in the layout you need to only show the name.

JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

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

  • Gerben
  • Gerben's Avatar Topic Author
  • Offline
  • Senior Member
More
10 years 6 months ago #125274 by Gerben
Lefteris,

Thanks for the push in the right direction, with a bit more modifications i managed to do the trick.
Once again thanks for your help.

Kind regards,
Geppie

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


Powered by Kunena Forum