Search found 1390 matches
Author
Message
 Topic: Discord Module
coRpSE

Replies: 20
Views: 171
 Forum:   Nuke Blocks / Modules Support   Posted: Sat Sep 30, 2023 3:13 pm   Subject: Re: Discord Module
n/p. I find looking at the order of what something does usually can turn up what the issue is, or at least get you in the general ballpark. This was a new one for me and I learned something from it, which will benefit others in the future if they have an issue similar to this one.

 Topic: Discord Module
coRpSE

Replies: 20
Views: 171
 Forum:   Nuke Blocks / Modules Support   Posted: Sat Sep 30, 2023 1:42 pm   Subject: Re: Discord Module
Yeah, just set it to 755 instead of 777. For security reasons, you shouldn't have that with that permission.
But glad to hear that we were able to get this solved and its working.

 Topic: Discord Module
coRpSE

Replies: 20
Views: 171
 Forum:   Nuke Blocks / Modules Support   Posted: Sat Sep 30, 2023 11:32 am   Subject: Re: Discord Module
Yup, I replied to your PM with another suggestion, basically, making sure that permissions are right. The way my system works is, it will first check to see if the cached file exist and is newer than X time. If the file doesn't exist, or is older X time, then it will make the cURL call and put the info into a cached file.

Once it puts the info into the cached file, the system then reads off of that cached file. By doing it this way, it save on it making a cURL on every page reload, which will in turn save your site and Discord's from getting too many API calls.

Now, we have determined that your site is allowing the API calls and is able to display the information, so that leads me to think that it is not either allowing the creation of the cache file, which would be the folder permission that I put in that PM, or, the file permissions, which would block the ability to write the info from the curl into that file.

 Topic: Discord Module
coRpSE

Replies: 20
Views: 171
 Forum:   Nuke Blocks / Modules Support   Posted: Sat Sep 30, 2023 8:39 am   Subject: Re: Discord Module
##daveran27703## Do any other cURL's work on your site?

I see that you have the cURL extensions installed, but have you done a phpinfo(); to verify that it is enabled?

PHP:  [ Select all ]

<?php
phpinfo
();
?>


You can run a test script. I put one together that worked fine for me trying to make sure it worked on my local:

PHP:  [ Select all ]

<?php

// URL to test (something like your Discords widget .json URL)
$url 'PUT YOUR URL HERE';

// Initialize cURL session
$ch curl_init($url);

// Set cURL options
curl_setopt($chCURLOPT_RETURNTRANSFERtrue);
curl_setopt($chCURLOPT_SSL_VERIFYPEERtrue); // Verify SSL certificate
curl_setopt($chCURLOPT_SSL_VERIFYHOST2);    // Verify host name in certificate

// Execute cURL request
$response curl_exec($ch);

// Let's check for cURL errors
if (curl_errno($ch)) {
 
   echo "cURL Error: " curl_error($ch);
} else {
 
   // Let's check for SSL certificate errors
 
   $sslInfo curl_getinfo($chCURLINFO_SSL_VERIFYRESULT);
 
   if ($sslInfo === 0) {
 
       echo "SSL Certificate OK <br />";
 
   } else {
 
       echo "SSL Certificate Error (Code: " $sslInfo ") <br />";
 
   }

 
   // Let's check HTTP status code (200 OK)
 
   $httpCode curl_getinfo($chCURLINFO_HTTP_CODE);
 
   if ($httpCode === 200) {
 
       echo "HTTP Status Code: 200 OK <br />";
 
   } else {
 
       echo "HTTP Status Code: " $httpCode "<br />";
 
   }
}

// Close cURL session
curl_close($ch);

echo 
'<br /><br />' $response//Show the contents
?>


Just put that code into a blank PHP file, put in your Discord's widget URL, then place that file into the root of your site and then point your browser towards it.
If you see:

SSL Certificate OK
HTTP Status Code: 200 OK

At the top of the page with a bunch of info under it, then that would eliminate the SSL verify as an issue. That is an issue I had with my local WAMP server not being able to read SSL certs.

Here is the post I made about it:
Please login to see this link
Get registered or Log in


You can also attempt to try that line of code I put in that post to see if that works. Thought that was for steam, it will be the same for the Discord module except that my Discord module uses the cURL for Evo, and that is found in the file public_html/includes/functions_evo_custom.php.

Just do a search for cache_json_data and in that function, you should see what I mentioned in that post.

I am just trying to do a process of elimination to hopefully solve this.

coRpSE

Replies: 2
Views: 41
 Forum:   News   Posted: Fri Sep 29, 2023 4:32 pm   Subject: Re: Forum News v2.3 & v3.3 Released
no problem.

 Topic: Discord Module
