News:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

Main Menu

Discord Who's Online

Started by vbgamer45, February 18, 2021, 01:19:30 PM

Previous topic - Next topic

vbgamer45

Link to the mod

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
Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

Aleksi "Lex" Kilpinen

Cool. Seems to me though that the "Show discord avatars.." setting does nothing. Either way it's set, the avatars are shown.
Slava
Ukraini!


"Before you allow people access to your forum, especially in an administrative position, you must be aware that that person can seriously damage your forum. Therefore, you should only allow people that you trust, implicitly, to have such access." -Douglas

How you can help SMF

vbgamer45

Fixed

1.1
!Fixed setting for showing avatars not working.
!Clear cache when saving setings
Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

Aleksi "Lex" Kilpinen

Slava
Ukraini!


"Before you allow people access to your forum, especially in an administrative position, you must be aware that that person can seriously damage your forum. Therefore, you should only allow people that you trust, implicitly, to have such access." -Douglas

How you can help SMF

vbgamer45

Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

Jelle Mees

#5
Can you make it so that the usernames are aligned in the center of the avatar and not at the bottem. Like this:



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

vbgamer45

Change made the vertical-align middle thanks.
Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

efk

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?

vbgamer45

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
Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

efk

Quote from: 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
Thanks this can be useful for everyone.

StarredSkies

This is a really cool addition! Might have to try it out.

revgreed

Hi,

I just installed this mod on the following:

SMF 2.1.2
Default theme

Under the "Info Center" where the "Discord Who's Online" and the "Visit Discord Server" wording is displayed - it's being displayed as such:

Discord Who's Online Visit Discord Server

And I was wondering if I could change it to where there shows an obvious separation between the two.  Such as a hyphen to become:

Discord Who's Online - Visit Discord Server

Where would I go to make that change?

I attached an image of what I'm referring to:



https://ibb.co/m6zcgW3

revgreed

Quote from: revgreed on May 22, 2022, 12:19:58 AMHi,

I just installed this mod on the following:

SMF 2.1.2
Default theme

Under the "Info Center" where the "Discord Who's Online" and the "Visit Discord Server" wording is displayed - it's being displayed as such:

Discord Who's Online Visit Discord Server

And I was wondering if I could change it to where there shows an obvious separation between the two.  Such as a hyphen to become:

Discord Who's Online - Visit Discord Server

Where would I go to make that change?

I attached an image of what I'm referring to:



https://ibb.co/m6zcgW3

I believe I figured it out.  Here's what I did.

I went to "..Themes/default/languages/discordonline.english.php"

And find:

$txt['discord_online_title'] = 'Discord Who\'s Online';
Change to:

$txt['discord_online_title'] = 'Discord Who\'s Online - ';
Although it worked perfectly - I'm just not sure it's the correct way.

vbgamer45

That is the correct way good job!
Community Suite for SMF - Take your forum to the next level built for SMF, Gallery,Store,Classifieds,Downloads,more!

SMFHacks.com -  Paid Modifications for SMF

Mods:
EzPortal - Portal System for SMF
SMF Gallery Pro
SMF Store SMF Classifieds Ad Seller Pro

Advertisement: