Advertisement:

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

Offline cuongvttt

  • Semi-Newbie
  • *
  • Posts: 55
    • http://vietnetwork.vn
Re: Avatars on Board and/or MessageIndex
« Reply #180 on: June 13, 2019, 04:29:29 AM »
This is a beautiful mod and it makes website look very lively, bro Pipke.
It' more than perfect if avatars appear on Recent Topic/Post also, can you help me? Thank you so much.



Offline Pipke

  • Full Member
  • ***
  • Posts: 505
    • #31970508 on GitHub
Re: Avatars on Board and/or MessageIndex
« Reply #181 on: June 13, 2019, 01:12:20 PM »
It' more than perfect if avatars appear on Recent Topic/Post also, can you help me? Thank you so much.

thx glad you like it,
The answer to your question will be no, because i no longer update the version for smf2.0.x, currently working on a mod update for smf2.1.x, maybe I will add this part to 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 shadav

  • Jr. Member
  • **
  • Posts: 208
  • Gender: Female
Re: Avatars on Board and/or MessageIndex
« Reply #182 on: August 30, 2019, 09:16:07 AM »
I was wondering if you could help me make this mod work with the Default Avatar mod
so that it will show the default avatars on the boards/child boards, instead of the "blank" default avatar
thank you

Offline Pipke

  • Full Member
  • ***
  • Posts: 505
    • #31970508 on GitHub
Re: Avatars on Board and/or MessageIndex
« Reply #183 on: August 31, 2019, 05:48:00 PM »
I was wondering if you could help me make this mod work with the Default Avatar mod
so that it will show the default avatars on the boards/child boards, instead of the "blank" default avatar
thank you

ok here we go, open Sources/abm_code.php

find:
Code: [Select]
$avatar = preg_replace($find[2], ' src="'.$settings['images_url']. '/abm_avatar.gif"', $avatar);
replace with:
Code: [Select]
if(!empty($modSettings['enable_default_avatar']) && !empty($modSettings['default_avatar_url']))
$avatar = preg_replace($find[2], ' src="'.$modSettings['default_avatar_url'].'"', $avatar);
else // No costum url set
$avatar = preg_replace($find[2], ' src="'.$settings['default_images_url'] . '/default_avatar.png"', $avatar);

find:
Code: [Select]
SELECT mem.id_member,
replace with:
Code: [Select]
SELECT mem.id_member, mem.gender,

find:
Code: [Select]
if (empty($avatar))
$avatar = $settings['images_url']. '/abm_avatar.gif';
replace with:
Code: [Select]
if (empty($avatar))
{
// Default
if(!empty($modSettings['enable_default_avatar']) && ($row['gender'] == 0) && !empty($modSettings['default_avatar_url']))
$avatar = $modSettings['default_avatar_url'];
else // No costum url set
$avatar = $settings['default_images_url'] . '/default_avatar.png';
// Male
if(!empty($modSettings['enable_default_avatar']) && ($row['gender'] == 1) && !empty($modSettings['default_male_avatar_url']))
$avatar = $modSettings['default_male_avatar_url'];
// Female
if(!empty($modSettings['enable_default_avatar']) && ($row['gender'] == 2) && !empty($modSettings['default_female_avatar_url']))
$avatar = $modSettings['default_female_avatar_url'];
}

see attached image for result.

uncheck the admin setting from Default Avatar Mod: Makes default avatars transparent when user logs out, as that would need more db queries and will slow down your site, and not really needed anyway.
« Last Edit: August 31, 2019, 06:02:23 PM by Pipke »
“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 shadav

  • Jr. Member
  • **
  • Posts: 208
  • Gender: Female
Re: Avatars on Board and/or MessageIndex
« Reply #184 on: September 01, 2019, 12:39:20 AM »
thank you, works perfectly and thanks for the tip about the transparent log off setting

Offline maglix04

  • Semi-Newbie
  • *
  • Posts: 22
Re: Avatars on Board and/or MessageIndex
« Reply #185 on: January 01, 2020, 06:18:12 AM »
Hello everyone and happy new year! Since I updated the forum to version 2.0.16 and also this morning to 2.0.17 the mod don't integrate well the image proxy function linking to images with http.
Solutions?
Sorry for my bad english

Offline Pipke

  • Full Member
  • ***
  • Posts: 505
    • #31970508 on GitHub
Re: Avatars on Board and/or MessageIndex
« Reply #186 on: January 03, 2020, 05:10:31 PM »
Hello everyone and happy new year! Since I updated the forum to version 2.0.16 and also this morning to 2.0.17 the mod don't integrate well the image proxy function linking to images with http.
Solutions?
Sorry for my bad english

Mod updated:

Version 2.0.17 - Jan 3, 2020
- Fixed: Script proxy for external avatar urls
“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 maglix04

  • Semi-Newbie
  • *
  • Posts: 22
Re: Avatars on Board and/or MessageIndex
« Reply #187 on: January 03, 2020, 05:28:56 PM »
Perfect! Thank you  ;)

Offline Pipke

  • Full Member
  • ***
  • Posts: 505
    • #31970508 on GitHub
Re: Avatars on Board and/or MessageIndex
« Reply #188 on: February 16, 2020, 03:34:44 PM »
Same mod for SMF 2.1.* can be found 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 pocttopus

  • Jr. Member
  • **
  • Posts: 381
  • Low pressure
    • @pocttopus on Twitter
    • mkreef.com
Re: Avatars on Board and/or MessageIndex
« Reply #189 on: February 16, 2020, 05:31:47 PM »
What's today update changelog?  ???
Version: smf 2.0.17
PHP version: 7.3.6

Offline Pipke

  • Full Member
  • ***
  • Posts: 505
    • #31970508 on GitHub
