Skip to main content

Posts

Showing posts from 2013

Wordpress - Creating Pages On Site Setup

If you, like me, create a bunch of Wordpress sites and, while building your menu, create all the blank pages for placeholders, then this plugin is for you. http://wordpress.org/plugins/bulk-page-creator/ The Bulk Page Creator lets you create all your pages on one single page using a little Ajax.  It's quite simple and saves you a ton of time.

Heart Shaped Social Icon for Instagram

A bit of a random post I grabbed this icon set for a site: Heart Shaped Icons . Unfortunately, it was missing the Instragam icon, so I made my own:

WP Anything Slider

I recently added the WP Anything Slider to a Wordpress blog that I was doing development on.  The default animation options are scrolls (based on the JQuery Cycle plugin).  I wanted to add a fade animation. Thankfully, it's pretty easy to add fade as an effect.  You can add whatever you want from the Jquery Cycle Plugin. Just edit plugins/cycle-setting.php and search for the options list, duplicate the line with "ScrollDown" on it and then replaced the instances of ScrollDown on that line with Fade...done. <select id="wpanything_sdirection" name="wpanything_sdirection"> <option value=""></option> <option echo="" if="" php="" scrollleft="" selected="" value="scrollLeft" wpanything_sdirection_x="=">&gt;scrollLeft</option> <option echo="" if="" php="" scrollright="

Fix For Joomla Admin Menu That Stops Working

A quick fix for those of us who have encountered the top admin menu in Joomla becoming unresponsive. You know, you click, but no sub menu appears? If you check your dev tool of choice (ie. Firebug), you'll most likely see something like this: $ES is not defined The issue has to do with mootools.js and how older versions of Joomla handle the rendering of the admin menus.  Recently, I ran into this issue when I installed a newer version of mootools so that I could get a lightbox effect on a Joomla Virtuemart store.  What I didn't realize at the time was this resulted in the admin menu failing. The fix, thankfully, is quite easy. The file is:  /administrator/templates/khepri/js/menu.js The changes are: Find: var elements = $ES('li', el); Replace with:   var adminMenu=el.id; var elements = $(adminMenu).getElements('li'); Find: nested = $E('ul', element); Replace with: nested = element.getElement('ul');

YiiFramework - Check If User Is Logged In (couponic)

So, I was doing a bit of customization of a Couponic template where I wanted to add a squeeze box (a future post!), but I first needed to check if a user was logged in or not. I didn't want a logged in user to see the squeeze box so I needed to figure out how the framework checked if a user is logged in. Well, it's pretty simple (I've included a quick and dirty write to the browser console log for quick debugging) <?php $isUser = Yii::app()->user->checkAccess('user'); if(!$isUser){ ?> <script> console.log("NOT A USER!!!!!!!!!!!!"); </script> <?php }else{ ?> <script> console.log("IS A USER!!!!!!!!!!!!"); </script> <?php } ?>

Virtuemart: Different Free Shipping Amount For Different Countries

How to adapt Virtuemart's Minimum Amount For Free Shipping so it can handle different amounts for different countries: Now, before we begin, the usual warning:  Backup the files you are going to be working with.  This is a hack of the global.php file to allow different free shipping amounts for different countries. The file you'll be working with:  /administrator/components/com_virtuemart/global.php First, in the Virtuemart administration page, go to the Store -> Edit Store page and set the base amount you want to use for 'free shipping'.  Usually, this should be the value you set for the most commonly used free amount you want to use (ie. your home country). Now, open up global.php , and search for: $vendor_freeshipping = $db->f("vendor_freeshipping"); The example will show how to detect for a country and hard-code in a new value for free-shipping. Ie. The amount set in the VM Admin page will be the base amount for free shipping in Canada.

How To Run Chrome From Within Notepad++

If you have recently tried to Run  Chrome from within Notepad++ recently, you've probably encountered the same issue I did.  Chrome didn't run. The fix is actually really simple.  Open up the Run box in Notepad++ and browse to your installation of Chrome. ie.  C:\Program Files\Google\Chrome\Application\Chrome.exe Select the file when you find it.  Now, the trick is: Put quotation marks around the path you see in the Run  box.  Now, put 1 space after the closing quotation mark. Type this: $(FULL_CURRENT_PATH) It'll look something like this: Click Run .  If Chrome opens, click Save and set your hotkey.