dougandrews.co.uk

August 19, 2010

common autoresponder mistakes

Filed under: Techie stuff — admin @ 10:02 pm

Setting up an autoresponder for your emails for when you are away is relatively well documented but there are some additional things you need to do to ensure it works as you plan, otherwise you can get caught out.

1. The autoresponder loop

If you setup an autoresponder to simply reply to any incoming email with a ‘I’m away email’ then you can get caught in a loop if the sender has setup a similar autoresponder. i.e. I received an email from ebay, to which my autoresponder replied to say I was away, to which ebay replied that ‘my message was important to them’ or somesuch, to which my autoresponder replied to say I was away to which … you get the idea. I had set up various filters etc to keep my emails to the minimum so I could pick them up remotely on my iphone, where I was paying according to the volume downloaded. This loop generated an email about every other minute until I was ironically rescued from drowning in auto emails by:

2. The automatic update

If you forget to switch it off, Windows will automatically check for updates and install them, if that means a restart then your emails are no longer checked and the autoresponder doesn’t kick in.

These two both caught me out but a third which I DID manage to do but which I don’t see often mentioned is to ensure that your computer is set not to sleep after a certain amount of time.

Solutions:
1. It is unfortunately difficult to make this 100% foolproof as not all autoresponders reply with a copy of your original email, so you can’t simply check for a word used in your original email to stop the process. My best effort would be to create a rule which sits above your autoresponder, which checks for :
- a word (such as ‘autoresponder’ or whatever you have used in your reply)
- certain give-away addresses, such as ‘donotreply@’, ‘blackhole@’ etc
- any domains which you happen to know of which has this kind of receipt notification set up

If any of the above are found stop the system from processing any more rules, so it never reaches your autorresponse rule.

2. stop the computer from updating

Go to : control panel > system and security > windows update > change settings.

Change important updates to: anything except install automatically.

Note that this does pose a minor security risk but you can’t have your cake and eat it, just remember to turn it back on when you return.

3. stop the computer from sleeping

Go to : control panel > hardware and sound > power options > edit plan settings.

Change put the computer to sleep: never

These settings in 2 and 3 are for Windows 7.

May 24, 2010

bb press security options

Filed under: Techie stuff — admin @ 2:21 pm

There are a bewlidering array of plugins that try and control security settings within bbPress. Which one(s) to use??

The plugins don’t appear to be categorised in any useful manner so I’ve trawled through and here’s my list:

Registration

  • Approve user registration – adds a manual check
  • Clickcha – adds a visual puzzle to forms to prevent ‘bot submissions. Works on registration and forum posts
  • Human Test for BB Press – displays 2 random numbers, add them to complete registration.
  • New User Notification – sends email notification, could be used in conjunction with ‘Approve user registration’.
  • bb-NoSpamUser – blocks registrations based on a centrally controlled database of IP addresses, emails and username.
  • Project Honey Pot – not entirely clear, but appears to block according to centrally controlled criteria.
  • reCAPTCHA for Bb Press – uses the reCAPTCHA project from Google to display fuzzy text which needs to be entered when registering. Needs a free account with Google reCAPTCHA.

Forum use

  • Force login – requires users to login in order to see any forum posts
  • Forum restriction -restrict access to forums to certain individuals and hide them and their topics from all others.
  • reCAPTCH Bb Press as above, adds it to forum posts
  • Private forums – set viewing access to forums

Administration

  • bb Press Moderation suite – contains a number of tools
  • Mass Edit – allows moderators to bulk edit posts/comments
  • bb moderation hold – holds posts for moderation.

May 5, 2010

Installation of WordPress MU 2.9.2, BuddyPress 1.2.3 and bbPress 1.0

Filed under: Techie stuff — Tags: , , , — admin @ 9:12 am

I made these notes as I went along, if you take a step out of turn as I did on more than one occasion you will probably have to start from scratch with your installation. The installation of these three provides you with a good platform for a social network. I used this to setup www.scienceafrica.info, which at the time of writing is still in Beta.

I’ve used www.example.com as my example, substitute this for your own domain.

Setting up WordPress MU
1. Setup the database
2. download http://mu.wordpress.org/download/
3. unzip and upload the contents of wordpress-mu to the root of the webserver
4. go to www.example.com
5. follow the instructions to setup WordPress up with access to the database. Exclude ‘www.’ from the server address.
5.a. NB for this to work make sure that you have http://example.com (as opposed to http://www.example.com) registered as a A record for your domain, otherwise it will not work
6. login to test it is all working OK using the supplied username and login. make a note of these for future ref.

Setting up Buddypress 1.2.3
MANUALĀ  INSTALL – I recommend the automatic install
1. download http://buddypress.org/download/
2. unzip and upload to /wp-content/plugins/folder NOT mu-plugins folder

AUTOMATIC INSTALL
1. login to wordpress
2. go to plugins -> add new
3. search for and install buddypress
4. activate a buddypress compatible theme -> follow on screen instructions

