Advertisement:

Author Topic: Avatars Display Integration  (Read 3381 times)

Offline Hatshepsut

  • Jr. Member
  • **
  • Posts: 121
  • Gender: Male
    • bgnacionalisti.org/ on Facebook
    • Bulgarian Nationalist Forum
Re: Avatars Display Integration
« Reply #20 on: April 09, 2020, 09:37:07 PM »
@Hatshepsut

you can find that source code in the .../Themes/{YourTheme}/css/AvatarsDisplayIntegration.css file   

find and edit this to your likenings
Code: (find) [Select]
.counter {
    padding-right: 12px;
    line-height: 28px;
    text-shadow: 0 1px 1px #3f3f3f;
    color: #fff;
    opacity: 0.5;
}


or just remove the text-shadow, color and/or opacity rule!

Thanks :)

Offline kokkieblanda

  • Semi-Newbie
  • *
  • Posts: 19
Re: Avatars Display Integration
« Reply #21 on: May 23, 2020, 07:05:10 AM »
when clicking all alerts in the alerts box (showalerts) i get an error loop, when i activate the errorlog its works but i get an error
Sources/AvatarsDisplayIntegration.php (line 524)
==>524:    $context['alerts'][$id_alert]['icon'].= $context['adi']['close'].$context['adi']['iconstatus'].'</div>';

any idea? Strange part is the error loop only happens with admins and not with regular members

Offline Pipke

  • Full Member
  • ***
  • Posts: 524
    • #31970508 on GitHub
Re: Avatars Display Integration
« Reply #22 on: May 23, 2020, 07:42:14 AM »
when clicking all alerts in the alerts box (showalerts) i get an error loop, when i activate the errorlog its works but i get an error
Sources/AvatarsDisplayIntegration.php (line 524)
==>524:    $context['alerts'][$id_alert]['icon'].= $context['adi']['close'].$context['adi']['iconstatus'].'</div>';

any idea? Strange part is the error loop only happens with admins and not with regular members

Can you post the complete error log about this error loop, this way i can see what is going on here.
“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 kokkieblanda

  • Semi-Newbie
  • *
  • Posts: 19
Re: Avatars Display Integration
« Reply #23 on: May 23, 2020, 08:21:24 AM »
array(7) {
  • => array(3) { ["file"]=> string(67) "/home/xxxxxxx/public_html/Sources/Errors.php" ["line"]=> int(290) ["function"]=> string(9) "log_error" } [1]=> array(3) { ["file"]=> string(86) "/home/xxxxxx/public_html/Sources/AvatarsDisplayIntegration.php" ["line"]=> int(524) ["function"]=> string(17) "smf_error_handler" } [2]=> array(3) { ["file"]=> string(65) "/home/xxxxx/public_html/Sources/Subs.php" ["line"]=> int(4834) ["function"]=> string(27) "adi_integrate_theme_context" } [3]=> array(3) { ["file"]=> string(65) "/home/xxxxx/public_html/Sources/Subs.php" ["line"]=> int(3581) ["function"]=> string(21) "call_integration_hook" } [4]=> array(3) { ["file"]=> string(65) "/home/xxxxxxxx/public_html/Sources/Subs.php" ["line"]=> int(3652) ["function"]=> string(17) "setupThemeContext" } [5]=> array(3) { ["file"]=> string(65) "/home/xxxxxxxxx/public_html/Sources/Subs.php" ["line"]=> int(3274) ["function"]=> string(15) "template_header" } [6]=> array(3) { ["file"]=> string(58) "/home/xxxxxxxxx/public_html/index.php" ["line"]=> int(154) ["function"]=> string(6) "obExit" } } Error loop.

Offline Pipke

  • Full Member
  • ***
  • Posts: 524
    • #31970508 on GitHub
Re: Avatars Display Integration
« Reply #24 on: May 23, 2020, 11:32:56 AM »
Maybe this is relevant to your error, just check it out
Re: Getting an Error Loop on 2.1 RC2

Fix found here
https://www.simplemachines.org/community/index.php?topic=566687.0

Otherwise where you got this array error from: the smf error logs?
i mean does smf throw an error in the error log? if so post that then, it looks almost like this if you click on the Backtrace information
Code: [Select]
Type of error: Undefined_vars
Error message: 8: Undefined index: name
File: D:/xampp/htdocs/rc2/Themes/Magnetizer/Magnetizer.template.php
Line: 64
URL of page causing the error: http://localhost/rc2/index.php?http://localhost/rc2/
Backtrace information
#0: smf_error_handler()
Called from D:\xampp\htdocs\rc2\Themes\Magnetizer\Magnetizer.template.php on line 64
#1: template_rft_above()
Called from D:\xampp\htdocs\rc2\Sources\Load.php on line 2538
#2: loadSubTemplate()
Called from D:\xampp\htdocs\rc2\Sources\Subs.php on line 3887
#3: template_header()
Called from D:\xampp\htdocs\rc2\Sources\Subs.php on line 3471
#4: obExit()
Called from D:\xampp\htdocs\rc2\index.php on line 171
“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 kokkieblanda

  • Semi-Newbie
  • *
  • Posts: 19
