Archive for category code
Post a Facebook video on your website
Posted by Mitch in code, Web Development on August 14, 2010

Simple code to embed a video you have on your Facebook account (or anyone else’s Facebook account), provided that the privacy settings allow access. <object classid=”clsid:d27cdb6e-ae6d-11cf-96b8-444553540000″ width=”400″ height=”300″ codebase=”http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0″><param name=”allowfullscreen” value=”true” /><param name=”allowscriptaccess” value=”always” /><param name=”src” value=”http://www.facebook.com/v/movieID” /><embed type=”application/x-shockwave-flash” width=”400″ height=”300″ src=”http://www.facebook.com/v/movieID” allowscriptaccess=”always” allowfullscreen=”true”></embed></object>
Update a domain name in a Microsoft Access database field

This is just for my own notes because I use this code infrequently and don’t like to retype it. If you need to update an email field and change the domain, use this code: Mid([contactpoint],1,InStr(1,[contactpoint],”@”))+”finished_domain.com” Make sure you’re only selecting the data you wish to update.
Arras Theme add border to images
Posted by Mitch in code, Web Development on July 14, 2010
Arras Theme captioned images do not align center
Posted by Mitch in code, Web Development on July 14, 2010
Business Catalyst Search by gender not working
Posted by Mitch in code, Web Development on July 12, 2010

Because the default search action of web app search forms is to search partial words, if you specify MALE then FEMALE will be included in the result. Buried in the description for how a Web App works is an instruction regarding using a custom field for Gender in your web app. To avoid this issue [...]
Hide Arras Theme header image on pages
Posted by Mitch in code, Web Development on July 11, 2010
Change the Page Title on Tell-A-Friend confirmation page

This is a simple bit of code, but it’s something that may come up depending on the development you are doing. For example, in Business Catalyst the Tell-A-Friend function allows you to email a page to someone and then redirects to a confirmation page when done. Unfortunately, that page shows your account name as the [...]
Business Catalyst script: show different content logged in users
Posted by Mitch in code, Web Development on July 4, 2010

I was messing with a friend’s Business Catalyst CMS and managed to break his Javascript while trying to fix his top navigation. In truth, the way it was before wasn’t acceptable anyway so really I didn’t break anything that wasn’t already broken. Anyway, there was a SCRIPT which was supposed to show a link that [...]
Calculate distance between two points (Latitude / Longitude)
Posted by Mitch in code, Web Development on July 2, 2010

This is a useful script for calculating the distance between two points using their coordinates. Very useful as part of a Lookup function. I can see many applications for this code. Note: read the notes in the code carefully so you implement it correctly the first time. Original code location: here The code below isn’t [...]
Invite ALL Facebook friends to a group, event or page
Posted by Mitch in code, Web Development on July 1, 2010

Here’s a winner of a Facebook hack. To invite ALL of your friends to a Group, Event or Page: Click on Invite or Suggest or whatever. Wait for the window to open. Copy/Paste the code below into your browser address bar behind the window (where you type website addresses): javascript:elms=document.getElementById(‘friends’).getElementsByTagName(‘li’);for(var fid in elms){if(typeof elms[fid] === ‘object’){fs.click(elms[fid]);}} [...]

