Feedback for MembersList Enhanced

This discussion is related to the Members List Enhanced addon.
2

Comments

  • @peregrine is it possible to add additional fields of information, such as Karma, # of times Thanked, etc.?

  • ahh I found your reply here: http://vanillaforums.org/discussion/comment/171208/#Comment_171208

    I'll give this a try. Thanks.

    422
  • kirkpa31kirkpa31 ✭✭
    edited March 2013

    Quick Question:

    Possible to allow all users to see members list 2.0 through config.php?

  • SOLVED:

    Just edited the 'roles & permissions' within my dashboard. All good now. Didn't think to do something so simple right off the bat.

  • kirkpa31kirkpa31 ✭✭
    edited March 2013

    Attempt to sort the added KarmaBankBalance column

    Trying to do an 'if,else' statement within a SQL query, so that the Karma Balance column will be sorted separately than the others, obviously it's not working yet, but if someone sees something simple to add, please shout it out.

    ->Select('*') ->From('User u') ->Join('KarmaBankBalance kb', 'u.UserID = kb.UserID') if ($ShowKarma) { ->OrderBy("kb.Balance", $SortOrder); } else { ->OrderBy("u.$UserField", $SortOrder); } ->Where('Deleted',false) ->Limit($Limit, $Offset) ->Get();

  • do the if else entirely outside the sql and call two different sql's
    if ($ShowKarma)

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

  • kirkpa31kirkpa31 ✭✭
    edited March 2013

    I just don't think the "if ($ShowKarma)" portion is correct. I've set up the multiple sql's as you've suggested, but I'm thinking it will work if the correct "if" portion is written. I'll keep trying. Thank you!

    I can keep getting it to sort only by Karma with this: ->OrderBy("kb.Balance", $SortOrder); instead of this: ->OrderBy("u.$UserField", $SortOrder); but that eliminates the functionality of the others.

  • peregrineperegrine MVP
    edited March 2013

    @kirkpa31 said:
    I just don't think the "if ($ShowKarma)" portion is correct. I've set up the multiple sql's as you've suggested, but I'm thinking it will work if the correct "if" portion is written. I'll keep trying. Thank you!

    I can keep getting it to sort only by Karma with this: ->OrderBy("kb.Balance", $SortOrder); instead of this: ->OrderBy("u.$UserField", $SortOrder); but that eliminates the functionality of the others.

    I uploaded a new MembersList Enhanced v3.0 with functionality for like this plugin, karma balance plugin, and thankful people plugin and sorting of those columns with options to include them in settings if desired.

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

    vrijvlinderkirkpa31chrisk22985
  • kirkpa31kirkpa31 ✭✭
    edited March 2013

    Although the many days I spent modifying 2.0 to include things that now come standard in 3.0, you've taught me a lot about all of this and I couldn't be more grateful. Many apologies for the barrage of questions I had earlier, as this plugin is utterly perfect. You are the best @peregrine. As is this community.

    Also, I see the mistakes I was making in the if-else statement and what you've done now makes perfect sense to me.

    422
  • great plugin. This is perfect.

  • To make the Karma and Thanks values clickable, sending you to the respective tab in the user's profile, just change:

    if ($ShowThank) echo '<td>' . $User->ReceivedThankCount . '</td>'; if ($ShowKarma) echo '<td>' . $User->Balance . '</td>';

    to

    if ($ShowThank) { $Anchor = '/profile/receivedthanks/'. $User->UserID .'/'. $User->Name; echo '<td>' . Anchor($User->ReceivedThankCount,$Anchor) . '</td>'; } if ($ShowKarma) { $Anchor = '/profile/karmabank/'. $User->UserID .'/'. $User->Name; echo '<td>' . Anchor($User->Balance,$Anchor) . '</td>'; }

    peregrine
  • peregrineperegrine MVP
    edited March 2013

    @kirkpa31
    I didn't even think of to include that. nice addition.

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

    kirkpa31UnderDog
  • @peregrine said:
    kirkpa31
    I didn't even think of to include that. nice addition.

    I put your mod into version 4.0 thx. nice addition.

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

    UnderDogkirkpa31
  • kirkpa31kirkpa31 ✭✭
    edited March 2013

    Members List 4.0 isn't sortable b/c of a small change within memtable.php

    lines 30-31:

    $Arg = $MLUrl; $MColUrl = 'members/p1';

    change to:

    $Arg = $MLUrl; $MColUrl = 'plugin/MembersListEnh/views/memberlist/p1';

    and

    lines 171-172:

    $MemNumRows, 'members' . '/{Page}' . '&sort=' . $SortOrder . '&ufield=' .$UserField

    change to:

    $MemNumRows, 'plugin/MembersListEnh/views/memberslistenh' . '/{Page}' . '&sort=' . $SortOrder . '&ufield=' .$UserField

  • peregrineperegrine MVP
    edited March 2013

    thanks for the feedback -

    1) Use the original 4.0 zip without your changes above.

    2) remove any routes that deal with members under routing in your dashboard,

    3) disable plugin.

    4) enable plugin.

    it is sortable as is, if you disable the plugin and re-enable it. if I failed to mention it, consider it mentioned.

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

    kirkpa31
  • Ah ok, that way is much easier.

  • kirkpa31kirkpa31 ✭✭
    edited April 2013

    I added a column within my Members List Enhanced to show each user's Accepted Answer total from the Q&A plugin.

    I used the QnACountAcceptance keyword that @x00 references in the Karma Bank plugin and just followed what you've laid out in the code @peregrine. It seems to work perfectly in tests, sorts well and updates instantly.

    within /plugins/MembersListEnh/default.php add:

    'Plugins.MembersListEnh.ShowAnswers',



    within /plugins/MembersListEnh/views/memtable.php add in 4 separate respective areas:

          case 'qnacountacceptance':
                $UserField  = 'QnACountAcceptance';
               break;  
    

    $ShowAnswers = Gdn::Config("Plugins.MembersListEnh.ShowAnswers");

           if ($ShowAnswers)
           echo  '<th>' .Anchor(T('Answers'),$MColUrl . '&ufield=' . 'QnACountAcceptance' . '&sort=' . $NewSort ) . '</th>';
    


                     if ($ShowAnswers)
                     echo '<td>' . $User->QnACountAcceptance . '</td>';
    



    within /plugins/MembersListEnh/views/mle-settings.php add:

             <tr>
                <td>
                    <?php
                    echo $this->Form->CheckBox(
                            'Plugins.MembersListEnh.ShowAnswers', 'Show Answers', array('value' => '1', 'selected' => 'selected')
                    );
                    ?>
                </td>
                <td class="Alt">
                    <?php echo Gdn::Translate('Display Accepted Answers Column in Members List(QnA Plugin must be enabled)'); ?>
                </td>
            </tr>    
    
    hgtonightvrijvlinderUnderDogperegrine
  • peregrineperegrine MVP
    edited April 2013

    @kirkpa31

    never mind I thought you missed something.

    now, you are only missing kudos and voting I think :).

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

  • having a problem, that it numbers all members, but includes all the spam bots that got caught in my filters as well, which looks odd when my 20th member is number 180 or so, and it's giving enough pages to fit all of those, when only the first couple are in use. any suggestions on what to do?

  • At the moment I'm busy, and I've written too many plugins and received too few donations to look at specific feature requests from people who haven't donated.

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

    UnderDogphreak
Sign In or Register to comment.