What's New

.htaccess – force trailing slash for url

This little .htaccess code does the trick on solving the SEO problem of bad url’s… let’s say that you have a https://www.example.com/images/ url that works ok, but someone forgets to add the last trailing slash and he/she accesses the https://www.example.com/images that, normally gives you a 404 error page and not the real stuff like photos and videos…

You just need to add this little code to your .htaccess file and if anyone forgets to add the last / after the url, it will be forced redirected to the right url with the / at the end.

Get actual link of website PHP

Security headers for .htaccess

jQuery toggle both content and button

Display as you type input value in div and input type populate with the same text with jQuery

Some situations need a special way of thinking regarding functionality and automation.

This little script sends the text typed in a form/input type to a div and also to another input type so that you can use in many ways the final result – the POST or GET variable created. Also the fist input type works with its defined name.

You can see a working demo here: DEMO

CSS / HTML make text / element blink

This simple CSS code can make a text / element blink, you just need to set the timer in seconds and provide the element that you want to blink with the .blink_me class.

Click for DEMO here.

Free PHP, HTML, CSS, JavaScript/TypeScript editor – CodeLobster IDE

In this article, we suggest you to get acquainted with the free editor of web languages – CodeLobster IDE. It is presented on the software market for a long time already, and it wins a lot of fans.

CodeLobster IDE allows you to edit PHP, HTML, CSS, JavaScript and TypeScript files, it highlights the syntax and gives hints for tags, functions and their parameters. This editor easily deals with those files that contain a mixed content.

If you insert PHP code in your HTML template, then the editor correctly highlights both HTML tags and PHP functions. The same applies to CSS and JavaScript/TypeScript code, which is contained in HTML files.

The program includes auto-completion function, which greatly speeds up the programmer’s work and eliminates the possibility of errors.

CodeLobster IDE provides contextual help on all supported programming languages, it uses the most up to date documentation at this moment, downloading it from official sites. So we can quickly get a description of any HTML tag, CSS attribute, PHP or JavaScript/TypeScript function by pressing the F1 key. 

The built-in PHP debugger allows you to execute PHP scripts step by step, sequentially moving through the lines of code. You can assign check points, view the process of the work of loops, and monitor the values of all variables during the execution of the script.

Other useful functions and features of the IDE:

  • A pair highlighting of parentheses and tags – you will never have to count parentheses or quotation marks, the editor will take care of it.
  • Highlighting of blocks, selection and collapsing of code snippets, bookmarks to facilitate navigation on the edited file, recognition and building of the complete structure of PHP projects – these functions ensure easy work with projects of any scale.
  • Support for 17 user interface languages, among them English, German, Russian, Spanish, French and others.
  • The program works on the following operation systems: Windows 7, Windows 8, Windows 10, Mac OS, Linux, Ubuntu, Fedora, Debian.

The professional version of CodeLobster IDE provides the programmer with even more features.

For example, you have an opportunity to work with projects on a remote server with use of the built-in FTP client. You can edit the selected files, preview the results and then synchronize the changes with the files on the hosting.

In addition the professional version includes an extensive set of plug-ins:

  • Fully implemented support for JavaScript (and TypeScript) libraries, such as jQuery, Node.js, AngularJS, AngularTS, BackboneJS, EmberJS, VueJS and MeteorJS.
  • A large set of extensions that help to work with PHP frameworks – CakePHP, CodeIgniter, Laravel, Phalcon, Smarty, Symfony, Twig and Yii plug-ins.
  • Plugins for working with the most popular CMS – Drupal, Joomla, Magento and WordPress.
  • Also CodeLobster IDE has special plug-in for Bootstrap.

We can download and install any framework directly from the program without being distracted from the main tasks.

In general, for a year of work, our team had no complaints against the editor. CodeLobster IDE works fast, does not hang and allows us to work even with large PHP projects.

You can download CodeLobster IDE from the original website http://www.codelobster.com/.

PHP – make timestamp from normal date/time string

Demo here.

jQuery add/remove hidden input field to form on click

I used this little code with a reservation form… to put it simple… the user that wanted to make a reservation could opt in/out of receiving a confirmation SMS a few hours before the scheduled date/time…