Thursday, March 2, 2017

bbPress, W3TC & WordPress 4.7.2

The latest stable release of WordPress is 4.7.2. I have a few blogs that need upgrade and most of my WordPress upgrades went through smoothly, however, a few did have some problems. One of them was entirely my fault.

Somehow I clicked too fast, and I managed to "upgrade" the plugins before upgrading the WordPress core. Oh wow, neither the site nor the admin interface showed up properly. So I manually downloaded the files and overwrote those on the server, it is working again.

And then there were couple of sites which gave me more trouble, overwriting didn't work. Basically, the site was working, but I could not access the wp-admin page. The error said "... page isn't working ... is currently unable to handle this request. HTTP ERROR 500". If you have this same problem, don't panic. Use FTP to rename your "plugins" directory, make it something else, then your wp-admin page should work again. Among all the plugins, I think bbPress and W3TC are the troublemakers, next time it might be a good idea to disable them first.

After all the upgrading, I found a general readme page for WordPress upgrades, and one of the suggestions is "Deactivating all plugins" before doing anything, LOL. Well, maybe I should do that next time. Other suggestions include flushing caching plugins, flushing managed host caches, switching to default theme.

Friday, July 15, 2016

Changing Timezone in phpDolphin

phpDolphin is a social network script based in PHP. While playing with the script for the first time, I noticed that everything I posted the post time always started with "4 hours ago". It didn't look too good, LOL. I wrote an email asking for some help. The script author is nice enough to help solving the problem within a day. Now that is some kind of support! :)

So, I was told that the "4 hours ago" problem was due to the fact that the server's time was not synced with the MySQL database. To fix this problem, the following line is added to the file includes/config.php

date_default_timezone_set("Etc/GMT+4");


Now everything looks right. If you just post something, the post message will be "seconds ago". Btw, if you are also using phpDolphin and happen to encounter some sort of SMTP mail server error, need to put additional fields in your profile page, or want to edit footer links, please check out my other blog post here.

Wednesday, October 7, 2015

The Best Content Sharing WordPress Theme

ThemeForest is a website that I both love and hate, I love it because there are more than 20k templates or themes to choose from, I hate it because I need to spend hours to find the right theme. You might ask, don't they already have a search engine to help refine results? Yes, however in order to make sure the theme works as described, you should check their demo and read the comments to see how it actually works, and that is time consuming.

Recently, I purchased a theme called Foot, it consists of all the features that I need - masonry layout, front-end content submission, Facebook login, responsive menu for tablets and mobiles, review system, infinite scroll. Interested? Here is a short review of the theme.

Btw, do you know that ThemeForest has added a support feature? Say, for a regular theme license of $59, you can extend support to 12 months for an additional $17.70. What does support include? The theme purchase includes any updates made available by the author. The item support mainly includes availability of the author to answer questions. I reckon with this new author support service, more authors would be eager to provide a better support service. :)

Sunday, July 12, 2015

Strict Standards: Only variables should be passed by reference in...

Recently I switched my web hosting service to some new providers, one of the websites is having a little minor problem. The error message was "Strict Standards: Only variables should be passed by reference in... some file... some line..."

The line that had the problem:

$ext = strtolower(end(explode('.', $image_path)));

Not sure for real or not, some folks suggest that this little problem could cause a memory leak, and memory leak can eat up memory which can not be reclaimed till the script finishes. Or in some cases it can not be reclaimed until the server restarts. Little bit of this and that of memory leak can add up gradually and bring a healthy server to a crawl. Wow, sounds serious eh?

Anyway, the suggested way to fix it is really simple:

$tmp = explode('.', $image_path);
$ext = end($tmp);
$ext = strtolower($ext);

After the little modification, my website works again. Well, I guess this new provider is a bit more strict on things than the previous one.

Sunday, June 14, 2015

Images appear for a second then disappear in Internet Explorer

