Topics Filter v3.0

Started by M-DVD, October 10, 2007, 06:57:55 PM

Previous topic - Next topic

Shark-Time

well i looked more in to it and i think it has some kind of javascript problem..cuz of which it do not work with IE..




please some one look in to this and help me out...


Providing Cheapest Offshore Hosting as low as 5$/year.
MoneyBookers | AlertPay
Pm Me

Shark-Time

bump....Help!!!



Quote from: Shark-Time on September 14, 2009, 09:24:40 PM
well i looked more in to it and i think it has some kind of javascript problem..cuz of which it do not work with IE..




please some one look in to this and help me out...






Providing Cheapest Offshore Hosting as low as 5$/year.
MoneyBookers | AlertPay
Pm Me

M-DVD

MOD Topics Filter v3.1
===============


New features:

  • Now is compatible with 'sort by' topics - Thanks Ianus for idea
  • New Filters has been added:
       - Filters by topic's date - Thanks acappella7 for idea
       - Filters by topic's icon - Thanks Shark-Time for idea
  • Quickly change Sort Topic's have been added - Thanks Ianus for idea
  • The visual aspect have been changed:
       - Now the Filters are in the right
       - Quick Changes (sort by and pagination) are in the left
  • Fixed bug 't.id_topic' in 'field list' - Thanks A. SK for report.
  • Fixed bug in Internet Explorer and Javascript Object - Thanks ttuu for report.
  • Improved some code

How do I upgrade?

  • Uninstall the previous version
  • Install the new
  • Isn't neccesary reedit your custom templates files

=======================================

Características Nuevas:


  • Ahora es compatible con 'Ordenar temas' - Gracias Ianus por la idea
  • Nuevos Filtros han sido añadidos:
       - Filtros por fecha del tema - Gracias acappella7 por la idea
       - Filtros por ícono del tema - Gracias Shark-Time por la idea
  • Agregado "Cambio Rápido" de orden en temas - Gracias Ianus por la idea
  • El aspecto visual ha tenido cambios:
       - Ahora los Filtros están a la derecha
       - Los "Cambios Rápidos" (paginación y ordenamiento de temas) están a la izquierda
  • Reparado bug: 't.id_topic' in 'field list' - Gracias A. SK por la reportar.
  • Reparado bug en Internet Explorer y Javascript Object - Gracias ttuu por la reportar.
  • Mejorado algo de Código

¿Como actualizar?

  • Desinstalar la anterior versión
  • Instalar la nueva
  • No es necesario reeditar tus archivos de themas

Kimmie

Quote from: M-DVD on September 27, 2009, 08:27:07 PM
MOD Topics Filter v3.1
===============





thank you thank you thank you thank you thank you thank you.... Will try it first thing in the morning :)

Blinker

Hi M-DVD, nice to see you back!

I installed v3.1 and got the following error:

Fatal error: Call to undefined function: array_diff_key_() in /home/content/x/x/x/xxxxxxxxx/html/forum/Sources/MessageIndex.php on line 840

Line 840 in my file:

$nousingfilter = empty($user_info['filter_topic']) || !count(array_diff(array_diff_key_($user_info['filter_topic'], array('pages' => '')), array('', '0')));

I noticed that in the first instance you used array_diff but after the bracket you used array_diff_key_

I don't know much php but I had a shot in the dark and removed the '_key_' and tried it. It worked!

The mod seems to function fine so I guess all's good. Let us know if that change affects anything serious or whether it was just a typo on your part.

For those of you playing at home the line should now be:

$nousingfilter = empty($user_info['filter_topic']) || !count(array_diff(array_diff($user_info['filter_topic'], array('pages' => '')), array('', '0')));

@ngel

French Translation (beware of accented characters)

$txt['filter_Reset'] = 'Réinitialiser';
$txt['filter_Off'] = 'Filtrage Sujets sur Off: Javascript doit être autorisé';

$txt['filter_letter_title'] = 'Filtrage par Lettre';
$txt['filter_letter_values'][0] = 'Tous';

$txt['filter_icon_title'] = 'Filtrage par Sujet/Icône';
$txt['filter_icon_values'][0] = 'Tous';
$txt['filter_icon_values_end'][0] = 'Déplacé';
$txt['filter_icon_values_end'][1] = 'Recyclé';
$txt['filter_icon_values_end'][2] = 'Sans fil';
$txt['filter_icon_values_end'][3] = 'Pièces jointes';

