Advertisement:

Author Topic: Avatars on Board and/or MessageIndex  (Read 60007 times)

Offline aegersz

  • SMF Hero
  • ******
  • Posts: 1,756
  • Gender: Male
  • the "mods and tweaks" junkie
    • dopetalk (drugs and users)
Re: Avatars on Board and/or MessageIndex
« Reply #220 on: May 06, 2021, 08:15:14 PM »
That's a little better.

it only happens every time I select the "Forum" app/button to view all the boards from my Simple portal front-end ... it then generates the 2 errors.

It's not a big deal and I can live with it so don't waste too much of your time on it.
The configuration of my Linux VPS (SMF 2.0 with 155+ mods & some assorted manual tweaks) can be found here and notes on my mods can be found here (warning: those links will take you to a drug related forum). My (House) music DJ dedication page is here

Offline aegersz

  • SMF Hero
  • ******
  • Posts: 1,756
  • Gender: Male
  • the "mods and tweaks" junkie
    • dopetalk (drugs and users)
Re: Avatars on Board and/or MessageIndex
« Reply #221 on: May 10, 2021, 06:43:53 PM »
I think that has worked as I get no more new errors.

Thanks for your help.
The configuration of my Linux VPS (SMF 2.0 with 155+ mods & some assorted manual tweaks) can be found here and notes on my mods can be found here (warning: those links will take you to a drug related forum). My (House) music DJ dedication page is here

Offline Pipke

  • Full Member
  • ***
  • Posts: 557
    • #31970508 on GitHub
Re: Avatars on Board and/or MessageIndex
« Reply #222 on: May 11, 2021, 07:40:42 AM »
I think that has worked as I get no more new errors.

Thanks for your help.

“If something is wrong, fix it if you can. But train yourself not to worry. Worry never fixes anything.”

My Mods for SMF:
Avatars Display Integration
Avatars on Board and/or MessageIndex
Recent Forum Topics on Boardindex
Relative Time Formats

Offline aegersz

  • SMF Hero
  • ******
  • Posts: 1,756
  • Gender: Male
  • the "mods and tweaks" junkie
    • dopetalk (drugs and users)
Re: Avatars on Board and/or MessageIndex
« Reply #223 on: June 07, 2021, 05:46:32 AM »
Oh no ! for some reason, the same problem has come back again every time i select "Forum" from Simple Portal.

Any more thoughts on this odd issue ?
The configuration of my Linux VPS (SMF 2.0 with 155+ mods & some assorted manual tweaks) can be found here and notes on my mods can be found here (warning: those links will take you to a drug related forum). My (House) music DJ dedication page is here

Offline aegersz

  • SMF Hero
  • ******
  • Posts: 1,756
  • Gender: Male
  • the "mods and tweaks" junkie
    • dopetalk (drugs and users)
Re: Avatars on Board and/or MessageIndex
« Reply #224 on: June 07, 2021, 09:17:00 AM »
here is a clue: it only happens when a post on a child of a child board has a date of Today or Yesterday and only when starting at the forum's root board (as you do when selecting "Forum").

Apart from that same couple of errors, it works properly.
« Last Edit: June 07, 2021, 10:08:43 AM by aegersz »
The configuration of my Linux VPS (SMF 2.0 with 155+ mods & some assorted manual tweaks) can be found here and notes on my mods can be found here (warning: those links will take you to a drug related forum). My (House) music DJ dedication page is here

Offline Pipke

  • Full Member
  • ***
  • Posts: 557
    • #31970508 on GitHub
Re: Avatars on Board and/or MessageIndex
« Reply #225 on: June 07, 2021, 02:19:11 PM »
Getting lots of these errors in 2.0.17 and the latest version of this mod

Code: [Select]
8: Undefined index: time
File: /var/www/html/Sources/abm_code.php
Line: 353

Code: [Select]
8: Undefined offset: 32
File: /var/www/html/Sources/abm_code.php
Line: 348

The mod is working fine though. Any ideas ?

does it still generate these two errors, or only one of it?
“If something is wrong, fix it if you can. But train yourself not to worry. Worry never fixes anything.”

My Mods for SMF:
Avatars Display Integration
Avatars on Board and/or MessageIndex
Recent Forum Topics on Boardindex
Relative Time Formats

Offline aegersz

  • SMF Hero
  • ******
  • Posts: 1,756
  • Gender: Male
  • the "mods and tweaks" junkie
    • dopetalk (drugs and users)
Re: Avatars on Board and/or MessageIndex
« Reply #226 on: June 07, 2021, 03:26:23 PM »
It generates both at a time.

I cannot reproduce it on a fresh test system with a few mods but on my "fully moded" systems, it doesn't matter how may posts fit the criteria I mentioned before, only two messages occur at a time.

I don't want to waste your time but if you can think of something easy then that's great.

Remember that I have over 150 mods on so it could be anything really (and not your logic) !

I have been dumping variables to the log but I either get too much data back in the form of huge arrays or very little.

