Extension Name: Thanks for posts
Author: rxu
Extension Description: Код: Выделить всё
This extension is a conversion of Thanks for posts MOD for phpBB 3.0 by Палыч.
Updates from MOD to extension should keep the thanks data.
General functionality:
adds Thanks button to the posts at the end of the post buttons row
allows thanking and removing thank for a post
adds a feature to display posts/topics/forums rating based on the count of post thanks for them (thankslist) (configurable)
adds a controller to display a list of users who thanked others and who got thanks for their posts
adds a controller to display a list of top thanked posts/topics/forums (toplist) (configurable)
adds special group permissions to control viewing of toplist and thankslist
adds special permissions to control user abilities to thank for posts (local, forum-based) and to clean thanks list (global)
adds "standard" permission sets to the predefined roles
adds notifications for the thanking and thanks removing events (including board and email notifications, configurable in UCP)
if rating displaying for all of posts/topics/forums is disabled, the toplist is unavailable
I'm not sure if i displayed in the right place and apologies if i didn't what i want is to display a modified version of thanklist into a sidebar that i have , here is the code
Код: Выделить всё
{# Start first sidebar box #}
{% if SIDEBAR_NUMBER_BOXES >= '1' %}
{{ definition.SB_H_L }}<i class="fa fa-thumbs-up" aria-hidden="true"></i> Thank List{{ definition.SB_H_R }}
<div class="row bg1 bg1-sidebar bgi-sidebar">
<div class="tab" style="background-color: rgb(32, 35, 36);">
<button class="tablinks active" onclick="openTab(event, 'thanksGiven', '{{ memberrow.USERNAME_FULL }}', '{{ memberrow.GIVENS }}')">Thanks Given</button>
<button class="tablinks" onclick="openTab(event, 'thanksReceived', '{{ memberrow.USERNAME_FULL }}', '{{ memberrow.RECEIVED }}')">Thanks Received</button>
</div>
<div id="thanksGiven" class="tabcontent">
<p id="thanksGivenContent"></p>
</div>
<div id="thanksReceived" class="tabcontent" style="display: none;">
<p id="thanksReceivedContent"></p>
</div>
</div>
<style>
/* Style the tabs */
.tab {
overflow: hidden;
background-color: rgb(32, 35, 36);
}
/* Style the tab buttons */
.tab button {
background-color: inherit;
color: white;
float: left;
border: none;
outline: none;
cursor: pointer;
padding: 14px 16px;
transition: 0.3s;
}
/* Change color on hover */
.tab button:hover {
background-color: #181a1b;
border-color: #494012;
}
/* Style the tab content */
.tabcontent {
display: none;
padding: 6px 12px;
border-top: none;
}
</style>
<script>
function openTab(evt, tabName, username, value) {
var i, tabcontent, tablinks;
tabcontent = document.getElementsByClassName("tabcontent");
for (i = 0; i < tabcontent.length; i++) {
tabcontent[i].style.display = "none";
}
tablinks = document.getElementsByClassName("tablinks");
for (i = 0; i < tablinks.length; i++) {
tablinks[i].className = tablinks[i].className.replace(" active", "");
}
document.getElementById(tabName).style.display = "block";
evt.currentTarget.className += " active";
// Update the content based on the provided values
if (tabName === 'thanksGiven') {
document.getElementById(tabName + 'Content').textContent = username + ' ' + value;
} else {
document.getElementById(tabName + 'Content').textContent = username + ' ' + value;
}
}
// Open the default tab (Thanks Given)
document.getElementById("thanksGiven").style.display = "block";
document.getElementsByClassName("tablinks")[0].className += " active";
</script>
{{ definition.SB_F_L }}{{ definition.SB_F_R }}
{% endif %}
{# End first sidebar box #}
the problem is that {{ memberrow.USERNAME_FULL }}', '{{ memberrow.RECEIVED }}') '{{ memberrow.GIVENS }}' are not working
From what i understand the memberrow data needs to be correctly loaded and available and i'm not sure how i can do that
Download Link: https://www.phpbb.com/customise/db/exte ... r_posts_2/
Language: English