Advertisement:

Author Topic: Unanswered Topics  (Read 9174 times)

Offline dougiefresh

  • SMF Hero
  • ******
  • Posts: 2,702
  • Mod King
    • XPtsp.com Community
Unanswered Topics
« on: March 03, 2016, 05:48:05 PM »
Link to Mod


UNANSWERED TOPICS v2.5
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, 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 has been removed and can be seen at XPtsp.com.

      License
      Copyright (c) 2016 - 2017, 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.
News: Missing GitHub repository...

My Free Simple Machines mods on XPtsp.com, Simple Machines Customization Site, and at GitHub!
Problem uninstalling mods?  Try Arantor's Sortable Packages (and Installed Time) mod!  It's super helpful!

Offline roza

  • Semi-Newbie
  • *
  • Posts: 45
Re: Unanswered Topics
« Reply #1 on: March 07, 2016, 04:36:13 AM »
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.

Offline Snrj

  • Jr. Member
  • **
  • Posts: 304
  • Gender: Male
    • Snrj Forumları
Re: Unanswered Topics
« Reply #2 on: March 07, 2016, 09:08:29 AM »
turkish translate

index.turkish.php and index.turkish-utf8.php
find
Code: [Select]
?>before
Code: [Select]
$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:';


Offline dougiefresh

  • SMF Hero
  • ******
  • Posts: 2,702
  • Mod King
    • XPtsp.com Community
Re: Unanswered Topics
« Reply #3 on: March 07, 2016, 10:15:23 AM »
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!
News: Missing GitHub repository...

My Free Simple Machines mods on XPtsp.com, Simple Machines Customization Site, and at GitHub!
Problem uninstalling mods?  Try Arantor's Sortable Packages (and Installed Time) mod!  It's super helpful!

Offline rock3r

  • Newbie
  • *
  • Posts: 5
Re: Unanswered Topics
« Reply #4 on: March 07, 2016, 11:01:51 AM »
thanks for the Turkish translation . Snrj .

Offline Inti31

  • Jr. Member
  • **
  • Posts: 247
    • Chevrolet Epica & Malibu Community
Re: Unanswered Topics
« Reply #5 on: March 18, 2016, 08:45:41 PM »
error in unanswered.php (i use 2.0.11)

line 173 & 186 - there is:
Code: [Select]
&$temp - it has to be:
Code: [Select]
$temp
When i modify it i get this error:
Quote
Database 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

Offline dougiefresh

  • SMF Hero
  • ******
  • Posts: 2,702
  • Mod King
    • XPtsp.com Community
Re: Unanswered Topics
« Reply #6 on: March 19, 2016, 07:35:43 PM »
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!
News: Missing GitHub repository...

My Free Simple Machines mods on XPtsp.com, Simple Machines Customization Site, and at GitHub!
Problem uninstalling mods?  Try Arantor's Sortable Packages (and Installed Time) mod!  It's super helpful!

Offline roza

  • Semi-Newbie
  • *
  • Posts: 45
Re: Unanswered Topics
« Reply #7 on: March 27, 2016, 07:20:37 AM »

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

Offline JBlaze

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 12,154
    • @fragicide on Twitter
Re: Unanswered Topics
« Reply #8 on: March 27, 2016, 07:24:08 AM »
Code: [Select]
title="', $txt, '"
There's your culprit. It should be $txt['last_post'] ;)

Offline dougiefresh

  • SMF Hero
  • ******
  • Posts: 2,702
  • Mod King
    • XPtsp.com Community
Re: Unanswered Topics
« Reply #9 on: March 27, 2016, 12:14:27 PM »
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)!!
News: Missing GitHub repository...

My Free Simple Machines mods on XPtsp.com, Simple Machines Customization Site, and at GitHub!
Problem uninstalling mods?  Try Arantor's Sortable Packages (and Installed Time) mod!  It's super helpful!

Offline roza

  • Semi-Newbie
  • *
  • Posts: 45
Re: Unanswered Topics
« Reply #10 on: March 30, 2016, 11:39:56 AM »
Thank you for new update.

Offline Rock Lee

  • Native Language Support Specialist
  • SMF Hero
  • *
  • Posts: 1,807
  • Gender: Male
  • I also speak english :D
    • BomberCode.Oficial on Facebook
    • RockLee-BC on GitHub
    • @Bomber_Code on Twitter
    • Bomber Code ~ La nueva era del conocimiento