Damn php, it's a tricky language for me.
The configuration of my Linux VPS (SMF 2.0 with 155+ mods & some assorted manual tweaks) can be found here and notes on my mods can be found here (warning: those links will take you to a drug related forum). My (House) music DJ dedication page is here

Offline aegersz

  • SMF Hero
  • ******
  • Posts: 1,756
  • Gender: Male
  • the "mods and tweaks" junkie
    • dopetalk (drugs and users)
Re: Avatars on Board and/or MessageIndex
« Reply #227 on: June 07, 2021, 04:35:43 PM »
Can you think of any mods that would interact with your fabulous mod ?

So far I have tried:

1.
	
SimplePortal
	
2.3.6
	
Uninstall ]
2.
	
Global 
Topics
	
2.2
	
Uninstall ]
3.
	
Avatars on Board/MessageIndex
	
2.0.17
	
Uninstall ]
4.
	
DevCenter
	
0.4.1
	
Uninstall ]
5.
	
Tidy Child Boards
	
2.0
	
Uninstall ]
6.
	
SA Chat
	
1.0b1 Rev120
	
Uninstall ]
7.
	
EmailValidator
	
1.1
	
Uninstall ]
8.
	
Topic Rating Bar
	
1.4.1
	
Uninstall ]


Check my signature for the full list of mods that I run, if you wish ...

I have attached the errors in more detail:
« Last Edit: June 07, 2021, 05:15:24 PM by aegersz »
The configuration of my Linux VPS (SMF 2.0 with 155+ mods & some assorted manual tweaks) can be found here and notes on my mods can be found here (warning: those links will take you to a drug related forum). My (House) music DJ dedication page is here

Offline Pipke

  • Full Member
  • ***
  • Posts: 557
    • #31970508 on GitHub
Re: Avatars on Board and/or MessageIndex
« Reply #228 on: June 08, 2021, 02:07:59 PM »
try this:
Code: (find) [Select]
$context['categories'][$row['id_cat']]['boards'][$row['id_parent']]['last_post']['time'] = $context['categories'][$row['id_cat']]['boards'][$row['id_parent']]['last_post']['time'].'</div><p><!---->';

Code: (replace by) [Select]
if (isset($context['categories'][$row['id_cat']]['boards'][$row['id_parent']]['last_post']['time']))
$context['categories'][$row['id_cat']]['boards'][$row['id_parent']]['last_post']['time'] = $context['categories'][$row['id_cat']]['boards'][$row['id_parent']]['last_post']['time'].'</div><p><!---->';

“If something is wrong, fix it if you can. But train yourself not to worry. Worry never fixes anything.”

My Mods for SMF:
Avatars Display Integration
Avatars on Board and/or MessageIndex
Recent Forum Topics on Boardindex
Relative Time Formats

Offline aegersz

  • SMF Hero
  • ******
  • Posts: 1,756
  • Gender: Male
  • the "mods and tweaks" junkie
    • dopetalk (drugs and users)
Re: Avatars on Board and/or MessageIndex
« Reply #229 on: June 11, 2021, 12:18:14 AM »
Thanks Pipke,

That got rid of one of the errors but this one still persists:

Code: [Select]
https://forum.drugs-and-users.org/index.php?8: Undefined offset: 31 File: /var/www/html/Sources/abm_code.php
Line: 350

The offset 31 is the parent and first-level child board, as you probably already know. So I made the following code change to get rid of this:

Find:
Code: [Select]
                                                if ($context['abm_avatars_value'][$row['id_board']]['last_id_member']) //member
                                                        $context['categories'][$row['id_cat']]['boards'][$row['id_parent']]['last_post']['member']['link'] = 'abm<!----></p><div style="padding-left: '. $abm_avatar_size.'px; position: relative;"><a href="' . $scripturl . '?action=profile;u=' . $context['abm_avatars_value'][$row['id_board']]['last_id_member'] . '"><img class="abm_avatar_board" alt="abm_id='.$context['abm_avatars_value'][$row['id_board']]['last_id_member'].'" /></a><b>'. $txt['last_post']. '</b>  '. $txt['by']. ' '.$context['categories'][$row['id_cat']]['boards'][$row['id_parent']]['last_post']['member']['link'];
                                                else //guest or deleted account
                                                        $context['categories'][$row['id_cat']]['boards'][$row['id_parent']]['last_post']['member']['link'] = 'abm<!----></p><div style="padding-left: '. $abm_avatar_size.'px; position: relative;"><img class="abm_avatar_board" alt="abm_id='.$context['abm_avatars_value'][$row['id_board']]['last_id_member'].'" /><b>'. $txt['last_post']. '</b>  '. $txt['by']. ' '.$context['categories'][$row['id_cat']]['boards'][$row['id_parent']]['last_post']['member']['link'];

