Simple Machines Community Forum

SMF Support => SMF 2.1.x Support => Topic started by: 20abc22 on December 27, 2022, 01:01:42 AM

Title: Several questions from a newbie
Post by: 20abc22 on December 27, 2022, 01:01:42 AM
Hi everyone,

I've recently created a new forum, and would appreciate it if you could point me in the right directions on the following:

1) I've installed an additional theme and made it a default one on the forum, but when I go into my file directory in cPanel, I don't see the folder with my new theme. I also want to add an image to override the logo for the default theme, but can't figure out in which directory to place it, so that the theme can work with it (the page inside the Admin control function says it should go under the custom theme directory, but I don't see it).

2) Is there a working mod for the newest version of the SMF that can enable links to Facebook, Twitter and Telegram?

3) Which files and where are they located to modify the welcome message that gets automatically sent to users upon registration? I need to make a few adjustments.

4) Can I modify the terms that are automatically provided for users to accept when registering? My forum is in another language, so the privacy policy is not even provided. if the forum has specific rules, can I modify the terms notification to say 'abide by the rules', other than the current 'boilerplate' version? also, where is the file located with the standard terms, so that I could find and modify it?

Thanks so much!
Title: Re: Several questions from a newbie
Post by: Diego Andrés on December 27, 2022, 01:12:53 AM
1- You could try asking for help in the support topic for that specific theme you downloaded. The theme folder should exist if the theme is indeed installed like you say, should be inside the Themes folder with a name somewhat similar to whatever it's named. Additionally, sometimes themes include settings to setup logo and other things, try checking in Admin > Forum config > Theme Settings.

2- I don't recall anything, did you search in the modsite already? Perhaps in the Tips and Tricks board you might find something useful too, but you'd have to add it manually if that's the case.

3- Depends which type of registration you have set. For immediate, it should be this string $txt[' register_immediate_body '] in Themes/default/languages/EmailsTemplate.english.php

4- You should be able to change them in the registration settings in Admin > Members > Registration > Registration Agreement, and Admin > Members > Registration > Privacy Policy
Title: Re: Several questions from a newbie
Post by: Kindred on December 27, 2022, 10:48:04 AM
Note:   If you just installed the forum and are just starting, then you should use SMF 2.1.3 - not the 2.0.x branch.   2.0.x is ramping down and will soon be end-of-life.
Title: Re: Several questions from a newbie
Post by: 20abc22 on December 27, 2022, 03:53:02 PM
Quote from: Kindred on December 27, 2022, 10:48:04 AMNote:   If you just installed the forum and are just starting, then you should use SMF 2.1.3 - not the 2.0.x branch.   2.0.x is ramping down and will soon be end-of-life.

Before I even saw your reply, I realized I must have posted in the wrong forum. Thanks for pointing this out!

Apologies to everyone.
Title: Re: Several questions from a newbie
Post by: 20abc22 on December 27, 2022, 04:13:05 PM
Thanks for moving my topic to the right forum, Kindred!

I have a dumb question - to access code (e.g., for updating an element of a theme), do I go through the CPanel, or can I do it through the Admin panel on the forum.

Is there a part of an online manual that step-by-step describes the process for total newbies how to modify code?

Thank you.
Title: Re: Several questions from a newbie
Post by: Doug Heffernan on December 27, 2022, 04:42:15 PM
Quote from: 20abc22 on December 27, 2022, 04:13:05 PMI have a dumb question

There are no dumb questions imo. No one is born with knowledge.

Quote from: 20abc22 on December 27, 2022, 04:13:05 PMto access code (e.g., for updating an element of a theme), do I go through the CPanel, or can I do it through the Admin panel on the forum.

You can make edits to a file through the File Manager section located in the cPanel, or you can use a php editor for that. Personally I would recommend doing it this way, through an editor. Notepad++ is a free editor program and it is very good too.

Quote from: 20abc22 on December 27, 2022, 04:13:05 PMIs there a part of an online manual that step-by-step describes the process for total newbies how to modify code?

All you have to do is open up the file that you want to modify and apply your edits. Most programs have a search and find section that will make it easier to find the relevant code. That 's pretty much it.
Title: Re: Several questions from a newbie
Post by: Illori on December 27, 2022, 04:45:54 PM
dont forget to do a backup before you edit any files.
Title: Re: Several questions from a newbie
Post by: Doug Heffernan on December 27, 2022, 04:51:34 PM
Quote from: Illori on December 27, 2022, 04:45:54 PMdont forget to do a backup before you edit any files.

