Avatars Display Integration

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

Previous topic - Next topic

Diego Andrés

I don't know if both mods have it like that, but at least for the Topic Solved mod, the better solution would be to add the classes instead of replacing.
e.g.
$context['topics'][$topic_data['id']]['css_class'] .= ' other classes here';

SMF Tricks - Free & Premium Responsive Themes for SMF.

gevv

Quote from: Pipke on January 25, 2022, 06:32:28 PM@gevv above post is not right and triggers errors (so ignore above post, i cannot remove or edit it anymore)

do instead this: in SolveTopic.php
Code (find) Select
        // Is it solved?
        if ($context['topics'][$topic_data['id']]['is_solved'])
            $context['topics'][$topic_data['id']]['css_class'] = 'windowbg solvedbg';

and disable these 2 code lines

Code ("replace by") Select
        // Is it solved?
/*         if ($context['topics'][$topic_data['id']]['is_solved'])
            $context['topics'][$topic_data['id']]['css_class'] = 'windowbg solvedbg'; */



I tried, problem solved, thanks
ElkArte is a modern, powerful community building forum software. https://www.elkarte.net/

gevv

Quote from: Pipke on February 13, 2021, 06:13:30 PM
Code (find) Select
// Avatars categories (board)index (aka main/home page)
if ((isset($context['categories']) && !empty($context['categories'])) && in_array('boardindex_outer', $context['template_layers'], true) && $modSettings['adi_boardindex'])
{
Code (add after) Select
if (!empty($context['latest_posts'])) {
foreach ($context['latest_posts'] as $id_post => $post) {
// Guests
if ($modSettings['adi_initials'] && $context['latest_posts'][$id_post]['poster']['id'] == 0)
{
// Build overlay status
adi_status_data(null, $context['latest_posts'][$id_post]['poster']['name'], null, 'costum');

// Hook in context
$context['latest_posts'][$id_post]['link'] = '<span class="adi_item_costum"><span class="avatar" '.adi_name2hex2rgb($context['latest_posts'][$id_post]['poster']['name']).' '.adi_avatar_data(true).'>'.mb_strtoupper(mb_substr($context['latest_posts'][$id_post]['poster']['name'], 0, 1), 'UTF-8').'</span>'.$context['adi']['iconstatus'].'</span>'. $post['link'];
}
else
$context['latest_posts'][$id_post]['link'] = '<span>data-adi-id="'.$context['latest_posts'][$id_post]['poster']['id'].'"<span>'. $post['link'];
}
}





Hi,


@Pipke codes worked before.

It doesn't work now, when I add the second code, the white all pages  appears

error log;

Sources/AvatarsDisplayIntegration.php on line 828

Avatars Display Integration  v1.4.2
SMF 2.1.1
ElkArte is a modern, powerful community building forum software. https://www.elkarte.net/

Pipke

"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! ☕

FrizzleFried

Just installed... 2.1 with only 6 or 7 mods...

I am now getting this error:

https://www.aha-forums.com/cron.php
/home/ahaforum/public_html/Sources/AvatarsDisplayIntegration.php (Line 387)

Type of error: Cron
Error messageSelect
8: Undefined index: current_action

Backtrace info:

#0: smf_error_handler_cron()
Called from /home/ahaforum/public_html/Sources/AvatarsDisplayIntegration.php on line 387
#1: adi_integrate_bbc_codes()
Called from /home/ahaforum/public_html/Sources/Subs.php on line 5763
#2: call_integration_hook()
Called from /home/ahaforum/public_html/Sources/Subs.php on line 2465
#3: parse_bbc()
Called from /home/ahaforum/public_html/Sources/tasks/CreatePost-Notify.php on line 569
#4: handleWatchedNotifications()
Called from /home/ahaforum/public_html/Sources/tasks/CreatePost-Notify.php on line 270
#5: execute()
Called from /home/ahaforum/public_html/cron.php on line 233
#6: perform_task()
Called from /home/ahaforum/public_html/cron.php on line 127

FrizzleFried

Any suggestions on the error above?  This is the only mod I am getting an error from ...

Thanks!

Pipke

Quote from: FrizzleFried on February 26, 2022, 12:25:42 AMAny suggestions on the error above?  This is the only mod I am getting an error from ...

Thanks!

it's fixed mod updated newest version is now 1.5
Version 1.5 - Feb 27, 2022
- Fixed error 500 blank page due missing global var
- Fixed Undefined index: current_action
- Added option: Display avatar poster recent posts on info center

Also fixed various layout and css stuff to work with newest smf version 2.1.1
"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! ☕

FrizzleFried

Hi...Unfortunately,  with the new version,  it breaks the CSS for the AVATAR on BBC Mention setting for 2.1.1.  If you set it for either BEFORE @ or after @ it will break the setting and put the avatar justify left... BEFORE even the text... and pushes the text right.

EDIT: It also appears the new option to put avatars on recent posts ... if you untick it,  the avatars remain (no way to turn them off).

SIDE QUESTION: How do I adjust the number of recent posts that show up?  20 is far too many... 10 would be nice.


gevv

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

@rjen

Find attached the language file in dutch
Running SMF 2.1 with latest Tinyportal at www.fjr-club.nl
Testing SMF 2.1 with next version Tinyportal at test.fjr-club.nl

Pipke

Mod updated.
Version 1.5.1 - Feb 28, 2022
- Fixed css for @mentions avatar in posts
- Added dutch language

Quote from: FrizzleFried on February 28, 2022, 11:21:35 AMHi...Unfortunately,  with the new version,  it breaks the CSS for the AVATAR on BBC Mention setting for 2.1.1.  If you set it for either BEFORE @ or after @ it will break the setting and put the avatar justify left... BEFORE even the text... and pushes the text right.
Thanks for the report, i have fixed this newest mod version is now 1.5.1

Quote from: @rjen on February 28, 2022, 11:40:51 AMFind attached the language file in dutch
Thanks for that, i have added dutch to mod package newest mod version is now 1.5.1
ps. er zat ook een foutje in het vertalen je hebt 1 woordje "on" vergeten naar "op", verder alles prima hoor, ben zelf te lui om mijn mods te vertalen naar nederlands ;)

