2017-10-24, 10:13 AM
2017-10-27, 07:26 PM
I've been working on multiple instances of the plugin. Unfortunately. it's not possible to do it automatically, BUT! I've made a workaround.
If you want to have multiple instances of this plugin you have to:
1. Move all files from 'inc' to your mybb 'inc' folder as always
2. Copy file discord_webhooks{suffix}.php to your mybb's inc/plugins folder
3. Replace {suffix} that filename to your suffix code (for example: _test1, so the filename should looks like discord_webhooks_test1.php)
4. Edit that file, find and replace all {suffix} text to string you have replaced the filename (eg. {suffix} => _test1}
Now you have another instance of discord plugin
IMPORTANT! You HAVE TO use only alphanumeric or underscore characters for suffix as it's contained into the function names. Suffix shouldn't contain special characters, punctuations characters, whitespaces, etc.!
//Edit: Of course I'll update multiinstance code always when normal code will be updated. I'll work on other issues on a sunday evening
If you want to have multiple instances of this plugin you have to:
1. Move all files from 'inc' to your mybb 'inc' folder as always
2. Copy file discord_webhooks{suffix}.php to your mybb's inc/plugins folder
3. Replace {suffix} that filename to your suffix code (for example: _test1, so the filename should looks like discord_webhooks_test1.php)
4. Edit that file, find and replace all {suffix} text to string you have replaced the filename (eg. {suffix} => _test1}
Now you have another instance of discord plugin
IMPORTANT! You HAVE TO use only alphanumeric or underscore characters for suffix as it's contained into the function names. Suffix shouldn't contain special characters, punctuations characters, whitespaces, etc.!
//Edit: Of course I'll update multiinstance code always when normal code will be updated. I'll work on other issues on a sunday evening
2017-10-29, 02:08 AM
Awesome! Ill give this a try tonight when I get back to my computer
2017-11-24, 01:52 AM
I can't seem to get this to work. Is it because forum urls end with .html? So I am wondering if it is because search engine friendly urls are enabled? so this showthread.php?tid=1 becomes thread-1.html.
Thanks
Thanks
2017-11-24, 02:09 AM
Yes, it's because of friendly URLs. I do not have as much time as I would like to because of work. It should be fixed in the first days of december
2017-11-24, 02:13 AM
(2017-11-24, 02:09 AM)ryczypior Wrote: [ -> ]Yes, it's because of friendly URLs. I do not have as much time as I would like to because of work. It should be fixed in the first days of december
I could edit the code but wasn't sure if I could easily. I suppose I can turn off friendly urls.
How long does it normally take to post? Or is it pretty fast? I turned off friendly urls and still not working.
2017-11-29, 03:31 AM
Can't wait for you to fix it for friendly urls. Great work on this! ty
2017-12-01, 05:48 AM
Does this require the pluginlibrary?
2017-12-05, 01:04 AM
After a while of using this, I've yet to come across any problems, so +1 for that!
There's really only one thing that I can think of that would make this webhook plugin complete.
And that would be a way to add embeds in the messages, instead of just the default text message.
With embeds, we'd be able to make the notifications look quite a bit more appealing, such as something along these lines:
Something that could pull the posters avatar URL, and either the site's favicon or a custom image, would definitely be nice, in my personal opinion.
EDIT. Well, I have experienced one problem haha. When I get post notifications, the URLs don't work for some reason.
#2nd EDIT.
Fixed the problem, for some reason, under "static public function newThread($entry)" the link showed up fine "$discordWebhook->getFullUrl('/forums/showthread.php?tid='" but under "static public function newPost($entry)" the link showed up wrong "$discordWebhook->getFullUrl('/showthread.php?tid='". Don't know if this was just a me-case, or if it's a problem others might run into.
There's really only one thing that I can think of that would make this webhook plugin complete.
And that would be a way to add embeds in the messages, instead of just the default text message.
With embeds, we'd be able to make the notifications look quite a bit more appealing, such as something along these lines:
Something that could pull the posters avatar URL, and either the site's favicon or a custom image, would definitely be nice, in my personal opinion.
EDIT. Well, I have experienced one problem haha. When I get post notifications, the URLs don't work for some reason.
#2nd EDIT.
Fixed the problem, for some reason, under "static public function newThread($entry)" the link showed up fine "$discordWebhook->getFullUrl('/forums/showthread.php?tid='" but under "static public function newPost($entry)" the link showed up wrong "$discordWebhook->getFullUrl('/showthread.php?tid='". Don't know if this was just a me-case, or if it's a problem others might run into.
2017-12-05, 06:57 PM
I have same issue. Looking forward, I hope there will be a new release soon