Good point Illori.

Notepad++ does have an auto backup option that will make a backup of any files prior to editing. It is a very useful feature.
Title: Re: Several questions from a newbie
Post by: 20abc22 on December 27, 2022, 04:52:04 PM
Quote from: Doug Heffernan on December 27, 2022, 04:42:15 PMAll you have to do is open up the file that you want to modify and apply your edits. Most programs have a search and find section that will make it easier to find the relevant code. That 's pretty much it.

Thanks a lot! This community is so amazing and so patient with ppl like me :) Will go and check it out.
Title: Re: Several questions from a newbie
Post by: 20abc22 on December 27, 2022, 04:52:30 PM
Quote from: Illori on December 27, 2022, 04:45:54 PMdont forget to do a backup before you edit any files.

Thanks! That's another thing I need to learn and pronto.
Title: Re: Several questions from a newbie
Post by: 20abc22 on December 27, 2022, 05:43:58 PM
OK, I have found an answer to my question 1 - perhaps, someone else may find it of use.

The active Themes folder with a few that I have installed is located under Public_html/forum. I created a folder 'Forum' manually, but when I run the autoinstaller, it must have created another 'forum' folder under Public__html.
Title: Re: Several questions from a newbie
Post by: 20abc22 on December 27, 2022, 05:59:53 PM
Quote from: Doug Heffernan on December 27, 2022, 04:51:34 PM
Quote from: Illori on December 27, 2022, 04:45:54 PMdont forget to do a backup before you edit any files.

Good point Illori.

Notepad++ does have an auto backup option that will make a backup of any files prior to editing. It is a very useful feature.

I've created a backup and downloaded it to my computer, and installed the Notepad++. Now, how do I get to use Notepad++ on the index.css file which I see in cPanel File Editor? Do I download it to my computer to make edits and then overwrite the original file?

Tried it and it worked :)

Thanks!
Title: Re: Several questions from a newbie
Post by: Doug Heffernan on December 28, 2022, 05:47:10 AM
Glad to see that it worked for you.
Title: Re: Several questions from a newbie
Post by: 20abc22 on January 02, 2023, 10:52:40 PM
Hi everyone,

I am excited to report that my forum is up and running and I already have a few users that registered, and quite a few reviews/visits!

I've learned quite a bit too during this time.

Having said that, I have one major issue - please advise what I should check out in terms of getting it sorted out.

The problem is that some users cannot complete the registration process, because they never get registration emails from the forum. It's like their email providers reject them. It is happening with GMail specifically.

I have opened a ticket with my hosting provider, but is there something I should be doing on my side?

As well, can someone please let me know how I can display the ban list to the users (perhaps, in the admin section of the forum). I can't seem to find this option in the settings.

Thank you!
Title: Re: Several questions from a newbie
Post by: Kindred on January 03, 2023, 12:15:13 AM
There is No way to display the ban list to users.  That is an admin only function
Title: Re: Several questions from a newbie
Post by: Oldiesmann on January 03, 2023, 12:29:25 AM
As for the email thing, tell your users to check their spam folder, and consider changing to SMTP instead of PHP (Admin -> Maintenance -> Mail - the values to use for server, username, password, etc. will vary depending on your situation)
Title: Re: Several questions from a newbie
Post by: 20abc22 on January 03, 2023, 07:31:08 AM
Quote from: Kindred on January 03, 2023, 12:15:13 AMThere is No way to display the ban list to users.  That is an admin only function

Thanks for the response! Perhaps, I am using the wrong term. On another forum which uses an older version of Simple Machines, as a user I could see a list of banned folks with the explanation for ban. Maybe it is called something else.

Or maybe it was a mod?
Title: Re: Several questions from a newbie
Post by: 20abc22 on January 03, 2023, 07:32:38 AM
Quote from: Oldiesmann on January 03, 2023, 12:29:25 AMAs for the email thing, tell your users to check their spam folder, and consider changing to SMTP instead of PHP (Admin -> Maintenance -> Mail - the values to use for server, username, password, etc. will vary depending on your situation)

Thank you for the suggestion re changing the settings. But I know for a fact that some users did everything, checked the spam, and still did not get anything. The funny thing is that I see them in the list of users and even approved them, but they still did not get an email.
Title: Re: Several questions from a newbie
Post by: Doug Heffernan on January 03, 2023, 11:04:48 AM
Quote from: 20abc22 on January 03, 2023, 07:31:08 AMOr maybe it was a mod?

