Showing posts with label internet. Show all posts
Showing posts with label internet. Show all posts

Sunday, July 08, 2018

Why some HTML tags disappear in Wordpress?

Do you have Wordpress powered website, and HTML tags like <form></form>, <input />, <script></script> disappear when you are updating the existing post or page?

Congratulation! You also have found a bug in the security of Wordpress CMS...

Change the author of page/post to the current user or just re-login with a proper Wordpress account.


Friday, May 04, 2018

Online tests for Google Analytics and Tag Manager

I've spent a lot of time setting up and testing different actions using Google Global Site Tag.

Moreover there are at least 3 different versions of installation codes for Google Analytics plus Google Tag Manager.

So I've gathered all these codes in one website and added some testing tools there. For example, you can generate any event on the fly.

Installation Codes and On-line Tests for Google Analytics and Google Tag Manager.


Sunday, May 01, 2016

PHP scripts inside HTML on webserver with FCGId

There are lots of articles how to enable PHP scripts inside .html files using AddType and/or AddHandler directives in the Apache web-server configuration file.

But if you have the hosting with PHP engine is running as FCGId module, all these tutorials will not work or will issued downloading of the binary file instead of opening the HTML content in the web-browser :(

Here is a workaround that works for me, just modify .conf file of your website in the following way:


DirectoryIndex index.html index.htm index.php index.php4 index.php5
<Directory /home/xyz/public_html>
...
RemoveHandler .html
AddType application/x-httpd-php .html
AddHandler fcgid-script .html
FCGIWrapper /home/xyz/fcgi-bin/php7.2.fcgi .html
...
</Directory>

The "magic" comes in AddHandler + FCGIWrapper detectives. Enjoy :)

P.S. If you have HTTP and HTTPS websites, don't forget to configure both Apache .conf files!


Friday, February 13, 2015

Microsoft Remote Desktop on Mac OS X


Quick guide (in a single picture) how to properly setup remote desktop connection using Microsoft Remote Desktop software on Mac OS X:


How to setup Microsoft Remote Desktop on Apple computer under Mac OS X


Text variant:

  • Don't use old Remote Desktop Connection software Mac OS X version 10.10.x and higher! Use Microsoft Remote Desktop from App Store instead.
  • Don't add domain or PC name with back slash into username! Put just a login name, official instruction is wrong.
  • Specify the port number in the connection filed! Different RDC protocols uses different port numbers by default.


Thursday, March 20, 2014

How to detect Internet Explorer 10 and higher?

For a long time detecting of Internet Explorer browser was easy using Conditional Comments, something like:

<!--[if IE]>
 <script type="text/javascript">
  var isIE = true;
 </script>
<![endif]-->

Starting version 10, Internet Explorer doesn't support conditional comments feature :(

Here is the JavaScript code to detect IE of any version since 5 till 11:

var isIE = (function(){
    var undef,rv = -1; // Return value assumes failure.
    var ua = window.navigator.userAgent;
    var msie = ua.indexOf('MSIE ');
    var trident = ua.indexOf('Trident/');

    if (msie > 0) {
        // IE 10 or older => return version number
        rv = parseInt(ua.substring(msie + 5, ua.indexOf('.', msie)), 10);
    } else if (trident > 0) {
        // IE 11 (or newer) => return version number
        var rvNum = ua.indexOf('rv:');
        rv = parseInt(ua.substring(rvNum + 3, ua.indexOf('.', rvNum)), 10);
    }

    return ((rv > -1) ? rv : undef);
}());
 

Hope Internet Explorer 12 and higher will work the same way :)


Friday, November 15, 2013

How do I make software products?

Here is a screencast on x8 speed of all processes are required to create the software product and to publish it online:


As you see coding takes less than half of time. Making of screenshots is more important than programming. Pages in social networks are more important than pretty looking website. And so on...

Program in this video is a first public version of Missing Buttons software

Monday, November 04, 2013

Testing Ecwid online shopping platform


KARPOLAN's Autograph
$10.00


Tuesday, August 13, 2013

Websites at Different Screen Resolutions

If you are creating a lot of web pages, or have a bunch of own websites, you know how important it is to make the HTML documents are looking good for each user. Different formats of monitors (4x3, 16x9, 16x10), lots of screen resolutions (1366x768, 1920x1080, etc), the variety of mobile devices, half of them with automatic rotation of the screen ... What the hell?

So I've created a simple online web service to view any web page at different sizes and resolutions.

By the way, it's free :)

Thursday, December 20, 2012

KARPOLAN's Life by ANIMOTO


Cool video I've created using Animoto web service: KARPOLAN's Life

Monday, November 12, 2012

Did you remember this?

If you are old enough to remember Windows 95 or 98, this is for you:
Black screen at the end.

Friday, November 02, 2012

Software product in less than 1 hour!

There were about 3 hours of free time before visit to the cinema. So, just for fun, I've decided to measure the speed of my work. Also I was planning to record a screencast movie "how to make software products" :)

Unfortunately CamStudio recorder sucks for high resolution screen, so there is no movie :( But in less than 1 hour I've finished following tasks:

  • Purchase domain for new site and setup Wordpress there
  • Create Facebook, Twitter and Google+ accounts for new software
  • Make a copy of Caps Lock Indicator software for Scroll Lock key
  • Setup trial protection routines
  • Build installation package and upload it to the website

Not bad, isn't it? ;)

So, here it is: Scroll Lock Indicator software for Windows.

Scroll Lock Indicator software for Windows
Download EXE file
Download ZIP Archive

Software offers two Scroll Lock state indicators: Tray Icon and On-Screen Display. Notifications by different sound when On and Off are also available.

The product is distributed as try before you buy (shareware) with 30-day trial period. The license costs $2.95 per user.

Sunday, August 05, 2012

IFTTT Challenge

Testing IFTTT service.

Notification about this post should appear in @karpolan twitter

Sunday, July 22, 2012

Back to Shareware :)

I have never ever planned back to shareware business, but one of my technical tasks requests testing of modern software protection and integration with billing services. So I've decided to make a small utility and push it to all required tests.

I have many ideas and feature requests form users of free Keyboard LEDs software, so there was no problem with idea of new software. So, here it is: Caps Lock Indicator

Caps Lock Indicator software for Windows
Download EXE file
Download ZIP Archive

Software for Windows, offers two Caps Lock state indicators: Tray Icon and On-Screen Floating Text. Notifications by sound are also available. The product is distributed as shareware with 30-day trial period. The license costs $9.95 per user.

Sunday, July 08, 2012

Credit Card Joke

Anybody knows is it legal to make funny stuff like that:

Credit Card Joke

I don't want to get any subpoena :) Maybe some kind of legal notes are required?

Wednesday, July 04, 2012

Picture of the Day

I've created own Picture of the Day service.

It took about 3 hours at night while I was fighting the insomnia...

Monday, June 25, 2012

Random Color Generator and Preview


I've created the online color viewer.

Everybody can preview any color using this base URL: http://karpolan.com/services/color/

Want to see a green color? Here it is: http://karpolan.com/services/color/008000/

A dark blue one? No problem: http://karpolan.com/services/color/000060/

Also, there is the Online Random Color Generator there.

Wednesday, June 06, 2012

Friday, October 28, 2011

PHP - Print any variable easily

You often need to print some PHP variable right into the HTML code, but the variable is out of your current scope. Familiar problem, isn't it?

Here is a bright solution: PHP function that prints any global variable:


function print_var($var = 'domain', $url = '')
{
  global $$var, $$$var;
  if ($url != '')
    echo("<a href=\"$url\">${$var}</a>");
  else
    echo(${$var});
}

Moreover, you can pass some URL as a second parameter, and your variable becomes a clicable link :)

Some examples:


<?php print_var('page')?>
<?php print_var('domain', '/') ?>
<?php print_var('software', '/download/') ?>
<?php print_var('author', 'http://www.site.com') ?>

Sunday, October 16, 2011

Wordpress + Custom Scripts = Error 404

Wordpress is the most popular CMS in the world. Many sites are powered by Wordpress, plugins almost for every need are available. But...

If you decide to add some custom web scripts or other CMS to the domain where Wordpress is already installed, you'll get a problem with Error Handling. Wordpress shows Error 404 (File not found) for any URL that is not a part of Wordpress system!

Moreover, Wordpress changes standard error pages to its own ones. So if an error occurs outside Wordpress environment, the error message appears in Wordpress style anyway!

This can be fixed using .htaccess settings. At first you should exclude work folders form RewriteMode redirections. Add the following line into .htaccess file in the root of your site:

RewriteEngine On
RewriteBase /wordpress/
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_URI} !^/(folder1|folder2)/
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /wordpress /index.php [L]

Then you should disable custom error page, at least in folders of your scripts. Add the following line to .htaccess files in your script folders. You can add this line to the root file as well, but sometimes it doesn't work:

ErrorDocument 404 default

This is enough if Wordpress is installed into a folder. But if Wordpress is installed into the root of the site, the solution may not work depending on CMS version and installed theme. Most probably you will need to fix some files manually to disable 404 error handling. The core is located in class-wp.php file:

function handle_404() {
...
$wp_query->set_404();
status_header( 404 );
...
}

BTW, Wordpress in the root of the site is not a best practice...