- Posts: 45
COMMUNITY FORUM
Exclude data when loading the mod_k2_users
- Gerben
- Topic Author
- Offline
- Senior Member
Less
More
10 years 7 months ago #125266
by Gerben
Exclude data when loading the mod_k2_users was created 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
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
- Offline
- Platinum Member
- Aham Brahmasmi
10 years 7 months ago #125267
by Kannan Naidu Venugopal
K2 Rocks \m/
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
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
- Topic Author
- Offline
- Senior Member
Less
More
- Posts: 45
10 years 7 months ago #125268
by Gerben
Replied by Gerben on topic Re: Exclude data when loading the mod_k2_users
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?
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
- Offline
- Platinum Member
- Aham Brahmasmi
10 years 7 months ago #125269
by Kannan Naidu Venugopal
K2 Rocks \m/
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.
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
- Topic Author
- Offline
- Senior Member
Less
More
- Posts: 45
10 years 7 months ago #125270
by Gerben
Replied by Gerben on topic Re: Exclude data when loading the mod_k2_users
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
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.
- Lefteris
- Offline
- Moderator
Less
More
- Posts: 8743
10 years 7 months ago #125271
by Lefteris
JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)
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.
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
- Topic Author
- Offline
- Senior Member
Less
More
- Posts: 45
10 years 7 months ago #125272
by Gerben
Replied by Gerben on topic Re: Exclude data when loading the mod_k2_users
@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 :)
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.
- Lefteris
- Offline
- Moderator
Less
More
- Posts: 8743
10 years 7 months ago #125273
by Lefteris
JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)
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:
Of course in the layout you need to only show the name.
$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
- Topic Author
- Offline
- Senior Member
Less
More
- Posts: 45
10 years 6 months ago #125274
by Gerben
Replied by Gerben on topic Re: Exclude data when loading the mod_k2_users
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
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.