I think that is the case. I think I remember seeing a mod or 2 that do that. Have you checked the Mods Database?
Title: Re: Several questions from a newbie
Post by: Shades. on January 03, 2023, 03:35:55 PM
Quote from: Doug Heffernan on January 03, 2023, 11:04:48 AMI think that is the case. I think I remember seeing a mod or 2 that do that. Have you checked the Mods Database?
It was probably this one (https://custom.simplemachines.org/index.php?mod=1198) for 2.0. ;)

Maybe @vbgamer45 will update it for 2.1.x if asked when he gets time from all his other projects! O:)  8)
Title: Re: Several questions from a newbie
Post by: 20abc22 on January 04, 2023, 01:22:50 AM
Thanks, everyone - I will keep my eyes open for the mod when available.

There is another technical question I have. I have a user who was trying to create a new thread from his mobile phone and received an error message that his session ended while he was creating it.

Has anyone seen something like that and what would be the root cause? Other users successfully created new threads (although I can't say whether this was on their desktops or not).
Title: Re: Several questions from a newbie
Post by: Steve on January 04, 2023, 06:08:56 AM
Marking unsolved so your question isn't skipped over.
Title: Re: Several questions from a newbie
Post by: Doug Heffernan on January 04, 2023, 06:18:03 AM
Quote from: 20abc22 on January 04, 2023, 01:22:50 AMThanks, everyone - I will keep my eyes open for the mod when available.

There is another technical question I have. I have a user who was trying to create a new thread from his mobile phone and received an error message that his session ended while he was creating it.

Has anyone seen something like that and what would be the root cause? Other users successfully created new threads (although I can't say whether this was on their desktops or not).

Is anything logged in the error log either in the admin panel or server?
Title: Re: Several questions from a newbie
Post by: 20abc22 on January 04, 2023, 07:04:16 AM
Quote from: Doug Heffernan on January 04, 2023, 06:18:03 AM
Quote from: 20abc22 on January 04, 2023, 01:22:50 AMThanks, everyone - I will keep my eyes open for the mod when available.

There is another technical question I have. I have a user who was trying to create a new thread from his mobile phone and received an error message that his session ended while he was creating it.

Has anyone seen something like that and what would be the root cause? Other users successfully created new threads (although I can't say whether this was on their desktops or not).

Is anything logged in the error log either in the admin panel or server?

No, nothing in the logs. I guess when the user tried to make a post, it never made it to the forum.
Title: Re: Several questions from a newbie
Post by: 20abc22 on January 04, 2023, 08:40:58 AM
Now, when I try to log in as a user, it says something along the lines of 'you cannot login. Check your cookie settings'. While I was there just a moment ago, logged in.
Title: Re: Several questions from a newbie
Post by: Kindred on January 04, 2023, 10:52:17 AM
what is the URL of your forum?
Title: Re: Several questions from a newbie
Post by: 20abc22 on January 04, 2023, 09:23:26 PM
Quote from: Kindred on January 04, 2023, 10:52:17 AMwhat is the URL of your forum?

May I PM the url? I prefer not to post it in public.

What has happened I still can't log in either as a user or admin in my usual browser Brave, but I managed to log in through Firefox. When I was logging in, I was seeing messages that connection is insecure. I wonder if security certificates were properly deployed.
Title: Re: Several questions from a newbie
Post by: 20abc22 on January 05, 2023, 01:41:18 AM
What I also noticed is that the quote button does not work, unlike on this forum. I have to manually add quote tags and copy and paste the text.
Title: Re: Several questions from a newbie
Post by: Kindred on January 05, 2023, 11:38:23 AM
You definitely have a problem in your configuration. Send me your URL and a test login, please.
Title: Re: Several questions from a newbie
Post by: Kindred on January 06, 2023, 02:40:55 PM
OK....

1- your forum is not https
2- favicon.ico does not exist in your forum root directory, but your site is calling for it

HOWEVER...   *THIS* appears to be the root of a bunch of problems
<script async defer src="https://connect.facebook.net/en_US/sdk.js#xfbml=1&version=v3.2"></script><?xml version="1.0" encoding="UTF-8"?>This script fails...

you have some sort of mod or code addition that attempts to load something from facebook and that load fails. That is potentially causing all sorts of errors on the page as OTHER scripts attempt to do actions.

Слaва Украинi

Title: Re: Several questions from a newbie
Post by: 20abc22 on January 06, 2023, 03:20:12 PM
Quote from: Kindred on January 06, 2023, 02:40:55 PMOK....

1- your forum is not https
2- favicon.ico does not exist in your forum root directory, but your site is calling for it

HOWEVER...   *THIS* appears to be the root of a bunch of problems
<script async defer src="https://connect.facebook.net/en_US/sdk.js#xfbml=1&version=v3.2"></script><?xml version="1.0" encoding="UTF-8"?>This script fails...

you have some sort of mod or code addition that attempts to load something from facebook and that load fails. That is potentially causing all sorts of errors on the page as OTHER scripts attempt to do actions.


Thank you SO MUCH! how do I do the security stuff? is this something that needs to be done through C Panel?

The facebook stuff may have something to do with the mod I installed hoping to embed facebook posts. It does not work anyway. I will remove it.

I also tried installing some custom smilies, and probably did not do it right. I will remove that file.

QuoteСлaва Украинi

Героям Слава! Thank you SO MUCH for that too! Your support means the world to us :).
Title: Re: Several questions from a newbie
Post by: Kindred on January 06, 2023, 03:23:54 PM
You host should have an option to set up a certificate using Let's Encrypt -- so, yes, in your host CPanel.


I work with Ukrainians and I've been to Dnipro. :)
Title: Re: Several questions from a newbie
Post by: Aleksi "Lex" Kilpinen on January 06, 2023, 03:46:43 PM
Sorry for going off topic a bit, but this is an actual photo from a city street in eastern Finland. Слава Україні!
Title: Re: Several questions from a newbie
Post by: 20abc22 on January 07, 2023, 01:17:40 AM
Quote from: Kindred on January 06, 2023, 03:23:54 PMYou host should have an option to set up a certificate using Let's Encrypt -- so, yes, in your host CPanel.


I work with Ukrainians and I've been to Dnipro. :)

I have removed two mods (twitter and facebook embed) and added the favicon.ico (although I am not sure if I put it in the right directory). Magically quoting works and my site appears to have https now :)

Still will have to check with some users if they have posting issues.

Thank you SO much - you guys are amazing and it is nice to know you had a chance to visit Ukraine and work with them. Ukraine is a beautiful country and has lots of talented people. It's a terrible thing that it is going through this nightmare right now :(.
Title: Re: Several questions from a newbie
Post by: 20abc22 on January 07, 2023, 01:18:53 AM
Quote from: Aleksi "Lex" Kilpinen on January 06, 2023, 03:46:43 PMSorry for going off topic a bit, but this is an actual photo from a city street in eastern Finland. Слава Україні!

This is amazing and heartwarming - thanks so much! It made my day and I shared this with my friends and family.
Title: Re: Several questions from a newbie
Post by: Doug Heffernan on January 07, 2023, 05:35:17 AM
Quote from: 20abc22 on January 06, 2023, 03:20:12 PMhow do I do the security stuff? is this something that needs to be done through C Panel?

After your host has set up the certificate, have a look at this topic on how to implement it at your Smf forum properly.

https://www.simplemachines.org/community/index.php?topic=555034.0
Title: Re: Several questions from a newbie
Post by: Steve on January 07, 2023, 07:35:19 AM
Quote from: 20abc22 on January 07, 2023, 01:17:40 AMadded the favicon.ico (although I am not sure if I put it in the right directory)
It goes in your root directory, where index.php and settings.php are.
Title: Re: Several questions from a newbie
Post by: 20abc22 on January 07, 2023, 11:05:34 AM
Quote from: Steve on January 07, 2023, 07:35:19 AM
Quote from: 20abc22 on January 07, 2023, 01:17:40 AMadded the favicon.ico (although I am not sure if I put it in the right directory)
It goes in your root directory, where index.php and settings.php are.

Thanks for the tip. I think that's where I put it, but I will double-check.
Title: Re: Several questions from a newbie
Post by: 20abc22 on January 07, 2023, 11:05:59 AM
Quote from: Doug Heffernan on January 07, 2023, 05:35:17 AM
Quote from: 20abc22 on January 06, 2023, 03:20:12 PMhow do I do the security stuff? is this something that needs to be done through C Panel?

After your host has set up the certificate, have a look at this topic on how to implement it at your Smf forum properly.

https://www.simplemachines.org/community/index.php?topic=555034.0


Thanks a lot!!
Title: Re: Several questions from a newbie
Post by: 20abc22 on January 07, 2023, 11:07:43 AM
I still have this one user who is able to log in and post, but his session terminates in about 2 min, although he chooses the option to be logged in 'forever'. He also says he cannot log out. He does it on his mobile.

What could be causing this? is it on his end or something in the forum set up is not working? Others appear to be posting fine, including myself.

His OS is Android and Os X.
Title: Re: Several questions from a newbie
Post by: Kindred on January 07, 2023, 11:54:07 AM
I suspect it is something on his side...  probably some security settings that he configured in his mobile browser
Title: Re: Several questions from a newbie
Post by: 20abc22 on January 07, 2023, 05:31:24 PM
Quote from: Kindred on January 07, 2023, 11:54:07 AMI suspect it is something on his side...  probably some security settings that he configured in his mobile browser

I let him know. I've tried the forum on my own cell and the tablet and had no issues posting or staying logged in as long as I needed ...

Thank you again for all the amazing help and support! What a great community. I hope to give back one day :).
Title: Re: Several questions from a newbie
Post by: 20abc22 on January 11, 2023, 11:07:11 PM
Hi again,

