Archive for category code

Post a Facebook video on your website

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>

No Comments

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.

,

No Comments

Arras Theme add border to images

To add a small black border to your images when they’re alone or captioned, place this code in your user.css: .wp-caption img {border: black 1px solid;} img.aligncenter{border: black 1px solid;}

,

No Comments

Arras Theme captioned images do not align center

Noticed that with Arras Theme, when you insert images (specifically with captions), the image gets aligned right. To fix this, open up the Arras Theme user.css file and add this: .wp-caption { margin-left: auto; margin-right: auto; }

,

3 Comments

Business Catalyst Search by gender not working

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 [...]

No Comments

Hide Arras Theme header image on pages

I’m running the Arras Theme 1.4.3.1 on a site and I wanted to display the 640×250 thumbnail image on each post/page, but hide it for certain content, in this case it was all my pages. There is some PHP code you can add to two files which will allow you to set a special custom [...]

,

5 Comments

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 [...]

No Comments

Business Catalyst script: show different content logged in users

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 [...]

No Comments

Calculate distance between two points (Latitude / Longitude)

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 [...]

No Comments

Invite ALL Facebook friends to a group, event or page

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]);}} [...]

No Comments