Archive for April 30th, 2011

Embedding a Google Calendar on your website

Google Calendar is a great tool, and embedding your calendar on your website is a great idea for busy professionals who want to be able to direct their potential customers or anyone else to their calendar to schedule appointments.

Embedding a Google calendar into your website isn’t too difficult, but it does require that you get the correct embedding code for the calendar you want to embed. The following guide shows how to do it in a few easy steps.

Step One

Log into your Google Calendar and locate the ‘My Calendars’ selection box on the left sidebar, and click the ‘settings’ link.

Step Two

Click the calendar you wish to embed.

Step Three

Locate the section titled ‘Embed this calendar’ and copy/paste the code into a page on your website, or select the ‘Customize’ link to customize the way the calendar appears.

Your site must support iframes for the embedded Google calendar to display. WordPress users, make sure you click the HTML tab before entering the code. Also, make sure you adjust the width of the calendar if it doesn’t display properly or you change your theme. Take a look at my calendar for an example of how it looks.

Questions, comments, and feedback on this are welcome and appreciated. Thank you!

Advertisements

Leave a comment

JungleDisk Server Edition Management Client – Package of bad quality

While trying to install the JungleDisk Server Management Client version 3.14 64-bit .deb package, I was greeted with the following message:

Lintian check results for /home/mike/Downloads/junglediskservermanagement_314-0_amd64.deb:
E: junglediskservermanagement: wrong-file-owner-uid-or-gid usr/ 1000/0
E: junglediskservermanagement: wrong-file-owner-uid-or-gid usr/local/ 1000/0
E: junglediskservermanagement: wrong-file-owner-uid-or-gid usr/local/bin/ 1000/0
E: junglediskservermanagement: wrong-file-owner-uid-or-gid usr/local/bin/junglediskservermanagement 1000/0
E: junglediskservermanagement: wrong-file-owner-uid-or-gid usr/local/share/ 1000/0
E: junglediskservermanagement: wrong-file-owner-uid-or-gid usr/local/share/junglediskservermanagement/ 1000/0
E: junglediskservermanagement: wrong-file-owner-uid-or-gid usr/local/share/junglediskservermanagement/INSTALL 1000/0
E: junglediskservermanagement: wrong-file-owner-uid-or-gid usr/local/share/junglediskservermanagement/LICENSE 1000/0
E: junglediskservermanagement: wrong-file-owner-uid-or-gid usr/share/ 1000/0
E: junglediskservermanagement: wrong-file-owner-uid-or-gid usr/share/applications/ 1000/0
E: junglediskservermanagement: wrong-file-owner-uid-or-gid usr/share/applications/junglediskservermanagement.desktop 1000/0
E: junglediskservermanagement: wrong-file-owner-uid-or-gid usr/share/pixmaps/ 1000/0
E: junglediskservermanagement: wrong-file-owner-uid-or-gid usr/share/pixmaps/junglediskservermanagement.png 1000/0

I chose to ignore and install, and I haven’t seen any deal-breaking issues. I have reported this to JungleDisk Support, and hopefully they release a new .deb package.

I received a prompt response from JungleDisk support:

JungleTravis, Apr-30 10:26 am (CDT):

Hello Mike –

Thanks for contacting Jungle Disk.

We are aware of this issue and are working to ensure that the latest version of Ubuntu is supported under Jungle Disk. The next release of Jungle Disk should be compatible with this new Ubuntu release.

If you have any additional questions, don’t hesitate to update this ticket.

Thanks,
JungleTravis
Jungle Disk Support

So it looks like this check is something introduced in Natty. This explains why I didn’t see it in Maverick.

,

Leave a comment

How to block requests by referrer using .htaccess

There may be times you want to stop site visitors from clicking from a link on another site. This is called blocking the “referrer”, it’s also used to prevent image hot-linking.

A “referrer” is another site that is linking to yours. When a user clicks on the link on the other site, they are considered the referrer. In a basic referrer block, you block the traffic by specifying what domains (referrers) may not send you traffic.

For example, the following code will block any visitors that visit by clicking on links at example.com, or block any pages or images included in example.com that are from your site (iframes, images, etc).

RewriteEngine On
# Next line may be required, uncomment it if you're having trouble
# Options +FollowSymlinks
RewriteCond %{HTTP_REFERER} example.com [NC]
RewriteRule .* - [F]

The thing about this is it does not stop someone from simply typing in your website address into their browser; it specifically stops traffic that originates from that other domain.

If you simply want to stop image hot-linking, we just block the file types, rather than all traffic. The only line to change is the RewriteRule line. You have two choices: To block the images completely, or to present an image that says that you don’t allow hotlinks.

Option 1: Forbid the request

RewriteRule .*.(jpe?g|gif|bmp|png)$ - [F]

Option 2: Redirect to something else

RewriteRule .*.(jpe?g|gif|bmp|png)$ http://mysite.com/nohotlinks.jpg [L]

Feel free to adapt this to your needs.

Questions, comments, or feedback? Got another method that you think is better, or am I missing something? Please feel free to share it in the comments below. Thank you!

Leave a comment