Updating pMachine
Very Important:
If you are using a version of pMachine older than 2.3, please contact support@pmachine.com before proceeding. You will need to perform some additional steps.
Be sure to make a backup of both your site files as well as a backup of your database before proceeding. This should be standard practice and you should remember to do this at regular intervals.
Jump to a Section
Please carefully select the instructions based on the version of pMachine you are currenty using:
- Currently using pMachine Free 2.3
- Currently using pMachine Pro 2.3
- Updating forums to match pMachine.com
Updating to Version 2.4 from pMachine Pro 2.3
Step 1
Delete the file called install.php, located in the pm directory. You do not need it.
Step 2
Save your config file
Download your existing config file (config.php) from your server and copy your existing settings to the new config file located inside the pm directory of the 2.4 distribution. There are new settings in the 2.4 copy of the config file, so make sure to leave them there when copying over your old settings.
Step 3
On your server, delete everything contained inside your control panel (pm) directory (cp, db, lib, docs, language, etc.) except your images and scripts folders.
Note: Be sure not to delete your public site files. These are the files of your actual site such as weblog.php, comments.php, archives.php, etc.
Essentially, you will not touch any files in this step outside of your pm directory.
Step 4
Upload all of the files and directories contained in the 2.4 pm folder to your server (except the images and scripts folders), including your new config file.
Step 5
Inside the images folder (in your public files, not the pm directory), there is a folder called captchas. Upload this folder to your server and set the permissions for this directory to "777".
If you do not know how to set permissions, please visit the Knowledge-Blog at pMachine.com.
Step 6
Find the image called v2.4.jpg, located in the pm/images directory of this distribution. Upload it to the pm/images directory on your server.
Step 7
Run the update script
Note: Be sure that your database user has ALTER privileges. If you aren't certain, contact your Host or server admin about this. If your database user does not have alter privileges the update process will not complete correctly.
Point your browser to the pm/updates/index.php file on your server. This file will update you to version 2.4. Be sure that you're accessing the file through your webserver and not just loading the file into your web browser locally. Access the file as you would a regular webpage, using an address similar to http://www.yourdomain.com/pm/updates/index.php.
Delete the updates directory from your server when you are finished with the update.
Step 9 - Captchas (Optional):
Incorporating Captchas into your site
In order to use the new captcha feature you must add some new HTML and pMachine variables to your Templates in the Control Panel.
i. Go to: Control Panel > Edit Templates > Weblog Templates > Comment Form Templates. In both templates, add the 'Example Captcha Code' below after all of the form fields, but before the submit and preview buttons.
ii. Go to: Control Panel > Edit Templates > Weblog Templates > Collective Entry Form Templates. In both templates, add the 'Example Captcha Code' below after all of the form fields, but before the submit and preview buttons.
iii. Go to: Control Panel > Edit Templates > Membership > Registration Form Add the 'Example Captcha Code' below after all of the form fields, but before the submit button.
vi. Go to: Control Panel > Edit Templates > Membership > Email Member Form Add the 'Example Captcha Code' below after all of the form fields, but before the submit button.
v. Go to: Control Panel > Edit Templates > Email > Contact Form Template and Tell-A-Friend Templates Add the 'Example Captcha Code' below in the first template. Put it after all of the form fields, but before the submit button.
Example Captcha Code:
{if captcha}
Submit the word you see below:
%%captcha%%
<br />
<input type="text" name="captcha" value="" size="20" maxlength="20" style="width:140px;" />
{/if}
Updating to Version 2.4 from pMachine Free 2.3
Step 1
Delete the file called install.php, located in the pm directory. You do not need it.
Step 2
Save your config file
Download your existing config file (config.php) from your server and copy your existing settings to the new config file located inside the pm directory of the 2.4 distribution. There are new settings in the 2.4 copy of the config file, so make sure to leave them there when copying over your old settings.
Step 3
On your server, delete everything contained inside your control panel (pm) directory (cp, db, lib, docs, language, etc.) except your images and scripts folders.
Note: Be sure not to delete your public site files. These are the files of your actual site such as weblog.php, comments.php, archives.php, etc.
Essentially, you will not touch any files in this step outside of your pm directory.
Step 4
Upload all of the files and directories contained in the 2.4 pm folder to your server (except the images and scripts folders), including your new config file.
Step 5
Inside the images folder (in your public files, not the pm directory), there is a folder called captchas. Upload this folder to your server and set the permissions for this directory to "777".
If you do not know how to set permissions, please visit the Knowledge-Blog at pMachine.com.
Step 6
If you have not changed the name of your main scripts/"pm" directory, skip this step.
Look for a file called pm_inc.php, located mailinglists directory. Open this file and look for this line of code:
$script_directory_name = "pm";
Change the word "pm" with the new name you gave the pm directory.
Note: You do not rename the actual file itself; only edit the variables inside the file.
Step 7
Upload the directory called mailinglists into the same directory that contains your website pages.
Step 8
Replace the file called members.php, located in your members directory with the new one from this distribution.
Step 9
Upload the file called events.php, located in the calendar directory into the same location that currently has your calendar index.php page; usually in the directory calendar.
Step 10
Find the image called v2.4.jpg, located in the pm/images directory of this distribution. Upload it to the pm/images directory on your server.
Step 11
Run the update script
Note: Be sure that your database user has ALTER privileges. If you aren't certain, contact your Host or server admin about this. If your database user does not have alter privileges the update process will not complete correctly.
Point your browser to the pm/updates/index.php file on your server. This file will update you to version 2.4. Be sure that you're accessing the file through your webserver and not just loading the file into your web browser locally. Access the file as you would a regular webpage, using an address similar to http://www.yourdomain.com/pm/updates/index.php.
Delete the updates directory from your server when you are finished with the update.
Step 12 - Captchas (Optional):
Incorporating Captchas into your site
In order to use the new captcha feature you must add some new HTML and pMachine variables to your Templates in the Control Panel.
i. Go to: Control Panel > Edit Templates > Weblog Templates > Comment Form Templates. In both templates, add the 'Example Captcha Code' below after all of the form fields, but before the submit and preview buttons.
ii. Go to: Control Panel > Edit Templates > Weblog Templates > Collective Entry Form Templates. In both templates, add the 'Example Captcha Code' below after all of the form fields, but before the submit and preview buttons.
iii. Go to: Control Panel > Edit Templates > Membership > Registration Form Add the 'Example Captcha Code' below after all of the form fields, but before the submit button.
vi. Go to: Control Panel > Edit Templates > Membership > Email Member Form Add the 'Example Captcha Code' below after all of the form fields, but before the submit button.
v. Go to: Control Panel > Edit Templates > Email > Contact Form Template and Tell-A-Friend Templates Add the 'Example Captcha Code' below in the first template. Put it after all of the form fields, but before the submit button.
Example Captcha Code:
{if captcha}
Submit the word you see below:
%%captcha%%
<br />
<input type="text" name="captcha" value="" size="20" maxlength="20" style="width:140px;" />
{/if}
Updating forums to match pMachine.com
These are optional instructions that enable you to change the look of your existing forum to match the forums at pMachine.com.
Step 1
Create a new forum template.
Find the file called forum_update.php, located in the forum directory. Move this file into your pm directory and load it with your browser. You must move the file for the update to work. It will create a new set of templates, formatted to look like the ones at pMachine.com. Be sure that you're accessing the file through your webserver and not just loading the file into your web browser locally. Access the file as you would a regular webpage, using an address similar to http://www.yourdomain.com/pm/forum_update.php.
Note: Your old forum templates will not be deleted. You may do so once you are finished with the update.
Step 2
Set up your new forum index.php page
Open the file called index.php located in the forum directory of the 2.3 distribution and set is up similarly to your existing forum index page, by duplicating the table for each forum you have and putting the name of each forum in the various tags in that file.
Step 3
Add your forum names to the bread-crumb navigation
Open the file called forum_names.php, located in the forum directory. You'll find instructions contained in that file for adding your forums to the breadcrumb.
Step 4
Replace your forum files
Delete all the files in your existing forum directory and replace them with the new ones.
Step 5
Switch to your new templates
In your Control panel, go to the weblog preference page (under Weblog Management) for each of your forums and switch the template set pull-down menu to correspond to your new template.
Step 6 (Optional)
Delete old template
Once you are satisfied that your forum looks the way it should you can delete your old forum templates. Click Edit Templates in your control panel and delete your old template set.