News:

SMF 2.0.19 has been released! Please update. Read more.

Main Menu

Custom fields and filters of post

Started by davidhs, February 21, 2014, 01:53:17 PM

Previous topic - Next topic

Tarkidu

Quote from: davidhs on March 31, 2019, 06:26:18 AM
I was waiting for the next release of SMF 2.1, but I did not know that RC1 and RC2 are already there! I will adapt my mods.

Are there any updates? ;D

davidhs

Quote from: Tarkidu on May 18, 2020, 09:01:07 AM
Quote from: davidhs on March 31, 2019, 06:26:18 AM
I was waiting for the next release of SMF 2.1, but I did not know that RC1 and RC2 are already there! I will adapt my mods.

Are there any updates? ;D
I am sorry, no. I have problems with editor of SMF 2.1. :(

Sebastiii

Hello :) @davidhs
I have updated the plugins to the latest version (2.0.3), and I was running a lot of log error.
Settings to not use eval settings (Admin > Maintenance > Server Settings > Disable template eval (tick) > save), I was able to find the line of code that trigger a lot of logs.
With help @Arantor it seems that that line 3942 need to be change from "continue; to continue 2;"

3922:                    {
3923:                        case 'chart_average':
3924:                        {
3925:                            echo '
3926:        ', $txt['cffp_show_stats_summary_min'], ': ', comma_format($stats['min_num'], $stats['min_num'] == (int) $stats['min_num'] ? 0 : 1), '<br />
3927:        ', $txt['cffp_show_stats_summary_average'], ': ', comma_format($stats['average'], 1), '<br />
3928:        ', $txt['cffp_show_stats_summary_max'], ': ', comma_format($stats['max_num'], $stats['max_num'] == (int) $stats['max_num'] ? 0 : 1), '<br />';
3929: 
3930:                            if (!empty($stats['options_text']) && $stats['chart_average']['options_text'])
3931:                                echo implode('
3932:        <br />', $stats['options_text']), '<br />';
3933: 
3934:                            echo '
3935:        <br />';
3936:                            break;
3937:                        }
3938:                        case 'chart_hbars':
3939:                        case 'chart_vbars':
3940:                        {
3941:                            if ($chart_hvbars)
==>3942:                                continue;
3943: 
3944:                            foreach ($stats['data'] as $value_data)
3945:                                echo '
3946:        ', $value_data['text'], ': ', comma_format($value_data['num']), ' (', comma_format($value_data['percent'], 1), '%)<br />';
3947: 
3948:                            echo '
3949:        <br />';
3950: 
3951:                            $chart_hvbars = true;
3952:                            break;
3953:                        }
3954:                        case 'summary':
3955:                        {
3956:                            foreach ($stats['summary'] as $k => $summary)
3957:                            {
3958:                                if (in_array($k, array('average', 'sum')))
3959:                                    $summary[1] = comma_format($summary[1], 1);
3960:                                elseif ('total' == $k)
3961:                                    $summary[1] = comma_format($summary[1]);
3962: 

https://www.****.com/forum/index.php?action=unread
2: "continue" targeting switch is equivalent to "break". Did you mean to use "continue 2"?
Fichier: /home/attrapes/public_html/forum/Themes/default/CustomFieldFilterPost.template.php
Ligne: 3942

After changing this line, no more error in log ;D

Advertisement: