#00AF33
Official Code Helper
19529
0
1
Nov 19, 2012 14:18:28 GMT -8
Todge
**
17,324
January 2004
todge
|
Post by Todge on Mar 17, 2019 11:28:04 GMT -8
@smithj, can you please try this.. Most Liked MembersIn your mini-profile template, you will need to wrap the liked number with a classed tag, such as <span class="member_likes L$[user.id]">$[user.likes]</span> so that the plugin can target and retrieve the current likes for that member. You will also need to add <div id="most_liked"></div> to your forum wrapper template to display the list(s). Hopefully it all works as intended, but let me know if not and I'll try to fix it.
|
|
Former Member
inherit
guest@proboards.com
253222
0
Nov 29, 2024 14:25:19 GMT -8
Former Member
0
January 1970
Former Member
|
Post by Former Member on Mar 17, 2019 14:19:58 GMT -8
@smithj , can you please try this.. Most Liked MembersIn your mini-profile template, you will need to wrap the liked number with a classed tag, such as <span class="member_likes L$[user.id]">$[user.likes]</span> so that the plugin can target and retrieve the current likes for that member. You will also need to add <div id="most_liked"></div> to your forum wrapper template to display the list(s). Hopefully it all works as intended, but let me know if not and I'll try to fix it. Doesn't look like it works.
|
|
#00AF33
Official Code Helper
19529
0
1
Nov 19, 2012 14:18:28 GMT -8
Todge
**
17,324
January 2004
todge
|
Post by Todge on Mar 17, 2019 16:41:26 GMT -8
@smithj , can you please try this.. Most Liked MembersIn your mini-profile template, you will need to wrap the liked number with a classed tag, such as <span class="member_likes L$[user.id]">$[user.likes]</span> so that the plugin can target and retrieve the current likes for that member. You will also need to add <div id="most_liked"></div> to your forum wrapper template to display the list(s). Hopefully it all works as intended, but let me know if not and I'll try to fix it. Doesn't look like it works. I assume you have added the classes to the mini-profile and the forum wrapper? If so, can you please leave a link to a guest friendly thread where I can take a look. Thanks.
|
|
Former Member
inherit
guest@proboards.com
253222
0
Nov 29, 2024 14:25:19 GMT -8
Former Member
0
January 1970
Former Member
|
Post by Former Member on Mar 18, 2019 12:51:29 GMT -8
Doesn't look like it works. I assume you have added the classes to the mini-profile and the forum wrapper? If so, can you please leave a link to a guest friendly thread where I can take a look. Thanks. Yes, I believe I've followed the steps correctly. BTW it's near the bottom of the page. brickmessage.boards.net/
|
|
#00AF33
Official Code Helper
19529
0
1
Nov 19, 2012 14:18:28 GMT -8
Todge
**
17,324
January 2004
todge
|
Post by Todge on Mar 18, 2019 15:26:34 GMT -8
I assume you have added the classes to the mini-profile and the forum wrapper? If so, can you please leave a link to a guest friendly thread where I can take a look. Thanks. Yes, I believe I've followed the steps correctly. BTW it's near the bottom of the page. brickmessage.boards.net/Has anyone liked or disliked anothers' post? The cell can only be populated after people start liking each other.
|
|
Former Member
inherit
guest@proboards.com
253222
0
Nov 29, 2024 14:25:19 GMT -8
Former Member
0
January 1970
Former Member
|
Post by Former Member on Mar 19, 2019 13:03:49 GMT -8
Has anyone liked or disliked anothers' post? The cell can only be populated after people start liking each other. Yes, I've liked other people's posts.
|
|
#00AF33
Official Code Helper
19529
0
1
Nov 19, 2012 14:18:28 GMT -8
Todge
**
17,324
January 2004
todge
|
Post by Todge on Mar 19, 2019 15:28:49 GMT -8
Has anyone liked or disliked anothers' post? The cell can only be populated after people start liking each other. Yes, I've liked other people's posts. The plugin cannot find the poster information because you have omitted the class and title in the user link in the mini-profile. For the code to know what to look for the user link needs the class "user_$[user.id]" and the title "@$[user.username]". Hopefully, adding the class and title will allow the plugin to work.
|
|
Former Member
inherit
guest@proboards.com
253222
0
Nov 29, 2024 14:25:19 GMT -8
Former Member
0
January 1970
Former Member
|
Post by Former Member on Mar 19, 2019 16:30:24 GMT -8
Yes, I've liked other people's posts. The plugin cannot find the poster information because you have omitted the class and title in the user link in the mini-profile. For the code to know what to look for the user link needs the class "user_$[user.id]" and the title "@$[user.username]". Hopefully, adding the class and title will allow the plugin to work. What do you mean by title?
|
|
#00AF33
Official Code Helper
19529
0
1
Nov 19, 2012 14:18:28 GMT -8
Todge
**
17,324
January 2004
todge
|
Post by Todge on Mar 21, 2019 14:15:10 GMT -8
The plugin cannot find the poster information because you have omitted the class and title in the user link in the mini-profile. For the code to know what to look for the user link needs the class "user_$[user.id]" and the title "@$[user.username]". Hopefully, adding the class and title will allow the plugin to work. What do you mean by title? 'Title' is an attribute given to an element that creates a tooltip when the mouse hovers over the cell, in the case of the member link it contains the user's username, ProBoards also uses this information to autofill the reply area with the username when you hold CTRL and ALT together when you click a member link. If you use $[user] to add the member link in your mini-profile, the necessary attributes are added automatically, but if for whatever reason you'd rather create your own link you'll need to use <a href="$[user.href]" class="user-$[user.id]" title="@$[user.username]">$[user.name]</a> to add the memberlink with the needed attributes instead.
|
|
Former Member
inherit
guest@proboards.com
253222
0
Nov 29, 2024 14:25:19 GMT -8
Former Member
0
January 1970
Former Member
|
Post by Former Member on Mar 21, 2019 17:44:29 GMT -8
What do you mean by title? 'Title' is an attribute given to an element that creates a tooltip when the mouse hovers over the cell, in the case of the member link it contains the user's username, ProBoards also uses this information to autofill the reply area with the username when you hold CTRL and ALT together when you click a member link. If you use $[user] to add the member link in your mini-profile, the necessary attributes are added automatically, but if for whatever reason you'd rather create your own link you'll need to use <a href="$[user.href]" class="user-$[user.id]" title="@$[user.username]">$[user.name]</a> to add the memberlink with the needed attributes instead. So can you tell me just all the html code (not JS) I should put into my templates please?
|
|
inherit
217348
0
Jul 27, 2022 7:26:44 GMT -8
Lynx
5,849
January 2015
msg
|
Post by Lynx on Mar 21, 2019 18:07:57 GMT -8
This part here: <a href="$[user.href]" class="user-$[user.id]" title="@$[user.username]">$[user.name]</a>
IS HTML and can be placed in your template where you want it to show. Things like $[user.href] are template variables and cannot be used in JS. What Todge gave you was a method to grab values from template variables to create a link. - I believe the $[user.href] returns the link to the user's profile page (feel free to correct me if I'm wrong on that one, Todge). - The $[user.id] returns the user's ID number (yours, @smithj, would return 253222 here on support). - The $[user.username] returns the user's username (the one you use to @ tag with). - The $[user.name] returns the user's display name. So, using you as an example, @smithj, that link run within a template that accepts all of those variables would return a link like this: <a href="http://support.proboards.com/user/253222" class="user-253222" title="@smithj">Jonathan</a>
with the word Jonathan as the clickable link.
|
|
Former Member
inherit
guest@proboards.com
253222
0
Nov 29, 2024 14:25:19 GMT -8
Former Member
0
January 1970
Former Member
|
Post by Former Member on Mar 22, 2019 4:52:28 GMT -8
This part here: <a href="$[user.href]" class="user-$[user.id]" title="@$[user.username]">$[user.name]</a>
IS HTML and can be placed in your template where you want it to show. Things like $[user.href] are template variables and cannot be used in JS. What Todge gave you was a method to grab values from template variables to create a link. - I believe the $[user.href] returns the link to the user's profile page (feel free to correct me if I'm wrong on that one, Todge). - The $[user.id] returns the user's ID number (yours, @smithj , would return 253222 here on support). - The $[user.username] returns the user's username (the one you use to @ tag with). - The $[user.name] returns the user's display name. So, using you as an example, @smithj , that link run within a template that accepts all of those variables would return a link like this: <a href="http://support.proboards.com/user/253222" class="user-253222" title="@smithj">Jonathan</a>
with the word Jonathan as the clickable link. And <a href="$[user.href]" class="user-$[user.id]" title="@$[user.username]">$[user.name]</a> is all I need to put into my code other than a script?
|
|
#00AF33
Official Code Helper
19529
0
1
Nov 19, 2012 14:18:28 GMT -8
Todge
**
17,324
January 2004
todge
|
Post by Todge on Mar 22, 2019 15:08:07 GMT -8
This part here: <a href="$[user.href]" class="user-$[user.id]" title="@$[user.username]">$[user.name]</a>
IS HTML and can be placed in your template where you want it to show. Things like $[user.href] are template variables and cannot be used in JS. What Todge gave you was a method to grab values from template variables to create a link. - I believe the $[user.href] returns the link to the user's profile page (feel free to correct me if I'm wrong on that one, Todge). - The $[user.id] returns the user's ID number (yours, @smithj , would return 253222 here on support). - The $[user.username] returns the user's username (the one you use to @ tag with). - The $[user.name] returns the user's display name. So, using you as an example, @smithj , that link run within a template that accepts all of those variables would return a link like this: <a href="http://support.proboards.com/user/253222" class="user-253222" title="@smithj">Jonathan</a>
with the word Jonathan as the clickable link. And <a href="$[user.href]" class="user-$[user.id]" title="@$[user.username]">$[user.name]</a> is all I need to put into my code other than a script? Yup, just use that code snippet to display te member's name in your mini-profile template.
|
|
Former Member
inherit
guest@proboards.com
253222
0
Nov 29, 2024 14:25:19 GMT -8
Former Member
0
January 1970
Former Member
|
Post by Former Member on Mar 24, 2019 7:53:18 GMT -8
And <a href="$[user.href]" class="user-$[user.id]" title="@$[user.username]">$[user.name]</a> is all I need to put into my code other than a script? Yup, just use that code snippet to display te member's name in your mini-profile template. I tried this in another forum and the former forum. galleries.boards.net/ doesn't work.
|
|
#00AF33
Official Code Helper
19529
0
1
Nov 19, 2012 14:18:28 GMT -8
Todge
**
17,324
January 2004
todge
|
Post by Todge on Mar 24, 2019 17:38:58 GMT -8
Yup, just use that code snippet to display te member's name in your mini-profile template. I tried this in another forum and the former forum. galleries.boards.net/ doesn't work. You cannot like your own posts. While you can click the like button, and the post will say that you liked it, your 'likes count' is not affected and so is not included in the plugin's count either. The only way to test this plugin is to like a post made by another member.
|
|