Recently, one of my blogs has this strange behaviour - all the images appear for a split second, and then disappear and show up as broken images. The images are only broken in Internet Explorer, they work fine with Chrome and Firefox. I wonder if that is because I haven't updated my theme for a long long time. So I try updating the theme, but the problem is still there.

Could there be a problem with the WordPress plugins? I turn off all plugins, and reactivate them one by one. The problem is with a plugin called Link Juice Keeper. Once I turn it off, all the images come back to life, and now they work with most of the popular browsers.

What is Link Juice Keeper? It redirects all non-existing URLs which normally return a 404 error to the blog front page using 301 redirect. It's a great plugin, unfortunately the last update was six years ago. It might be a bit outdated, but it still works with my other websites with the same latest WordPress version installed. So why it didn't work with this particular WordPress site, I have absolutely no idea. :) Anyway, if you have a similar problem, try deactivate your plugins. I heard that some buggy plugins would change your image path in a mysterious way, but in that case, your images wouldn't show up on any browsers.

Tuesday, April 7, 2015

The user name or password is incorrect

A week ago, I tried to login to my computer without success. The error message was "The user name or password is incorrect." I was pretty sure that I didn't change my password, even the password hint displayed was still the same. Was I being hacked?

I did install a free file cleaner software not long ago, did that software somehow screw up the system in some mysterious way? I tried to dig up info on the Internet about how to fix this user name and password login problem, there are numerous resources showing how one can remove the login requirement, edit registry, or use a tool called netplwiz for managing user accounts, blah blah blah... After a few times of trying to get into repair mode, the computer was managed to restore itself to an earlier restore point, things seemed to be working once again. I immediately did a scan on the computer, nothing malicious showed up.

A day ago, the same login problem showed up. I began to wonder if that was really a software problem, maybe it was a hardware one. So I ran to Walmart and bought a cheap keyboard, plugged it in, voila, it works again and I can sign in with my usual password. I removed the new keyboard, plugged in the old one, same old bad error message "The user name or password is incorrect" reappeared. I almost put the blame on that software and planned to send a complain email to the software author, LOL.

Thursday, July 31, 2014

How To Promote Your Website For Free

This method is easy and straightforward, all you need to do is to design a simple mechanism to give some sort of virtual points to your online visitors. Let's take a look at Poged.

Poged is a gaming portal website which displays lots of online games information including MMO, MMORPG, medieval, role-playing, fantasy, sport, sci-fi, strategy and adventure games. So if you are looking for new games to play or searching for game information updates, Poged is the place to go.

What interests me most is the way they try to promote their website - they have something called Poged dollar. There are several ways to make Poged dollars, e.g.

- Visit their website every day and earn 40 dollars
- Leave a comment and get 100 dollars, only once per day
- Complete your member profile, and get 150 dollars
- "Like" them on Facebook, give them a "plus" on Google, or "Follow" them on Twitter, you get 120 dollars
- Invite a friend to sign up, you earn 250 dollars

And what do you do with those dollars? With Poged dollars, you can redeem those virtual dollars for free stuff like game gold, game items, game time cards, beta keys and etc.

Now, if you can implement a similar system with your website, what can you offer to your visitors? Free blog mentions? Free service trial? Free consulting? Free product sample?

Sunday, July 20, 2014

5 Recommended Offshore Web Hosting Providers

Usually US based web hosting is a popular choice for most website owners. Most of the US providers offer a good variety of hosting plans with a decent service and reasonable price. However, sometimes, for some obvious reasons, people would prefer to host their websites with an offshore web hosting company.

Here are a few service providers I used in the past few months. In general, those which offer shared web hosting, also provide VPS hosting, but not the other way round.

If you need more offshore web hosts, check out my other post Best Reliable Offshore Web Hosting. If you want more privacy and are looking for web hosting companies that accept Bitcoin payment, check out another of my post 10 Offshore Web Hosting Companies That Accept Bitcoin.

Offshore Shared Web Hosting