coRpSE

Replies: 20
Views: 171
 Forum:   Nuke Blocks / Modules Support   Posted: Fri Sep 29, 2023 12:37 pm   Subject: Re: Discord Module
yeup, that it does use a curl, so no ports would need to be opened.

coRpSE

Replies: 2
Views: 41
 Forum:   News   Posted: Fri Sep 29, 2023 11:11 am   Subject: Forum News v2.3 & v3.3 Released
Expand


As you can see by the title, the Forum News Discord update is here. Both version v2.3 and v3.3 feature the Discord integration, which allows you to make a post like I am here, which can show up on the home page if you are running this module, which would, in turn, post your news onto Discord in a specific channel in which you assign the webhook. Because of the limitations of Discord and their Markdown syntax, instead of trying to port over from bbcode to their Markdown syntax, I decided just to strip all code and just do plain text. If an image is posted within the allowed characters, sort of like I did with this post putting the image at the start, it will grab that and post it with the Discord post.

ABOUT:
Now, if you know nothing about this module, and you are wondering what is the difference between v2.3 and v3.3, there is only one difference.

Version 2.3 requires you to create a specific forum for the news, like if you go onto my forums, (
Please login to see this link
Get registered or Log in
), you will see I have a category called [HSX] News, and in there, I have a Forum call News, which is where I post all news that will be posted on the Home page. If you use this version, all your news will be in one location, but it does require you to set the permissions of that forum so only you and the groups you want to be able to post news on the home page. If you look at the permissions, the one you want to make sure is set is "Post". Allowing replies is fine, you just don't want a random joe post a news article. Installation of v2.3 is easy to install, no file editing.

Version 3.3 requires you to edit 3 files, and maybe your theme if you have a responsive theme, utilizing what was put in for Responsive themes. But this version allows an admin to make any topic a forum news topic. There is a checkbox that shows up with the other options that says "Homepage news", and all you would do is check that. You can even edit someone else's post to make it home page news, but know that it has to be the 1st post, (topic starter), that can be posted as Forums News. This version downside is that you have to be an admin to be able to use this feature, and unlike the other version, you can't have specific groups allowed to use it. Also, the news can be spread all over the site which if you have a bit of an OCD with things like that, it can drive you a bit nuts.

Overall, each have these good sides and downsides, so the option is up to you on which you want to use.

Here is an image of what the Discord post will look like:
Expand

DISCORD INTEGRATION:
The way this module works with the Discord. When you make a post in the forums, and you mark it as a Forum News, (v3.3), once you hit submit, it will not send to Discord. It will send once someone views the home page, where you have the Forum News module set as the home module. What it does is it takes the information that it is allowing you to view, and filtering it for Discord, then it broadcasts to Discord while essentially checking a bot in the DB table saying, Discord message sent, that way it doesn't double send, (hopefully).

Now, is there a chance that it could double send, in theory, possibly. The timing would have to be perfect, where two people viewing come at the exact moment. But the odds of that happening are slim to none. I think I'd have a better chance of winning the Lotto, but, nothing is impossible. Any questions, feel free not to ask. lachen, j/k, ask away.

Please login to see this link
Get registered or Log in

Please login to see this link
Get registered or Log in

 Topic: Discord Module
coRpSE

Replies: 20
Views: 171
 Forum:   Nuke Blocks / Modules Support   Posted: Tue Sep 26, 2023 10:03 pm   Subject: Re: Discord Module
n/p

 Topic: Discord Module
coRpSE

Replies: 20
Views: 171
 Forum:   Nuke Blocks / Modules Support   Posted: Mon Sep 25, 2023 5:32 pm   Subject: Re: Discord Module
I just pushed an update for the module where the admin section, if someone wants to use it, can by using the username. I also did some other small updates to it.
To update, just re-download the files and upload overwriting what you have there and that is it.
Please login to see this link
Get registered or Log in

coRpSE

Replies: 0
Views: 45
 Forum:   News   Posted: Mon Sep 25, 2023 12:50 pm   Subject: Discord Block v1.1 Released
Expand


Well, it's been almost 5 years since this block was released, and I haven't touched it really since I released it. Well, today, after looking at it do to a support that was put in, I saw some areas that needed to be fixed, so I finally got around and fixed them. One of the updates brings back the admin shield. I know this was asked about years ago, just after Discord remove the unique ID number of all users, so I updated the system just to use usernames.

Updating is simple, if you already have this installed, just upload the files, that's it.
Download here:
Please login to see this link
Get registered or Log in

All times are UTC - 7 Hours [DST enabled]
Page 1 of 139
Goto page : 1, 2, 3 ... 137, 138, 139  Next
Jump to:  
Forums ©