Showing posts with label wordpress. Show all posts
Showing posts with label wordpress. 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, 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

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.

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...