News:

Join the Facebook Fan Page.

Main Menu

How To Add A Widget

Started by delta5, January 16, 2019, 08:30:28 PM

Previous topic - Next topic

delta5

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

Looking

Normally you would edit your template, but this might be of help: Discord Web Hooks.

delta5

Thanks! I will check that out. Any idea what that mod does?

Looking

Check the description to see if it will do what your widget does.

delta5

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?

Looking

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.

delta5

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.

Gwenwyfar

By front page you mean the board index?
"It is impossible to communicate with one that does not wish to communicate"

delta5


Gwenwyfar

The template for that is in Themes/BoardIndex.template.php
"It is impossible to communicate with one that does not wish to communicate"

delta5

Thanks! The widget will show on all themes then?

Gwenwyfar

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.
"It is impossible to communicate with one that does not wish to communicate"

delta5

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.

Advertisement: