Link to Mod (https://custom.simplemachines.org/mods/index.php?mod=4088)
UNANSWERED TOPICS v2.8
By Dougiefresh (http://www.simplemachines.org/community/index.php?action=profile;u=253913) -> Link to Mod (http://custom.simplemachines.org/mods/index.php?mod=4088)
IntroductionThis mod shows all of the topics, excluding locked topics and recycle board topics, that have not been answered (aka topics that consist of a single post). Locked topics and topics in the recycle boards are not included in the list because it makes no sense to include topics that can't be replied to....
Version 2.5 adds the ability to restrict by board(s) by using
board=- [/b], where
- [/b] is the board ID or IDs seperated by commas.
Admin Settings
There are two new settings under Admin -> Configuration -> Modification Settings:
o Default view for unanswered topics (set to posts view by default)
o Number of days to show unanswered topics (set to 90 days by default)
There is also a new permission under Admin -> Members -> Permissions:
o Can view unanswered topics (not permissable for guests)
Compatibility Notes
This mod was tested on SMF 2.0.13 and SMF 2.1 Beta 2 through 2.1 RC2, but should work on SMF 2.0 and up. SMF 1.x is not and will not be supported.
Related Discussions
o Un-answeredTopics for SMF 2.0? (http://www.simplemachines.org/community/index.php?topic=510124.0%5B/url)
Changelog
The changelog can be viewed at XPtsp.com (http://www.xptsp.com/board/free-modifications/unanswered-topics/?tab=1).
License
Copyright (c) 2016 - 2019, Douglas Orend
All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Hi @dougiefresh, Thank you again for this mod!
I've gotten an error of (8: Array to string conversion) on some lines(44, 163, 206) of the Unanswered.template.php (attached). Would you please have a look at the file?
Thanks in advance.
turkish translate
index.turkish.php and index.turkish-utf8.php
find
?>
before
$txt['unanswered_topics'] = 'Cevapsız Konular';
$txt['show_unanswered_topics'] = 'Tüm cevapsız konuları göster.';
$txt['show_unanswered_topics_limit'] = 'Son %d gündeki cevapsız konuları göster.';
$txt['unanswered_topics_visit_none'] = 'Son %d gün içinde cevaplanmamış son konular.';
$txt['unanswered_view_topics'] = 'Konu listesi şeklinde';
$txt['unanswered_view_posts'] = 'Konu içeriği şeklinde';
$txt['unanswered_time_limit'] = 'Son kaç gündeki konular görüntülensin:<div class="smalltext">(0 kapatır)<>';
$txt['unanswered_default_view'] = 'Cevapsız konular için varsayılan görünüm:';
Uploaded v1.2 - March 7th, 2016
o Added Turkish language support to the mod, thanks to Snrj (http://www.simplemachines.org/community/index.php?action=profile;u=373904)!
o Added SMF 2.1 Beta 2 support to the mod.
o Moved 2 language strings from index to ManageSettings language file.
@Snrj: Thank you for the Turkish translation! It has been included in the this version!
thanks for the Turkish translation . Snrj .
error in unanswered.php (i use 2.0.11)
line 173 & 186 - there is:
&$temp
- it has to be:
$temp
When i modify it i get this error:
QuoteDatabase error, given array of integer values is empty. (list_boards)
Find attached the german language file
Uploaded v1.3 - March 19th, 2016
o Fixed "Array to string conversion" error found by roza (http://www.simplemachines.org/community/index.php?action=profile;u=423124).
o Fixed array processing issue found by Inti31 (http://www.simplemachines.org/community/index.php?action=profile;u=189089).
o Added German translation by Inti31 (http://www.simplemachines.org/community/index.php?action=profile;u=189089).
@roza: Thank you for reporting the bug you found!! Sorry that I missed it for version 1.2, but it's been fixed for 1.3....
@Inti31: Thank you for the German translation, as well as the bug report! The bug has been fixed!
@dougiefresh, Thank you for new update. After updating to version 1.3, I just got the error of (8: Array to string conversion) on line 206 in the Unanswered20.template.php again.
Quote
$color_class2 = !empty($color_class) ? $color_class . '2' : '';
echo '
<tr>
<td class="', $color_class, ' icon1 windowbg">
<img src="', $settings['images_url'], '/topic/', $post['class'], '.gif" alt="" />
</td>
<td class="', $color_class, ' icon2 windowbg">
<img src="', $post['icon_url'], '" alt="" />
</td>
<td class="subject ', $color_class2, ' windowbg2">
<div>
', $post['is_sticky'] ? '<strong>' : '', '<span id="msg_' . $post['topic'] . '">', $post['link'], '</span>', $post['is_sticky'] ? '</strong>' : '', '
<a href="', $post['new_href'], '" id="newicon', $post['topic'], '"><img src="', $settings['lang_images_url'], '/new.gif" alt="', $txt['new'], '" /></a>
<p>
', $txt['started_by'], ' <strong>', $post['poster']['link'], '</strong>
', $txt['in'], ' <em>', $post['board']['link'], '</em>
<small id="pages', $post['topic'], '">', $post['pages'], '</small>
</p>
<>
</td>
<td class="', $color_class, ' stats windowbg">
', $post['replies'], ' ', $txt['replies'], '
<br />
', $post['views'], ' ', $txt['views'], '
</td>
<td class="', $color_class2, ' lastpost windowbg2">
<a href="', $post['href'], '"><img src="', $settings['images_url'], '/icons/last_post.gif" alt="', $txt['last_post'], '" title="', $txt, '" style="float: right;" /></a>
', $post['time'], '<br />
', $txt['by'], ' ', $post['poster']['link'], '
</td>';
if ($showCheckboxes)
echo '
<td class="windowbg2" valign="middle" align="center">
<input type="checkbox" name="topics[]" value="', $post['topic'], '" class="input_check" />
</td>';
echo '
</tr>';
}
title="', $txt, '"
There's your culprit. It should be $txt['last_post'] ;)
Uploaded v1.4 - March 27th, 2016
o Second attempt to fix array processing issue found by Inti31 (http://www.simplemachines.org/community/index.php?action=profile;u=189089).
@roza: I got the errors in the SMF 2.1 version of the template, but somehow missed the SMF 2.0.x template.... Sorry about that. Version 1.4 fixes the bug report for SMF 2.0.x template. Thanks for reporting the bug (again)!!
Thank you for new update.
Here I leave my translation into Spanish hope it will help and indeed very good mod I hope aprobecharlos in some projects!
index.spanish_latin.php
$txt['unanswered_topics'] = 'Temas sin respuesta';
$txt['show_unanswered_topics'] = 'Mostrar todos los temas sin respuesta.';
$txt['show_unanswered_topics_limit'] = 'Mostrar temas sin respuesta en los ultimos %d dias.';
$txt['unanswered_topics_visit_none'] = 'No hay temas sin respuesta que se encuentren en los ultimos %d dias.';
$txt['unanswered_view_topics'] = 'Ver como Temas';
$txt['unanswered_view_posts'] = 'Ver como Mensajes';
and index.spanish_latin-utf8.php
$txt['unanswered_topics'] = 'Temas sin respuesta';
$txt['show_unanswered_topics'] = 'Mostrar todos los temas sin respuesta.';
$txt['show_unanswered_topics_limit'] = 'Mostrar temas sin respuesta en los últimos %d días.';
$txt['unanswered_topics_visit_none'] = 'No hay temas sin respuesta que se encuentren en los últimos %d días.';
$txt['unanswered_view_topics'] = 'Ver como Temas';
$txt['unanswered_view_posts'] = 'Ver como Mensajes';
Regards!
Edit: I almost forgot 2 lines not to publish now add haha
ManageSettings.spanish_latin.php
$txt['unanswered_time_limit'] = 'Numero de dias para mostrar los temas sin respuesta:<div class="smalltext">(0 para desactivar)</div>';
$txt['unanswered_default_view'] = 'Vista predeterminada de temas sin respuesta:';
ManageSettings.spanish_latin-utf8.php
$txt['unanswered_time_limit'] = 'Número de días para mostrar los temas sin respuesta:<div class="smalltext">(0 para desactivar)</div>';
$txt['unanswered_default_view'] = 'Vista predeterminada de temas sin respuesta:';
Uploaded v1.5 - Match 30th, 2016
o Added Spanish-Latin translation by Rock Lee [BC] (http://www.simplemachines.org/community/index.php?action=profile;u=322597).
@Rock Lee [BC]: Thank you for the translation! It's been included in version 1.5!
Uploaded v1.6 - September 30th, 2016
o Fixed German language file so that it installs properly without errors.
The first page shows an index of Topics then the remaining pages changes to show the entire list of Posts.
This is not right - it should be an index of Topics like you see when looking at a board in the forum otherwise you have to wade through all the Posts.
I found the bug:
you have to modify the URL if you want to "view as topics", then pages 2 onwards show as posts: ...index.php?action=unanswered;start=nn instead of ...index.php?action=unanswered;topics;start=nn.
Uploaded v1.7 - October 1st, 2016
o Fixed a bug where posts where displayed instead of topics on page 2 and up... Thanks, aegersz (http://www.simplemachines.org/community/index.php?action=profile;u=413177)!
@aegersz: Thank you for the bug report and finding the cause of the bug! This version should fix that particular bug!
I like this mod but what I'd really like to see is the ability to choose topics and delete them en masse.
Quote from: Steve on October 01, 2016, 04:34:18 PM
I like this mod but what I'd really like to see is the ability to choose topics and delete them en masse.
I'll see what I can do....
Awesome. Thanks dougie.
thanks, dougiefresh - that fix works faultlessly !
Quote from: Steve on October 01, 2016, 04:34:18 PM
I like this mod but what I'd really like to see is the ability to choose topics and delete them en masse.
I know you've been busy dougie (judging from your recent posts) but have you had a chance to look at this? No hurry, am just curious.
Quote from: Steve on October 20, 2016, 04:54:42 PM
Quote from: Steve on October 01, 2016, 04:34:18 PM
I like this mod but what I'd really like to see is the ability to choose topics and delete them en masse.
I know you've been busy dougie (judging from your recent posts) but have you had a chance to look at this? No hurry, am just curious.
No, I haven't. I'm going to try to look at it soon....
Sorry to get back to this topic so late, but I am now working on it.....
Uploaded v2.0 - January 5th, 2017o Converted mod to 100% hook-based, removing all file edits!
o Completely rewrote unanswered topics function to use built-in list functionality.
o Moved all language strings to individual language files.
o Added code to exclude contents of the recycle board from the list.
o Added checkboxes to remove topics, when appropriate permissions are granted to user.
o Added code to restrict unanswered topics to selected member, if desirable.
Quote from: Steve on October 01, 2016, 04:34:18 PM
I like this mod but what I'd really like to see is the ability to choose topics and delete them en masse.
This version will fulfill this feature request; hopefuly it will address any other bug reports from the version 1.x-series mods.....
Got this error soon as I clicked on the index page link:
Unknown column 't.important' in 'field list'
File: /home/steve/public_html/forums/Sources/Unanswered.php
Line: 187
Uploaded v2.0.1 - January 6th, 2016o Fixed database query involving invalid field for this mod.
Quote from: Steve on January 06, 2017, 03:22:58 PM
Got this error soon as I clicked on the index page link:
Unknown column 't.important' in 'field list'
File: /home/steve/public_html/forums/Sources/Unanswered.php
Line: 187
Sorry about that!! This mod is based off another mod that I wrote, and evidentally, I didn't fix one line....
No worries Dougie! Works a treat now. :D
The only suggestion I could make for some future version is when you put 0 into the number of days settings it seems odd for the link to say 'Show unanswered topics in the last 0 days.'. If it's actually disabled as the setting says it is, then maybe not have the link show? Or if 0 means there's no limit to the number of days, then have it say 'Show all unanswered topics.'?
If 0 means no limit, the current version returns no results instead of showing all results.
The checkboxes I requested work beautifully! Can't thank you enough! :D
I'll look into this when I get home.... Sounds like I overlooked some minor detail....
Uploaded v2.1 - January 7th, 2017
o Fixed text display issue when number of days is equal to 0 in several places.
o Removed unused topic/post option leftover from version 1.x series.
o Changed several language strings to reflect better what the mod does when days equal 0.
@Steve: This update should fix the issue you brought to my attention. Thank you for the bug report!
Perfect! Great work as always Dougie. Probably something I did wrong but when I went to upload v2.1 it said it was already on the server even though the version on the server was 2.0.1 ...
No, the package-info.xml for version 2.0.1 had 2.1 for the version number. Didn't realize it until I went to edit the mod yesterday. Sorry about the confusion there....
No worries. :)
Uploaded v2.2 - July 5th, 2017
o SMF 2.1: Replaced missing settings_install.php with add_remove_hooks.php in package-info.xml.
Uploaded v2.3 - July 11th, 2017
o Replaced IFNULL with COALESCE in database queries for better Postgres support.
Quote from: thunderchld on July 23, 2017, 08:43:14 PM
Thank you guys! This is great.
Feature request: Permissions.
It would be nice if we could install this and only let certain groups see which are unanswered so they could respond.
E.g. We have 4 groups, Staff, Plot, Member1 Member 2. Only "Staff" being able to see what is unanswered would allow them to answer questions from the other 3 groups.
(if that makes any sense)
That would allow us to provide answers yet not draw attention to unanswered issues.
Working on this request....
Uploaded v2.4 - July 28th, 2017
o Added permission to view unanswered topics.
@thunderchld: This update should fill this request. Please note that guests still cannot view the unanswered topics page. This is enforced through the permission system, as opposed to a simple user member ID check in previous versions.... If you need this functionality, comment out line 26 in Subs-Unanswered.php....
The version number says 2.3 in the package manager when installed.
And where are the permissions located?
Quote from: Steve on July 28, 2017, 04:33:53 PM
The version number says 2.3 in the package manager when installed.
Oops! I've reuploaded the fixed package with the correct version number! Thanks!
Quote from: Steve on July 28, 2017, 04:33:53 PM
And where are the permissions located?
On the permissions screen, the new membergroup permission should be listed under the "General" category as
Can view unanswered topics.
Quote from: dougiefresh on July 28, 2017, 06:26:07 PMOops! I've reuploaded the fixed package with the correct version number! Thanks!
Thank ya sir. :)
Quote from: dougiefresh on July 28, 2017, 06:26:07 PMOn the permissions screen, the new membergroup permission should be listed under the "General" category as Can view unanswered topics.
Once I switched from 'Simple' to 'Classic' view (which I've never used), I found it right away. Thanks again Dougie. :)
Is it possible to specific which board?
I.e. board=3,4,5 in the URL?
Uploaded v2.5 - August 6th, 2017
o Added ability to narrow topic list by board ID.
@Stylus: Version 2.5 adds that ability to the mod. Versions prior to version 2.5 simply cannot. Note that this new code SHOULDN'T allow you to view boards that you don't have permission to view....
Quote from: dougiefresh on August 06, 2017, 11:35:52 PM
Uploaded v2.5 - August 6th, 2017
o Added ability to narrow topic list by board ID.
@Stylus: Version 2.5 adds that ability to the mod. Versions prior to version 2.5 simply cannot. Note that this new code SHOULDN'T allow you to view boards that you don't have permission to view....
Thank you for the addition!
Hi Dougiefresh,
Thanks for the mod. I installed the package (v2.5) but did not have the "Default view for unanswered topics (set to posts view by default)" option displayed. What may be the cause?
Thanks
KKOG forum Admin
Quote from: kkog on March 13, 2018, 12:52:31 AM
Hi Dougiefresh,
Thanks for the mod. I installed the package (v2.5) but did not have the "Default view for unanswered topics (set to posts view by default)" option displayed. What may be the cause?
Thanks
KKOG forum Admin
Did you give an error when installing it? Do you use a custom theme?
Regards!
Hi Rock Lee,
There were no errors when installing.
We are using a custom theme which is an adaptation of the Thanksgiving Theme downloaded from SMF site.
There was no option relating to the themes being used.
Thanks
KKOG Forum Admin
@kkog: I apologize about the delay in responding, as I had to deal with a lot of computer problems in the past few days. Can you attach your index.template.php from your custom theme? I need to further customize the regex doing the replacement and need to know what I'm looking for (as well as having something to test against!)....
Hi dougiefresh,
The mod is currently working but without the option available.
Attached is the index.template.php from the theme we are using.
Thanks
KKOG Forum Admin
Huh, the expected lines are present, so I guess I'm going to have to look to see if there is another place to insert the new link....
Thanks
KKOG Forum Admin
@kkog: Sorry about the wait! Been chasing other bug reports around the barn a few times..... O:)
I guess I really need to READ your bug report because I thought you couldn't find the link to the unanswered topics. Nope, that's not it at all.... The updated code never made it into the mod. Luckily, I found the source part of the new mod, but not the templates.... So I guess I'm going to have to build the templates from scratch....
Thanks for following up
KKOG Forum Admin
Little by little I will update what I need ... anything you tell me :P.
Regards!
Uploaded v2.6 - November 9th, 2018
o No functionality change.
o Updated documentation to point to new website.
I leave you the update of the Spanish Latin language 8)!
Regards!
Uploaded v2.7 - November 9th, 2018
o Updated Spanish Latin translation, courtsey of Rock Lee (https://www.simplemachines.org/community/index.php?action=profile;u=322597)!
@Rock Lee: I honestly don't know how I managed to miss the language update! Thank you for updating your translation! It's been included in this version!
Do not worry sometimes it happens @dougiefresh that's why he revised the mods from time to time in case they have commented lines to update!
Regards!
Sorry, but this modification does not appear to be compatible with the selected version.
This mod is in downloads for SMF 2.1 RC2, it will not install in 2.1RC2, in the parse you get a warning:
Sorry, but this modification does not appear to be compatible with the selected version.
Um, I just tried it on my localhost forum with a fresh copy of SMF 2.1 RC2 and it appears to be able to install correctly without errors. Definitely nothing showing that it is incompatible with it. Do you have emulation set in the package manager? Cause if not, this is really weird...
the package's info file shows it can install on 2.0 and 2.1 Beta 2, you might've just unintentionally wrote Beta instead of RC
Quote from: SychO on June 03, 2019, 05:38:53 PM
the package's info file shows it can install on 2.0 and 2.1 Beta 2, you might've just unintentionally wrote Beta instead of RC
I have a test board I tried it on and the results were a error.. See the images. I try installing on my regular forum which was a upgrade for 2.0.15 ro 2.1 RC2
The test board is a fresh install of 2.1 RC2
Uploaded v2.8 - June 19th, 2019
o Updated package.xml to allow install on SMF 2.1 RC2.
@OldCrow: Hopefully, this update solves your issue with this addon. It seems unnecessary to me, since version 2.7 installed on my localhost copy of SMF 2.1 RC2 without any issues.... But whatever. Enjoy!
Quote from: Biology Forums on August 06, 2017, 11:56:39 PM
Quote from: dougiefresh on August 06, 2017, 11:35:52 PM
Uploaded v2.5 - August 6th, 2017
o Added ability to narrow topic list by board ID.
@Stylus: Version 2.5 adds that ability to the mod. Versions prior to version 2.5 simply cannot. Note that this new code SHOULDN'T allow you to view boards that you don't have permission to view....
Thank you for the addition!
Can anyone tell me how the url should be constructed in this case? (I want to exclude certain boards as well).
I figured out that the start of the url would be (for instance) https://xxxx-xxxx.com/index.php?action=unanswered
But how do I include the boards after that I want to show?
And I included the Dutch translation.