Simple Machines Community Forum

Customizing SMF => Modifications and Packages => Topic started by: vbgamer45 on February 18, 2021, 01:19:30 PM

Title: Discord Who's Online
Post by: vbgamer45 on February 18, 2021, 01:19:30 PM
Link to Mod (https://custom.simplemachines.org/mods/index.php?mod=4281)

Discord Who's Online
By: vbgamer45

For: SMF 2.1.x, SMF 2.0.x

Adds who is online for a discord channel below who's online a forum.
Requires the Server Widget to be enabled under the Widget section for the channel settings.
Also requires cURL to be installed with PHP


Based on the idea from Arantor/StoryBB.


https://www.smfhacks.com
Title: Re: Discord Who's Online
Post by: Aleksi "Lex" Kilpinen on February 20, 2021, 02:28:58 AM
Cool. Seems to me though that the "Show discord avatars.." setting does nothing. Either way it's set, the avatars are shown.
Title: Re: Discord Who's Online
Post by: vbgamer45 on February 20, 2021, 02:22:30 PM
Fixed

1.1
!Fixed setting for showing avatars not working.
!Clear cache when saving setings
Title: Re: Discord Who's Online
Post by: Aleksi "Lex" Kilpinen on February 20, 2021, 02:26:19 PM
Seems to work now, thanks! :)
Title: Re: Discord Who's Online
Post by: vbgamer45 on February 20, 2021, 02:31:13 PM
Glad to help
Title: Re: Discord Who's Online
Post by: Jelle Mees on March 18, 2021, 04:06:00 PM
Can you make it so that the usernames are aligned in the center of the avatar and not at the bottem. Like this:

(https://i.postimg.cc/BnPsJxV4/Naamloos.png)

It's an easy fix. Simply add vertical-align:middle to the img style.

I also added padding-right:5px . Looks much nicer. Try it ;)
Title: Re: Discord Who's Online
Post by: vbgamer45 on March 18, 2021, 04:32:42 PM
Change made the vertical-align middle thanks.
Title: Re: Discord Who's Online
Post by: efk on March 18, 2021, 07:56:43 PM
Can it be displayed inside block on portal and without avatar, as a list of 10 names for example and with scroll button to see who else is active?
Title: Re: Discord Who's Online
Post by: vbgamer45 on March 18, 2021, 08:08:02 PM
Could be possible include discordonline.php
THen call
discordonline_boardlayout();
You can then customize your own
template_ic_block_discord_whos_online() for the layout
Title: Re: Discord Who's Online
Post by: efk on March 18, 2021, 11:50:04 PM
Could be possible include discordonline.php
THen call
discordonline_boardlayout();
You can then customize your own
template_ic_block_discord_whos_online() for the layout
Thanks this can be useful for everyone.