Skip to main content

Posts

Showing posts from 2012

How To Downgrade Your Wordpress Installation

I recently updated one of my Wordpress installations to 3.5 from 3.4.2 and found out that 3.5 really isn't ready for release as it appears to have a slew of problems . So, what to do?  Downgrade back to 3.4.2, obviously.  A quick Google search brought up this great article with some good steps to follow:  http://etuts.org/manually-downgrade-wordpress/ Here are the steps, with my notes: Log into the administrative backend of your Wordpress installation and deactivate all your plugins (important) Create a backup of your site including the database for safety's sake ( or at least download all the files including those in the root directory, especially wp-config.php) Delete the \wp-admin and \wp-includes folders of your site either with your FTP client or through the backend cPanel of your hosting company.  File Manager in cPanel is a lot quicker than through FTP. Find the Wordpress 3.4.2 (or whatever version you are going to downgrade to) files:   http://wordpress.org

Drupal Search Not Working - Fix

Editing or creating a Drupal site where the search form stopped working or never worked in the first place? Enable 'Search' module in   http://sitename.com/ ?q=admin/module See   ?q=admin/settings/search   to see how many items are left to index.  If you see that the site says 0% indexed, 177 items to go or something along those lines, run cron. Run 'cron.php' from your browser like  http://www. sitename .com/cron.php Check   ?q=admin/settings/search   again to see the status of search module. That's it. Something I never thought to do while making the site, so hopefully this post helps someone else out.

Category Sort Plugin For Wordpress

I was recently using a theme that had a secondary posts section and I wanted to organize the categories of posts independently of each other. Thankfully, I stumbled across this plugin for Wordpress that is just an all-around great plugin:   Category Order and Taxonomy Terms Order . After installation, it creates a quick little Ajax driven drag and drop category sorter under your posts menu.

.htaccess Redirect

Previously, I posted a quick .htaccess tip which you can find here:  http://2bluesolutions.blogspot.ca/2012/07/apache-modrewrite-all-files-temporarily.html As an addendum, I have recently discovered this great site: http://htaccessredirect.net/index.php This site will generate an .htaccess file for you based on a whole bunch of variables you can enter into the form. It's probably not as complex as some of you would need, but those of us making complex .htaccess files don't need this site, right? It's a great tool for creating fast and simple .htaccess file for handling a bunch of redirections. http://htaccessredirect.net/index.php

Apache - Mod_Rewrite All Files (Temporarily) To One File

For example, say you want to put up a coming soon page on a Drupal site and you don't want to edit the "Down for Maintenance" file, you can just quickly alter the .htaccess file. This example involved a Drupal site where I had FTP access, but not admin access to the installation. So, the quickest option was to whip up a coming soon page, upload the file as index.html and then put up a new .htaccess file (backing up the original). The .htaccess file should look like this: <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule !^/index.html$ /index.html [R=302] </IfModule>

Specific CSS Based On Orientation

A quick and easy way to load specific CSS based on the orientation of the viewing device (ie. iPad / iPhone). Just put the following in your header and create the appropriate stylesheets. <link href="portrait.css" media="all and (orientation:portrait)" rel="stylesheet"></link> <link href="landscape.css" media="all and (orientation:landscape)" rel="stylesheet"></link>

Brackets - A Possible Replacement For Notepad++?

Read an article via Smashing Magazine regarding a new editor called Brackets  and decided to give it at try. Initial reaction is that it is actually a pretty nice editor for Web Developers.  It's more of a true IDE than Notepad++ with a nice listing of open files on the left. So, why use Brackets?  Well, I do like the IDE type layout.  Though, I do know that there is a file listing component in Notepad++. I suppose the best that Brackets has to offer now is the live CSS editing.  Linked with Google Chrome, Brackets can live update any changes to your CSS files immediately in the Chrome browser.  It's pretty nifty to see in action. Give it a try:   Brackets

EZPZ One Click Backup For Wordpress

I just learned that one of my favourite (well, my only) backup utility for Wordpress isn't in the Wordpress Plugin Repository anymore for some reason unknown even to the author of the utility.  For those of you looking for it somewhere, you can find it on his site here:  http://ezpzsolutions.net/ocb-wp-plugin/ Or you can find it here:   http://2bluesolutions.ca/files/ezpz-one-click-backup-latest.zip Why do I like this plugin so much?  It's simple, easy to install and setup, and even includes a scheduling program that will email you with a direct link to the backup when it has created a new one.  Also, it's free which is always a huge plus.  Restoring from a backup is also dirt easy as well.  It really reminds me a lot of the Joomla backup tool I use .

Proper Viewport Scaling on iPad and iPhone

So, this is a little silly and I'm a little embarrassed to say that I've spent far too much of my time on this issue. I had a multi-page site that wasn't displaying correctly on my iPad.  One page would look great, but the next would have the top menu cut off on the right and everything would be slightly zoomed in. I realized that it was a scaling issue, but for all the experimenting I did with the meta viewport tag , I couldn't get it to work. Then I thought of something...some pages didn't have as much content as the others.  The longer pages were displaying great, it was the pages short on content that weren't.  So, I went ahead and set a min-height for each page of 1050px (I figured it had to be a little larger than the 1024px portrait height of an iOS device) and voila, it worked. All the pages showed correctly.  Now, I fully admit that this is most likely a hack that isn't considered the "proper way", but I am absolutely open to sugge

Wordpress Yoast SEO Plugin and Duplicate Titles Fix

If you're using the Yoast SEO Wordpress plugin and experiencing an issue with your site's title appearing twice (ie.  2Bluesolutions Tech Blog - What Is Kickstarter - 2Bluesolutions Tech Blog), then there is a simple fix that seems to work for many people. You need to edit the header.php file for your Wordpress theme. My particular Wordpress theme had this for the title meta tag: <title><?php wp_title('&laquo;', true, 'right'); ?> <?php bloginfo('name'); ?></title> You need to change it to something much more simplistic.  What you should replace it with is this: <title><?php wp_title(''); ?></title> That seems to fix the issue, at least for my sites.

Wordpress - Startup Tips

I've created a few Wordpress sites now that I know there are a few tips to do right off the bat that will save you grief later. First tip: Time - I always seem to forget to set the time zone settings found under Settings - General .  Without this properly set, you get the annoyance of having your post times be set to UTC-0 which is fine if you live on London. Second tip: Remote Publishing - Within Settings - Writing , be sure to check the box for XML-RPC so that you can use Wordpress apps to post from your mobile device. Third tip: Media Settings - be sure to go into Settings -> Media and change the default sizing for thumbnails, medium, and large images so they better match the dimensions of your site.  I prefer to make large the largest size, medium exactly half and then keep thumbnails the same. Fouth Tip: Permalinks - Under Settings - Permalinks you'll find the settings for how your URL will be displayed.  The default setting is

Windows Phone 7 doesn't support @font-face

Took me a while to realize that my @font-face fonts weren't being imported on my Windows Phone.  I thought I was doing something wrong and then just sort of gave up after a while. Well, today, I thought I would take another stab at it thinking that maybe I packaged/converted/imported the fonts incorrectly for the WP7 OS.  Then I stumbled across this article which clearly explains the limitation of IE9 on WP7 -  http://www.ubelly.com/2011/11/the-differences-between-ie9-on-the-desktop-and-ie9-on-wp7/ Now, I was really excited to see IE9 coming to WP7 and that excitement was mainly around HTML5 support AND @font-face support.  Silly me, thinking that IE9 on the mobile device would act like the desktop version. Anyways, I suppose I could just implement image swaps for the items I want displayed as a certain font. Here is the list of supported fonts for WP7: http://msdn.microsoft.com/en-us/library/ff806365%28v=VS.95%29.aspx

