Archive for the ‘Tech Talk’ Category
THIS ACTUALLY WORKS!!!
First of all, big thanks to the people over at www.egopoly.com for finding this gem. I had been searching for countless time for a way to completely remove MYSQL from my apple computer that is running snow leopard or OSX 10.6X.

I found multiple solutions that do most of the work, but missing one crucial step that www.egopoly.com was able to grasp. So, I figured I would quickly combine the two for a short, easy reference.
To completely remove MYSQL from your mac running osx 10.6 (snow leopard) perform the following tasks in TERMINAL:
sudo rm /usr/local/mysql
sudo rm -rf /usr/local/mysql*
sudo rm -rf /Library/StartupItems/MySQLCOM
sudo rm -rf /Library/PreferencePanes/My*
(Edit /etc/hostconfig) sudo vi /etc/hostconfig (Remove line MYSQLCOM=-YES)
sudo rm -rf /Library/Reciepts/mysql*
sudo rm -rf /Library/Reciepts/MySQL*
sudo rm -rf /var/db/receipts/com.mysql.mysql*
*the very last line is the egopoly.com hack
After executing these commands in terminal (which you can just copy and paste, hit return and go…), I would suggest restarting your mac. After reboot, MYSQL will be completely removed from your mac.
Hope you found this helpful and thanks to forums.mysql.com and www.egopoly.com for the inspiration. I tried to thank them on their blog but the entry was closed to posts. So, this is my thank you!

So, here is my boring story behind it. I was re-installing MYSQL on my mac and just kept running into problem after problem. It would install but fail to execute. I navigate to the MYSQL preference pane and click Start MYSQL and nothing would happen. So, I was probably downloading the wrong versions of it from the dev.mysql.com website. I finally found an older version that I wanted to install, but the installer kept failing. Saying that there was a newer version of MYSQL on the computer and that it couldn’t continue.
I then enabled hidden files to show in finder, went into /usr/local/mysql and deleted everything there. Rebooted and got the same error on install. And I would keep getting a pop up at startup telling me that the MYSQL engine failed to start because I didn’t have sufficient permissions. This was getting real frustrating at this point. I had tried the first lines of code mentioned above that were what my search results were returning, but to no avail.
Somehow I managed upon www.egopoly.com, I forgot what my exact search query was. And there it was… the answer to it all. I added the egopoly line on to the end of the one I got off of forums.mysql.com, ran it in terminal as mentioned above. I went to install the earlier version of MYSQL again and SUCCESS! I really couldn’t believe it. So, hopefully this will help you and you will spend less time searching.
Please visit their site and feel free to comment here if you like.
Volusion is probably one of the top 3 eCommerce solutions for small businesses on the internet. They offer credit card online transactions through Visa and Mastercard for considerably less than other alternatives, and secure trading over the internet.
What they don’t offer is a lot of wiggle room to customize the look of the website. The templates are fully customizable, but not for the content are of the site, such as the product display and category displays. Since Volusion uses .ASP pages to call their data, the pages are encrypted and aren’t given access to.
One of the most important things that Volusion stresses in their training videos is the importance of visual presentation, and then they don’t give you the ability to edit the look of one of the most critical parts of the site!
Luckily, thanks to a little research, and guidance from fellow web developers, scripts of javascript code can be used to identify certain parts of the site, and insert your own lines of code.
Volusion’s .ASP pages write the code in tables, as opposed to div tags, which are horrendous for SEO purposes, and also, you won’t have a div class to identify and override in your CSS. What you essentially have to do is identify a page by it’s URL, identify a table cell by it’s tag, insert your div tag in the table cell, and then write the corresponding CSS for that tag. Here’s how, step by step:
1) Identify the page you want to make changes on:
In the template of your Volusion site, insert the following code after your final div tag, but before the tag:
<script type="text/javascript">
//var sPath = location.href;
//if(sPath.indexOf('URL element defined by you') != -1) {if(location.href.indexOf('URL element defined by you') != -1) {
</script>
All this is doing is essentially telling the javascript, if the page you are currently on involves ‘this’ in the URL, begin the code. It SHOULD NOT be the entire URL, but a unique part of the URL that Volusion uses, for example : ‘category_s’ or ‘product_p’.
2) Tell the code to begin identifying tables by cell:
Now you have to tell the code to create a variable based on which block element you want to use.
var tdTags = new Array();
var tdTags = document.getElementsByTagName('td');
What you are doing is creating a variable called ‘tdTags’ and you are getting that specific block element by the type which in this case is a table cell (td). You can use this code later for other purposes, because it will identify block elements only, i.e. div, table, tr or whatever.
3) Call to a specific cell table by number:
This is the fun part. Since the pages are written in tables, and tables flow left to right, you basically have to call to them by number, like 1, 2, 3, and so on.
var replcode = tdTags[8].innerHTML;
tdTags[8].innerHTML = "<div class=\"YOUR CSS CLASS HERE \">" + replcode + "</div>"
So here, it’s calling to table cell # 8, and telling it, take that table cell, wrap it in a div tag with the class name of your choosing, put the code back in, and then close the div. You can now go to your CSS, write that class style, and it will now insert it for that particular table cell, for that page only.
Basically, when you are done, the code should look like this:
<script type="text/javascript">
//var sPath = location.href;
//if(sPath.indexOf('URL element defined by you') != -1) {if(location.href.indexOf('URL element defined by you') != -1) {
var tdTags = new Array();
var tdTags = document.getElementsByTagName('td');var replcode = tdTags[TABLE CELL NUMBER].innerHTML;
tdTags[TABLE CELL NUMBER].innerHTML = "<div class=\"HERE \">" + replcode + "</div>";}
</script>
You can repeat the last 2 lines of code and change the numbers as much as you’d like in the script. You can edit multiple table cells in one particular page, but if you change pages, you will have to write a new script, with a new unique URL element. Try it out, and see how it works for you.
PROBLEMS WITH USING THIS CODE :
It doesn’t come without its strings. I’ve definately encountered a few problems using this trick to get the look you want. The most notable :
1) Elements change constantly on a Volusion store. The idea behind being a web developer is turning this online store over to a client after the finished product is there. Since this code is POST data retrieval, when a client finally has their store up and running, their products may change, descriptions will change, amounts will change, and thus the table element’s numbers will change. The code will still work, but it may not call to the table cells you want anymore. This is NOT a dynamic script, sadly.
This is especially tricky is when you have a page that contains say 10 items, and then the next page has 5. The table’s are written left to write, not up and down, so if there is only 5 items, the table cells’ numbers will change for that last product, and it will take on the wrong elements and insert them. Unless you’re a super incredible web developer and want to insert a loop into your javascript code to prevent this (which sounds like a shit load of work), your pretty much stuck. Try to work around this.
2) It takes a lot of time to define these table cells. It certainly isn’t easy to just say, “oh, ok, Volusion put table cell #2 here.” You’re going to need something in place already to define a table cell element, and then call it by number. A LOT of trial and error. What i found was best is to just use a class with a small, thin red border around it. Start trying different numbers in the script to see where these table cells are placed on your page.
All and all, this code is good for small, minor changes, but will never be as satisfactory as simply having access to the .ASP pages. It will never be truly dynamic unless Volusion lets you.
Good luck!
Author: Randy Neil
Courtesy of: www.theheadrush.com