The profile area showing the entire editing history of someone can be pretty cool. Not so cool if you get a white screen of death because too much memory got eaten in PHP.
So, let's fix that with some pagination. Bit more complex a fix this, two files needed.
Firstly, SimpleDesk-Profile.php
(your copy may or may not have that odd empty line... just replace the entire function definition)
This does the actual pagination under the hood. Now we have to display it.
SimpleDesk-Profile.template.php
It's not pretty but it should give you pagination on the profile area log.
So, let's fix that with some pagination. Bit more complex a fix this, two files needed.
Firstly, SimpleDesk-Profile.php
Code (find) Select
function shd_profile_actionlog($memID)
{
global $context, $txt, $scripturl, $sourcedir, $user_info, $settings;
loadTemplate('sd_template/SimpleDesk-Profile');
shd_load_language('sd_language/SimpleDeskProfile');
require_once($sourcedir . '/sd_source/Subs-SimpleDeskAdmin.php');
$context['action_log'] = shd_load_action_log_entries(0, 10, '', '', 'la.id_member = ' . $memID);
$context['action_log_count'] = shd_count_action_log_entries('la.id_member = ' . $memID);
$context['action_full_log'] = allowedTo('admin_forum') || shd_allowed_to('admin_helpdesk', 0);
$context['page_title'] = $txt['shd_profile_area'] . ' - ' . $txt['shd_profile_actionlog'];
$context['sub_template'] = 'shd_profile_actionlog';
}
(your copy may or may not have that odd empty line... just replace the entire function definition)
Code (replace) Select
function shd_profile_actionlog($memID)
{
global $context, $txt, $scripturl, $sourcedir, $user_info, $settings;
loadTemplate('sd_template/SimpleDesk-Profile');
shd_load_language('sd_language/SimpleDeskProfile');
require_once($sourcedir . '/sd_source/Subs-SimpleDeskAdmin.php');
$context['action_log_count'] = shd_count_action_log_entries('la.id_member = ' . $memID);
$context['displaypage'] = 30;
$context['start'] = isset($_REQUEST['start']) ? $_REQUEST['start'] : 0;
if ($context['start'] < 0 || $context['start'] >= $context['action_log_count'])
$context['start'] = 0;
$context['action_log'] = shd_load_action_log_entries($context['start'], $context['displaypage'], '', '', 'la.id_member = ' . $memID);
$context['action_full_log'] = allowedTo('admin_forum') || shd_allowed_to('admin_helpdesk', 0);
$context['page_index'] = shd_no_expand_pageindex($scripturl . '?action=profile;area=hd_actionlog;u=' . $memID, $context['start'], $context['action_log_count'], $context['displaypage']);
$context['page_title'] = $txt['shd_profile_area'] . ' - ' . $txt['shd_profile_actionlog'];
$context['sub_template'] = 'shd_profile_actionlog';
}
This does the actual pagination under the hood. Now we have to display it.
SimpleDesk-Profile.template.php
Code Select
function template_shd_profile_actionlog()
{
global $context, $settings, $txt, $scripturl;
echo '
<div class="tborder">
<div class="cat_bar grid_header">
<h3 class="catbg" id="ticket_log_header">
<img src="', $settings['default_images_url'], '/simpledesk/log.png" class="icon" alt="*" />
', sprintf($txt['shd_profile_log'], $context['member']['name']), '
<span class="smalltext">(', $context['action_log_count'] == 1 ? $txt['shd_profile_log_count_one'] : sprintf($txt['shd_profile_log_count_more'], $context['action_log_count']) , ')</span>
</h3>
</div>
Code (replace) Select
function template_shd_profile_actionlog()
{
global $context, $settings, $txt, $scripturl;
echo '
<div class="title_bar">
<h3 class="titlebg">
<span class="smalltext">', $txt['pages'], ': ', $context['page_index'], '</span>
</h3>
</div>
<div class="tborder">
<div class="cat_bar grid_header">
<h3 class="catbg" id="ticket_log_header">
<img src="', $settings['default_images_url'], '/simpledesk/log.png" class="icon" alt="*" />
', sprintf($txt['shd_profile_log'], $context['member']['name']), '
<span class="smalltext">(', $context['action_log_count'] == 1 ? $txt['shd_profile_log_count_one'] : sprintf($txt['shd_profile_log_count_more'], $context['action_log_count']) , ')</span>
</h3>
</div>
It's not pretty but it should give you pagination on the profile area log.