[AddonsLab] Unread Post Count

[AddonsLab] Unread Post Count 1.6.0

No permission to download
Hello, i try to add the badge to a custom button, this is the code
HTML:
        <div class="block-row rowButton">
            <xf:button href="/quoi-de-neuf/posts/" class="button--link">
                <div class="button--home">
                    <div class="iconFa">
                        <xf:fa icon="fad fa-clock" class="orangeFa" />
                    </div>
                    <xf:if is="{$unreadCounter}===null">
                        <xf:set var="$unreadCounter" value="{$__globals.unreadCounter}" />
                    </xf:if>
                    <xf:if is="{$xf.options.showUnreadInMobile} && {$unreadCounter}!==''">
                        <div class="iconText badgeContainer badgeContainer--highlighted"
                            data-badge="{$unreadCounter}">
                            Nouveaux messages
                        </div>
                    <xf:else />
                        <div class="iconText">
                            Nouveaux messages               
                        </div>
                    </xf:if>   
                </div>
            </xf:button>
        </div>

Unfortunately the badge does not appears, what's wrong in my code?
Thank you.
 
@AddonsLab

I'm working with a site that uses some of your addons and I was recently investigating a database size issue. It had been growing at alarming rate compared to the amount of content added over a measured period of time.

In any case, when I pulled a copy of the database to investigate, I found that the xf_data_registry table was sized at 23.9gb.

1737169428483.webp

When investigating the content of this table, I found 42,495 records contained here, 42,423 of these records look like the below sample:

1737169550102.webp
{data key}, {data_value}

Code:
select * FROM xf_data_registry WHERE data_key LIKE '%unreadPostCount-%';
/* Affected rows: 0  Found rows: 42,423  Warnings: 0  Duration for 1 query: 0.016 sec. (+ 67.656 sec. network) */

select * FROM xf_data_registry;
/* Affected rows: 0  Found rows: 42,495  Warnings: 0  Duration for 1 query: 0.000 sec. (+ 64.407 sec. network) */

The content of the data_value field was approximately 672,000 (or 656KB on disk).

I believe that this data is being generated by this addon "Unread Post Count". Could you please check and advise?

1737171305406.webp
(Note: The addon cache time was set to 1 min but has now been set to 0 (disabled) for troubleshooting.)

The objective here is that we would like to clean up this massive amount of data in this table.

XF Version: 2.2.16
Addon: 1.6.0
PHP 8.2.27

Thanks for your assistance.
 
@AddonsLab

I'm working with a site that uses some of your addons and I was recently investigating a database size issue. It had been growing at alarming rate compared to the amount of content added over a measured period of time.

In any case, when I pulled a copy of the database to investigate, I found that the xf_data_registry table was sized at 23.9gb.

View attachment 317598

When investigating the content of this table, I found 42,495 records contained here, 42,423 of these records look like the below sample:

View attachment 317599
{data key}, {data_value}

Code:
select * FROM xf_data_registry WHERE data_key LIKE '%unreadPostCount-%';
/* Affected rows: 0  Found rows: 42,423  Warnings: 0  Duration for 1 query: 0.016 sec. (+ 67.656 sec. network) */

select * FROM xf_data_registry;
/* Affected rows: 0  Found rows: 42,495  Warnings: 0  Duration for 1 query: 0.000 sec. (+ 64.407 sec. network) */

The content of the data_value field was approximately 672,000 (or 656KB on disk).

I believe that this data is being generated by this addon "Unread Post Count". Could you please check and advise?

View attachment 317605
(Note: The addon cache time was set to 1 min but has now been set to 0 (disabled) for troubleshooting.)

The objective here is that we would like to clean up this massive amount of data in this table.

XF Version: 2.2.16
Addon: 1.6.0
PHP 8.2.27

Thanks for your assistance.
@AddonsLab - Just checking in, +45 days from the report above. Do you have any plans to address this concern that was noted?
 
Back
Top Bottom