Kagodora Points Activity Shortcode
Kagodora Points Activity Shortcode
Overview
The Please log in to see your points activity. shortcode gives members a clear, concise history of their points earnings and spendings that come directly from using the messaging and broadcast features of the Kagodora Engagement Suite. It displays the two most recent point transactions related to reading messages, sending broadcasts, and receiving âhelpfulâ votes on their messages.
This shortcode is designed to sit alongside your existing myCRED wallet (which shows the total balance) and provides context for how that balance has changed through recent messaging activity.
How It Works
The shortcode queries the myCRED log table (wp_mycred_log) for the currently loggedâin user and filters only those transactions where the reference (the action type) begins with kagodora_. These references are automatically recorded by the Kagodora Engagement Suiteâs myCRED hooks:
kagodora_read_message â awarded when a user marks a message as read.kagodora_broadcast_cost â deducted when a user sends a broadcast (if a points cost is set).kagodora_helpful â awarded to a message sender when another user clicks âHelpfulâ on their message.
Each transaction includes the date, the number of points (with a + or â sign), a humanâreadable description, and â where possible â a direct link back to the original message or the admin broadcast approval screen.
What It Displays
For each of the last two transactions, the output includes:
- Points change (e.g.,Â
+1 points orÂ-50 points) - Date and time (in your WordPress siteâs time format)
- Activity description â for example:
- âRead a messageâ
- âSent a broadcastâ
- âYour message was marked helpfulâ
- Optional link â âView messageâ or âView approvalâ that takes the user directly to the relevant inbox item or admin approval page.
If no messagingârelated points activity has occurred yet, the shortcode shows a simple message: âNo messaging points activity yet.â
If myCRED is not active, it shows: âPoints system is not active.â
Where to Use It
The shortcode is intended to be placed on the userâs account page â the same page where the myCRED wallet is already displayed. This gives members a complete view of their points balance (from the wallet) and the specific actions that have affected it (from the activity list).
Example placement:
htmlCopyDownloadRun
<!-- shows total points -->Please log in to see your points activity.
<!-- shows recent messaging activity -->
You can also place it on any other page where you want to show a user their recent points activity, such as a custom dashboard or a âMy Activityâ page.
Customisation
The shortcode is hardâcoded to show two entries (the default). To show more or fewer, edit the plugin file and change the LIMIT 2 in the SQL query to any positive number. For example, to show the last 5 entries:
phpCopyDownload
LIMIT 5
All other output (date format, link text) can be customised by editing the kagodora_eng_points_activity_shortcode() function inside the plugin.
Benefits for Users
- Transparency â Members see exactly why they gained or lost points from messaging actions.
- Engagement â Seeing recent activity encourages users to read messages, send helpful feedback, and participate in broadcasts.
- Convenience â Links directly to the message or approval screen save users from searching.
- Integration â Works seamlessly with the existing myCRED wallet, no extra configuration needed.
Technical Notes
- The shortcode is only available on the frontâend and only for loggedâin users.
- It requires the myCRED plugin to be active and the Kagodora Engagement Suiteâs myCRED hooks to be enabled.
- Links assume the inbox page slug isÂ
/inbox/. If your inbox page has a different slug (e.g.,Â/nbox/), update theÂhome_url('/inbox/') sections in the plugin file accordingly. - The shortcode does not run during AJAX requests or in the admin area, so it never interferes with post saving or other adminâside functionality.
Example Output (HTML)
<div class="kagodora-points-activity">
<h4>Recent Messaging Activity</h4>
<ul>
<li>
<strong>+1 points</strong><br>
<small>May 15, 2026 10:23 am</small><br>
Read a message â <a href="/inbox/?msg_id=42">View message</a>
</li>
<li>
<strong>-50 points</strong><br>
<small>May 14, 2026 3:15 pm</small><br>
Sent a broadcast â <a href="/wp-admin/admin.php?page=kagodora-engage-broadcasts">View approval</a>
</li>
</ul>
</div>
Summary
The Please log in to see your points activity. shortcode is a lightweight, informative addition that bridges the gap between the myCRED wallet and the specific actions users take within the Kagodora messaging system. It builds trust, encourages participation, and provides a seamless user experience on the account page.

Leave a Reply