Re: Avatars on Board and/or MessageIndex
« Reply #190 on: February 17, 2020, 05:12:27 PM »
What's today update changelog?  ???

Nothing i just added comment where to find same mod for SMF 2.1
“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

  • Jr. Member
  • **
  • Posts: 381
  • Low pressure
    • @pocttopus on Twitter
    • mkreef.com
Re: Avatars on Board and/or MessageIndex
« Reply #191 on: February 18, 2020, 09:18:00 AM »
What's today update changelog?  ???

Nothing i just added comment where to find same mod for SMF 2.1
Thanks.  :)
Version: smf 2.0.17
PHP version: 7.3.6

Offline jsx

  • Full Member
  • ***
  • Posts: 437
  • Gender: Male
Re: Avatars on Board and/or MessageIndex
« Reply #192 on: March 24, 2020, 01:56:12 PM »
Hi Pipke,

Your modification causes errors in the forum. When I enter a topic and when I want to search the word through the search engine in this topic, an error appears. How to fix it?



Error log:





The Great Winged Hussars

https://www.youtube.com/watch?v=eWkrQQly6xU

We remember
In september
When The Winged Hussars arrived!

Offline Pipke

  • Full Member
  • ***
  • Posts: 505
    • #31970508 on GitHub
Re: Avatars on Board and/or MessageIndex
« Reply #193 on: March 24, 2020, 04:38:29 PM »
@jsx to me i wonder how you get these errors on the search page as the mod isn't suppose to run on that action, as my code has 3 conditions wich must be passed:

if ($context['current_action'] == 'forum' ||  $context['current_action'] == 'unreadreplies' || $context['current_action'] == 'unread')

and

if (isset($context['topics']) && !empty($context['topics']))

and

if (!empty($context['abm_user_id']))

At this moment i have no clue and on my test site i'm not getting errors on the search page/results, maybe some other mod conflict with it?
i have a hard fix for you:

in .../Sources/abm_code.php

Code: (find line 137) [Select]
if (isset($context['current_action']) && $context['current_action'] == 'credits')

Code: (add before) [Select]
if (isset($context['current_action']) && $context['current_action'] == 'search2')
return;




“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 jsx

  • Full Member
  • ***
  • Posts: 437
  • Gender: Male
Re: Avatars on Board and/or MessageIndex
« Reply #194 on: March 25, 2020, 04:12:56 AM »
@Pipke

I understand, but after uninstalling your modification, the search engine works properly. This error does not appear:



After adding this code, the search engine still does not work properly.

Critical Error:

(...)index.php?action=search2

Wrong value type sent to the database. Array of integers expected. (id)

Function: abm_mod_setup

File: /home(...)Sources/abm_code.php

Line: 183

I can uninstall all other modifications and install only your modification and then check if this error still occurs.
The Great Winged Hussars

https://www.youtube.com/watch?v=eWkrQQly6xU

We remember
In september
When The Winged Hussars arrived!

Offline jsx

  • Full Member
  • ***
  • Posts: 437
  • Gender: Male
Re: Avatars on Board and/or MessageIndex
« Reply #195 on: March 26, 2020, 02:23:31 PM »
@Pipke

I installed a clean forum and uploaded all the modifications that are used in the official forum and this error is not there. So what can cause this error? Do you have any idea?

Wrong value type sent to the database. Array of integers expected. (id)

As I wrote earlier. When I uninstall the Avatars on Board and/or MessageIndex modification, the search engine works properly.
The Great Winged Hussars

https://www.youtube.com/watch?v=eWkrQQly6xU

We remember
In september
When The Winged Hussars arrived!

Offline Pipke

  • Full Member
  • ***
  • Posts: 505
    • #31970508 on GitHub
Re: Avatars on Board and/or MessageIndex
« Reply #196 on: March 26, 2020, 07:01:47 PM »
@jsx next try to fix your error

in .../Sources/abm_code.php

Code: (find ) [Select]
foreach(array($abm_topics['id']) as $context['abm_user_id'][]) {}

Code: (replace by) [Select]
if (isset($abm_topics['id']))
foreach(array($abm_topics['id']) as $context['abm_user_id'][]) {}

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 jsx

  • Full Member
  • ***
  • Posts: 437
  • Gender: Male
Re: Avatars on Board and/or MessageIndex
« Reply #197 on: March 27, 2020, 03:15:33 AM »
@Pipke

Now this solution has fixed the problem. The search engine works and no errors are generated. Thanks for the help. :) 8)

This solution is only for me, will you make this change for modification?


The Great Winged Hussars

https://www.youtube.com/watch?v=eWkrQQly6xU

We remember
In september
When The Winged Hussars arrived!

Offline Pipke

  • Full Member
  • ***
  • Posts: 505
    • #31970508 on GitHub
Re: Avatars on Board and/or MessageIndex
« Reply #198 on: March 27, 2020, 08:48:26 AM »
@Pipke

Now this solution has fixed the problem. The search engine works and no errors are generated. Thanks for the help. :) 8)
Glad it's been sorted now ;)

This solution is only for me, will you make this change for modification?
Hmmm, not sure where the problem is, i still think it comes from another mod wich you have installed, on a clean smf install with only my mod no errors. Ill wait if more users report this issue.
“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 jsx

  • Full Member
  • ***
  • Posts: 437
  • Gender: Male
Re: Avatars on Board and/or MessageIndex
« Reply #199 on: March 27, 2020, 10:28:04 AM »
@Pipke

I understand, but a new error occurred after moving the thread to another board.

index.php?action=movetopic;topic=1370.0
2: array_filter() expects parameter 1 to be array, null given
File: .../Sources/abm_code.php
Line: 316

The Great Winged Hussars

https://www.youtube.com/watch?v=eWkrQQly6xU

We remember
In september
When The Winged Hussars arrived!