#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 27, 2019 15:50:55 GMT -8
No worries..
|
|
#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 26, 2019 14:45:17 GMT -8
Nice! It's pretty good. Though now my test account now should have 6 likes and only 3 appears. Edit: Now it's good though. Not sure how often that will happen. Hopefully not very.. Unfortunately I have no control over that. Another thing that will throw the count off is if you like the same person more than once without refreshing the page as the likes in the mini-profiles are not updated until then.
|
|
#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 26, 2019 14:28:06 GMT -8
Todge, Can the pokes only be done once? Do they reset so they can be repeated? Or is there a way to manually reset them for members so they can be repeated? Once you poke a member, you cannot poke them again until they have acknowledged that poke by either poking you back or ignoring the poke.
|
|
#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 26, 2019 14:20:57 GMT -8
Yup, but you'll have to create a cell in the Sidebar Redux plugin and put the RUTS in there instead of in the sidebarr-left (or right) cell instead. I actually found a code that I modified to do the job, but it's doing something wonky... abetterplace.boards.net/Code I found at: support.proboards.com/post/6705259/thread<script> jQuery(function($){ var info = {}; $(".title-bar").each(function(i, v){ var $c = $(".content", $(v).parent()), ts = "title-bar" + i, $ae = ($ae = $('h2 .title_wrapper', v)).length? $ae : $('h2', v); if(window.localStorage[ts] && window.localStorage[ts] === "true"){ $c.hide(); info[ts] = true; } i && $ae.css({maxWidth: 880}); $ae.append('<span style="float: right; cursor: pointer;">Hide/Show</span>'). click(function(){ $c.animate({ height:"toggle" }, 1000, "easeOutQuad"); if(info[ts]){ info[ts] = false; window.localStorage[ts] = "false"; } else { window.localStorage[ts] = "true"; info[ts] = true; } }); }); }); </script> I modified it to: <script> jQuery(function($){ var info = {}; $("#recent-threads-title").each(function(i, v){ var $c = $(".content", $(v).parent()), ts = "recent-threads-title" + i, $ae = ($ae = $('h2 .title_wrapper', v)).length? $ae : $('h2', v); if(window.localStorage[ts] && window.localStorage[ts] === "true"){ $c.hide(); info[ts] = true; } i && $ae.css({maxWidth: 880}); $ae.append('<span style="float: right; cursor: pointer;"></span>'). click(function(){ $c.animate({ height:"toggle" }, 1000, "easeOutQuad"); if(info[ts]){ info[ts] = false; window.localStorage[ts] = "false"; } else { window.localStorage[ts] = "true"; info[ts] = true; } }); }); }); </script> But as you can see on my forum, it's leaving a weird box above the title bar when it collapses. I tried it on other containers and it worked fine. I tried it with the RUTS by itself instead of in Sidebar Redux and it did the same thing. Tries it without matching forum styling and again... weird box. Any ideas? Try this instead.. <script type="text/javascript"> $(document).ready(function(){ if(localStorage.rtt == undefined) { localStorage.rtt = 'show'; } if(localStorage.rtt == 'hide') { $('#recent-threads-title').next().animate({ height:"toggle" }, 1000 ); } $('#recent-threads-title').mouseover(function(){ $(this).find('h2').off('click'); }).css('cursor','pointer').click(function(){ var dis = localStorage.rtt; if(dis == 'show') { localStorage.rtt = 'hide'; } else { localStorage.rtt = 'show'; } $(this).next().animate({ height:"toggle" }, 1000 ); }); }); </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 26, 2019 12:45:02 GMT -8
That ' should' correct itself with the next like.. It's possible to have miscounts if more that one window is open at the same time when a like is given. Is there a way to fix that? I'm afraid not, that's the reason I used 2 keys, one to store the data to be displayed and the other to ensure that the count in the first does not run away from the actual count. Everytime a post is liked or disliked, the weekly, monthly and yearly count is increased or decreased accordingly, and the total is reset to the according to the count in the miniprofile currently being displayed. It's possible that the count in the mini-profile is is incorrect though, depending on what has gone on elsewhere in your forum while you have been viewing that page, and so when you like a post, the total recorded may be wrong, BUT, the next time a post is like the same thing happens again, and so the total should never move far from the correct total, and should be correct more time than it is incorrect.
|
|
#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 25, 2019 17:18:49 GMT -8
Hi Todge I use Siderbar Redux as a container for the RUTS, and the containers on Siderbar Redux toggle collapse/open when you click the title bar. Would that be possible for the RUTS as well? Yup, but you'll have to create a cell in the Sidebar Redux plugin and put the RUTS in there instead of in the sidebarr-left (or right) cell instead.
|
|
#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 25, 2019 17:16:41 GMT -8
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. 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. So... I now have 2 likes but the thing for of all time says I have 1. That ' should' correct itself with the next like.. It's possible to have miscounts if more that one window is open at the same time when a like is given.
|
|
#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 25, 2019 17:09:51 GMT -8
|
|
#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.
|
|
#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:21:04 GMT -8
I would like them on the side and not showing in codes but the actual image itself. How can I do this please? Can you pleas elaborate a little? Whereabouts 'on the side' are you meaning?
|
|
#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:15:52 GMT -8
Hey, I've not had "final blow dealt by: ____" filled in with the user's name yet. How can I fix that? Can you please elaborate, has the creature's HP been reduced to 0? Are you getting the notification but without the member's name? Also, I'd probably need to see the thread where you have the Creature Hunt plugin operating to have any chance of diagnosing any problems, so if you could either post a link here, or PM me it to me if you prefer. The board will have to be guest friendly for me to have any chance of seeing any possible issues. Thank you.
|
|
#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.
|
|
#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.
|
|
#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 16:01:09 GMT -8
Any possible way you can do this? If not, it's no big deal, but my members cannot figure out how to make their sigs properly. Thanks!
I don't see why not.. I'll see what I can do.
|
|
#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.
|
|