Re: Avatars Display Integration
« Reply #25 on: May 23, 2020, 01:54:20 PM »
array error is not from the logs. With error log disabled. When i click on alerts in top line and then on button all alerts that error shows up and the website goes blanc, just that error is viable.
When i enable error log that button works but the error log show the notice Sources/AvatarsDisplayIntegration.php (line 524)
==>524:    $context['alerts'][$id_alert]['icon'].= $context['adi']['close'].$context['adi']['iconstatus'].'</div>';


Backtrace information

    #0: smf_error_handler_cron()
    Called from /home/xxxxx/public_html/Sources/AvatarsDisplayIntegration.php on line 387
    #1: adi_integrate_bbc_codes()
    Called from /home/xxxxxx/public_html/Sources/Subs.php on line 4834
    #2: call_integration_hook()
    Called from /home/xxxxxxx/public_html/Sources/Subs.php on line 1924
    #3: parse_bbc()
    Called from /xxxxxxx/public_html/Sources/tasks/CreatePost-Notify.php on line 204
    #4: execute()
    Called from /home/xxxxxxxxx/public_html/cron.php on line 211
    #5: perform_task()
    Called from /home/xxxxxxxxu/public_html/cron.php on line 105


Offline kokkieblanda

  • Semi-Newbie
  • *
  • Posts: 19
Re: Avatars Display Integration
« Reply #26 on: May 25, 2020, 09:41:58 AM »
524:    $context['alerts'][$id_alert]['icon'] = $context['adi']['close'].$context['adi']['iconstatus'].'</div>'; seems to solve the error
524:    $context['alerts'][$id_alert]['icon'].= $context['adi']['close'].$context['adi']['iconstatus'].'</div>'; original

Offline Pipke

  • Full Member
  • ***
  • Posts: 524
    • #31970508 on GitHub
Re: Avatars Display Integration
« Reply #27 on: May 25, 2020, 12:12:07 PM »
524:    $context['alerts'][$id_alert]['icon'] = $context['adi']['close'].$context['adi']['iconstatus'].'</div>'; seems to solve the error
524:    $context['alerts'][$id_alert]['icon'].= $context['adi']['close'].$context['adi']['iconstatus'].'</div>'; original

if you remove the "dot" then you create another fault in the output format ?
“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 kokkieblanda

  • Semi-Newbie
  • *
  • Posts: 19
Re: Avatars Display Integration
« Reply #28 on: May 26, 2020, 01:33:10 AM »
everything works fine now
there is an error item only for guests not for members, so it doesn't bother me, the mod works splendidly
Fouttype: Cron
Foutmelding: 8: Undefined index: current_action
Bestand: /home/xxxxx/public_html/Sources/AvatarsDisplayIntegration.php Regel: 387

Offline pocttopus

  • Full Member
  • ***
  • Posts: 472
  • Low pressure
    • @pocttopus on Twitter
    • mkreef.com
Re: Avatars Display Integration
« Reply #29 on: May 29, 2020, 05:58:34 PM »
Hello,

I am receiving errors, can someone help me:

Type of error: General
8: Trying to access array offset on value of type null https://renaultclub.mk/index.php?
/home/xxxx/public_html/Sources/AvatarsDisplayIntegration.php (Line 164)


Offline Pipke

  • Full Member
  • ***
  • Posts: 524
    • #31970508 on GitHub
Re: Avatars Display Integration
« Reply #30 on: June 03, 2020, 03:25:21 PM »
Hello,

I am receiving errors, can someone help me:

Type of error: General
8: Trying to access array offset on value of type null https://renaultclub.mk/index.php?
/home/xxxx/public_html/Sources/AvatarsDisplayIntegration.php (Line 164)



this is perhaps coming due php 7.4

try this in file @lines 143,144,145 .../Sources/AvatarsDisplayIntergration.php (make backup first!)
Code: (find) [Select]
// Get, if not queried yet the who's online list
if (!isset($context['adi_online']) && $modSettings['adi_icon_overlay'] !== 'none' && $array_var == null)
adi_get_online_members();

Code: (replace by) [Select]
// Get, if not queried yet the who's online list
if (!isset($context['adi_online']) && $modSettings['adi_icon_overlay'] !== 'none' && !isset($array_var))
adi_get_online_members();

let me know if that works.
“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 pocttopus

  • Full Member
  • ***
  • Posts: 472
  • Low pressure
    • @pocttopus on Twitter
    • mkreef.com
Re: Avatars Display Integration
« Reply #31 on: June 03, 2020, 06:14:23 PM »
Hello @Pipke and thanks for your reponse,

Unfortunately after the changes I still receive the same error messages:

Code: [Select]
Type of error: General
8: Trying to access array offset on value of type null https://renaultclub.mk/index.php?
xxxx/public_html/Sources/AvatarsDisplayIntegration.php (Line 164)