Root.lu (Luxembourg) - €2/month, 250 MB Storage, Unlimited Bandwidth, 1 Domain

KnownSRV (Netherlands, Luxemburg, Romania) - $2.95/month, 5 GB Storage, 30 GB Bandwidth, Unlimited Domains

Shine Servers (Netherlands) - $3.34/month, 5GB Storage, 1 TB Bandwidth, 3 Domains

WRZHost (Netherlands, Hong Kong) - $2/month, 1 GB Storage, 50 GB Bandwidth, 1 Domain

Offshore VPS Hosting

Ecatel (Netherlands) - €29/month, 80GB Storage, 2GB RAM, 10TB on 100 mbit unshared

Monday, July 7, 2014

Search Engine Not Indexing Your Posts?

First of all, I assume that you are using the most popular webmaster tools developed by the most popular search engine, well, you know which one. In "Index Status", you noticed that you only have very few URLs being indexed, e.g. around 1~3. And you remember that you already submitted a sitemap for your blog. According to the section "Crawl", "Sitemaps", you have over 100 pages submitted, and over 100 pages indexed. So, how come you only have 2 URLs being indexed?

Why is search engine not indexing your posts correctly? A possible reason is that when you set up your profile in webmaster tools, you add your site name incorrectly. For example, if your domain name is some--domain--name.com, some--domain--name.com is very different from www.some--domain--name.com in the eyes of search engine. If you add www.some--domain--name.com as your site name in the profile, and try to update the search engine by "Crawl", "Fetch as", you will get a redirect error message. If you add some--domain--name.com as your site name in the profile and "Fetch", you will get a message saying "Status: Complete, URL and linked pages submitted to index..."

I have a WordPress website which only has 30+ blog pages, and the total number of URLs indexed is well over 100, probably some URLs including those tags and etc. So, if you have an extremely low number of URLs indexed, check if you are naming your website incorrectly. In the user interface, I don't see a place where you can change / edit your website name, I guess you have to start a new profile.

Saturday, April 5, 2014

Sentinel Theme Setup

This post is a reminder of how I set up my Sentinel theme. I bought the theme in Jan, and didn't bother to update the theme since then. Yesterday, I decided to update the theme, and here are a few things that I did.

The error “The image could not be loaded.” and post text wrapping image problem - I suppose there are many ways to solve this problem, but I just remove line 686-801 in global.js in folder js, and the problem goes away.

Add an Adsense 468x60 banner ad at the top right corner - Edit header-1.php in folder templates/header, comment out line 36-37, add the Adsense code after line 35. To make the ad looking better, I put the ad code inside a <div style='float:right; margin-top:14px;'> </div>

Remove the orange message "Navigation Menu can be added in Appearances -> Menu" at the bottom right corner - If you don't use a menu at that location, an error message will appear. Edit footer-bottom.php in folder templates/footer, comment out line 19-28.

Remove comments number, likes number, and author box in blog post - Edit blog-single-1.php in folder templates/blog, comment out line 28-29, and 43. Edit htmlPrinterPost.php in folder printers, comment out line 104-112.

Remove comments number in the front page - Edit recentPosts.php in folder visualComposer, comment out line 87.

That's about it for now. Obviously, you can do a lot of modifications to set it up the way you like it. Overall, the theme is getting better and better, e.g. the front page sidebar and visualComposer are working now.

Wednesday, January 15, 2014

$20 for Lots of Themes / Graphics / Goodies

The latest Digital Trends Bundle from Envato is quite tempting. You get more than 40 files with value over $500 for just $20. To be exact, this digital bundle consists of 16 GraphicRiver items, 4 ThemeForest items, 8 PhotoDune items, 5 AudioJungle items, 9 VideoHive items, and 1 CodeCanyon.

