Advertisement:
GCWebhosting

Author Topic: How To Add A Widget  (Read 793 times)

Offline delta5

  • Jr. Member
  • **
  • Posts: 281
    • @@kd8hmo on Twitter
    • FedUpWithLiberals.com
How To Add A Widget
« on: January 16, 2019, 08:30:28 PM »
Hi guys,
I'm trying to start a Discord server for my forum. Discord now has a website widget. You create a server, then click a tab and it generates a code snippet that you paste where you want it. I would like to put it where the smfpacks shout box is, but I have no idea where to paste that code. Any help would be appreciated.
Thanks

Offline Looking

  • SMF Hero
  • ******
  • Posts: 2,350
  • SMF Customization
    • jeanborde on Facebook
    • SMF Custom Themes & Custom Coding
Re: How To Add A Widget
« Reply #1 on: January 16, 2019, 08:35:23 PM »
Normally you would edit your template, but this might be of help: Discord Web Hooks.

Offline delta5

  • Jr. Member
  • **
  • Posts: 281
    • @@kd8hmo on Twitter
    • FedUpWithLiberals.com
Re: How To Add A Widget
« Reply #2 on: January 16, 2019, 08:40:24 PM »
Thanks! I will check that out. Any idea what that mod does?

Offline Looking

  • SMF Hero
  • ******
  • Posts: 2,350
  • SMF Customization
    • jeanborde on Facebook
    • SMF Custom Themes & Custom Coding
Re: How To Add A Widget
« Reply #3 on: January 16, 2019, 09:06:11 PM »
Check the description to see if it will do what your widget does.

Offline delta5

  • Jr. Member
  • **
  • Posts: 281
    • @@kd8hmo on Twitter
    • FedUpWithLiberals.com
Re: How To Add A Widget
« Reply #4 on: January 16, 2019, 09:27:06 PM »
That's what I was wondering. Not much about it there. I'm wondering if it sends texting from discord like an RSS feed. This widget is brand new, so maybe I wont need that mod?

Offline Looking

  • SMF Hero
  • ******
  • Posts: 2,350
  • SMF Customization
    • jeanborde on Facebook
    • SMF Custom Themes & Custom Coding
Re: How To Add A Widget
« Reply #5 on: January 16, 2019, 09:58:51 PM »
The mod was just an option I shared because its already integrated with SMF/Discord and you do not know how to install the one you have.

You will need to learn how to edit your templates to insert your code. That is not something I can show you how to do here.

Offline delta5

  • Jr. Member
  • **
  • Posts: 281
    • @@kd8hmo on Twitter
    • FedUpWithLiberals.com
Re: How To Add A Widget
« Reply #6 on: January 19, 2019, 08:16:39 PM »
Ok, i think im ready to add this code. Can anyone tell me which template to edit? I want to put the widget on the front page, where the shoutbox would normally sit.

Offline Gwenwyfar

  • Great Wizard's familiar
  • SMF Friend
  • SMF Hero
  • *
  • Posts: 2,263
  • Gender: Female
Re: How To Add A Widget
« Reply #7 on: January 20, 2019, 04:44:34 AM »
By front page you mean the board index?
Energy follows attention.

There is nothing more precious than being yourself and following your heart.

Offline delta5

  • Jr. Member
  • **
  • Posts: 281
    • @@kd8hmo on Twitter
    • FedUpWithLiberals.com
Re: How To Add A Widget
« Reply #8 on: January 20, 2019, 07:35:41 AM »
Yes, just the index.

Offline Gwenwyfar

  • Great Wizard's familiar
  • SMF Friend
  • SMF Hero
  • *
  • Posts: 2,263
  • Gender: Female
Re: How To Add A Widget
« Reply #9 on: January 20, 2019, 07:58:38 AM »
The template for that is in Themes/BoardIndex.template.php
Energy follows attention.

There is nothing more precious than being yourself and following your heart.

Offline delta5

  • Jr. Member
  • **
  • Posts: 281
    • @@kd8hmo on Twitter
    • FedUpWithLiberals.com
Re: How To Add A Widget
« Reply #10 on: January 20, 2019, 12:35:29 PM »
Thanks! The widget will show on all themes then?

Offline Gwenwyfar

  • Great Wizard's familiar
  • SMF Friend
  • SMF Hero
  • *
  • Posts: 2,263
  • Gender: Female
Re: How To Add A Widget
« Reply #11 on: January 20, 2019, 01:30:56 PM »
If they do not have their own copy of BoardIndex.template.php, they should. It will use the default file in that case. If they have their own file, you have to edit that too.
Energy follows attention.

There is nothing more precious than being yourself and following your heart.

Offline delta5

  • Jr. Member
  • **
  • Posts: 281
    • @@kd8hmo on Twitter
    • FedUpWithLiberals.com
Re: How To Add A Widget
« Reply #12 on: January 21, 2019, 08:33:01 PM »
Interesting, i get a syntax error. I guess I will just pay someone to do it for my since my html skills are below zero lol

Thanks for the help.