Creating a triangle in Adobe Fireworks

I'm not sure why I only just stumbled across this now, but I used to create triangles in Gimp by creating a square, rotating it, and cutting away half of it, then importing it into Adobe Fireworks. I have no idea why I made life so difficult for myself when there is a brutally easy way to accomplish the exact same task within Fireworks itself. Draw a square (yah, I know how to do that) Select the Skew Tool (hotkey Q) Grab one corner of the square that you want to be the arrow point and pull it towards the middle.  The opposite corner will automatically pull into the middle at the same time. Done. Stupid easy and I feel just a tad smarter.

A pair of great Chrome extensions for taking screenshots

I recently came upon a need for a way to take some screen shots of some of the sites I have created. There are plenty of tools available to serve this purpose, but I wanted something relatively quick and easy. Initially, I looked into a utility called webscreencapture . While it worked really well for most sites and you can make a nice batch file to run it all at once, it failed to capture some Joomla sites and Flash sites. So, next I figured I should try a browser solution. There is Fireshot for Firefox, but since Chrome is my browser of choice, I decided to find an extension for Chrome instead. What I found right off the bat was Awesome Screenshot and Annotation . It installs a button in the upper right of your browser which you can press to take a screenshot of whatever is on the page of your browser.  You can annotate the image, or like me, you can just click done and save it locally. Now that I had a screenshot tool, I realized that there is one more issue to resolv

Virtuemart - DIBS module “No paytype(s)! Missing test parameter?”

As a follow up to my previous post about installing the DIBS module in Virtuemart , there is a poorly documented error you will run into when trying to use the payment module on a live site. Basically, it will complain about a missing "paytype" which is actually not what is missing.  What is missing is the "test parameter" as the error will tell you.  After spending too much time trying to fix the "missing" paytype, I tried a different method and deduced that it really was missing a test parameter. With the default setup, the DIBS payment processor will only send a "test" variable to DIBS when it is actually in testing mode.  Makes sense, right? if(DIBS_TESTMODE == "YES") { $oid = 'test-' . $db->f("order_id") . '-' . time(); $post_variables["test"] = "YES"; $post_variables["orderid"] = $oid; } else { $oid = $db->f("order_id") . '-' . time();

Installing DIBS in Virtuemart

I recently was contacted to install the DIBS payment module in Joomla's Virtuemart . It is actually a very straightforward procedure that the DIBS developers lay out nicely in their help file. First step is to download the files you need from the DIBS site: http://tech.dibs.dk/toolbox/dibs_standard_shopmodules/ ( direct download ) Scroll down to the VirtueMart plugin or choose the above direct download link. Unzip the files. Inside, you will find the "docs" folder which contains a readme file which is very well laid out. Quickly, the steps are: Upload the contents of the module folder to the root of your Joomla installation. Log in and navigate to your Virtuemart administrative page. Select List Payment Modules (under Store) and choose DIBS Credit Card from the list of available payment modules. Tick the box for " Active " to make it active. Change the payment method name to whatever you want the customer to see when they checkout. Code =

Virtuemart - Remove or Edit Send Registration Button (or Form)

If you want your checkout page to look like this: First, you can edit the text for you button in: /administrator/components/com_virtuemart/languages/common/english.php Search for: BUTTON_SEND_REG Whatever you put in for that value, will change the value of the button. For example, put in "Next" instead of "Send Registration" (the default value): Now, to remove the empty "Next" box as seen in the above example, it will just require a simple edit from within your Virtuemart administration page. Log into your Joomla administration page. Enter your Virtuemart administration page. Under Admin, select Manage User Fields . Find delimiter_sendregistration : Then click on the green check mark in the Published field to unpublish the field Finally, for a little bit of housekeeping, edit the following file and add some blank space before the BUTTON_SEND_REG button. /admin/components/com_virtuemart/checkout_register_form.php