The items that most interested me are the 2 WordPress theme items - Presso, clean & modern magazine theme and Ubergrid, responsive grid wordpress theme, and the CodeCanyon item - Digital Paybox. Presso and Ubergrid are listed as two of the popular themes recently, you can't go wrong with them! And Digital Paybox seems to be quite useful as a payment processing tool for any WordPress sites, it works with a number of payment gateways including PayPal, Payza / Alertpay, krill / Moneybookers, Authorize.Net, InterKassa, EgoPay, Perfect Money, Credit / Debit Cards (via Stripe), Bitcoins (via BitPay).

Everything sounds good, I was about to order it, but then I noticed the bold sentence in the bundle description, "Due to the exclusive nature of the Digital Trends Bundle, the Bundle items are purchased ‘as-is’, meaning no Bundle files are eligible for item support or updates." So, that's the catch eh? It's a bit scary to buy a theme which does not provide supports and updates. Maybe this package should be renamed as "Trial Bundle", then prospective customers could expect that they would need to pay later to get supports and updates. But of course, if you find other items (those that most likely don't need updates) useful, $20 is still a good deal for this trial bundle.

Sunday, January 12, 2014

How to add a sidebar to Sentinel WordPress Theme frontpage

A friend of mine also bought a copy of Sentinel theme and wondered how to add a right sidebar to the frontpage. Indeed, many people would like to have such an option so to display a pretty AdSense 300x600 vertical ad or other stuff on the sidebar. The latest update has not yet solved this problem. So here is some more detail.

You might have tried all the options in the page editor or theme settings page, but the sidebar just never show up. Take a look at the source code, and you will notice that there is a comment "<!-- No sidebar -->".

Open page-1.php in templates/home, and page-1-sb-right.php in templates/page.

Replace line 15 "<div class="grid">" of page-1.php with line 17 "<div class="grid sidebar_right">" of page-1-sb-right.php

and

replace line 30 "<!-- No sidebar -->" of page-1.php with line 36 "<?php get_sidebar(); ?>" of page-1-sb-right.php.

Of course, you can modify, add or delete other items for your frontpage as well.

Just received an update notification from the plugin Visual Composer, hopefully the coming Sentinel update will include a working Visual Composer as well. That's about it for now.

Sunday, November 3, 2013

Images Not Showing Up in RSS

If you are using WordPress and your post images do not show up in your rss feed, most likely that is just a settings problem.

Check "Settings", "Reading", "For each article in a feed, show", did you select "Summary"? If you selected "Summary", your post images will not be included, and only part of your post text will show up in your rss feed.

Also, depends on what WordPress theme you are using, some might display your full blog post in a big chunk of text, no images, no paragraphs, no format at all. Anyway, try select "Full text" in "For each article in a feed, show", and see if that solves the problem.

Secondly, if you are using Feedburner to manage your rss feed with the default setting, your rss feed might show up without any formatting. Sign in your Feedburner account, go to "Optimize", enable "BrowserFriendly" and "SmartFeed".

BrowserFriendly would apply clean visual formatting to the raw feed XML for much improved readability in all modern web browsers, and SmartFeed would publish and translate your feed into a format (RSS or Atom) compatible with your visitors' feed readers.

Tuesday, October 22, 2013

How to design a profitable browser game

Many people want to make money online, some are interested in browser game development and believe that they could make a killing in the online game business. They could be right, or wrong.

If you are interested in getting into the online game industry, it's better that you are a game fan yourself, play a few games and see how other people are doing. If the players really enjoy the game, most would not mind sparing a few dollars or more for some better features and stuff. From a player point of view, what would make you interested in purchasing game gold?

Here I want to show you one example - Rail Nation. Rail Nation is a free online railway simulation game which is about hauling goods to cities, the association and city which haul the most win the endgame. I'm in no way affiliated with the game company. While I'm playing the game, I found the developers quite smart in designing the game features.

In the game, a high level lab requires a certain amount of game money to upgrade. If you do not use game gold, you will be required to wait a few days to save up enough game money to first upgrade your bank a few levels and then your lab. If you use game gold to buy the "plus" account, you instantly get your bank account double in size. I believe if one likes the game enough, one would not mind spending a few dollars per week for the extra feature. Then there are many other ways for you to spend game gold, normal game upgrades would take hours to complete, with game gold you get your building upgraded with one click.

Another huge difference between this game and others is that, this is not the ordinary hit and slash game, you won't get destroyed by your competitors. It's all about logistics planning, where to lay a track, what to haul, where to make a stop. This is an interesting game that requires your brain to do some careful planning. Since nobody can destroy what you built, you can play at your own style or work with others and have more fun.

A game without new features would bore people easily. According to the latest game newsletter, the upcoming update will include some new engines, new tech tree, new game rules, and better interface. That's exactly what game developer should do - get more features and new items, and keep the players interested in.

Is your browser game making money? Do you need any creative ideas or features? I would be happy to throw you an idea or two.

Wednesday, October 9, 2013

AreYouAHuman not working with Contact Form 7?

After using AreYouAHuman's plugin PlayThru for some time, I got to say that PlayThru is one of the best captcha programs that actually works. And its design is way better than those captcha plugins that use images for verification, some of those images are really hard to read for most of the time.

Currently, the daily number of spam comments almost reduce to zero, that is pretty amazing! Afterall, PlayThru is quite fun to use, who would mind to play a little flash game from time to time?

Another great advantage of PlayThru is that it works with Contact Form 7 very well. However, I noticed that sometimes PlayThru would stop working, i.e. the flash game works, gets verified, but the message content could not be submitted. I figure there must be a bug or conflict of some sort after the plugins' updates. So I edit the contact form, re-select the PlayThru element, insert a new PlayThru tag into the form, and the form works again. So next time, if there is any update on your AreYouAHuman or Contact Form 7 plugin, remember to check your form again.

Monday, August 26, 2013

Your Ad Doesn't Show Up on Tumblr?

Adding an advertisement code to a Tumblr blog could be a little bit tricky. After all, you have to edit the template file to insert the code, you might have to test it a few times to get things working. Sometimes, the ads show up alright in the preview, but not in the live blog, the ad area just goes totally blank. What went wrong?

There are few things that might help to get your ads working on your Tumblr blogs.

Does your blog have a domain name? If you are serious about making blog money using your Tumblr blog, it might worth the money to invest in a domain name. Some ad programs only work with a blog which has its own domain name, a sub domain won't work.

Is your blog content unique? Do you reblog other bloggers' work, or simply copy and paste lots of content from other sources? If most of your content are original and unique, you shouldn't have much problem getting your ad program approved. On the other hand, if you only reblog other people's stuff, you might get your account banned.

Do your blog posts mainly display images and not much text? Actually that's perfectly ok in some cases. A good example I found is a Tumblr theme designer's blog. His Tumblr blog just displays 10+ image thumbnails for people to download his free themes, and his ads have been there for ages. Again, your content has got to be unique!

One final point - Nowadays, many people don't use any ads on Tumblr, they only consider Tumblr as a good traffic source, i.e. it could be more effective if you just direct your Tumblr traffic to your other "money" blogs.

Tuesday, June 25, 2013

New Category Posts Do Not Show Up on WordPress Homepage

Recently, I installed a theme called Bayside for my gift idea blog. Bayside theme is a really cool Pinterest, masonry style theme with an automatic infinite scrolling feature. I believe this type of theme is great for a gift blog, photo blog, or any blog with lots of images. Anyway, naturally I created a few more new categories and added more posts and stuff. Now, here comes the problem - blog posts that are under old existing categories do show up on the homepage, but not those that are under a new category name, so what went wrong?

After spending a little time to sort things out, I found out that it is all just a careless WordPress setup mistake. I forgot to edit Settings > Reading > Front page displays, select "Your latest posts"...


Here are 2 more tips for setting up Bayside theme:

After editing the reading setting as described above, now all the posts from all categories are showing up correctly. But it's kind of weird that the post title from the latest post shows up as well, it's a huge title with H1 tags. To remove that, add body.home #content h1.page-title {display:none;} to the style.css file.

The default design uses a gray gradient, I found it darkened the images a bit too much, so I just removed the file gradient-overlay.png file from the folder images, and the gradient is gone.

Saturday, May 4, 2013

Google Analytics Tracking Not Installed

I tried to setup Google Analytics for a new blog, and the Tracking Info page kept saying "not installed". I got really frustrated, and then I noticed something.

The old code is something like:

<script type="text/javascript">

  var _gaq = _gaq || [];
  _gaq.push(['_setAccount', 'UA-<your number here>']);
  _gaq.push(['_trackPageview']);

  (function() {
    var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
    ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
  })();

</script>

The new code is like this:

<script>
  (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
  (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
  m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
  })(window,document,'script','//www.google-analytics.com/analytics.js','ga');

  ga('create', '<your number here>', '<your domain name here>');
  ga('send', 'pageview');

</script>

So I removed the new tracking code, and use the old code with the appropriate account number, and I got the "Status: Tracking Installed" message instantly.

Tuesday, April 16, 2013

Unable to login WordPress admin page wp-admin?

Recently, I have a little problem with my WordPress admin login. I can access the wp-admin page with Firefox and Chrome, but not with Internet Explorer. The browser returned a "HTTP 406 Not Acceptable" error. When I clicked more info, it says, "This error (HTTP 406 Not Acceptable) means that Internet Explorer was able to receive information from the website you visited, but the information was not in a format that Internet Explorer can display."

So I contacted my Hostgator support, and found out that my IP was temporarily blocked. They got it fixed within minutes. That's some kind of service! How did that happen... It appears that lately, there is a some kind of global WordPress brute force flood, and I happen to login quite often lately, so my IP got blocked. :)

For more info of this brute force flood, you can visit this Hostgator blog post, or this CloudFlare post. CloudFlare provides a possible explanation of how this could happen:

"One of the concerns of an attack like this is that the attacker is using a relatively weak botnet of home PCs in order to build a much larger botnet of beefy servers in preparation for a future attack. These larger machines can cause much more damage in DDoS attacks because the servers have large network connections and are capable of generating significant amounts of traffic. This is a similar tactic that was used to build the so-called itsoknoproblembro/Brobot botnet which, in the Fall of 2012, was behind the large attacks on US financial institutions."

So if you have also received this HTTP 406 error, contact your hosting support to whitelist your IP.

Monday, March 4, 2013

Do you need a .cn domain?

Few days ago, I received the following email:

"Dear President & CEO,

We are an organization specified at dealing with domain name dispute and registration in Asia. We have something important on intellectual property right need to confirm with your company.

On February 29, 2013, we received an application formally, one company named "somenamehere" applied for the Brand Name "somenameherealso" and some domain names with our organization.

After checking, we found your company is the original trademark owner. If the company's action haven't been authorized by your company, so their behavior will conflict with your interests. In order to deal with the matter better, please contact us ASAP. (If you are NOT President, please forward this to your President & CEO, because this is urgent. Thanks.)

Best Regards,

Andy
Auditing Director

Web: http://www.huynic.org
Tel:+00852-30775989
Fax:+00852-30771254
Mail: andy.chan@huynic.org"

Some people who are not familiar with Internet domain name system, might actually believe that this is some sort of real online marketing threat. If you reply, I bet they will write back and suggest you to purchase a list of domain names. However, do you know how many domain extensions out there? As of now, there are 22 generic top level domain extensions, 3 US top level domain extensions, 253 country code top level domain extensions and a few others. Some extension like .tm is quite pricey, their minimum registration period is 10 years and the retail cost is US$1000 for the 10 year period. There are so many, you can't register all!

If you have another variation of this type of ad, please post in comments.