News:

Want to get involved in developing SMF, then why not lend a hand on our github!

Main Menu

Avatars Display Integration

Started by Pipke, February 15, 2020, 07:43:21 PM

Previous topic - Next topic

Hatshepsut

Quote from: Pipke on April 09, 2020, 03:29:14 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 :)

kokkieblanda

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

Pipke

Quote from: kokkieblanda 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

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."

Click here to view my mods for SMF

Hey 👋 Did i helped... you like what i do. You can now buy me a coffee! ☕

kokkieblanda

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.

Pipke

Maybe this is relevant to your error, just check it out
Quote from: vbgamer45 on April 20, 2020, 03:08:30 PM
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

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."

Click here to view my mods for SMF

Hey 👋 Did i helped... you like what i do. You can now buy me a coffee! ☕

kokkieblanda

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


kokkieblanda

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

Pipke

Quote from: kokkieblanda 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

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."

Click here to view my mods for SMF

Hey 👋 Did i helped... you like what i do. You can now buy me a coffee! ☕

kokkieblanda

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

pocttopus

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)


Pipke

Quote from: pocttopus 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)



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."

Click here to view my mods for SMF

Hey 👋 Did i helped... you like what i do. You can now buy me a coffee! ☕

pocttopus

Hello @Pipke and thanks for your reponse,

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

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)

Arantor

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.

pocttopus

 :(

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)
$context['adi']['is_online'] = $array_var['is_online'] ? 'log_in' : 'log_un';

pocttopus

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.

Pipke

Quote from: Arantor 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.

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."

Click here to view my mods for SMF

Hey 👋 Did i helped... you like what i do. You can now buy me a coffee! ☕

pocttopus

More errors on the same line as previous... any help please?

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


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']);

Pipke

Quote from: pocttopus on June 25, 2020, 04:08:09 AM
More errors on the same line as previous... any help please?

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


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

$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."

Click here to view my mods for SMF

Hey 👋 Did i helped... you like what i do. You can now buy me a coffee! ☕

gevv

Hi,

There are some problems smf 2.1 rc3 I found the solution will disable some features

some topic give white page 503 error;

in settings; Display avatar when using bbc @mention member in posts...   
I chose " please do not" problem solved




recent post page give white page 503 error;

in settings; Display avatar poster on the Recent posts index
I uncheck the box problem solved

ElkArte is a modern, powerful community building forum software. https://www.elkarte.net/

wylekk

I have version 1.2, smf 2.1 rc3 installed and there are no such problems. Yes, all features are included.  ;)

Advertisement: