-
This can display a nice little sidebar block summarising all the members who've posted in a topic.
-
Is that test forum using the database I think it is? :lol:
-
Hey, nice... It's actually one of the many features I had on my (core) to-do list. I guess I can give it up now... :)
Maybe it should be made core, BTW...? Or at least an official plugin...
Can you share it for now? :P
-
Funny, when I suggested a variation on this idea (putting it as a link in the message index to a similar sort of popup) you weren't so keen.
The reason for suggesting it that way is performance saving ;)
-
I don't remember having this discussion before..?
I had this mod installed on one of my earlier SMF1 sites, no longer there though, but I liked it...
-
Well, we did, a long time ago, haha.
Also, I noticed a bug which I'll report in a minute.
-
Hey, nice... It's actually one of the many features I had on my (core) to-do list. I guess I can give it up now... :)
Maybe it should be made core, BTW...? Or at least an official plugin...
Can you share it for now? :P
If it'll be core it shouldn't be in the alpha.
And done.. Someone wants it on their site :P
-
Nao lurves his plugins.
There's about 6 plugins active on this site right now... :o
-
Nice one live :cool:
-
I literally loled...
Quite a change in spirit. First wanting to shy away, then wanting to install some, then... wanting to build some?
-
I don't blame him from shying away from plugins. If you've never had to think in that mindset before, it takes some getting used to. Fortunately I'd come from SMF where I'd already been making lots and lots of use out of it.
But building is less a skill and more an art in doing the dance the right way, especially if you're used to just adding code wherever you feel like.
-
I don't believe I ever had anything against plugins, on the contrary...
I hate mods because they make your life a nightmare when it comes to upgrading the main program.
I love plugins because they never modify external code.
I don't know how to write a plugin, though. And I wouldn't want to look into it for now -- it's not time for me. I have other priorities...
But I love the fact that some of the features I'm always postponing end up in nicely made plugins. That's pretty great.
Anyway... Active Members enabled on Wedge.org :) Thanks, John!
Oh, and also thanks for reminding me (through your code) that I hadn't (yet) fixed the $_GET['title']/$_POST['t'] bug in the Like popup. Done now. (Locally.)
Posted: October 11th, 2012, 04:48 PM
Also, a quick fix for the 'more' link giving out negative numbers... (Due to activemembers_num being higher than the current number of posters.)
<?php
$num_active_members = count($active_members);
if (!empty($settings['activemembers_num']) && $num_active_members > $settings['activemembers_num'])
$context['active_members'][] = '<a href="#" onclick="reqWin(weUrl(\'action=activemembers;t=' . $topic. '\'), 500); return false;">' . $txt['more'] . '</a> (' . ($num_active_members - $settings['activemembers_num']) . ')';
-
The ability to push features into plugins is one of the reasons I wanted to make sure there was a battle-hardened plugin system there ;)
Writing them isn't hard, once you get into the mindset. The mindset simply is: I can run my own code at *these* places, if I were inserting my own code there to do a job, what would I write? The rest is pure packaging.
-
Nice work live627!
-
Thanks for the bug fix, Nao!
But I love the fact that some of the features I'm always postponing end up in nicely made plugins. That's pretty great.
It's purely coincidental at this point mainly because I have absolutely no ides what's on your to-do list.
-
There's also a problem with the URL for the admin icon, but I haven't looked into it yet.
Yeah my to-do list isn't public, but I posted some of it a few months ago... ;)
Maybe I should clean it up and post the entirety of it. Plenty of ideas for people to exploit!
-
Wait, ideas can be exploited now? :lol:
Also, I clicked the (more) link here and nothing happened. Firebug did not show a data-eve on it. Or onclick. Or whatever.
Posted: October 14th, 2012, 12:23 AM
http://wedge.org/pub/plugins/6998/plugins-i-refuse-to-do/
-
Wait, ideas can be exploited now? :lol:
So many little things that wouldn't take more than a day to implement, and yet I haven't been working on because, well, I just lack motivation for them...Also, I clicked the (more) link here and nothing happened. Firebug did not show a data-eve on it. Or onclick. Or whatever.
What 'more' link..?! Where?
-
I already sent a link in my last post. I am talking, of course, of the more link when in excess of 10 active members are found...
-
I already sent a link in my last post. I am talking, of course, of the more link when in excess of 10 active members are found...
Alrighty.
Clicked link.
Opened a popup for me...
Using Firefox 17 (Aurora).
-
I'm using Chrome Version 22.0.1229.94 m and Firefox 15.0.1. When I click the 'more' that you guys are talking about, the screens just fades and that's it. No popup box or anything.
And also just out of curiosity I know it displays member names in the order of the number posts made on that topic but how does it choose between two members who've made the equal number of posts on that topic? 'cause I noticed that the member "Antes" was literally the second poster on that thread and yet his name has been pushed into the "more" list. Is it based on a member's overall post count because it can't be alphabetical either as I see the member "Zootalaws" who's made one post himself among the ten displayed members.
Edit: no wait it can't be based on a member's overall post count either. Confused... Random order?
-
The popup throws a 'unable to find the main template' error. (As in looking up the URL the popup requests, that's the problem)
-
action=activemembers;t=6998 returns an error 403 for me when I'm logged out, resulting in a popup never showing...
So it's probably down to a wrong permission out there.
:edit: Ninja'd...
-
Yup. The 403 is because fatal_lang_error always pushes out HTTP 403 by default, though you can override that to whatever error code you like.
-
Hmm, there IS an active_members permission out there.
I didn't notice in the first place.
Maybe the plugin area should indicate whether a plugin is associated with permissions, and give a link to them...? Maybe..?
-
Or better still, do what I always intended should be done and use the settings-page to do it.
Firstly, use the correct type for <text name="activemembers_num" /> - it should be an int (which also allows setting min, max, step, size), it's a number, not a text string.
Secondly, adding the permission to the settings page. <permissions name="view_active_members_own" /> and <permissions name="view_active_members_any" /> though you'll need to make strings for them too. (And the <newperms> block still has to be left present too.)
The reason for that is because so many people got confused that they have to set permissions in somewhere other than the plugin's own area. So instead, put the permissions in the plugin's settings page.
-
Does it work with per-board perms..?
Posted: October 15th, 2012, 04:46 PM
Hmpf... I've enabled the permission for guests and members alike. It still doesn't seem to work...
Have no time to work on this further for now, though.
Oh, and while I'm at it... I guess the #1 thing to do with the plugin is to ensure the word 'more' isn't linkable when the user doesn't have permission to view that popup... Would have saved me some debugging time ;)
-
Does it work with per-board perms..?
No, but mostly because there's simply no sane way to handle that permission in a UI that is designed to be constrained inside the confines of a simple settings page.Hmpf... I've enabled the permission for guests and members alike. It still doesn't seem to work...
Mostly because it's actually buggy. The permission is defined in the permissions as an own/any pair (and that relates to my comments above) but it's used in active_members_action as a simple permission, as allowedTo('view_active_members')
It needs to be one or the other.
-
I'm guessing the line should be something like that...?
if (allowedTo('view_active_members_any') || ($topicinfo['id_member'] == $user_info['id'] && allowedTo('view_active_members_own')))Posted: October 15th, 2012, 08:17 PM
Hmm, not working... :-/
-
Define 'not working'...
-
Well, it's still crashing.
But I just realized that it's not the permissions that are a problem at this point, it's the fact that it can't find the 'main' block, which rings no bell to me... I mean, it's the exact same code as in Help.php..?!
Posted: October 15th, 2012, 08:25 PM
(Nope... It's definitely the permissions that trigger the error.)
Posted: October 15th, 2012, 08:27 PM
1/ it's id_member_started, not just id_member...
2/ action=activemembers doesn't have 'topic' but 't' as its topic ID, so no $topicinfo for it... :-/
Posted: October 15th, 2012, 08:30 PM
(Fixed.)
-
And also just out of curiosity I know it displays member names in the order of the number posts made on that topic but how does it choose between two members who've made the equal number of posts on that topic?
Database order I think.
-
Secondly, adding the permission to the settings page. <permissions name="view_active_members_own" /> and <permissions name="view_active_members_any" /> though you'll need to make strings for them too. (And the <newperms> block still has to be left present too.)
I specifically did not do that because it doesn't play with the permission profile system.
-
Yeah, you're not really supposed to for that reason. It doesn't work properly, of course, though the system won't actively prevent it at this stage (it really should)
Does it really need to be an own/any permission, though?
-
One thing that is filling my error log:
#/Plugins/active_members_fixed/img/tick.png): failed to open stream: No such file or directory
-
It is looking for an image that doesn't exist. I never got around too finding a suitable icon.
-
Then it shouldn't call for one. Small icons aren't required, big icons have a fallback.