Setting up bbpress
1. download http://bbpress.org/download/
2. create the directory where you want the forums, i.e. root/forums will mean users access them via www.example.com/forums
3. unzip and upload contents of bbpress to /forums directory
4. go to www.example.com/forums/
5. enter the database configuration info requested:
– for ease of use suggest using same database as WordPress
6. check the tick box to add integration settings for WordPress then cookie settings
– enter the wordpress and blog address as http://example.com
– all of the cookie and salt info is found in wp-config.php. Click on the ? to get the exact description of which value to enter.
7. check to add user integration

Integrating WordPress with bbPress
1. login to bbpress – if already logged in after installation, logout, then login again.
2. go to settings_wordpress integration
3. Enter user mapping andn save, suggest:
admin->key master
editor->moderator
everone else->member
4. check that the cookie & salt values entered are correct as entered previously
5. got to www.example.com/wp-admin/
6. go to Plugins->add new->bbpress integration->install->activate
7.go to settings->bbpress integration
8. enter the info requested and save:
–bbpress URL : http://example.com/forums/
–leave the plugins field
– wordpress type -> MU
9. scroll down to the bottom and the manual cookie settings should be populated with code:
define( ‘COOKIEHASH’, ‘xxxxxxxxxxxxxxxxxxxxxxx’ );
define( ‘COOKIE_DOMAIN’, ‘.example.com’ );
define( ‘SITECOOKIEPATH’, ‘/’ );
define( ‘COOKIEPATH’, ‘/’ );
Copy and paste this code into wp-config.php

You should be done! Do all of the above before attempting to use the installation.

July 22, 2008

Xampp, hosts file and Norton 360 network address check

Filed under: Techie stuff — Tags: , , , — admin @ 9:34 am

Ah, it all makes sense now – I set up Xampp a while ago on my machine as a local testbed and as part of that edited my hosts file so that I could simulate whatever domain I wanted locally – but every so often the hosts file would revert to the default, wiping my addition to the file. This meant that my local URL didn’t work again until I re-entered the info into the hosts file, ad infinitum. I always wondered what was causing it and have just worked it out – the Norton 360 Network Address check lists it as a vulnerability and ‘fixes it’.

January 16, 2008

Storing arrays in a database

Filed under: Resources/Tools,Techie stuff — Tags: , , , , — admin @ 9:33 am

This is a good resource on how to do it and also the pro’s and con’s of using serialize/unserialize versus implode/unimplode versus the use of separate tables – each has it’s own place it seems.


Storing arrays in a database

January 2, 2008

Creating a dynamic, database driven form

Filed under: Techie stuff — admin @ 3:06 pm

Creating a dynamic, database driven form using mysql and php.

In principal this doesn’t sound too difficult: call the database, check how many fields are required and loop through printing each required field. The complication comes when receiving the data, because you need to know what information to expect and the relevant field names.

Printing your form fields.
Assuming you have called a list of records from a mysql database ($formfields in my code below), simply loop through each relevant row printing a new field with [] after the field name:

<FORM name=’yourformname’ ACTION=’/yourdestinationurlhere.php’ method=’post’>

do {

html.= “<INPUT TYPE=TEXT NAME=’input[]‘>”;

} while ($formfields = mysql_fetch_assoc($fields));

</FORM>

Receiving your data.
You need to count how many records there are:

for ($i=0;$i<count($_POST['input']);$i++) {

}

Within the loop pull the posted data and assign it to a variable:

for ($i=0;$i<count($_POST['input']);$i++) {

$data = ($_POST['input'][$i]);

}

Once the variable is assigned the value, do what you need to do, still within the loop. i.e. to add a new row to a database:

for ($i=0;$i<count($_POST['input']);$i++) {

$data = ($_POST['input'][$i]);

$insert_newdata = “INSERT INTO TableName “;
$insert_newdata.= “(MyData) “;
$insert_newdata.= “VALUES ($data) “;
$newdataitem = mysql_query($insert_newdata, $yourdatabase) or die(mysql_error());

}

November 30, 2007

xampp installation

Filed under: Techie stuff — admin @ 4:43 pm

I made notes of some of the potential stumbling blocks when installing xampp, hope it is useful to somebody.
Before starting Apache as a service first quite skype if you have it running (this uses port 80). Once Apache has started re-start skype and it will search for an alternative available port.

To check what services are running you can use:
run –> services.msc

If a service won’t start right click on the service and select properties. This will show you the executable path, check it is correct. The path for the mysql service is stored in windows.my.ini. If changing this does not work (you may have a stray my.ini file somewhere from a previous installation??) you can start the mysql service manually via the command prompt entering the correct path:
c:\xampp\mysql\bin\myqld.exe –console

If you are having problems starting apache check the log files:
xampp\apache\logs\

Use the command window to start apache and get additional info on error:
run cmd.exe
cd c:\xampp
type apache_start.bat

Adding a virtual host:

** update **
I got into a mess on a subsequent re-installation of xampp. Your best best is to follow the guides on this page.

one thing worth noting that isn’t covered in the guide is that if the path to the document root includes spaces put the path inside quotes.
——————-

Enable mod rewrite

1. Open httpd.conf (C:\xampp\apache\conf\httpd-conf)
2. Scroll down to around line 118 and look for the line #LoadModule rewrite_module modules/mod_rewrite.so. Remove the # from the beginning of the line.
3. Save the change to the file, and restart XAMPP.

———————-

Powered by WordPress