I was wondering if you can help me with the following problem.

I've noticed that there is a Russian bot Yandex crawling the forum. I want to stop it. I have found the code for it to create robots.txt, but for the life of me I can't figure out what my root directory is to place this file into.

I also don't seem to get my favicon file to work. It's not showing on my website. It's currently in the public_html/forum folder.

Thank you!

Title: Re: Several questions from a newbie
Post by: TwitchisMental on January 11, 2023, 11:09:46 PM
Quote from: 20abc22 on January 11, 2023, 11:07:11 PMHi again,

I was wondering if you can help me with the following problem.

I've noticed that there is a Russian bot Yandex crawling the forum. I want to stop it. I have found the code for it to create robots.txt, but for the life of me I can't figure out what my root directory is to place this file into.

I also don't seem to get my favicon file to work. It's not showing on my website. It's currently in the public_html/forum folder.

Thank you!


This plugin should make what you are trying to do a bit easier -

https://custom.simplemachines.org/index.php?mod=2659
Title: Re: Several questions from a newbie
Post by: Kindred on January 12, 2023, 12:16:39 AM
I dunno about that...

Anyway,  robots.txt should go in the same directory as your smf installation... the one with settings.php in it

The favicon may take several days to show...  it's a browser thing
Title: Re: Several questions from a newbie
Post by: 20abc22 on January 13, 2023, 11:19:09 PM
Quote from: TwitchisMental on January 11, 2023, 11:09:46 PM
Quote from: 20abc22 on January 11, 2023, 11:07:11 PMHi again,

