It's time to deal with Wordpress. Personally, I've been using it for quite a while, but only as a user/administrator, with a little half-intuitive tweaking of some missing functionality for me personally. But now it's time to go deeper.
Despite the fact that most of the time I still program, I decided to touch on such a slippery topic. With this note, I will start a series of posts about the so-called SEO. I do not claim one hundred percent correctness or completeness (moreover) of the material presented. In general, these notes are actually initially addressed to one person, but as practice shows, they may be useful to a larger number of readers.
A few notes back I considered working with assets in the Symfony framework. This example shows how to work with your own assets. But in practice, it is often necessary to use external assets.
For such, and not only such tasks, assetic is suitable. It is quite difficult to describe in a few words what it is. But I imagine assetic as an asset manager for myself.
In recent times, I have had to spend too much time in front of the computer screen. Unfortunately, my eyes didn't like it very much, and I felt strained after 15-20 minutes of work. Therefore, I decided to buy a new monitor, specifically one without flickering (PWM backlight). As it turned out, the problem was deeper than I thought. Most modern monitors are illuminated by backlight, and the brightness changes with PWM (Pulse Width Modulation).
In the previous note, we familiarized ourselves with the deprecated mysql module. Here we will provide an example of working with a more modern one.
If before (before php 5.0) it was possible to use a more or less trivial way of working with databases in php (using the MySQL module), then with new versions of php it is necessary to switch to new modules, such as mysqli or pdo. The MySQL module is deprecated in php 5.5.x and will soon be completely excluded.
In this note we will remind you how to use the MySQL module, but use modern interfaces for work (see the next notes). To use the minimum functionality of the MySQL module you only need to remember a few functions (of course, there are many more of them, here only the necessary minimum is presented).
As of 2012, there were 612,843,429 websites on the Internet. This number is rapidly growing.
So why do people create websites?
So, in this note we will learn how to restrict access to sections of a website written using Symfony framework. Symfony framework provides powerful tools for access control, which allow you to restrict access both by url and entire controllers.
Quite an important task in the development of websites and web applications is restricting access to certain sections of the site, such as the admin panel. In theory, this is a rather complex process, consisting of three components - authentication, identification, and authorization.
I decided to install kernel 3.10.4 with the tuxonice patch on my Gentoo.
The result was very satisfying, many system problems disappeared, and this is considering the fact that I did not modify the old kernel configuration. The first thing I noticed is that the network finally started working properly after waking up from suspend.
But there was something that needed adjustment.
In the previous lesson, we learned how to create simple forms in Symfony framework that contain (and modify if necessary) data from tables. As you remember, we used models (entities) of these tables.
But in practice, we have to solve more complex tasks. For example, displaying/modifying data from multiple tables in Symfony framework.
A rough example - one table contains articles, and there is a field that sets the section id (which has a separate table). We need to make it possible to conveniently select a section for an article. Fortunately, this is a routine task for Symfony framework. =)
Sometimes a convenient method to restrict access to certain sections of a website (such as the administrator panel or confidential data) is to use access restriction with .htaccess (or, alternatively, basic authentication). Of course, with scripts, this can be done more elegantly, conveniently, and sometimes even more securely. The thing is, all the information needed to gain access is sent with each request in the form of headers. But if this is not critical, then it can be used; it is probably the fastest option.
In this note we will learn how to create and handle forms in Symfony framework.
Forms can be created "from scratch" or using an ORM (object-relational mapping) to generate forms based on database tables. Let's start by exploring the second option. In practice, these types of forms are most commonly encountered since in most cases, the data entered in the form needs to be stored somewhere (in a database).
As you know from the lessons, the public directory of Symfony framework by default is web/, and the framework directories lie next to it. This means that for normal operation and pretty URLs, the DocumentRoot on the server should be set specifically to the web/ folder. But this is not always convenient and not always possible on hosting. In most cases, you will not have the ability to edit the DocumentRoot.