How to stop a webpage from auto refreshing constantly
There’re a few questions related to this matter I received today from my clients. Some of them have tried “break;” and “window.stop();” and “pause();” and “window.location.reload(false);”, … you name it; however, non of them works. There’s a trick to reload a webpage once and stop the webpage from auto-refreshing itself. At the end of the URL, add the pound sign like this # in the Get or Post URL. Then when you retrieve the value by GET/POST variables, remember to remove the # sign by using str_replace function in php, or string.cut(), string.substring() function in JavaScript.
This is the Javascript codes that will refresh the webpage once and dynamically detect the screen width and height of a client computer or a mobile device such as iPad, iPhone, Android, Smartphone…
<script language=javascript> window.location.href="?height="+screen.height+"&width="+screen.width+'#'; </script>
Editor issue with fresh installation of WordPress 3.5.1
For those of you who install fresh WordPress 3.5.1, you may experience some buttons / links of the HTML editor didn’t work such as the toggle between View/Text button, the Add Media or Add Image button. If it behaves so, this is another option you can do to fix it.
1) Back up all your WP files and Database
2) Go to this website http://wordpress.org/download/release-archive/ and download Version 3.4.2.
3) Install on your server.
4) Now log in as WP Admin and upgrade to 3.5.1. It should take care of the issue.
For those who installed customized WP theme, you can re-install the same theme after the upgrade.
Between WordPress and Joomla, what should I use?
Up until todate, we’ve received a few questions about what to choose between WordPress and Joomla from our new clients. So we do some research and this is the best comparisons of the two most popular CRMs right now. This document was created back in January 2013 by Redgiantdesign so it’s considered to be quite recent.
Please click on this link to view the entire comparison in graphic.
How to use dynamic text in an html/htm page
Whether you have a Joomla, WordPress, or E-commerce website, updating the copyright year on your website may not be a legal requirement, but it’s a smart marketing method to prove that your business is active. Showing the year is especially important if you have a site without dates on its content.
There’re many ways you can automatically refresh the copyright year by inserting a simple JavaScript or php script (see below) into your website’s html code, or you can manually change the year in the footer of your website, or you can use direct PHP codes such as echo date(‘Y’) in the footer.
Here’s the JavaScript. Copy and paste it wherever you want the current year to appear:
<script language="javascript" type="text/javascript" > var today = new Date() var year = today.getFullYear() document.write(year) </script>
And here’s the php script:
<?php echo date("Y"); ?>
The php code is simpler, but it may not work yet. You need to take another step first to make the php script run on html pages. Create or edit an .htaccess file. in the root of your website directory. Open a new file in a text editor like Notepad or Notepad++. Paste the following code into the file:
AddType application/x-httpd-php .htm .html
If you have an existing .htaccess file, open it and add the above code. The .htaccess file now affects every other file in your website.
How to read a .diff file when you purchase an X-Cart module
Diff is a comparison utility that’s very useful when you upgrade or modify your web application pages. If you notice carefully, there’re some modules that come with readme.txt and patch.diff files. Open the .diff file in a notepad or Notepad++ (better), you can see each line in different colors for different purposes, meaning, & usage.
*** /path/to/original_file ''server_timestamp'' --- /path/to/new_file ''server_timestamp'' @@ -l,s +l,s @@ optional section heading