Replace with:
Code: [Select]
                                                if ($context['abm_avatars_value'][$row['id_board']]['last_id_member']) //member
                                                        if (isset($context['categories'][$row['id_cat']]['boards'][$row['id_parent']]))
                                                                $context['categories'][$row['id_cat']]['boards'][$row['id_parent']]['last_post']['member']['link'] = 'abm<!----></p><div style="padding-left: '. $abm_avatar_size.'px; position: relative;"><a href="' . $scripturl . '?action=profile;u=' . $context['abm_avatars_value'][$row['id_board']]['last_id_member'] . '"><img class="abm_avatar_board" alt="abm_id='.$context['abm_avatars_value'][$row['id_board']]['last_id_member'].'" /></a><b>'. $txt['last_post']. '</b>  '. $txt['by']. ' '.$context['categories'][$row['id_cat']]['boards'][$row['id_parent']]['last_post']['member']['link'];
                                                else //guest or deleted account
                                                        if (isset($context['categories'][$row['id_cat']]['boards'][$row['id_parent']]))
                                                                $context['categories'][$row['id_cat']]['boards'][$row['id_parent']]['last_post']['member']['link'] = 'abm<!----></p><div style="padding-left: '. $abm_avatar_size.'px; position: relative;"><img class="abm_avatar_board" alt="abm_id='.$context['abm_avatars_value'][$row['id_board']]['last_id_member'].'" /><b>'. $txt['last_post']. '</b>  '. $txt['by']. ' '.$context['categories'][$row['id_cat']]['boards'][$row['id_parent']]['last_post']['member']['link'];

I was able to adapt your fix logic to the above. The only side effect of this odd error with my system is that there is no avatar displayed on the parent board for the most recent entry on it's child's child board - which is no problem as SMF vanilla (with your mod) doesn't even display the details of it at all.

We are done finally. Thanks again for your guidance.
« Last Edit: June 11, 2021, 01:16:10 AM by aegersz »
The configuration of my Linux VPS (SMF 2.0 with 155+ mods & some assorted manual tweaks) can be found here and notes on my mods can be found here (warning: those links will take you to a drug related forum). My (House) music DJ dedication page is here

Offline aegersz

  • SMF Hero
  • ******
  • Posts: 1,756
  • Gender: Male
  • the "mods and tweaks" junkie
    • dopetalk (drugs and users)
Re: Avatars on Board and/or MessageIndex
« Reply #230 on: June 11, 2021, 01:28:58 AM »
This is what I mean ... as I said, my "vanilla" SMF 2.0.18 system with your mod doesn't even show the item i have circled, so i guess that it's a bonus  :).

The parent of the child of the child board is rectangled and it's contents are in the second attachment.

Both refer to the latest post in the "Cautions" board.

I know that this is not your bad logic as I have a bug in my "boards" logic and have had it for a for a fair while -  I had an empty board somehow (?)
« Last Edit: June 11, 2021, 02:28:02 AM by aegersz »
The configuration of my Linux VPS (SMF 2.0 with 155+ mods & some assorted manual tweaks) can be found here and notes on my mods can be found here (warning: those links will take you to a drug related forum). My (House) music DJ dedication page is here

Offline aegersz

  • SMF Hero
  • ******
  • Posts: 1,756
  • Gender: Male
  • the "mods and tweaks" junkie
    • dopetalk (drugs and users)
Re: Avatars on Board and/or MessageIndex
« Reply #231 on: June 11, 2021, 04:45:32 AM »
BTW, I made a 2.0.18 version to incorporate all these fixes if you are interested ...
The configuration of my Linux VPS (SMF 2.0 with 155+ mods & some assorted manual tweaks) can be found here and notes on my mods can be found here (warning: those links will take you to a drug related forum). My (House) music DJ dedication page is here

Offline Pipke

  • Full Member
  • ***
  • Posts: 557
    • #31970508 on GitHub
Re: Avatars on Board and/or MessageIndex
« Reply #232 on: June 11, 2021, 02:21:36 PM »
BTW, I made a 2.0.18 version to incorporate all these fixes if you are interested ...

no thanks for the offer, then you would have to make a change for every 'own setup change' and that is not an option
“If something is wrong, fix it if you can. But train yourself not to worry. Worry never fixes anything.”

My Mods for SMF:
Avatars Display Integration
Avatars on Board and/or MessageIndex
Recent Forum Topics on Boardindex
Relative Time Formats

Offline aegersz

  • SMF Hero
  • ******
  • Posts: 1,756
  • Gender: Male
  • the "mods and tweaks" junkie
    • dopetalk (drugs and users)
Re: Avatars on Board and/or MessageIndex
« Reply #233 on: June 11, 2021, 03:38:23 PM »
BTW, I made a 2.0.18 version to incorporate all these fixes if you are interested ...

no thanks for the offer, then you would have to make a change for every 'own setup change' and that is not an option

Fair enough.
The configuration of my Linux VPS (SMF 2.0 with 155+ mods & some assorted manual tweaks) can be found here and notes on my mods can be found here (warning: those links will take you to a drug related forum). My (House) music DJ dedication page is here