News:

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

Main Menu

Hide Topics From View

Started by dougiefresh, December 29, 2016, 12:22:40 PM

Previous topic - Next topic

dougiefresh

Link to Mod



HIDE TOPIC FROM VIEW v1.6
By Dougiefresh -> Link to Mod



Introduction
This mod allows the user to hide any topic from the board index and message index views.  It also allows the user to show the topic again, both from the topic display and the message index views.

In the Profile area, a new section called Hidden Topics has been added so that the users can show any topics they have hidden after-the-fact....

Known Issue(s)
This mod only affects the Board Index, Message Index, SSI functions, and Unread topics functionality.  Any other functionality has not been affected.

Admin Settings
There are no admin settings at this time.  To disable, you must uninstall this mod.

Compatibility Notes
This mod was tested on SMF 2.0.12, but should work on SMF 2.0 and up, as well as SMF 2.1 RC2.  SMF 1.x is not and will not be supported. 

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.

dougiefresh

Uploaded v1.1 - March 19th, 2017
o Added support for SMF 2.1 Beta 2.
o Added "Hidden Topics" profile page to show list of hidden topics.
o Added SSI support for other mods that use SSI functions.
o Added Unread Topics support.

dougiefresh

Uploaded v1.2 - July 11th, 2017
o Replaced IFNULL with COALESCE in database queries for better Postgres support.

Geor'G

(ru) Ошибка при установке.
Нужно или дописать новую колонку в файле db_install.php

Error during installation.
You must either add a new column to the db_install file.php

array(
'name' => 'id',
'type' => 'int',
'auto' => true,
),



(ru) Или исправить тут:
Or fix here:
$indexes = array(
array(
'type' => 'primary',
'columns' => array('id')
),


$indexes = array(
   array(
      'type' => 'primary',
      'columns' => array('id_member')
   ),

dougiefresh

Uploaded v1.3 - March 10th, 2018
o Fixed invalid field error during table creation in database installer.




@Geor'G:  Thank you for reporting the error!  It's been fixed for this version!

-Rock Lee-

Very good this without doubt to implement on my site :D step by step I leave the translations ;)


Regards!
¡Regresando como cual Fenix! ~ Bomber Code
Ayudas - Aportes - Tutoriales - Y mucho mas!!!

dougiefresh

Uploaded v1.4 - March 15th, 2018
o Added Spanish Latin translation, courtsey of Rock Lee!




@Rock Lee:  Thank you for the translation!!  It's been included in this version!

Jonben

Muy bueno esto sin duda para implementar en mi sitio: D paso a paso dejo las traducciones. ¡Gracias por informar el error! ¡Ha sido arreglado para esta versión!

dougiefresh

Quote from: Jonben on March 22, 2018, 05:14:21 PM
Muy bueno esto sin duda para implementar en mi sitio: D paso a paso dejo las traducciones. ¡Gracias por informar el error! ¡Ha sido arreglado para esta versión!
Sorry, I don't speak Spanish (at least, that's what I assume it is!).  If you don't speak English, please use Google Translate.

Google Translate: Lo siento, no hablo español (al menos, eso es lo que supongo que es). Si no habla inglés, use Google Translate.

-Rock Lee-

Quote from: Jonben on March 22, 2018, 05:14:21 PM
Muy bueno esto sin duda para implementar en mi sitio: D paso a paso dejo las traducciones. ¡Gracias por informar el error! ¡Ha sido arreglado para esta versión!

Siempre lo mantiene actualizado en lo posible sus modificaciones, si tenes cualquier error comentalo aunque trata de hacerlo en ingles, ya que la mayoria de los foros aca se habla en ingles americano :P o comentalo en la zona de español y me avisas si algo esta mal con mi traduccion :-\.

Quote from: dougiefresh on March 22, 2018, 08:49:18 PM
Sorry, I don't speak Spanish (at least, that's what I assume it is!).  If you don't speak English, please use Google Translate.

Google Translate: Lo siento, no hablo español (al menos, eso es lo que supongo que es). Si no habla inglés, use Google Translate.

If it is indeed Spanish and insurance English is complicated. Many of us speak Spanish, we have that problem and Google translator sometimes gets crazy when we pass the words...


Regards!
¡Regresando como cual Fenix! ~ Bomber Code
Ayudas - Aportes - Tutoriales - Y mucho mas!!!

dougiefresh

@Rock Lee:  :o  Um...  Yeah, I keep forgetting that Google Translate isn't...  (um, how do I say this) perfect at translating (?!?), but it is better than nothing IMHO....  Maybe I should learn Spanish, since I live in Tennessee and work retail...  ???

-Rock Lee-

@dougiefresh At the step helps a lot but when it becomes something more timely can play against not knowing what you translate ... Spanish is simple can only play tricks on the times used to assemble the sentences, that's why it costs me English for the times and ways of expressing have American English. Added I am Argentine who has his way of speaking "Spanish" many sentences translated into English has no meaning that sometimes I find it hard to translate (I try to do it to my intender) in order if you have doubts I help you with the language without problems :P
¡Regresando como cual Fenix! ~ Bomber Code
Ayudas - Aportes - Tutoriales - Y mucho mas!!!

dougiefresh

Uploaded v1.6 - June 19th, 2019
o Added support for SMF 2.1 RC2.
o Removed support for SMF 2.1 Beta 2.
o Fixed permissions issue with Profile area functions.
o Fixed undefined variable within Subs-HideTopic.php.
o Fixed database issue where same entry was being inserted twice.

sirfpsycho

Is this can be used for 18+ ? If user sets enable 18+ in profile, user can see the all the topics(existing topics+ newly added topics) in a board.
Or I have to hide each post manually? If manually then new topics posted will not be hidden by default?

DanCarlos

After i click "HIDE TOPIC" i am receiving this error



I am using SMF Version 2.0.17

EDIT : Last night after i click "HIDE TOPIC" i am being redirected to my Profile, now, i am receiving that error.

-Rock Lee-

That is a server side error, did you look at the error log? something like error.log or error.txt or similar should appear.


Regards!
¡Regresando como cual Fenix! ~ Bomber Code
Ayudas - Aportes - Tutoriales - Y mucho mas!!!

DanCarlos

Quote from: Rock Lee on September 11, 2020, 09:57:52 PM
That is a server side error, did you look at the error log? something like error.log or error.txt or similar should appear.


Regards!

I have seen this inside the Error.log

continue' not in the 'loop' or 'switch' context in /home4/MYDOMAIN/public_html/Sources/Profile-HideTopics.php on line 256

-Rock Lee-

What version of php are you using? now I don't have my computer at hand but it goes on the syntax side it gives an error, it's a topic changed some PHP rules in the newer versions.


Regards!
¡Regresando como cual Fenix! ~ Bomber Code
Ayudas - Aportes - Tutoriales - Y mucho mas!!!

Arantor

Change Profile-HideTopics.php lines 255-256:

Code (find) Select
if (empty($board))
continue;


Code (replace) Select
if (empty($board))
return;


This should never have worked and only worked in PHP before PHP 7 by accident.

Doug Heffernan

Quote from: Toxicity Personified on September 12, 2020, 12:32:22 PM
Change Profile-HideTopics.php lines 255-256:

Code (find) Select
if (empty($board))
continue;


Code (replace) Select
if (empty($board))
return;


This should never have worked and only worked in PHP before PHP 7 by accident.


Your new name made me lol :D

Advertisement: