User Badges 7.x-3.2 integrates well with Author Pane, but I noticed that 7.x-4.x-dev doesn't work with it yet. Does anybody know of a solution?

Comments

kporras07’s picture

ok; now I see the problem.
I have never used that module; but as I can see in code; that module tries to integrate with 3.x version of user_badges where there was a property inserted in $account named badges; now thats a field with different name.

I could:
1) Submit a patch for author_pane; but it's not a good option since 4.x is not stable branch yet.
2) Using this for integrating user_badges with author_pane module. (I think this is best option)
3) Suggest doing this integration in a custom module if this is out of user_badges scope.

I'd love to get feedback from Shabana about this and as soon as possible for me I'd work on this.

jay.lee.bio’s picture

I'd choose the second option too. Thanks in advance.

shabana.navas’s picture

This is a tough one to make a decision on. I agree that the second option is the best out of the three, but I am also worried that if we do the integration in the User Badges module itself, we might start a precedence and integration for other modules might find its way into the 4.x branch. I'd hate to clutter it like this.

At the moment I feel like we should do the integration in a custom module and once we get a stable 4.x version, we can submit a patch for author_pane.

What do you guys think?

jay.lee.bio’s picture

How about you guys just provide a patch to Author Pane? If you look at its 7.x-2.0 version, there's a file called author-pane.tpl.php. Lines 104 - 109 support the older version of User Badges:

<?php /* User badges */ ?>
<?php if (!empty($user_badges)): ?>
  <div class="author-pane-line author-badges">
    <?php print $user_badges; ?>
  </div>
<?php endif; ?>

So can't you guys just add some more code right underneath it so that it also works for those that are using 7.x-4.x-dev?

shabana.navas’s picture

Yes, what @wwwjaylee mentions seems to be more appropriate. We just need to do a version check and change the output based on that.