2021-02-13, 08:37 PM
Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42
2021-02-20, 01:05 AM
I have now made a new fix for making it so if you use SEO Urls, the threads should have the correct url now. Before the thread link in the template was hardcoded using an id parameter. Now I have it actually use the value of get_thread_link($tid, $action). If you do not want to wait for this feature, you can edit the template recentthread_thread and change
to this:
<span class="{$new_class}" id="tid_{$thread['tid']}"><a href="{$mybb->settings['bburl']}/showthread.php?tid={$thread['tid']}">{$thread['subject']}</a></span>
to this:
<span class="{$new_class}" id="tid_{$thread['tid']}"><a href="{$threadlink}">{$thread['subject']}</a></span>
2021-03-13, 09:19 PM
Apologies if this is somewhere obvious, but I haven't been able to find it --
Guests are not being shown the avatars for this plug-in. Have I got a setting somewhere wrong? Anybody know? They're not hidden anywhere else, just in the recent threads table, and just for guests.
Guests are not being shown the avatars for this plug-in. Have I got a setting somewhere wrong? Anybody know? They're not hidden anywhere else, just in the recent threads table, and just for guests.
2021-03-13, 09:59 PM
It is intentional that guests can't view avatars. Users have an option in User CP to view avatars and since guests don't have access to User CP, they aren't allowed to view them.
2021-03-13, 10:32 PM
(2021-03-13, 09:59 PM)dragonexpert Wrote: [ -> ]It is intentional that guests can't view avatars. Users have an option in User CP to view avatars and since guests don't have access to User CP, they aren't allowed to view them.
Thanks for the quick reply. Is there a way to change this setting so that guests can view avatars?
2021-03-13, 10:48 PM
You'll need to change these 2 lines in inc/plugins/recentthreads/hooks.php
Remove the second part of the condition.
if($mybb->settings['recentthread_avatar'] && $mybb->user['showavatars'])
if($mybb->settings['recentthread_lastavatar'] && $mybb->user['showavatars'])
Remove the second part of the condition.
2021-03-14, 02:37 AM
(2021-03-13, 10:48 PM)dragonexpert Wrote: [ -> ]You'll need to change these 2 lines in inc/plugins/recentthreads/hooks.php
if($mybb->settings['recentthread_avatar'] && $mybb->user['showavatars'])
if($mybb->settings['recentthread_lastavatar'] && $mybb->user['showavatars'])
Remove the second part of the condition.
Perfect, thank you so much for your help!
2021-03-14, 09:49 AM
This should be handled via plugin without code chnages... not?
2021-03-15, 11:01 PM
I've slightly modified my index template and template.json so you can use it in a sidebar instead of below or above the forums.
index template should include this:
templates.json should look like this:
{"recentthread":{"title"
"recentthread_thread":{"template"
Have fun!
index template should include this:
<div class="side" style="float: right; width: 21%">
{$recentthreadtable}
</div>
<div class="forum" style="float: left; width: 79%;">{$forums}
</div>
templates.json should look like this:
{"recentthread":{"title"
"<div id=\"recentthreads\">\n<table border=\"0\" cellspacing=\"1\" cellpadding=\"6\" class=\"tborder\" style=\"clear: both;max-height:300px\">\n<thead>\n <tr>\n <td class=\"thead{$expthead}\" colspan=\"{$colspan}\" style=\"text-align:left; font-size: 10pt;\">\n \n<div><b>~ <a href=\"{$mybb->settings['bburl']}\/misc.php?action=recent_threads\" title=\"Show More Threads\">{$lang->recentthreads_recentthreads}<\/a> ~<\/b><\/div>\n<\/td>\n <\/tr>\n<\/thead>\n<tbody style=\"{$expdisplay}\" id=\"cat_9999_e\">\n <tr>\n <td class=\"tcat\" colspan=\"1\"><strong>{$lang->recentthreads_thread} \/ {$lang->recentthreads_author}<\/strong><\/td>\n <td class=\"tcat\"><strong>{$lang->recentthreads_last_post}<\/strong><\/td>\n{$modheader}\n <\/tr>\n {$recentthreads}\n<\/tbody>\n <\/table>\n<\/div>"},
"recentthread_thread":{"template"
"<tr>\r\n <td class=\"{$trow}{$thread_type_class}\">{$arrow} {$recentprefix}<span class=\"{$new_class}\" id=\"tid_{$thread['tid']}\"><a href=\"{$threadlink}\">{$thread['subject']}<\/a><\/span> {$thread['multipage']}<br \/>{$create_string} {$thread['author']}<br \/>{$posteravatar}<\/td>\r\n <td class=\"{$trow}{$thread_type_class}\">{$lastposttimeago}<br \/>\r\n <a href=\"{$lastpostlink}\">Last Post:<\/a> {$lastposterlink}<br \/>{$lastavatar}<\/td>\r\n{$modcol}\r\n
Have fun!
2021-03-15, 11:11 PM
Thanks for your contribution OlDirty. Do you mind if I create a new file called sidebar_templates.json and add it to the plugin for the next release? This way if users would prefer to use it as a sidebar rather than above / below the forum list they have that option.