cymeradwyo.net  
 

Archive for the ‘Blogging’ Category

Disqus Comments

Sunday, March 14th, 2010

This evening I have installed “Disqus Comments” onto this blog, so at the end of this post you should see a new type of comment box.  Please leave a comment so that I know it is working!

Although you can enter your details as usual, you can also use a Disqus account or your Twitter or Facebook login to validate yourself.  This not only helps me prevent spam in the comments, but makes it easier for you as a reader because you can stay logged in (through a cookie) and don’t have to enter your details every time you visit.

Also, if you visit other Disqus sites then they should recognise you as well without the need to enter your information.

Is that a problem for you?  Is it OK to link up blogs in this way?  Please let me know!

Bookmark and Share


Is this blog loading faster?

Friday, February 19th, 2010

Does this blog appear to be loading faster to you?

It should be, because I moved it from a hosted webspace onto a virtual server this week.

I was practising for my main blogs, which will be moving shortly.  These were originally setup on hosted webspace and have now outgrown it, making them slower.

Whilst I will probably leave the smaller blogs there for the moment along with any static pages, I obviously want my main projects to load as quickly as possible, and having had the server running now for several months for newer things, the time has come to move the older ones across.

Bookmark and Share


How to add a lightbox form to WordPress

Thursday, February 11th, 2010

Here are the steps that I took to create the lightbox subscription form used on this site:

1. Download “Lightbox gone Wild” from this page.

2. Unpack the following files and save them to the “lightbox” directory on your site:

scripts\lightbox.js
scripts\prototype.js
css\lightbox.css

3. Save the HTML code for the lightbox as a file in the lightbox directory, eg. as form.html

4. To make the lightbox load automatically, make the changes listed on this page, but don’t add the last line of HTML to anything just yet.

5. Return to the Lightbox gone Wild site and search for a comment from “preaxz”.  Make the changes listed, so that the lightbox disappears when you press Escape or click in the shadowed area.

6. Create the following files within your WordPress theme directory:

– lightbox-cookies.php –

<?php
$lightboxcookie = $_COOKIE["lightbox"];
setcookie ("lightbox","1",pow(2,31)-1,"/");   // never expire
?>

– lightbox-header.php –

<!-- CSS -->
<link rel="stylesheet" href="/lightbox/css/lightbox.css" media="screen,projection"
type="text/css" />

<!-- JavaScript -->
<script type="text/javascript" src="/lightbox/scripts/prototype.js"></script>
<script type="text/javascript" src="/lightbox/scripts/lightbox.js"></script>

– lightbox-activate.php –

<?php
if ($lightboxcookie != "1")
{
echo "<input class=\"lbOn\" id=\"lbOnAuto\" type=\"hidden\"
value=\"/lightbox/form.html\">";
};
?>

7. Within the WordPress theme file header.php, add the following lines:

On the very first line (yes, before the DocType!) add:

<?php include "lightbox-cookies.php"; ?>

Before the </HEAD> tag add:

<?php include "lightbox-header.php"; ?>

After the <BODY> tag add:

<?php include "lightbox-activate.php"; ?>

8. Now upload the 4 files in the theme directory and the lightbox directory to your site!

Bookmark and Share