News:

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

Main Menu

Avatars on Board and/or MessageIndex

Started by Pipke, April 05, 2016, 06:27:00 PM

Previous topic - Next topic

dansal

I want to minimize my topic, in the list of forums, and in the section of details make a unique link where the avatar, date and title of the message. To make it more comfortable to use with a mobile device.

It is a small community where almost everyone has their full profile

razzy

Hello. I was directed to post my small issue here, as I posted in the wrong place yet again.  :-[

Anyways. It's installed just fine, and is pretty slick. I love it. It's a fantastic mod.

Although once a category has been posted in, it shows 'abm' above the who posted last bit. I could try reading through the code to see if I cant find where that bugger is, but I was hoping someone knew about the issue already and could help.

Thank you. =)

Pipke

 
Quote from: razzy on August 18, 2017, 06:31:12 PM
Hello. I was directed to post my small issue here, as I posted in the wrong place yet again.  :-[

Anyways. It's installed just fine, and is pretty slick. I love it. It's a fantastic mod.

Although once a category has been posted in, it shows 'abm' above the who posted last bit. I could try reading through the code to see if I cant find where that bugger is, but I was hoping someone knew about the issue already and could help.

Thank you. =)


As it looks your using an other theme then default, wich theme is that and can you post your forum url with mod installed so i can take a look and maybe solve it for you.
"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! ☕

aegersz

this mod ground my system to a halt on numerous occasions but i'm giving it another go because it's a beauty ! fingers crossed.
The configuration of my Linux VPS (SMF 2.0 with 160+ 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

razzy

I'm using a Dziner theme called Gearbox2.0. Will pm the link. =)

Pipke

Quote from: razzy on August 19, 2017, 01:48:13 PM
I'm using a Dziner theme called Gearbox2.0. Will pm the link. =)

note that this fix is only for Gearbox2.0 theme.
open file Sources/abm_code.php

find in that file on line 393

'~<p>abm<!----></p>~',


replace by

'~abm<!---->~',


save file and reupload 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! ☕

razzy

Easily located the file and line 393. replaced the code exactly how you said and the 'abm' is still showing where it was before.

I'll open the file to edit again, and see if I'm missing something.


combing through this file, and not really seeing anything outside the ordinary. (given I'm not well versed in .php. i make things pretty. lol)

Only thing around the area that made me wonder, is this...  $abm ='';

// remove the 'abm_id={}' text
$context['html_headers'] .= '
<style type="text/css">
.lastpost img {
color: rgba(0,0,0,0);
font-size: 1px;
}
.subject img {
color: rgba(0,0,0,0);
font-size: 1px;
}
</style>';

  $abm ='';

// Find in messages the outprinted topics

Pipke

@razzy ive tested in chrome and firefox, the fix i posted should do the job, do you use any other browser?
Can you attach the file with the edit you made.
"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! ☕

Kindred

Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

razzy

I'm going to have to see about working all this out. Something has gone very wrong with me trying to rush through this. The board package manager says the mod isnt there, but the mod settings still show in the Modification Settings.

So I logged into the Cpanel, and it shows the zip file still there. So I downloaded it and unzipped it to magically find it empty...?

the kicker, is the mod still shows up in the board and on display. I'll post again once I figured out wth is going on. Thank you for the help so far and I'm sorry for this as I've been out of designing anything for several years now.

razzy

So the fix suggested by Pipke works flawlessly now. Big huge thank you for everything, including your patience.

Somehow the entire mod's zip was blanked. I havent used .zip in ages, until recently I've always used .rar and because of that I somehow erased everything but the fixed php file. lol

and Also thank you Kindred, that was a very sound suggestion.

<3<3

MartiMedia

Hi @Pipke, do you still have version 1.4 of the mod available for download? That version produced an error, and it seems to have slipped back into version 1.9 but probably it's my fault manually merging sources. I'd like to compare 1.4 with 1.5 (which I still have a copy of and where the bug was solved).
More detail: it's the 'Wrong value type sent to the database. Array of integers expected. (id)' in function abm_mod_setup (maybe you have the code snippet that changed there with the 1.4->1.5 change?)

Cheers, I hope someone can help me (I'm no PHP coder..)

Marti

Pipke

@MartiMedia i would like to know how you got that error on v1.9 and where.
"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! ☕

MartiMedia

Smart me, I just cleared the logs a few days ago (and reported this error), and now I don't seem to be able to reproduce it atm. I recall it had to do with the 'last poster' and having no avatar, but not sure.. Anyway, if you still have the 1.4 package I can compare it with 1.5 to look for that difference. I'm at 1.9 on my production site, but somehow a code snippet from 1.4 seems to have slid back in (my reasoning may be wrong of course) by some manual edits I did. I'll post when the error is raised again, but in the meanwhile, can you post or mail me the 1.4 version? That would be great.. Thanks for always being helpful Pipke..

Pipke

Quote from: MartiMedia on September 28, 2017, 06:07:32 PM
I'll post when the error is raised again

ok ill wait for that then if it happens agian, in meanwhile this is solved.

Quote from: MartiMedia on September 28, 2017, 06:07:32 PM
can you post or mail me the 1.4 version?

i dont have that version anymore.
"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! ☕

Mochi

Hello.  :)

How can I hide the avatars from guests?

Pipke

Quote from: Mochi on November 19, 2017, 10:37:54 AM
Hello.  :)

How can I hide the avatars from guests?

in file Sources/abm_code.php

Code (find) Select

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


Code (replace by) Select

if ($context['user']['is_guest'])
return;

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


and

Code (find) Select

if (isset($_REQUEST['xml']))
return $avatar;


Code (replace by) Select

if ($context['user']['is_guest'])
return $avatar;

if (isset($_REQUEST['xml']))
return $avatar;
"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! ☕

Mochi


maglix04

Thank you for this beautiful mod, but it do not use proxy in avatar images in the forum's home
Solution?

Dav999

I've been using this mod for a month now and I like it. :)

It just doesn't seem to be compatible with PHP 7.1. On PHP 7.0.26 the mod works fine, but if I try using PHP 7.1.12, the forum index breaks:



That particular error message comes with no extra information and is also not logged in either the forum or PHP error logs, but the following one shows up in the forum error log:

2: Illegal string offset 'value'
File: /home/X/public_html/forum/Sources/abm_code.php
Line: 292

Code (Sources/abm_code.php) Select
285: // Find in categories the outprinted boards ¿maybe not found logic?
286: if (isset($context['categories']) && !empty($context['categories']))
287: {
288: if (is_array($context['categories']))
289: foreach ($context['categories'] as $abm_id)
290: {
291: if (is_array($abm_id))
==>292: foreach($abm_id as $abm['value'][]) {}
293: }


(This also causes 3 error messages in index.template.php about the menu buttons not appearing.)

Also, as mentioned in the post above, it does not pass external avatar URLs through the image proxy in SMF 2.0.14+.

Advertisement: