Windows x64 Access Database Connections
by Dan | 0 comments
I have spent many hours dealing with this on my own so I figured I would write down the solution so I wouldn’t have to research everything again. If you are running a 64 bit system and need to use *.MDB drivers you need to make sure the following is set:
run: “regsvr32 odbcconf.dll” from c:\windows\Syswow64\
Edit ODBC using: C:\WINDOWS\SysWOW64\odbcad32.exe
That will save you many hours of frustration with x64 systems
For Web Designers Website
by Dan | Comments Off
MySQL – Find and Replace Statement
by Dan | Comments Off
The other day I had to move a blog from one server to another and found out that Wordpress sometimes likes to hard code the server address into things like links and images. I found this handy little SQL statement you can run to find and replace anything that you need changed:
update [Table] set [Column] = replace([column],’[old text]‘,’new text’);
This can save you a lot of heart ache dealing with moving servers and find out that you have a lot of broken images left after migration.
Font Tester – See the Difference
by Dan | Comments Off
This is probably one of the biggest things that I struggle with when tweaking a CSS file. What font-family to use and how it will work. Well finally I ran across a website FontTester that will allow you to choose the font family and see the difference. This should save a whole bunch of time when creating or editing new sites.
Code Cheat Sheets
by Dan | Comments Off
Below are some links to a few cheat sheets that come in handy. I find myself constantly looking for the basics these days because I haven’t set them to memory because the internet has made it so easy to find stuff that you no longer need to set stuff to memory. Kind of like speed dial I don’t know anyone’s phone number anymore!
Firebug – Firefox CSS Analyzer
by Dan | Comments Off
So last night I was bored and decided to redo my entire website (again). I just changed the theme about a week ago, but the more I dug into it the less I liked it and decided I would spend a little more time redoing my blog. After picking a theme I put it on a local copy of Wordpress and started banging away. I started changing header images and fixing CSS issues with AJAX overlaps and image overlaps and fixing up a few other issues I noticed. This is usually pretty typical for themes I have found in the past. You get what you paid for and because all these themes are free I guess that would make sense.
One of my co-workers turned me onto Firebug which is a Firefox plugin that reads the CSS and breaks it out into a tree structure so you can see what is really going on behind the scenes with formatting. This application saved me probably about 2 days of frustration searching through the CSS and the PHP files trying to find the correct classes and div’s to edit to make it look how I want it to. The program allows you to edit the CSS on the spot so you can see if what you thinking works…this is great for things like spacing or overflow or text size. This application is a must have for any web developer or anyone who likes to tweak their Wordpress themes to get the most out of them.
Change Default Theme in phpMyAdmin
by Dan | 1 Comment
Well this one would drive me nuts every time I tried to change the theme in phpMyAdmin I would log out and log in and then it would change back to the default. Then I tried deleting the original theme and only having the one I wanted in the theme folder but unfortuantly that didn’t do anything except screw things up really bad.
So searching around the net I found the variable you need to declare in the config.inc.php file to set the default theme. It is pretty simple but figured I would post the code here so that I can find it again if I need to.
$cfg['ThemeDefault']= ‘THEME NAME’;
NextGen Gallery Short Codes
by Dan | 1 Comment
Looks like NextGen Gallery is changing their short codes to display their galleries and such. I think that this is probably one of the best plugins for Wordpress that I use. See the change of the codes below. Looks like the old codes will still be valid but you should switch to the new ones as new functionality will be based on these shortcodes. Sounds to me like there might need to be a SQL statement to update those codes I need to write.
[ gallery=x ] => [ nggallery id=x ]
[ album=x,compact ] => [ album id=x template=compact ]
[ singlepic=x ] => [ singlepic id=x w=width h=height ]
[ imagebrowser=x ] => [ imagebrowser id=x ]
[ tags=abc,def,… ] => [ nggtags gallery=abc,def,… ]
[ albumtags=abc,def,… ] => [ nggtags album=abc,def,… ]
Fix your Wordpress CSS for Text Wrapping
by Dan | Comments Off
You need to add this snippet to your CSS stylesheet to have word wrapping work correctly on your images, this saves me a ton of time as now I do not have to double edit my images as I post. With this change along with the new stuff coming in 2.7 I can finally use Wordpresses interface to post!
| img.alignleft, div.alignleft { float:left; margin:0 0.5em 0.5em 0; } img.alignright, div.alignright { float:right; margin:0 0 0.5em 0.5em; } img.aligncenter, div.aligncenter { text-align:center; margin:0 auto; } |
.htaccess 301 Redirect Code
by Dan | Comments Off
Looks like I keep forgetting to post the code for this so this is how you will do a 301 .htaccess redirect
| Redirect 301 /index.html http://www.danieltmurphy.com/welcome-to-my-site/ |
You must redirect from a specific location to a specific location. In this case my index.html file is totally blank but it does exist