Offline Arantor

  • Resident Overthinker
  • SMF Friend
  • SMF Legend
  • *
  • Posts: 72,951
Re: Avatars Display Integration
« Reply #32 on: June 03, 2020, 07:44:01 PM »
Replace line 164 of that file.

Code: (before) [Select]
$context['adi']['title'] = $context['user']['id'] == $id ? $txt['adi_you_are_logged_in'] : ($name ? $name : $txt['adi_unknown_user'].$id).' '.($array_var['is_online'] ? $txt['adi_log_in'] : $txt['adi_log_un']);
Code: (after) [Select]
$context['adi']['title'] = $context['user']['id'] == $id ? $txt['adi_you_are_logged_in'] : ($name ? $name : $txt['adi_unknown_user'].$id).' '.($array_var && $array_var['is_online'] ? $txt['adi_log_in'] : $txt['adi_log_un']);
The issue is that $array_var is being inserted into that function as null, and you can't ask for an array subscript of null.

Offline pocttopus

  • Full Member
  • ***
  • Posts: 472
  • Low pressure
    • @pocttopus on Twitter
    • mkreef.com
Re: Avatars Display Integration
« Reply #33 on: June 03, 2020, 08:22:09 PM »
 :(

Code: [Select]
Type of error: General
8: Trying to access array offset on value of type null https://renaultclub.mk/index.php?
xxxxx/public_html/Sources/AvatarsDisplayIntegration.php (Line 163)

Now this line is the issue (163)
Code: [Select]
$context['adi']['is_online'] = $array_var['is_online'] ? 'log_in' : 'log_un';

Offline pocttopus

  • Full Member
  • ***
  • Posts: 472
  • Low pressure
    • @pocttopus on Twitter
    • mkreef.com
Re: Avatars Display Integration
« Reply #34 on: June 04, 2020, 02:44:37 AM »
Somehow it stops showing errors.
I believe that now everything is fine... I'll update if error log returns.

Thanks @Pipke and @Arantor for your help, you are very kind.

Offline Pipke

  • Full Member
  • ***
  • Posts: 524
    • #31970508 on GitHub
Re: Avatars Display Integration
« Reply #35 on: June 04, 2020, 04:16:29 AM »
Replace line 164 of that file.

Code: (before) [Select]
$context['adi']['title'] = $context['user']['id'] == $id ? $txt['adi_you_are_logged_in'] : ($name ? $name : $txt['adi_unknown_user'].$id).' '.($array_var['is_online'] ? $txt['adi_log_in'] : $txt['adi_log_un']);
Code: (after) [Select]
$context['adi']['title'] = $context['user']['id'] == $id ? $txt['adi_you_are_logged_in'] : ($name ? $name : $txt['adi_unknown_user'].$id).' '.($array_var && $array_var['is_online'] ? $txt['adi_log_in'] : $txt['adi_log_un']);
The issue is that $array_var is being inserted into that function as null, and you can't ask for an array subscript of null.

nice catch, thx Arantor
Ill update the code in next release!
“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 pocttopus

  • Full Member
  • ***
  • Posts: 472
  • Low pressure
    • @pocttopus on Twitter
    • mkreef.com
Re: Avatars Display Integration
« Reply #36 on: June 25, 2020, 04:08:09 AM »
More errors on the same line as previous... any help please?

   
Code: [Select]
Type of error: General
8: Trying to access array offxxxset on value of type null xxSources/AvatarsDisplayIntegration.php (Line 163)

Code: [Select]
161: {
162: // Who what where is online
==>163: $context['adi']['is_online'] = $array_var['is_online'] ? 'log_in' : 'log_un';
164: $context['adi']['title'] = $context['user']['id'] == $id ? $txt['adi_you_are_logged_in'] : ($name ? $name : $txt['adi_unknown_user'].$id).' '.($array_var && $array_var['is_online'] ? $txt['adi_log_in'] : $txt['adi_log_un']);

Offline Pipke

  • Full Member
  • ***
  • Posts: 524
    • #31970508 on GitHub
Re: Avatars Display Integration
« Reply #37 on: June 28, 2020, 06:06:48 AM »
More errors on the same line as previous... any help please?

   
Code: [Select]
Type of error: General
8: Trying to access array offxxxset on value of type null xxSources/AvatarsDisplayIntegration.php (Line 163)

Code: [Select]
161: {
162: // Who what where is online
==>163: $context['adi']['is_online'] = $array_var['is_online'] ? 'log_in' : 'log_un';
164: $context['adi']['title'] = $context['user']['id'] == $id ? $txt['adi_you_are_logged_in'] : ($name ? $name : $txt['adi_unknown_user'].$id).' '.($array_var && $array_var['is_online'] ? $txt['adi_log_in'] : $txt['adi_log_un']);

change line 163 to
Code: [Select]
$context['adi']['is_online'] = isset($array_var['is_online']) ? 'log_in' : 'log_un';
“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