- Posts: 12
COMMUNITY FORUM
User rating
- ross
-
Topic Author
- Offline
- New Member
Less
More
11 years 3 months ago #123238
by ross
User rating was created by ross
Hi,
have anyone here tried to create a user rating (a list of users that have highest number of items posted with good rating)?
have anyone here tried to create a user rating (a list of users that have highest number of items posted with good rating)?
Please Log in or Create an account to join the conversation.
- Krikor Boghossian
-
- Offline
- Platinum Member
Less
More
- Posts: 15920
11 years 3 months ago #123239
by Krikor Boghossian
JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)
Replied by Krikor Boghossian on topic Re: User rating
You can use the K2 content module for that list.
You can also sort the category and the menu item as well to Highest Rated as well.
You can also sort the category and the menu item as well to Highest Rated as well.
JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)
Please Log in or Create an account to join the conversation.
- ross
-
Topic Author
- Offline
- New Member
Less
More
- Posts: 12
11 years 3 months ago #123240
by ross
Replied by ross on topic Re: User rating
I looked at the k2 content module, but it can give the list of items by popularity, not a list of users by popularity. Have i missed something?
Please Log in or Create an account to join the conversation.
- Yiota
-
- Visitor
11 years 3 months ago #123241
by Yiota
Replied by Yiota on topic Re: User rating
Hello,
If you need to show users with most popular items you need the K2 Users module. This one has the option to fetch users by most popular items.
If you need to show users with most popular items you need the K2 Users module. This one has the option to fetch users by most popular items.
Please Log in or Create an account to join the conversation.
- ross
-
Topic Author
- Offline
- New Member
Less
More
- Posts: 12
11 years 3 months ago #123242
by ross
Replied by ross on topic Re: User rating
Thank you, it works!
Do you know how to change NAMES in this list to USERNAMES?
i have tried to change code in the module template php file:
<?php if($userName): ?>
<a rel="author" href="<?php echo $user->link; ?>"><?php echo $user->name; ?></a>
<?php else: ?>
<?php echo $user->name; ?>
<?php endif; ?>
</span>
<?php endif; ?>
to
<?php if($userName): ?>
<a rel="author" href="<?php echo $user->link; ?>"><?php echo $user->username; ?></a>
<?php else: ?>
<?php echo $user->username; ?>
<?php endif; ?>
</span>
<?php endif; ?>
but it didnt solve the problem
thank you in advance
Do you know how to change NAMES in this list to USERNAMES?
i have tried to change code in the module template php file:
<?php if($userName): ?>
<a rel="author" href="<?php echo $user->link; ?>"><?php echo $user->name; ?></a>
<?php else: ?>
<?php echo $user->name; ?>
<?php endif; ?>
</span>
<?php endif; ?>
to
<?php if($userName): ?>
<a rel="author" href="<?php echo $user->link; ?>"><?php echo $user->username; ?></a>
<?php else: ?>
<?php echo $user->username; ?>
<?php endif; ?>
</span>
<?php endif; ?>
but it didnt solve the problem
thank you in advance
Please Log in or Create an account to join the conversation.
- Yiota
-
- Visitor
11 years 3 months ago #123243
by Yiota
Replied by Yiota on topic Re: User rating
Try instead of $user->name to put $user->userName, I saw that this is included in the $user object.
Please Log in or Create an account to join the conversation.
- ross
-
Topic Author
- Offline
- New Member
Less
More
- Posts: 12
11 years 3 months ago #123244
by ross
Replied by ross on topic Re: User rating
nope, tried userName, but it didnt worked - it just gives a blank space
Please Log in or Create an account to join the conversation.
- Yiota
-
- Visitor
11 years 3 months ago #123245
by Yiota
Replied by Yiota on topic Re: User rating
OK. I searched it a bit. The username is not fetched from database for this module. In order to fetch it you will have to modify core module files.
Please Log in or Create an account to join the conversation.
- ross
-
Topic Author
- Offline
- New Member
Less
More
- Posts: 12
11 years 3 months ago #123246
by ross
Replied by ross on topic Re: User rating
Oh, thats bad
My programming skills are really poor, can anyone help me what to do in this situation?
My programming skills are really poor, can anyone help me what to do in this situation?
Please Log in or Create an account to join the conversation.
- Yiota
-
- Visitor
11 years 3 months ago #123247
by Yiota
Replied by Yiota on topic Re: User rating
It is kind of easy though. Just edit the helper.php file of the mod_k2_users. Around line 125 there is this code
right after the users.name, add users.username,
add this to the other 2 cases around lines 140 and 154 and save.
Then open the override of the mod_k2_users template file located in your template's folder and replace the $user->name with $user->username.
case 1 :
$query = "SELECT users.name,users.email,users.id AS UID, profiles.*, COUNT(i.id) AS counter FROM #__users AS users
right after the users.name, add users.username,
add this to the other 2 cases around lines 140 and 154 and save.
Then open the override of the mod_k2_users template file located in your template's folder and replace the $user->name with $user->username.
Please Log in or Create an account to join the conversation.
- ross
-
Topic Author
- Offline
- New Member
Less
More
- Posts: 12
11 years 3 months ago #123248
by ross
Replied by ross on topic Re: User rating
thank you, it worked!
Please Log in or Create an account to join the conversation.
- Lefteris
-
- Offline
- Moderator
Less
More
- Posts: 8743
11 years 3 months ago - 11 years 3 months ago #123249
by Lefteris
JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)
Replied by Lefteris on topic Re: User rating
You are welcome.
Make sure to take a backup of the module before any K2 update. The files located under modules folder will be overriden.
Make sure to take a backup of the module before any K2 update. The files located under modules folder will be overriden.
JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)
Please Log in or Create an account to join the conversation.