inherit
King Oligochaete
126470
0
Feb 24, 2021 12:23:15 GMT -8
Wormopolis
Stop rating plugins with 1 star that dont deserve it.
20,002
June 2008
tbserialkillers
Wormo's Mini-Profile
|
Post by Wormopolis on Apr 10, 2013 5:48:56 GMT -8
can it not just skip a mini profile if the name doesnt have a "user-x" class?
|
|
inherit
First Contributor
66253
0
Mar 18, 2024 11:09:20 GMT -8
aRMY83
2,925
December 2005
army83
|
Post by aRMY83 on Apr 10, 2013 6:10:02 GMT -8
After importing the v1.2.0 I'm still having this problem: linkExample image within above link: and only after I disable this version, everything works just fine.
|
|
inherit
164980
0
Oct 11, 2012 23:21:29 GMT -8
Tohsaka Rin
Why do men keep falling into my residence? I can collect on the damage insurance, right?
602
March 2011
lunacticinferno
|
Post by Tohsaka Rin on Apr 10, 2013 9:15:47 GMT -8
Well, me, personally, I do not want (nor care to have) Karma available on an "Alter" mini-profile. It should function properly on the users normal profile. However, it is not doing that with the Alter plugin active.
The normal profile karma modification for listing the karma, giving or taking karma, works; on the mini-profiles it does not because of something in the Alter plugin that is causing it to not be able to refresh/display properly.
Karma itself should not be displayed on an Alter (which so far it does not.)
It is just that, as stated, something in the Alter plugin is making it unable to update.
|
|
inherit
170346
0
Mar 1, 2016 12:53:37 GMT -8
Shorty
Yeah, I'm that cool. Lol! No I'm not.
3,018
August 2011
shortyverrett94
|
Post by Shorty on Apr 10, 2013 14:19:05 GMT -8
After importing the v1.2.0 I'm still having this problem: linkExample image within above link: and only after I disable this version, everything works just fine. Can you provide me a link, that I will have permission to see the posts. Well, me, personally, I do not want (nor care to have) Karma available on an "Alter" mini-profile. It should function properly on the users normal profile. However, it is not doing that with the Alter plugin active. The normal profile karma modification for listing the karma, giving or taking karma, works; on the mini-profiles it does not because of something in the Alter plugin that is causing it to not be able to refresh/display properly. Karma itself should not be displayed on an Alter (which so far it does not.) It is just that, as stated, something in the Alter plugin is making it unable to update. Okay.
|
|
inherit
First Contributor
66253
0
Mar 18, 2024 11:09:20 GMT -8
aRMY83
2,925
December 2005
army83
|
Post by aRMY83 on Apr 10, 2013 15:01:21 GMT -8
Right now shorty I have this board open to guests so you can see what I mean: linkIt does work for a few <prev or next > but then locks up. Do try some of the others within this board and you'll get the same results.
|
|
inherit
170346
0
Mar 1, 2016 12:53:37 GMT -8
Shorty
Yeah, I'm that cool. Lol! No I'm not.
3,018
August 2011
shortyverrett94
|
Post by Shorty on Apr 10, 2013 15:13:12 GMT -8
If you disabled all plugins but this one does it still do it?
|
|
inherit
First Contributor
66253
0
Mar 18, 2024 11:09:20 GMT -8
aRMY83
2,925
December 2005
army83
|
Post by aRMY83 on Apr 10, 2013 16:38:12 GMT -8
Yes it does shorty.
|
|
inherit
170346
0
Mar 1, 2016 12:53:37 GMT -8
Shorty
Yeah, I'm that cool. Lol! No I'm not.
3,018
August 2011
shortyverrett94
|
Post by Shorty on Apr 10, 2013 18:03:29 GMT -8
That's really, really, really odd. Because on my board I have never once been able to get that to happen. And it seems as if it only does it to a few people. Can you try removing the second pagination and see if that fixes it? I'm trying to find differences in our 2 boards.
|
|
inherit
Official Code Helper
65613
0
1
Oct 22, 2024 1:56:19 GMT -8
Chris
"'Oops' is the sound we make when we improve"
9,018
December 2005
horace
RedBassett's Mini-Profile
|
Post by Chris on Apr 10, 2013 18:08:19 GMT -8
I took a quick look at this ... Although there's a qualifier to ignore .guest-mini-profile, there's nothing preventing processing of Camille's profile which has no user-link (deleted member perhaps Army?). This causes an error which eventually redounds on pagination since pagination is disabled in beforeSearch then re-enabled in afterSearch. If your code is encountering an error and it is hooking the aftersearch event then the pagination does not get re-enabled. It might actually be prudent to wrap your aftersearch function in a try/catch to prevent this condition should there be an error. In this case, the error occurs in the line that starts var userId = $(this).find('a.user-link') which Camille's mini-profile does not have
$('.ui-autosearch').on('autosearchaftersearch.enhanced', function () { $('div.mini-profile:not(.guest-mini-profile)').each(function() { var userId = $(this).find('a.user-link').attr('class').split('user-link user-')[1].split(' group-')[0]; var karmaNumber = karmaKey.get(userId) if(karmaNumber == undefined) { karmaNumber = 0; } if(!members.length || (members.length && !userId.match(members2))) { $('span.userKarmaNumber'+userId).text(karmaNumber); } if(proboards.data('user').is_staff == '1') { $('span.userKarmaNumber'+userId+'').click(function() { proboards.dialog('world', { title:'Edit '+karmaText+'', html:''+karmaText+' Value:<br /><input type="text" class="karmapopup" value="'+karmaNumber+'" style="width:95%;" />', buttons: { 'Cancel': function(){$(this).dialog('close');}, 'Confirm': function(){$(this).dialog('close'); karmaKey.set(userId,$('input.karmapopup').val()); $('span.userKarmaNumber'+userId+'').text(karmaKey.get(userId));} } }); }); } });
I'll also note that you do not need that ".enhanced" namespace since that was added for namespacing on another plugin and instead of checking for IE you could instead check for $.pushStateSupport() which would cover older browsers other than IE as well as future-proof should by some miracle IE suddenly adds pushState support or a browser is masquerading as IE but has pushState support.
|
|
inherit
170346
0
Mar 1, 2016 12:53:37 GMT -8
Shorty
Yeah, I'm that cool. Lol! No I'm not.
3,018
August 2011
shortyverrett94
|
Post by Shorty on Apr 10, 2013 18:26:21 GMT -8
I took a quick look at this ... Although there's a qualifier to ignore .guest-mini-profile, there's nothing preventing processing of Camille's profile which has no user-link (deleted member perhaps Army?). This causes an error which eventually redounds on pagination since pagination is disabled in beforeSearch then re-enabled in afterSearch. If your code is encountering an error and it is hooking the aftersearch event then the pagination does not get re-enabled. It might actually be prudent to wrap your aftersearch function in a try/catch to prevent this condition should there be an error. In this case, the error occurs in the line that starts var userId = $(this).find('a.user-link') which Camille's mini-profile does not have I did notice that Camille's profile didn't have what it was looking for. I don't know why I didn't think that would be the cause. I guess because I didn't know that it would affect pagination. Also, I'm not exactly sure what 'try/catch' means as I'm not the brightest. So if you could please elaborate. Thank you for the help! Would it work if I added :has(a.user-link) to the div.mini-profile:not(.guest-mini-profile)? I'll also note that you do not need that ".enhanced" namespace since that was added for namespacing on another plugin and instead of checking for IE you could instead check for $.pushStateSupport() which would cover older browsers other than IE as well as future-proof should by some miracle IE suddenly adds pushState support or a browser is masquerading as IE but has pushState support. For the .enhanced thing. I just used that because I copy/pasted what you had given us earlier. And for the $.pushStateSupport() thing. Thank you for that. I will definitely add that in. Since I'm trying to make it run in only IE because it doesn't run the autosearchaftersearch on I think page load(atleast it didn't when I first did it), would I just do, if(!$.pushStateSupport()) { code } Thank you again for the help, I really appreciate it!!!
|
|
inherit
Official Code Helper
65613
0
1
Oct 22, 2024 1:56:19 GMT -8
Chris
"'Oops' is the sound we make when we improve"
9,018
December 2005
horace
RedBassett's Mini-Profile
|
Post by Chris on Apr 10, 2013 18:44:02 GMT -8
Try/catch allows your code to recover from an error:
try{ YOUR CODE HERE }catch(err){ RECOVER FROM ERROR CODE HERE }
This way should there be an error such as this in the future execution will still pass back to the native aftersearch handler so it can re-enable the pagination. The :has(a.user-link) will cover much more scenarios than just guest mini-profiles.
I suggest you add your own namespace as well to that event hook (replace the "enhanced"), since that allows you to subsequently remove that hook without affecting other plugins that may also have hooked that event.
Edit:
if(navigator.appName == "Microsoft Internet Explorer") { $('.ui-autosearch').data('autosearch')._trigger('afterSearch'); }
becomes
if(!$.pushStateSupport()) { //older browsers and IE $('.ui-autosearch').data('autosearch')._trigger('afterSearch'); }
|
|
inherit
170346
0
Mar 1, 2016 12:53:37 GMT -8
Shorty
Yeah, I'm that cool. Lol! No I'm not.
3,018
August 2011
shortyverrett94
|
Post by Shorty on Apr 10, 2013 18:53:42 GMT -8
Try/catch allows your code to recover from an error: try{ YOUR CODE HERE }catch(err){ RECOVER FROM ERROR CODE HERE } This way should there be an error such as this in the future execution will still pass back to the native aftersearch handler so it can re-enable the pagination. The :has(a.user-link) will cover much more scenarios than just guest mini-profiles. I suggest you add your own namespace as well to that event hook (replace the "enhanced"), since that allows you to subsequently remove that hook without affecting other plugins that may also have hooked that event. Alright. Thanks for showing the try/catch. I don't exactly know how I would use it. What would go in the catch part? I'll look some stuff up on it. Would the :has(a.user-link) be good then? because I don't really want to try and implement the try/catch thing right now, as I have no idea how to use it. Sorry, but I have no idea what a namespace is either. Sorry for the questions, but can you explain that? Thanks!
|
|
inherit
Official Code Helper
65613
0
1
Oct 22, 2024 1:56:19 GMT -8
Chris
"'Oops' is the sound we make when we improve"
9,018
December 2005
horace
RedBassett's Mini-Profile
|
Post by Chris on Apr 10, 2013 19:05:54 GMT -8
$('.ui-autosearch').on('autosearchaftersearch.shortykarma', function () { $('div.mini-profile:has(.user-link)').each(function () { try{ var userId = $(this).find('a.user-link').attr('class').split('user-link user-')[1].split(' group-')[0]; var karmaNumber = karmaKey.get(userId) if (karmaNumber == undefined) { karmaNumber = 0; } if (!members.length || (members.length && !userId.match(members2))) { $('span.userKarmaNumber' + userId).text(karmaNumber); } if (proboards.data('user').is_staff == '1') { $('span.userKarmaNumber' + userId + '').click(function () { proboards.dialog('world', { title : 'Edit ' + karmaText + '', html : '' + karmaText + ' Value:<br /><input type="text" class="karmapopup" value="' + karmaNumber + '" style="width:95%;" />', buttons : { 'Cancel' : function () { $(this).dialog('close'); }, 'Confirm' : function () { $(this).dialog('close'); karmaKey.set(userId, $('input.karmapopup').val()); $('span.userKarmaNumber' + userId + '').text(karmaKey.get(userId)); } } }); }); } }catch(R){} });
We can take this to PM rather than spamming the thread...
|
|
inherit
170346
0
Mar 1, 2016 12:53:37 GMT -8
Shorty
Yeah, I'm that cool. Lol! No I'm not.
3,018
August 2011
shortyverrett94
|
Post by Shorty on Apr 10, 2013 20:44:21 GMT -8
Alright so thanks to Chris, the issue is now fixed. aRMY83 this fixes the pagination problem and Tohsaka Rin this should also fix the problem with the alter plugin.
|
|
inherit
164980
0
Oct 11, 2012 23:21:29 GMT -8
Tohsaka Rin
Why do men keep falling into my residence? I can collect on the damage insurance, right?
602
March 2011
lunacticinferno
|
Post by Tohsaka Rin on Apr 10, 2013 21:03:41 GMT -8
Yep, it is fixed. Ran a few tests on various plugins, divs, and styles to make sure nothing was conflicting again.
Hurray~
Thanks for the speedy fix!
|
|