Category Archives: Tech

Excel Functions Quick Guide – Part 1 – Strings

Continue reading

Posted in Tech | Tagged , , , | Leave a comment

How to connect an external hard drive to an Xbox

It sounds like it would be pretty simple to connect an external hard drive to your Xbox. Take a USB cable and plug it in to both devices, right? Wrong, as I found out.

I wanted to hook up our 1TB hard drive with all the movies and TV shows on it, as well as my music and pictures, but when I plugged it into one of the front USB ports nothing at all happened. I tried a back port, but the Xbox remained sullen and unresponsive. Continue reading

Posted in Tech | Tagged , , | Leave a comment

How to link back to an album in a NextGen Gallery

When you use the amazing plugin NextGen Gallery for WordPress you can organise your photos into ‘Galleries’ and you can sort these into ‘Albums’ to create a folder hierarchy like you might have on your computer.

When these galleries and albums are viewed on your website they give the visitor a great way to see your pictures, but there’s one feature missing; links back to the album you just came from. I searched the internet for a solution to this but didn’t find a way I liked, so I created my own breadcrumb trail to insert. Continue reading

Posted in Tech | Tagged , , | Leave a comment

NextGen Gallery

Single Picture

[singlepic id=x w=width h=height mode=web20|watermark float=left|right|center]

The singepic shortcode displays a single picture from any gallery.  Clicking on the image displays the image as you have specified on the Effects options page.  With the default Thickbox effect, the background goes gray and a larger version of the image (if available) is displayed. Continue reading

Posted in Tech | Tagged , , , , | Leave a comment

My Favourite WordPress Plugins

I’m using the most up-to-date versions of each of the plugins below (as of 22-09-11) and I’m using WP v.3.2.1.

AddThis Social Bookmarking Widget

Get it here.

Help your visitor promote your site! The AddThis Social Bookmarking Widget allows any visitor to bookmark your site easily with many popular services. Sign up for an AddThis.com account to see how your visitors are sharing your content–which services they’re using for sharing, which content is shared the most, and more. It’s all free–even the pretty charts and graphs.

I really recommend this. Sign up for an add this account and it displays your shares and clicks on your wp dashboard, very useful.
Continue reading

Posted in Tech | Tagged , | Leave a comment

Regular Expression for A Number

I’ve recently had to delete pages numbers out of some of the novels I’ve saved on this site. A handy way of stripping out these numbers quickly is by using Dreamweaver’s search function, which can take a regular expression as a search term.

To get rid of numbers in the format [1]… [10]… [100] I just searched for;

[[0-9]+]

When I needed to get rid of the page line links (<a name=”Page_12″ id=”Page_12″></a>) I searched for;

<a name=”Page_[0-9]+” id=”Page_[0-9]+”></a>

Posted in Tech | Tagged | Leave a comment

Tag Sorting PHP

To make the various tag pages on this site (eg; fanfic ship tags) I used the plugin shortcode exec php to insert the following code into a page;

$dbhost = ‘localhost’;
$dbuser = ‘dbname’;
$dbpass = ‘pass’;
$dbname = ‘dbname’;

Continue reading

Posted in Tech | Tagged , , | Leave a comment

Print Array Contents

To print all contents of an array to the screen use;

print_r($array);

Posted in Tech | Tagged , | Leave a comment

Get All POST Variables

To iterate through all POST form variables, use the code below;

foreach ($_POST as $var => $value) {
echo “$var = $value”;
}

 

Posted in Tech | Tagged , | Leave a comment

Redirect

You can use the .htaccess file to redirect visitors to different files, either on the same website, or on a different site.

Redirect rules are written as below, starting with Redirect, then the location you are directing away from, then the location you are redirecting to.

Redirect /oldindex.php /newindex.php

You can redirect whole directories as well.

Redirect /olddirectory /newdirectory

And you can redirect to a different site.

Redirect /index.php http://othersite.com/newindex.php

Posted in Tech | Tagged , | Leave a comment