News:

SMF 2.1.4 has been released! Take it for a spin! Read more.

Main Menu

Unanswered Topics

Started by dougiefresh, March 03, 2016, 05:48:05 PM

Previous topic - Next topic

dougiefresh

Link to Mod



UNANSWERED TOPICS v2.8
By Dougiefresh -> Link to Mod



Introduction
This 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?

      Changelog
      The changelog can be viewed at XPtsp.com.

      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.

roza

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.

Snrj

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:';



dougiefresh

Uploaded v1.2 - March 7th, 2016
o Added Turkish language support to the mod, thanks to Snrj!
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!

rock3r

thanks for the Turkish translation . Snrj .

Inti31

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
my forum
my testforum


my mods - which I only made them work for 2.0 Gold:
Topics Filter v3.2 SMF 2.0 Gold
MemberNumber

dougiefresh

Uploaded v1.3 - March 19th, 2016
o Fixed "Array to string conversion" error found by roza.
o Fixed array processing issue found by Inti31.
o Added German translation by Inti31.




@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!

roza


@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>';
      }

JBlaze

title="', $txt, '"

There's your culprit. It should be $txt['last_post'] ;)
Jason Clemons
Former Team Member 2009 - 2012

dougiefresh

Uploaded v1.4 - March 27th, 2016
o Second attempt to fix array processing issue found by Inti31.




@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)!!

roza

Thank you for new update.

-Rock Lee-

#11
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:';
¡Regresando como cual Fenix! ~ Bomber Code
Ayudas - Aportes - Tutoriales - Y mucho mas!!!

dougiefresh

Uploaded v1.5 - Match 30th, 2016
o Added Spanish-Latin translation by Rock Lee [BC].




@Rock Lee [BC]: Thank you for the translation!  It's been included in version 1.5!

dougiefresh

Uploaded v1.6 - September 30th, 2016
o Fixed German language file so that it installs properly without errors.

aegersz

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.
The configuration of my Linux VPS (SMF 2.0 with 160+ mods & some assorted manual tweaks) can be found here and notes on my mods can be found here (warning: those links will take you to a drug related forum). My (House) music DJ dedication page is here

aegersz

#15
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.
The configuration of my Linux VPS (SMF 2.0 with 160+ mods & some assorted manual tweaks) can be found here and notes on my mods can be found here (warning: those links will take you to a drug related forum). My (House) music DJ dedication page is here

dougiefresh

Uploaded v1.7 - October 1st, 2016
o Fixed a bug where posts where displayed instead of topics on page 2 and up...  Thanks, aegersz!




@aegersz:  Thank you for the bug report and finding the cause of the bug!  This version should fix that particular bug!

Steve

I like this mod but what I'd really like to see is the ability to choose topics and delete them en masse.
DO NOT pm me for support!

dougiefresh

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....

Steve

DO NOT pm me for support!

Advertisement: