Can you make a JS that will be triggered by a new post?
2 posters
Page 1 of 1
Can you make a JS that will be triggered by a new post?
If there's a new post in specific forum, it will be triggered this JavaScript.
FYI, I'm not a founder, I'm just an administrator. So, I can't access to some authorization that founder can.
Thanks ahead of time!
FYI, I'm not a founder, I'm just an administrator. So, I can't access to some authorization that founder can.
Thanks ahead of time!
Re: Can you make a JS that will be triggered by a new post?
hello
i cannot fully understand what you are asking for can you please be more specific or put a screenshot
also please provide us with your forum url
thank you
i cannot fully understand what you are asking for can you please be more specific or put a screenshot
also please provide us with your forum url
thank you
Re: Can you make a JS that will be triggered by a new post?
I already have Javascript(JS) that will get topic titles for POSTing to another platform, like Discord.
But, I want to make it's triggered automatically by new posts.
So, I tried to make a Webhook by using the specific forum as base. It's like notification to platform which it will update automatically by new posts.
For now, I can make it POST by refreshing manually in specific page for now.
Forum url: http://thaistickman.thai-forum.net/
But, I want to make it's triggered automatically by new posts.
So, I tried to make a Webhook by using the specific forum as base. It's like notification to platform which it will update automatically by new posts.
For now, I can make it POST by refreshing manually in specific page for now.
Forum url: http://thaistickman.thai-forum.net/
Re: Can you make a JS that will be triggered by a new post?
I am not sure how Discord works but I suppose they have an API which you can access. After you post a topic on the forum, it redirects you to a /post page with a message life "Topic was posted". You basically need a javascript that gets executed on that page, looks for the Topic was posted message, then makes a call to the Discord API. I can help you if you need.
Guest- Guest
Re: Can you make a JS that will be triggered by a new post?
Menim wrote:I am not sure how Discord works but I suppose they have an API which you can access. After you post a topic on the forum, it redirects you to a /post page with a message life "Topic was posted". You basically need a javascript that gets executed on that page, looks for the Topic was posted message, then makes a call to the Discord API. I can help you if you need.
I can't to find that redirect page in Admin panel, though. At least, It's not in what I can access to.
But, I'm already done with Discord part.
Also, Won't that trigger JS whenever the users post a new topic?
I might use the wrong word? By the forum, I mean one of row of forums like this.
(in red square.)
- Spoiler:
I want to make them to trigger after new topic in One of those forums.
Just like when Icon changed into 'New' when new topics came up.
- Spoiler:
I hope this specifies better.
Re: Can you make a JS that will be triggered by a new post?
You want the js to run when a topic is posted or what?
Guest- Guest
Re: Can you make a JS that will be triggered by a new post?
Menim wrote:You want the js to run when a topic is posted or what?
Yes, but only on one of forum.
Re: Can you make a JS that will be triggered by a new post?
That's going to be a little bit harder. Your code has to detect the /post?f=ID&mode=newtopic page, where ID is the ID of the forum whose topics you need. Than listen the the submit event on the form there and send a call to the api when the user submits.
Guest- Guest
Re: Can you make a JS that will be triggered by a new post?
Come to update a bit. I already make my code to detect that page.
But, I'm not sure how to make it listen the submit form, because I don't know what is the id for the form.
I tried to check with view page source and such. I still stumble anyhow. Any idea?
But, I'm not sure how to make it listen the submit form, because I don't know what is the id for the form.
I tried to check with view page source and such. I still stumble anyhow. Any idea?
- Code:
if(!(window.location.href.indexOf("/post?f=") > -1))
{ return;
}
$(document).ready(function() {
/*$(document).addEventListener('submit',function()
{ alert("sended submission!2");
//webHook('{ "content": "1 founda new post :>" }');
return false;
});*/
});
}
Re: Can you make a JS that will be triggered by a new post?
The form has no id here on the support forum. Not sure about your forum. You can use
or even simply
if you don't have any other forms on the page.
|
|
Guest- Guest
Similar topics
» Topic count is triggered by script
» Make post box on the left?
» How to make post border?
» how can i make a post?
» How to make line on post?
» Make post box on the left?
» How to make post border?
» how can i make a post?
» How to make line on post?
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum