Flatpress blog with discord webhook

This is the right place to report general bugs, make suggestions or ask for help.
User avatar
ScrapBlox
Posts: 18
Joined: Sat Mar 12, 2022 2:37 am
Location: United States, OHIO
Contact:

Flatpress blog with discord webhook

Post by ScrapBlox » Sun May 01, 2022 8:57 pm

How would I do this?
So when a admin or I make a blog post I want it to create the post AND send a message to discord using the discord webhook system
I know how to create the discord webhook I just don't know how to send a POST request to it with some blog information
Thank you in advance 8-)
Content Creator | Developer | Gamer
~ ScrapBlox (Alec)

User avatar
Madekozu
Posts: 45
Joined: Thu Apr 21, 2022 8:41 am
Location: Hemmingen (Germany, BaWü)
Contact:

Re: Flatpress blog with discord webhook

Post by Madekozu » Sun May 01, 2022 9:43 pm

I don't know anything about FlatPress itself. Maybe a detour via the feed provided by FlatPress will help.

-->> https://newbieto.com/gaming/how-to-setu ... ith-ifttt/
Bäume spenden Schatten und Kettensägen Licht!

Tongara
Posts: 77
Joined: Wed Jan 22, 2020 11:09 am
Location: Birmingham, UK
Contact:

Re: Flatpress blog with discord webhook

Post by Tongara » Sun May 01, 2022 10:32 pm

Yeah, doing it as above with the RSS feed provided in Flatpress is how I have it set up on IFTTT.
Screenshot_20220501-233031_Chrome.jpg
Screenshot_20220501-233031_Chrome.jpg (98.31 KiB) Viewed 4553 times

User avatar
ScrapBlox
Posts: 18
Joined: Sat Mar 12, 2022 2:37 am
Location: United States, OHIO
Contact:

Re: Flatpress blog with discord webhook

Post by ScrapBlox » Mon May 02, 2022 12:35 am

Maybe a detour via the feed provided by FlatPress will help.
Yeah, doing it as above with the RSS feed provided in Flatpress is how I have it set up on IFTTT.
Hi thanks for the suggestion to use IFTTT but how do I setup RSS with my blog?
EDIT:
1.png
1.png (24.53 KiB) Viewed 4547 times
This link is going to the rss.php page
That's the error I get
Content Creator | Developer | Gamer
~ ScrapBlox (Alec)

User avatar
Madekozu
Posts: 45
Joined: Thu Apr 21, 2022 8:41 am
Location: Hemmingen (Germany, BaWü)
Contact:

Re: Flatpress blog with discord webhook

Post by Madekozu » Mon May 02, 2022 1:00 pm

That's weird - FlatPress's RSS feed is actually clean. Are you using the current version 1.2.1 of FlatPress?

Can you test your feed here? I'm afraid there's a mistake somewhere.
-->> https://validator.w3.org/feed/
Bäume spenden Schatten und Kettensägen Licht!

User avatar
ScrapBlox
Posts: 18
Joined: Sat Mar 12, 2022 2:37 am
Location: United States, OHIO
Contact:

Re: Flatpress blog with discord webhook

Post by ScrapBlox » Mon May 02, 2022 1:11 pm

Madekozu wrote: Mon May 02, 2022 1:00 pm That's weird - FlatPress's RSS feed is actually clean. Are you using the current version 1.2.1 of FlatPress?

Can you test your feed here? I'm afraid there's a mistake somewhere.
-->> https://validator.w3.org/feed/
Ok so I just got done doing that and here is the results of it
flatpressVersion.png
flatpressVersion.png (5.19 KiB) Viewed 4523 times
Version of the blog ^^^
feedValidator.png
feedValidator.png (18.44 KiB) Viewed 4523 times
Blog feed validation ^^^
No clue what the feed validation means
Content Creator | Developer | Gamer
~ ScrapBlox (Alec)

User avatar
Madekozu
Posts: 45
Joined: Thu Apr 21, 2022 8:41 am
Location: Hemmingen (Germany, BaWü)
Contact:

Re: Flatpress blog with discord webhook

Post by Madekozu » Mon May 02, 2022 1:24 pm

I think I've got the right feed and I'm taking a closer look at it. 8-)

At the very top are three lines that aren't coming from FlatPress itself and are breaking the feed. Now we just need to figure out where the 3 lines are coming from.

Code: Select all

<head>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
</head>
Possible causes would be changes to the template or any plugins. Can you look in your /fp-interface/sharedtpls/rss.tpl to see if you happen to find the three lines at the top? If so - just get out - they really don't belong there.
Bäume spenden Schatten und Kettensägen Licht!

User avatar
ScrapBlox
Posts: 18
Joined: Sat Mar 12, 2022 2:37 am
Location: United States, OHIO
Contact:

Re: Flatpress blog with discord webhook

Post by ScrapBlox » Mon May 02, 2022 1:29 pm

Madekozu wrote: Mon May 02, 2022 1:24 pm I think I've got the right feed and I'm taking a closer look at it. 8-)

At the very top are three lines that aren't coming from FlatPress itself and are breaking the feed. Now we just need to figure out where the 3 lines are coming from.

Code: Select all

<head>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
</head>
Possible causes would be changes to the template or any plugins. Can you look in your /fp-interface/sharedtpls/rss.tpl to see if you happen to find the three lines at the top? If so - just get out - they really don't belong there.
Yo thank you so much the <head> & <meta viewport> tags were in the index.php file I've removed them and IFTTT will accept the URL now :D
Content Creator | Developer | Gamer
~ ScrapBlox (Alec)

User avatar
Madekozu
Posts: 45
Joined: Thu Apr 21, 2022 8:41 am
Location: Hemmingen (Germany, BaWü)
Contact:

Re: Flatpress blog with discord webhook

Post by Madekozu » Mon May 02, 2022 1:37 pm

Very nice, glad I could help. :)

However, I wouldn't have come across index.php - I'll have to remember that.
Bäume spenden Schatten und Kettensägen Licht!

Tongara
Posts: 77
Joined: Wed Jan 22, 2020 11:09 am
Location: Birmingham, UK
Contact:

Re: Flatpress blog with discord webhook

Post by Tongara » Mon May 02, 2022 4:21 pm

Brilliant!
Hopefully the information in here will help future users~

I wonder why that was giving an error though? Maybe something for the Flatpress devs to look into.

Post Reply

Who is online

Users browsing this forum: No registered users and 47 guests