$txt['filter_date0_title'] = 'Filtrage par Sujet/Date';
$txt['filter_date1_title'] = 'Filtrage par Réponse/Date';
$txt['filter_date_values'][0] = 'Aucun';
$txt['filter_date_values'][1] = 'Aujourd\'hui';
$txt['filter_date_values'][2] = 'Depuis hier';
$txt['filter_date_values'][3] = 'Les 7 derniers jours';
$txt['filter_date_values'][4] = 'Les 30 derniers jours';
$txt['filter_date_values'][5] = 'Les 60 derniers jours';
$txt['filter_date_values'][6] = 'Les 90 derniers jours';
$txt['filter_date_values'][7] = 'Les 180 derniers jours';
$txt['filter_date_values'][8] = 'Les 270 derniers jours';
$txt['filter_date_values'][9] = 'Les 365 derniers jours';
$txt['filter_date_values'][10] = 'Il y a plus d\'un an';

$txt['filter_replies_title'] = 'Filtrage par Sujet/Réponses';
$txt['filter_replies_values'][0] = 'Aucun';
$txt['filter_replies_values'][1] = 'Sujets sans réponses';
$txt['filter_replies_values'][2] = 'Sujets importants';
$txt['filter_replies_values'][3] = 'Sujets très importants';
$txt['filter_replies_values'][4] = 'Sondages';
$txt['filter_replies_values'][5] = 'Sujets verrouillés';
$txt['filter_replies_values'][6] = 'Sujets propriétaires';

$txt['filter_pages_title'] = 'Sujet par page';
$txt['filter_pages_values'][0] = 'Nombre par défaut';
$txt['filter_pages_values'][1] = '10 par Page';
$txt['filter_pages_values'][2] = '20 par Page';
$txt['filter_pages_values'][3] = '30 par Page';
$txt['filter_pages_values'][4] = '40 par Page';
$txt['filter_pages_values'][5] = '50 par Page';

$txt['filter_sort_title'] = 'Tri des sujets';
$txt['filter_sort_values'][0] = 'Les plus récents';
$txt['filter_sort_values'][1] = 'Les plus anciens';
$txt['filter_sort_values'][2] = 'Créateur du sujet';
$txt['filter_sort_values'][3] = 'Dernier créateur';
$txt['filter_sort_values'][4] = 'Sujet';
$txt['filter_sort_values'][5] = 'Réponses';
$txt['filter_sort_values'][6] = 'Vues';

$txt['topicsfilter_enable'] = 'Autoriser le filtrage MOD des sujets';
$txt['topicsfilter_sortby'] = 'Autoriser le changement rapide du tri par sujet';
$txt['topicsfilter_pages'] = 'Autoriser le changement rapide de pagination';
$txt['topicsfilter_date0'] = 'Autoriser le filtrage par date des sujets';
$txt['topicsfilter_date1'] = 'Autoriser le filtrage par date des réponses';
$txt['topicsfilter_replies'] = 'Autoriser le filtrage par réponses';
$txt['topicsfilter_letter'] = 'Autoriser le filtrage par lettre';
$txt['topicsfilter_icon'] = 'Autoriser le filtrage par icône';

AND in UTF-8 (HTML equivalent of characters ISO-8859-1 for pages encoded in UTF-8) :

$txt['filter_Reset'] = 'R&eacuteinitialiser';
$txt['filter_Off'] = 'Filtrage Sujets sur Off: Javascript doit &ecirctre autoris&eacute';

$txt['filter_letter_title'] = 'Filtrage par Lettre';
$txt['filter_letter_values'][0] = 'Tous';

$txt['filter_icon_title'] = 'Filtrage par Sujet/Ic&ocircne';
$txt['filter_icon_values'][0] = 'Tous';
$txt['filter_icon_values_end'][0] = 'D&eacuteplac&eacute';
$txt['filter_icon_values_end'][1] = 'Recycl&eacute';
$txt['filter_icon_values_end'][2] = 'Sans fil';
$txt['filter_icon_values_end'][3] = 'Pi&egraveces jointes';

$txt['filter_date0_title'] = 'Filtrage par Sujet/Date';
$txt['filter_date1_title'] = 'Filtrage par R&eacuteponse/Date';
$txt['filter_date_values'][0] = 'Aucun';
$txt['filter_date_values'][1] = 'Aujourd\'hui';
$txt['filter_date_values'][2] = 'Depuis hier';
$txt['filter_date_values'][3] = 'Les 7 derniers jours';
$txt['filter_date_values'][4] = 'Les 30 derniers jours';
$txt['filter_date_values'][5] = 'Les 60 derniers jours';
$txt['filter_date_values'][6] = 'Les 90 derniers jours';
$txt['filter_date_values'][7] = 'Les 180 derniers jours';
$txt['filter_date_values'][8] = 'Les 270 derniers jours';
$txt['filter_date_values'][9] = 'Les 365 derniers jours';
$txt['filter_date_values'][10] = 'Il y a plus d\'un an';

$txt['filter_replies_title'] = 'Filtrage par Sujet/R&eacuteponses';
$txt['filter_replies_values'][0] = 'Aucun';
$txt['filter_replies_values'][1] = 'Sujets sans r&eacuteponses';
$txt['filter_replies_values'][2] = 'Sujets importants';
$txt['filter_replies_values'][3] = 'Sujets tr&egraves importants';
$txt['filter_replies_values'][4] = 'Sondages';
$txt['filter_replies_values'][5] = 'Sujets verrouill&eacutes';
$txt['filter_replies_values'][6] = 'Sujets propri&eacutetaires';

$txt['filter_pages_title'] = 'Sujet par page';
$txt['filter_pages_values'][0] = 'Nombre par d&eacutefaut';
$txt['filter_pages_values'][1] = '10 par Page';
$txt['filter_pages_values'][2] = '20 par Page';
$txt['filter_pages_values'][3] = '30 par Page';
$txt['filter_pages_values'][4] = '40 par Page';
$txt['filter_pages_values'][5] = '50 par Page';

$txt['filter_sort_title'] = 'Tri des sujets';
$txt['filter_sort_values'][0] = 'Les plus r&eacutecents';
$txt['filter_sort_values'][1] = 'Les plus anciens';
$txt['filter_sort_values'][2] = 'Cr&eacuteateur du sujet';
$txt['filter_sort_values'][3] = 'Dernier cr&eacuteateur';
$txt['filter_sort_values'][4] = 'Sujet';
$txt['filter_sort_values'][5] = 'R&eacuteponses';
$txt['filter_sort_values'][6] = 'Vues';

$txt['topicsfilter_enable'] = 'Autoriser le filtrage MOD des sujets';
$txt['topicsfilter_sortby'] = 'Autoriser le changement rapide du tri par sujet';
$txt['topicsfilter_pages'] = 'Autoriser le changement rapide de pagination';
$txt['topicsfilter_date0'] = 'Autoriser le filtrage par date des sujets';
$txt['topicsfilter_date1'] = 'Autoriser le filtrage par date des r&eacuteponses';
$txt['topicsfilter_replies'] = 'Autoriser le filtrage par r&eacuteponses';
$txt['topicsfilter_letter'] = 'Autoriser le filtrage par lettre';
$txt['topicsfilter_icon'] = 'Autoriser le filtrage par ic&ocircne';

M-DVD

#246
Quote from: Blinker on September 28, 2009, 05:01:50 AM
Hi M-DVD, nice to see you back!

I installed v3.1 and got the following error:

Fatal error: Call to undefined function: array_diff_key_() in /home/content/x/x/x/xxxxxxxxx/html/forum/Sources/MessageIndex.php on line 840

Line 840 in my file:

$nousingfilter = empty($user_info['filter_topic']) || !count(array_diff(array_diff_key_($user_info['filter_topic'], array('pages' => '')), array('', '0')));

I noticed that in the first instance you used array_diff but after the bracket you used array_diff_key_

I don't know much php but I had a shot in the dark and removed the '_key_' and tried it. It worked!

The mod seems to function fine so I guess all's good. Let us know if that change affects anything serious or whether it was just a typo on your part.

For those of you playing at home the line should now be:

$nousingfilter = empty($user_info['filter_topic']) || !count(array_diff(array_diff($user_info['filter_topic'], array('pages' => '')), array('', '0')));

Thanks for report, but... the package is fine O.O!!!

I don't know why was bad installed  :o

Quote from: @ngel on September 28, 2009, 10:07:28 AM
French Translation (beware of accented characters)

Very good, thanks for translate, more later I will upload your translation

Many Thanks :D

Kimmie

#247
Installed 3.1 on 2.0RC1.2 and everything seems to be working good so far.


Edit: So far the only issue I see is that it disables the quick mod menu at the bottom so you cant do sngle/multiple moves etc anymore from topic view.  I messed with it to see if it was one specific filter causing it, a mizture of more than one, etc and what I have determined is that the only one you can have checked is the "Enable Quickly Change Sort Topics" or else that other menu becomes disabled.

Also, when you use the letter filter, it isnt sorting them alphabetically anymore (I say anymore because the version for 1.X always did). :)




ttuu

after i install this mod i  have blank page if i go to the message index page. i try to install mod menualy step after step and i see the problem starts after this step:
search:
// If there are children, but no topics and no ability to post topics...
$context['no_topic_listing'] = !empty($context['boards']) && empty($context['topics']) && !$context['can_post_new'];


replace:
// If there are children, but no topics and no ability to post topics...
// Only if no filtering is being done here, otherwise they won't be able to remove the filter
$nousingfilter = empty($user_info['filter_topic']) || !count(array_diff(array_diff_key($user_info['filter_topic'], array('pages' => '')), array('', '0')));
$context['no_topic_listing'] = !empty($context['boards']) && empty($context['topics']) && !$context['can_post_new'] && $nousingfilter;


KnowNothing

#249
Never mind, I found the answer.

M-DVD

Quote from: @ngel on September 28, 2009, 10:07:28 AM
French Translation (beware of accented characters)

Your translation have been uploaded :)

--

Quote from: Kimmie on September 28, 2009, 10:39:49 PM
Installed 3.1 on 2.0RC1.2 and everything seems to be working good so far.

Edit: So far the only issue I see is that it disables the quick mod menu at the bottom so you cant do sngle/multiple moves etc anymore from topic view.  I messed with it to see if it was one specific filter causing it, a mizture of more than one, etc and what I have determined is that the only one you can have checked is the "Enable Quickly Change Sort Topics" or else that other menu becomes disabled.

What theme are you using?
Have you tried with the default theme?
What browser you have?
What other MOD you have?

I have tested, and the Quick Moderation works fine with this MOD.

Quote from: Kimmie on September 28, 2009, 10:39:49 PM
Also, when you use the letter filter, it isn't sorting them alphabetically anymore (I say anymore because the version for 1.X always did). :)

You say: before was filter letter + sort alphabetically, and now only filter letter (and don't sort)?

--

Quote from: ttuu on October 01, 2009, 05:57:37 AM
after i install this mod i  have blank page if i go to the message index page. i try to install mod menualy step after step and i see the problem starts after this step:
search:
// If there are children, but no topics and no ability to post topics...
$context['no_topic_listing'] = !empty($context['boards']) && empty($context['topics']) && !$context['can_post_new'];


replace:
// If there are children, but no topics and no ability to post topics...
// Only if no filtering is being done here, otherwise they won't be able to remove the filter
$nousingfilter = empty($user_info['filter_topic']) || !count(array_diff(array_diff_key($user_info['filter_topic'], array('pages' => '')), array('', '0')));
$context['no_topic_listing'] = !empty($context['boards']) && empty($context['topics']) && !$context['can_post_new'] && $nousingfilter;



Any errors in the error log?

ttuu


Kimmie

#252
Quote from: M-DVD on October 05, 2009, 12:25:15 AM
Quote from: Kimmie on September 28, 2009, 10:39:49 PM
Installed 3.1 on 2.0RC1.2 and everything seems to be working good so far.

Edit: So far the only issue I see is that it disables the quick mod menu at the bottom so you cant do sngle/multiple moves etc anymore from topic view.  I messed with it to see if it was one specific filter causing it, a mizture of more than one, etc and what I have determined is that the only one you can have checked is the "Enable Quickly Change Sort Topics" or else that other menu becomes disabled.

What theme are you using?
Have you tried with the default theme?
What browser you have?
What other MOD you have?

I have tested, and the Quick Moderation works fine with this MOD.

Quote from: Kimmie on September 28, 2009, 10:39:49 PM
Also, when you use the letter filter, it isn't sorting them alphabetically anymore (I say anymore because the version for 1.X always did). :)

You say: before was filter letter + sort alphabetically, and now only filter letter (and don't sort)?


It happens on every theme including the Default Theme



It happens in both Internet Explorer 7 and Opera

As soon as I turn the mod off then it works fine.

When you click on a Letter it sorts them and pulls all the threads that begin with that letter, however it does not sort those thread in alphabetical order like the mod did when I had it on 1.x.

Example: When you click on the letter T, it gives you only the threads that start with the letter T however I still have to click on the SUBJECT header so that "those threads" are in alphabetical order

Kimmie

Quote from: Kimmie on October 09, 2009, 01:40:57 PM
Quote from: M-DVD on October 05, 2009, 12:25:15 AM
Quote from: Kimmie on September 28, 2009, 10:39:49 PM
Installed 3.1 on 2.0RC1.2 and everything seems to be working good so far.

Edit: So far the only issue I see is that it disables the quick mod menu at the bottom so you cant do sngle/multiple moves etc anymore from topic view.  I messed with it to see if it was one specific filter causing it, a mizture of more than one, etc and what I have determined is that the only one you can have checked is the "Enable Quickly Change Sort Topics" or else that other menu becomes disabled.

What theme are you using?
Have you tried with the default theme?
What browser you have?
What other MOD you have?

I have tested, and the Quick Moderation works fine with this MOD.

Quote from: Kimmie on September 28, 2009, 10:39:49 PM
Also, when you use the letter filter, it isn't sorting them alphabetically anymore (I say anymore because the version for 1.X always did). :)

You say: before was filter letter + sort alphabetically, and now only filter letter (and don't sort)?


It happens on every theme including the Default Theme



It happens in both Internet Explorer 7 and Opera

As soon as I turn the mod off then it works fine.

When you click on a Letter it sorts them and pulls all the threads that begin with that letter, however it does not sort those thread in alphabetical order like the mod did when I had it on 1.x.

Example: When you click on the letter T, it gives you only the threads that start with the letter T however I still have to click on the SUBJECT header so that "those threads" are in alphabetical order


Any updates on this yet? :)

M-DVD

Quote from: ttuu on October 01, 2009, 05:57:37 AM
after i install this mod i  have blank page if i go to the message index page. i try to install mod menualy step after step and i see the problem starts after this step:
search:
// If there are children, but no topics and no ability to post topics...
$context['no_topic_listing'] = !empty($context['boards']) && empty($context['topics']) && !$context['can_post_new'];


replace:
// If there are children, but no topics and no ability to post topics...
// Only if no filtering is being done here, otherwise they won't be able to remove the filter
$nousingfilter = empty($user_info['filter_topic']) || !count(array_diff(array_diff_key($user_info['filter_topic'], array('pages' => '')), array('', '0')));
$context['no_topic_listing'] = !empty($context['boards']) && empty($context['topics']) && !$context['can_post_new'] && $nousingfilter;


Ok, try

// If there are children, but no topics and no ability to post topics...
// Only if no filtering is being done here, otherwise they won't be able to remove the filter
$nousingfilter = empty($user_info['filter_topic']['date0']) && empty($user_info['filter_topic']['date1']) && empty($user_info['filter_topic']['replies']) && empty($user_info['filter_topic']['letter']) && empty($user_info['filter_topic']['icon']);
$context['no_topic_listing'] = !empty($context['boards']) && empty($context['topics']) && !$context['can_post_new'] && $nousingfilter;


and tell me

--

Quote from: Kimmie on October 09, 2009, 01:40:57 PM
Quote from: M-DVD on October 05, 2009, 12:25:15 AM
Quote from: Kimmie on September 28, 2009, 10:39:49 PM
Installed 3.1 on 2.0RC1.2 and everything seems to be working good so far.

Edit: So far the only issue I see is that it disables the quick mod menu at the bottom so you cant do sngle/multiple moves etc anymore from topic view.  I messed with it to see if it was one specific filter causing it, a mizture of more than one, etc and what I have determined is that the only one you can have checked is the "Enable Quickly Change Sort Topics" or else that other menu becomes disabled.

What theme are you using?
Have you tried with the default theme?
What browser you have?
What other MOD you have?

I have tested, and the Quick Moderation works fine with this MOD.

Quote from: Kimmie on September 28, 2009, 10:39:49 PM
Also, when you use the letter filter, it isn't sorting them alphabetically anymore (I say anymore because the version for 1.X always did). :)

You say: before was filter letter + sort alphabetically, and now only filter letter (and don't sort)?


It happens on every theme including the Default Theme



It happens in both Internet Explorer 7 and Opera

As soon as I turn the mod off then it works fine.

When you click on a Letter it sorts them and pulls all the threads that begin with that letter, however it does not sort those thread in alphabetical order like the mod did when I had it on 1.x.

Example: When you click on the letter T, it gives you only the threads that start with the letter T however I still have to click on the SUBJECT header so that "those threads" are in alphabetical order

Thanks for report.

Edit the topic_filter.js

And find:
+ ' <form id="TopicsFilter" name="TopicsFilter" action="" method="post">\n'
Replace:
// + ' <form id="TopicsFilter" name="TopicsFilter" action="" method="post">\n'

Find:
+ ' </form>\n'

Replace:
// + ' </form>\n'

And tell me


Kimmie

Quote from: M-DVD on October 05, 2009, 12:25:15 AMThanks for report.

Edit the topic_filter.js

And find:
+ ' <form id="TopicsFilter" name="TopicsFilter" action="" method="post">\n'
Replace:
// + ' <form id="TopicsFilter" name="TopicsFilter" action="" method="post">\n'

Find:
+ ' </form>\n'

Replace:
// + ' </form>\n'

And tell me


Nope still doesnt work

M-DVD

Quote from: Kimmie on October 14, 2009, 10:41:54 PM
Nope still doesnt work

I try in Opera and it work. (Important, you should do hard refresh ---> Shift + Click Refresh's button)
I cannot try in IE. (also, you should do hard refresh ---> Ctrl + F5)

Kimmie

Quote from: M-DVD on October 14, 2009, 11:12:00 PM
Quote from: Kimmie on October 14, 2009, 10:41:54 PM
Nope still doesnt work

I try in Opera and it work. (Important, you should do hard refresh ---> Shift + Click Refresh's button)
I cannot try in IE. (also, you should do hard refresh ---> Ctrl + F5)



Thanks that got it :)

ttuu

Quote from: M-DVD on October 14, 2009, 10:05:34 PM
Quote from: ttuu on October 01, 2009, 05:57:37 AM
after i install this mod i  have blank page if i go to the message index page. i try to install mod menualy step after step and i see the problem starts after this step:
search:
// If there are children, but no topics and no ability to post topics...
$context['no_topic_listing'] = !empty($context['boards']) && empty($context['topics']) && !$context['can_post_new'];


replace:
// If there are children, but no topics and no ability to post topics...
// Only if no filtering is being done here, otherwise they won't be able to remove the filter
$nousingfilter = empty($user_info['filter_topic']) || !count(array_diff(array_diff_key($user_info['filter_topic'], array('pages' => '')), array('', '0')));
$context['no_topic_listing'] = !empty($context['boards']) && empty($context['topics']) && !$context['can_post_new'] && $nousingfilter;


Ok, try

// If there are children, but no topics and no ability to post topics...
// Only if no filtering is being done here, otherwise they won't be able to remove the filter
$nousingfilter = empty($user_info['filter_topic']['date0']) && empty($user_info['filter_topic']['date1']) && empty($user_info['filter_topic']['replies']) && empty($user_info['filter_topic']['letter']) && empty($user_info['filter_topic']['icon']);
$context['no_topic_listing'] = !empty($context['boards']) && empty($context['topics']) && !$context['can_post_new'] && $nousingfilter;


and tell me


thanks. its work.

Paracelsus

M-DVD,

I see that there is a message icon filter now... can you tell me if it is similar somehow to the vMessageIcon Filter MOD? (since I have that one installed but is unlikely to develop further to v2.0 in the future)

Advertisement: