Link Counts To Profile Sections
-
I sent you an email about a week or two ago with revised code to (optionally) link the # counts to appropriate user profile sections.
It’s a private GitHub repo and your invitation is still pending.
The code is good-to-go and ready for release as the next version unless you decide to make any changes to it yourself first.
Copy/Paste from the repo readme.md:
bbp-topic-count
Robin W’s bbPress Topic Count plugin with a few changes and enhancements.
Number counts can now (optionally) be linked to user profile pages!
- These changes could/should also be ported over to the wonderful bbPress Style Pack plugin.
Key changes:
- New admin option: Link Counts or Do Not Link Counts
- display.php re-worked: display_counts() & display_counts_in_reply() were nearly identical with the only differences being HTML tag wrappers. These two functions have been merged into one so there’s less repeated code. HTML tag wrappers are determined by a passed arg to the new render_display_counts() function. Much easier to maintain.
- Linked Counts point to the profile page links for topics (topic count), replies (reply count), or engagements (post_count) within each user’s profile page.
- Linked Counts use the optional admin setting topic_label, reply_label, or posts_label within the HTML a title=”” attribute along with the user’s “nicename” that bbPress uses.
- Counts are only linked if they are greater than 0 (zero). No point linking to an empty profile page section!
- display_topic_count, display_reply_count, and display_total_count shortcodes honor the optional admin setting for whether or not to link number counts to profile page sections.
- Since tc_display_top_users shortcode can vary depending on how/where it’s used and does not directly correlate to the profile page topics/replies/engagements sections, no links are applied.
- Language .pot file regenerated.
Future Wish-list Changes/Additions:
- Account for guest/annonymous users: They won’t have a $user_id so this plugin won’t work for them at all as it stands. Either exclude them from counts completely, or do counts based on supplied email address for guest/anonymous posts.
- Display Order: I would personally put Total Posts first, then break it down by topic/reply counts. Adding selectable display order (like the bsp forum buttons) would be a nice touch!
- Display font settings: I would personally want to display the number counts with a bold font style. Others may want the labels bold, but the numbers regular. Others may want it all bold. Setting the label font color, label font size, label font family, and label font style as well as the number font color, number font size, number font family, and number font style would be an awesome addition!
Viewing 6 replies - 1 through 6 (of 6 total)
Viewing 6 replies - 1 through 6 (of 6 total)
- The topic ‘Link Counts To Profile Sections’ is closed to new replies.