I was wondering if you can help me with the following problem.

I've noticed that there is a Russian bot Yandex crawling the forum. I want to stop it. I have found the code for it to create robots.txt, but for the life of me I can't figure out what my root directory is to place this file into.

I also don't seem to get my favicon file to work. It's not showing on my website. It's currently in the public_html/forum folder.

Thank you!


This plugin should make what you are trying to do a bit easier -

https://custom.simplemachines.org/index.php?mod=2659


Thanks so much! I will definitely check it out.
Title: Re: Several questions from a newbie
Post by: 20abc22 on January 13, 2023, 11:20:15 PM
Quote from: Kindred on January 12, 2023, 12:16:39 AMI dunno about that...

Anyway,  robots.txt should go in the same directory as your smf installation... the one with settings.php in it

The favicon may take several days to show...  it's a browser thing

It appears to be there. I noticed there are fewer IPs from Yandex, but still a few managed to get through.
Title: Re: Several questions from a newbie
Post by: 20abc22 on January 15, 2023, 12:08:39 PM
There is something weird going on with the website.

For example, after making the above changes, it was showing the favicon in the browser and I did not see any Yandex bots.

Today they've been crawling it like crazy and the favicon disappeared.

When I log in to CPanel, I see 2 website instances. One is regular and another - with SSL next to it.

Is this normal?

Thank you.
Title: Re: Several questions from a newbie
Post by: Kindred on January 15, 2023, 04:28:55 PM
add this to your .htaccess file

RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]

I see that thefavicon is present, but don't see it in the browser...

so, you might have to add this to your index.template.php file - just before the </head>

<link rel="icon" type="image/x-icon" href="/images/favicon.ico">

Title: Re: Several questions from a newbie
Post by: 20abc22 on January 15, 2023, 04:47:52 PM
Quote from: Kindred on January 15, 2023, 04:28:55 PMadd this to your .htaccess file

RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]

I see that thefavicon is present, but don't see it in the browser...

so, you might have to add this to your index.template.php file - just before the </head>

<link rel="icon" type="image/x-icon" href="/images/favicon.ico">



Thank you, will do. Yesterday I could clearly see it and today it is not there.

It almost feels like the website is switched to something else and bots are back.
Title: Re: Several questions from a newbie
Post by: 20abc22 on January 15, 2023, 08:58:20 PM
Quote from: Kindred on January 15, 2023, 04:28:55 PMadd this to your .htaccess file

RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]

[/code]


This file was not originally visible, but I found and downloaded it, and kept the original copy just in case.

Where do I add this extra code - at the beginning or the end of the original code (I understand it should be kept untouched)?

Thank you.
Title: Re: Several questions from a newbie
Post by: 20abc22 on January 15, 2023, 09:08:03 PM
Quote from: Kindred on January 15, 2023, 04:28:55 PMadd this to your .htaccess file


so, you might have to add this to your index.template.php file - just before the </head>

<link rel="icon" type="image/x-icon" href="/images/favicon.ico">


Is this the index.template.php file in the directory for the theme I am using (ProCurve)?

Thank you.
Title: Re: Several questions from a newbie
Post by: Kindred on January 16, 2023, 12:30:42 AM
You can add the htaccess code anywhere in the file

And Yes the themes that you are using
Title: Re: Several questions from a newbie
Post by: 20abc22 on January 20, 2023, 12:54:44 AM
Unfortunately, I did not get the results I hoped for. Yandex bots are still crawling around and the favicon isn't showing :(.
Title: Re: Several questions from a newbie
Post by: Steve on January 20, 2023, 08:17:50 AM
Quote from: 20abc22 on January 20, 2023, 12:54:44 AMthe favicon isn't showing
You put the 32 x 32 image named favicon.ico in the root folder?
Title: Re: Several questions from a newbie
Post by: Kindred on January 20, 2023, 02:54:10 PM
Well, I just realized... with the code I provided, the favicon.ico would go into the theme's images directory
Title: Re: Several questions from a newbie
Post by: 20abc22 on January 20, 2023, 02:59:04 PM
Quote from: Steve on January 20, 2023, 08:17:50 AM
Quote from: 20abc22 on January 20, 2023, 12:54:44 AMthe favicon isn't showing
You put the 32 x 32 image named favicon.ico in the root folder?

Yes
Title: Re: Several questions from a newbie
Post by: 20abc22 on January 20, 2023, 02:59:36 PM
Quote from: Kindred on January 20, 2023, 02:54:10 PMWell, I just realized... with the code I provided, the favicon.ico would go into the theme's images directory

Thanks - will update tonight and see if anything changes.
Title: Re: Several questions from a newbie
Post by: Kindred on January 20, 2023, 03:02:02 PM
as for the yandex.....    the code that I gave you just forces the forum to use https.

To prevent yandex, you would have to block a whole range of IP addresses or try to block the user agent
Title: Re: Several questions from a newbie
Post by: 20abc22 on January 20, 2023, 09:54:01 PM
Quote from: Kindred on January 20, 2023, 03:02:02 PMas for the yandex.....    the code that I gave you just forces the forum to use https.

To prevent yandex, you would have to block a whole range of IP addresses or try to block the user agent

I was thinking about blocking IPs, as Yandex bots come from a few known IP addresses. Need to figure out how to do that. Learning something new every day :).
Title: Re: Several questions from a newbie
Post by: 20abc22 on January 20, 2023, 10:59:27 PM
I tried blocking specific Yandex IPs, and I still see them accessing the forum.

Also, added this code:

SetEnvIfNoCase User-Agent "^Yandex*" bad_bot
Order Deny,Allow
Deny from env=bad_bot

and still no good outcome.

Title: Re: Several questions from a newbie
Post by: 20abc22 on January 21, 2023, 11:17:23 AM
Not a day without issues.

I wake up this morning and can't load the website. Hosting provider checked on their end and it looks like a denial of service attack, which would not surprise me, given the contents.

What are my options? Provider suggested Cloudflare. I am worried it will make my users' experience more cumbersome :(.
Title: Re: Several questions from a newbie
Post by: Doug Heffernan on January 21, 2023, 11:53:50 AM
Quote from: 20abc22 on January 21, 2023, 11:17:23 AMNot a day without issues.

I wake up this morning and can't load the website. Hosting provider checked on their end and it looks like a denial of service attack, which would not surprise me, given the contents.

What are my options? Provider suggested Cloudflare. I am worried it will make my users' experience more cumbersome :(.

Personally I don't think that Cloudfare is worth it. Who is your host? A decent host should provide adequate protection against ddos attacks.
Title: Re: Several questions from a newbie
Post by: 20abc22 on January 21, 2023, 11:56:59 AM
Quote from: Doug Heffernan on January 21, 2023, 11:53:50 AM
Quote from: 20abc22 on January 21, 2023, 11:17:23 AMNot a day without issues.

I wake up this morning and can't load the website. Hosting provider checked on their end and it looks like a denial of service attack, which would not surprise me, given the contents.

What are my options? Provider suggested Cloudflare. I am worried it will make my users' experience more cumbersome :(.

Personally I don't think that Cloudfare is worth it. Who is your host? A decent host should provide adequate protection against ddos attacks.

This is included with the hosting. They checked on their side and their server is fine.

The other thing I noticed that some folders in my custom theme folder were updated yesterday. Which I haven't done myself :) wonder if there is a possibility there may be issues because of that.
Title: Re: Several questions from a newbie
Post by: 20abc22 on January 21, 2023, 11:58:55 AM
The message I am getting is this:

Connection Problems
Sorry, SMF was unable to connect to the database. This may be caused by the server being busy. Please try again later.

Or the site is just very slow.
Title: Re: Several questions from a newbie
Post by: Doug Heffernan on January 21, 2023, 12:10:37 PM
Quote from: 20abc22 on January 21, 2023, 11:56:59 AMThis is included with the hosting. They checked on their side and their server is fine.

The other thing I noticed that some folders in my custom theme folder were updated yesterday. Which I haven't done myself :) wonder if there is a possibility there may be issues because of that.

If you haven't updated any of those files yourself, the question is who did? You should contact your host and ask them to check the logs for your account and see how the files were updated. Also, if I were you, I would check the contents of the updated files to see that nothing malicious has been inserted into them.

Quote from: 20abc22 on January 21, 2023, 11:58:55 AMThe message I am getting is this:

Connection Problems
Sorry, SMF was unable to connect to the database. This may be caused by the server being busy. Please try again later.

Or the site is just very slow.

If the database permissions are in order and the database info has been entered correctly in the Settings.php file, the issue lies with your host. I suggest that you contact them about this.
Title: Re: Several questions from a newbie
Post by: 20abc22 on January 21, 2023, 12:15:40 PM
Quote from: Doug Heffernan on January 21, 2023, 12:10:37 PM
Quote from: 20abc22 on January 21, 2023, 11:56:59 AMThis is included with the hosting. They checked on their side and their server is fine.

The other thing I noticed that some folders in my custom theme folder were updated yesterday. Which I haven't done myself :) wonder if there is a possibility there may be issues because of that.

If you haven't updated any of those files yourself, the question is who did? You should contact your host and ask them to check the logs for your account and see how the files were updated. Also, if I were you, I would check the contents of the updated files to see that nothing malicious has been inserted into them.

Quote from: 20abc22 on January 21, 2023, 11:58:55 AMThe message I am getting is this:

Connection Problems
Sorry, SMF was unable to connect to the database. This may be caused by the server being busy. Please try again later.

Or the site is just very slow.

If the database permissions are in order and the database info has been entered correctly in the Settings.php file, the issue lies with your host. I suggest that you contact them about this.

I've been in touch with them since this morning.

The theme I have installed has recently been updated, but I did not update it through the forum. Is there a chance some of these scripts are updated automatically or this is not possible?
Title: Re: Several questions from a newbie
Post by: Doug Heffernan on January 21, 2023, 12:18:51 PM
Quote from: 20abc22 on January 21, 2023, 12:15:40 PMThe theme I have installed has recently been updated, but I did not update it through the forum. Is there a chance some of these scripts are updated automatically or this is not possible?

Did you update them through either, ftp or the cPanel? I don't see how they can get updated automatically, unless you have set up a cron/task job for it?

If you haven't, you should really check their contents. I don't mean to alarm you, but better safe than sorry.

Title: Re: Several questions from a newbie
Post by: 20abc22 on January 21, 2023, 12:20:36 PM
I wonder if I am having favicon issues. I've found online that depending on the size, they can slow down the site.
Title: Re: Several questions from a newbie
Post by: 20abc22 on January 21, 2023, 12:23:01 PM
Quote from: Doug Heffernan on January 21, 2023, 12:18:51 PM
Quote from: 20abc22 on January 21, 2023, 12:15:40 PMThe theme I have installed has recently been updated, but I did not update it through the forum. Is there a chance some of these scripts are updated automatically or this is not possible?

Did you update them through either, ftp or the cPanel? I don't see how they can get updated automatically, unless you have set up a cron/task job for it?

If you haven't, you should really check their contents. I don't mean to alarm you, but better safe than sorry.



The only updates I did yesterday was some .htaccess code changes, as discussed earlier in this thread, and placed favicons. Yes, it would be via Cpanel. But I did not touch these scripts in these folders at all.

I wonder if I should get rid of favicons completely for now.
Title: Re: Several questions from a newbie
Post by: Kindred on January 21, 2023, 01:13:14 PM
Send me your connection info again  (I don't keep that info after helping)

Let me take a look at what could be going on
Title: Re: Several questions from a newbie
Post by: 20abc22 on January 21, 2023, 02:20:18 PM
Sent you the PM. Thanks again for your help!
Title: Re: Several questions from a newbie
Post by: Kindred on January 21, 2023, 05:56:29 PM
OK....  (note: Posting this publicly in case others have similar problems and get to this thread through search - nothing private included in this post)

first, the recent edits to files.
The files you noted are the minified versions of the CSS.   Nothing to worry about. The system automatically generates those files based on the index.css and other css files -- because the minified versions are faster fro the browsers to load.

Second, yeah, your site seems to be getting pounded and is slow to load. I added the block for yandex and baidu into your forum .htaccess. See if that has any effect)
The site seems to be responding faster now than it was 20 minutes ago.
#deny access to yandex and baidu agents
    SetEnvIfNoCase User-Agent (yandex|baidu) bad_bot_block=1
    Order Allow,Deny
    Deny from env=bad_bot_block
    Allow from ALL

third, your google ID has a space in front of it, in the pageload.  That means that you either have a space in the google analytics mod that you added, or the mod is incorrectly adding a space before the ID
I don't know if that's enough to cause google to error out/delay the load. (looking at the mod code, it looks correct and that suggests that you have a space in front when you entered the ID in the mod settings)


fourth, I fixed your favicon. :)
Title: Re: Several questions from a newbie
Post by: 20abc22 on January 21, 2023, 06:14:40 PM
Quote from: Kindred on January 21, 2023, 05:56:29 PMOK....  (note: Posting this publicly in case others have similar problems and get to this thread through search - nothing private included in this post)

first, the recent edits to files.
The files you noted are the minified versions of the CSS.   Nothing to worry about. The system automatically generates those files based on the index.css and other css files -- because the minified versions are faster fro the browsers to load.

Second, yeah, your site seems to be getting pounded and is slow to load. I added the block for yandex and baidu into your forum .htaccess. See if that has any effect)
The site seems to be responding faster now than it was 20 minutes ago.
#deny access to yandex and baidu agents
    SetEnvIfNoCase User-Agent (yandex|baidu) bad_bot_block=1
    Order Allow,Deny
    Deny from env=bad_bot_block
    Allow from ALL

third, your google ID has a space in front of it, in the pageload.  That means that you either have a space in the google analytics mod that you added, or the mod is incorrectly adding a space before the ID
I don't know if that's enough to cause google to error out/delay the load. (looking at the mod code, it looks correct and that suggests that you have a space in front when you entered the ID in the mod settings)


fourth, I fixed your favicon. :)


Thank you SO MUCH! Unfortunately it looks like the site is still having issues. I see the error message 'the site unexpectedly closed the connection'. And then it's up and running, and quickly.

Will go check out that google thingie.
Title: Re: Several questions from a newbie
Post by: Kindred on January 21, 2023, 06:23:11 PM
yeah, that connection issue is odd....    that almost always ends up being some sort of host problem... but your current stats don't show anything unusual.
Title: Re: Several questions from a newbie
Post by: 20abc22 on January 21, 2023, 06:29:52 PM
Quote from: Kindred on January 21, 2023, 06:23:11 PMyeah, that connection issue is odd....    that almost always ends up being some sort of host problem... but your current stats don't show anything unusual.

For now, it is lighting speed. I will monitor it and will keep everyone posted.

Please check your PM soon and again thank you, thank you, thank you - I am so grateful!
Title: Re: Several questions from a newbie
Post by: 20abc22 on January 28, 2023, 08:06:06 PM
Just wanted to thank everyone, and especially Kindred, for your help and support.

There were some issues on the host/database side, but they were eventually fixed and the forum has been running wonderfully. Russian and Chinese bots issue has been totally addressed. There is one NA bot (SEMRush CY Ltd) coming, but it seems to be quite benign.

You guys have been awesome and thanks again!
Title: Re: Several questions from a newbie
Post by: Steve on January 29, 2023, 09:46:21 AM
Marking solved then.