Monthly Report ( September 2023 )

Income and Expenditure Report in Sep. 2023

carryover money24,717 yendetails__
internet charges (mon)1,100 yen22,000 yen
domain acquisition fee0 yen_1 yen
domain renewal fee (1yr)0 yen_2,596 yen
buy plugin0 yen_
buy software0 yen_
affiliate income0 yen_
surveyance costs0 yen_1,220 yen
total25,817 yen25,817 yen

Only my access is over 20,000 (^^;.

Hahahahaha——

In September, I worked hard to complete ” 7. Access Measures ” in Advance Preparation.

Hmm, it’s difficult. . .

SQL injection, cross-site scripting —— What are these ? ? ?

Difficult IT terms is running through my head (^^;.

Well, it will be safe that WordPress establishes the entrance measures firmly ( because computer viruses are hard to install on WordPress system ), so I believe it’s safe if you can create a passwordless environment.

” 7. Security measures ” will be completed next month, maybe.

Customize Cocoon hardly

The WordPress theme ” Cocoon ” is an excellent theme made by Japanese, but even if you change the language to “English”, some Japanese words are remained. For example, the home button on Breadcrumb Navigation is still remained as ” ホーム “.
Also, the multilingual plug-in ” Polylang ” does not have a translation function itself, so it looks better to consolidate in one language.

When I decided to unify the language into English, I finally carry the dangerous way out to change the source code (^_^;).

Cocoon is fully compatible with hard customization ( ? ). All we have to do is just copy the files in cocoon-master to the cocoon-child folder. Copy the file with its folders. Even if Cocoon has been updated, the files of Cocoon-child are not updated, so the edited content will be unchanged. Our customized content will not be lost. It’s very useful function.

Only the files in cocoon-master are changed by the update.

Customize m-tomato editing screen

I like the m-tomato skin because it is vegetarian-like. But the vegetables are displayed even on the editing screen. It’s hard to see.

Like this ——

In order to remove the background picture in the editing screen, you must edit the file of style.css which is in m-tomato folder.

First, copy m-tomato folder in Cocoon Master < skins. Next, create a folder of ” skins ” on cocoon-child-master folder, and paste the m-tomato folder there. It might be okay to change the directory structure, but as safety measure, keep the directory structure the same. Then start editing.

Before this, create a duplicate of style.css.

It’s a safety measure, also.

Editing is rewriting the original file directly. If it fails, open the copied file, then copy & paste the rewritten part of code to restore it, and then resume work. If rename or delete the original file, the protection function by WAF might be activated. The standard practice that is ” edit the copied file and replace it with the original file ” might not work. WAF might interrupt it. It is a good idea to stop WAF only during editing.
Much safer method is to create a mirror site for testing, but I won’t do it because it’s too difficult (^^;.

I think it no need for a personal site (^_^)/.

The work itself is just only deleting the red lines above (^^;.

Very easy.

However, by this, the background image displayed on the site also does disappear, so there needs to specify a new background image. You can rob the image when you will jump to the URL in the code above (^^;.

There are four freedoms in WordPress ( An overview of WordPress ), so it is no problem.

Nevertheless, when you display this background image, you will be redirected to the creator’s site. It looks like a cross-site scripting. Redirected to other site means that not only your IP address is detected, but also your site address will be detected. Even if the site owner can remodel the site function, the access location and the name of internet provider will be also detected ( however, it is not detected your personal information such as credit card number, etc ). I don’t know what this author looks like, but there can’t deny it.

I want to deleted all the URLs in this style.css, but when deleted the line after ” skin URL: “, the appearance of my site become strange, so I can’t do it.

It is the specifications of WordPress.

The lines other than red lines above could not be deleted.

Change Breadcrumb Navigation to English

Next is this.

Just changing ” Site Language ” to English on the Settings of WordPress, Cocoon can display English ( the word ” サイト内を検索 ” in the search box changes to ” search within the site “). But some items, such as Breadcrumb Navigation, remain in Japanese. I was waiting for the bug fixed, but for it never changed, I decided to change it myself.

By the way, Cocoon itself only supports English, so if you want to display by other languages, you need to create a translation file yourself using freeware called Poedit.

However, I only can use English, that is not my problem (^^;.

Fortunately, I found a way of changing the notation of Breadcrumb Navigation by Googling. I can refer it. However, this comes with a risk of rewriting the source code directly, I recommend you will use poedit to change the notation.

The reason that I changed the code is because the multilingual plugin ” Polylang ” cannot display properly in multiple languages ( Is it a bug ? ).

It is said that just adding additional code to function.php of Cocoon Child. I will do it using the WordPress’s theme file editor for safety.

Do it like this ——

There is one thing before doing it.

Create a duplicate of the file.

The function.php file of Cocoon Child is here.

As the additional code is on the Cocoon homepage, feel free to borrow it (^^;.

It is below.

Changing the notation of Breadcrumb Navigstion

//Write the function for the child theme below
////Post/Paste article breadcrumb root text
add_filter(‘breadcrumbs_single_root_text’, ‘breadcrumbs_root_text_custom’);
add_filter(‘breadcrumbs_page_root_text’, ‘breadcrumbs_root_text_custom’);
function breadcrumbs_root_text_custom() {
return ‘ホーム’;
}

Change the word ” ホーム ” at the end of strings to what you want. In my site, it is changed to ” HOME ” ( shown as the image two-above ).

Open function.php from the theme file editor, copy and paste the code above, change ” ホーム ” to ” HOME “, and press the Update File button below the screen. . .

Somehow red text appeared and rejected.

What ? Does WAF the rarely activated do his job ?!

It couldn’t continue working. So I would take the next step. After editing the copied function.php in the theme file editor, I replaced the name of copied file with the original file’s on the file manager. Then I successfully edited it.

I viewed the change.

My site was broken. . .

Ooops !!!

But I had created a copy, so I restored it from the side of web hosting service using its file manager. Soon I could recover my site. Then opened function.php from the file manager on the WordPress side, and copied and pasted the source code above. When I changed ” ホーム ” to ” HOME ” and saved it, it was finished without any problems. The Breadcrumb Navigation has now been successfully translated into English. It was just only a matter of using file manager.

Editing php files is very dangerous. . .

Whether was it wrong to change the name of original file or to delete it ? . . . I cannot find the reason.

Don’t use the theme file editor when editing php files.

I don’t know what will happen (^_^;.

At this time, security plugin Wordfence sent this email.

Oh. What an excellent security plugin !

Isn’t it safe even if the hacker will destroy a site without being aware ? !

By the way, there was no notification from my web hosting service.

No one knows what kind of work it had done.

End.

Leave a comment(コメントを残す)

Copied title and URL