Re: Unanswered Topics
« Reply #11 on: March 30, 2016, 07:14:28 PM »
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

Code: [Select]
$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

Code: [Select]
$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
Code: [Select]
$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

Code: [Select]
$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:';
« Last Edit: March 30, 2016, 07:46:45 PM by Rock Lee [BC] »
¡Regresando como cual Fenix! ~ Bomber Code © 2018
Ayudas - Aportes - Tutoriales - Y mucho mas!!!


Ayudame via PayPal

Offline dougiefresh

  • SMF Hero
  • ******
  • Posts: 2,702
  • Mod King
    • XPtsp.com Community
Re: Unanswered Topics
« Reply #12 on: March 30, 2016, 07:59:28 PM »
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!
News: Missing GitHub repository...

My Free Simple Machines mods on XPtsp.com, Simple Machines Customization Site, and at GitHub!
Problem uninstalling mods?  Try Arantor's Sortable Packages (and Installed Time) mod!  It's super helpful!

Offline dougiefresh

  • SMF Hero
  • ******
  • Posts: 2,702
  • Mod King
    • XPtsp.com Community
Re: Unanswered Topics
« Reply #13 on: September 30, 2016, 07:26:29 AM »
Uploaded v1.6 - September 30th, 2016
o Fixed German language file so that it installs properly without errors.
News: Missing GitHub repository...

My Free Simple Machines mods on XPtsp.com, Simple Machines Customization Site, and at GitHub!
Problem uninstalling mods?  Try Arantor's Sortable Packages (and Installed Time) mod!  It's super helpful!

Offline aegersz

  • Sophist Member
  • *****
  • Posts: 1,394
  • Gender: Male
  • "mods" junkie
    • dopetalk
Re: Unanswered Topics
« Reply #14 on: September 30, 2016, 11:43:47 AM »
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.
Linux CentOS VPS running SMF 2.0 with 140+ mods installed (the full h/w and s/w can be seen at http://forum.drugs-and-users.org/index.php/topic,3301)

Offline aegersz

  • Sophist Member
  • *****
  • Posts: 1,394
  • Gender: Male
  • "mods" junkie
    • dopetalk
Re: Unanswered Topics
« Reply #15 on: September 30, 2016, 08:36:31 PM »
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.
« Last Edit: September 30, 2016, 08:55:31 PM by aegersz »
Linux CentOS VPS running SMF 2.0 with 140+ mods installed (the full h/w and s/w can be seen at http://forum.drugs-and-users.org/index.php/topic,3301)

Offline dougiefresh

  • SMF Hero
  • ******
  • Posts: 2,702
  • Mod King
    • XPtsp.com Community
Re: Unanswered Topics
« Reply #16 on: October 01, 2016, 07:58:32 AM »
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!
News: Missing GitHub repository...

My Free Simple Machines mods on XPtsp.com, Simple Machines Customization Site, and at GitHub!
Problem uninstalling mods?  Try Arantor's Sortable Packages (and Installed Time) mod!  It's super helpful!

Offline Steve

  • Freak
  • Support Specialist
  • SMF Hero
  • *
  • Posts: 4,367
  • Gender: Male
  • I have not yet begun to procrastinate.
Re: Unanswered Topics
« Reply #17 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.
Online Manual

Please do not PM me for support.

Offline dougiefresh

  • SMF Hero
  • ******
  • Posts: 2,702
  • Mod King
    • XPtsp.com Community
Re: Unanswered Topics
« Reply #18 on: October 01, 2016, 07:49:56 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....
News: Missing GitHub repository...

My Free Simple Machines mods on XPtsp.com, Simple Machines Customization Site, and at GitHub!
Problem uninstalling mods?  Try Arantor's Sortable Packages (and Installed Time) mod!  It's super helpful!

Offline Steve

  • Freak
  • Support Specialist
  • SMF Hero
  • *
  • Posts: 4,367
  • Gender: Male
  • I have not yet begun to procrastinate.
Re: Unanswered Topics
« Reply #19 on: October 05, 2016, 01:30:19 PM »
Awesome. Thanks dougie.
Online Manual

Please do not PM me for support.