Quote from: FrizzleFried on February 28, 2022, 11:21:35 AMEDIT: It also appears the new option to put avatars on recent posts ... if you untick it,  the avatars remain (no way to turn them off).
I can't reproduce your problem. To me all works fine. Did you know there are 2 different settings for this... one for the "recent post index" and one for "recent post on info center"

Quote from: FrizzleFried on February 28, 2022, 11:21:35 AMSIDE QUESTION: How do I adjust the number of recent posts that show up?  20 is far too many... 10 would be nice.
Do you mean: recent posts info center or at recent posts index?
"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! ☕

@rjen

Quote from: Pipke on February 28, 2022, 03:23:10 PMThanks for that, i have added dutch to mod package newest mod version is now 1.5.1
ps. er zat ook een foutje in het vertalen je hebt 1 woordje "on" vergeten naar "op", verder alles prima hoor, ben zelf te lui om mijn mods te vertalen naar nederlands ;)

Tja, wat zal ik ervan zeggen...

By the way: after installing the MOd I noticed that some of my TinyPortal pages are showing a slightly different background. The cause is this mod stripping out empty <div></div> combinations..

Curious why it is doing that? Since the Curve2 has formatting applied to repeating divs (light <> dark <> light ) this action is affecting some screens...
Running SMF 2.1 with latest Tinyportal at www.fjr-club.nl
Testing SMF 2.1 with next version Tinyportal at test.fjr-club.nl

@rjen

Oh, and when I set the avatars to show for last poster but not topicstarter the Board-index is malformed on Mobile...

You cannot view this attachment.
Running SMF 2.1 with latest Tinyportal at www.fjr-club.nl
Testing SMF 2.1 with next version Tinyportal at test.fjr-club.nl

@rjen

One last note: when uninstalling the MOD wipes all settings, a bit annoying....
Running SMF 2.1 with latest Tinyportal at www.fjr-club.nl
Testing SMF 2.1 with next version Tinyportal at test.fjr-club.nl

Pipke

Quote from: @rjen on February 28, 2022, 03:48:42 PMBy the way: after installing the MOd I noticed that some of my TinyPortal pages are showing a slightly different background. The cause is this mod stripping out empty <div></div> combinations..

Curious why it is doing that? Since the Curve2 has formatting applied to repeating divs (light <> dark <> light ) this action is affecting some screens...

That's because i make such strange/complex changes at some places on the context/output-vars/arrays to make the mod "all hooks" for final outcome template.
If you got empty divs you get conflict with the HTML Markup Validation Service.
"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! ☕

Pipke

Quote from: @rjen on February 28, 2022, 03:55:17 PMOne last note: when uninstalling the MOD wipes all settings, a bit annoying....

It's free take it or leave it.
"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! ☕

Pipke

Quote from: @rjen on February 28, 2022, 03:51:13 PMOh, and when I set the avatars to show for last poster but not topicstarter the Board-index is malformed on Mobile...

You cannot view this attachment.

I will look into that
"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! ☕

@rjen

Quote from: Pipke on February 28, 2022, 04:19:42 PM
Quote from: @rjen on February 28, 2022, 03:55:17 PMOne last note: when uninstalling the MOD wipes all settings, a bit annoying....

It's free take it or leave it.

I know, just wanted to mention it: it can be coded differently....
Running SMF 2.1 with latest Tinyportal at www.fjr-club.nl
Testing SMF 2.1 with next version Tinyportal at test.fjr-club.nl

Pipke

Quote from: @rjen on February 28, 2022, 04:30:36 PM
Quote from: Pipke on February 28, 2022, 04:19:42 PM
Quote from: @rjen on February 28, 2022, 03:55:17 PMOne last note: when uninstalling the MOD wipes all settings, a bit annoying....

It's free take it or leave it.

I know, just wanted to mention it: it can be coded differently....

i know, btw this mod doesn't have much settings, so it's easy peasy to change them, after install you can get redirected to the settings, clicker the click and your done.
But anyway thanks for the ideas, maybe in future update i add it to the mod.
"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! ☕

Pipke

Quote from: Pipke on February 28, 2022, 04:23:16 PM
Quote from: @rjen on February 28, 2022, 03:51:13 PMOh, and when I set the avatars to show for last poster but not topicstarter the Board-index is malformed on Mobile...

I will look into that

Quick fix for that add in AvatarsDisplayIntegration.css file.
/* responsive stuff */
@media screen and (max-width: 720px) {
    .adi_print .lastpost {
        width: 100%;
    }
}
"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! ☕

Advertisement: