 |
Please perform the following updates to upgrade from v2.0 to v2.1. Note that any modified files should be saved and re-uploaded after editing. |
First, you need to update your database. This can be done one of two ways:
1. Upload the 'install' folder to your server and access the following file:
http://www.yoursite.com/greetings/install/upgrade2_1/index.php |
Follow the onscreen instructions. Once the upgrade is complete, delete the /install/ folder.
or
2. Log in to your database and run the following file:
docs/schematic/upgrades/upgrade2_1.sql |
Note that if your database prefix is NOT 'mgr_', then you will need to change the prefix for the tables names in this file BEFORE you run it.
Unless you are an advanced user, I recommend option 1.
|
Next, you need to do some template modifications.
1. Open up the 'templates/ecard.tpl.php' file in a text editor. Find the following:
<?php echo $this->MUSIC_OPTIONS; ?> |
AFTER that add the following:
<?php echo $this->POEMS; ?> |
2. In the same template file, find the following:
<tr>
<td align="left"><br><b><?php echo $this->ADDRESS_BOOK; ?>:</b></td>
<td align="left"><br><?php echo $this->ADDRESS_BOOK_DATA; ?></td>
</tr>
|
Change to the following:
<?php echo $this->ADDRESS_BOOK_DATA; ?> |
3. Again, in the same file, find the following:
<?php echo $this->CARD_MESSAGE; ?> |
AFTER that add the following:
<?php echo $this->DISPLAY_POEM; ?> |
4. Open up the 'templates/showcard.tpl.php' file in a text editor. Find the following:
<?php echo $this->CARD_MESSAGE; ?> |
AFTER that add the following:
<?php echo $this->DISPLAY_POEM; ?> |
5. ADD the following new templates to your 'templates' & 'templates/email' directories:
Templates:
paypal_cancel.tpl.php
paypal_index.tpl.php
paypal_processing.tpl.php
paypal_thanks.tpl.php
poems.tpl.php
E-Mail Templates:
paypal_admin_pending.txt
paypal_invalid.txt
paypal_member_pending.txt
paypal_thanks.txt
|
6. Finally, add the following to your 'templates/stylesheet.css' file:
fieldset {
border: 1px solid #68A7DA;
width: 95%;
padding-left:10px;
padding-right:10px;
padding-bottom:10px;
}
legend {
color: #000000;
background: #F0F6FF;
background-image: url('../images/poem_bg.gif');
border: 1px solid #68A7DA;
padding: 5px 20px;
font-weight:bold
}
|
Edit the colours above to suit.
|
This step can be skipped if you are not using the mod_rewrite option. If you are using mod_rewrite, the following changes/updates need
to be performed in your .htaccess file
ADD the following two rewrite rules to your .htaccess file.
Options +FollowSymLinks
RewriteEngine on
RewriteRule ^poems(.*)\.html$ index.php?cmd=poems&file=$1
Options +FollowSymLinks
RewriteEngine on
RewriteRule ^paypal_(.*)\.html$ index.php?cmd=process&loading=$1
|
Look for the long rewrite rule that starts:
RewriteRule ^(account|search|pickup|calendar |
ADD 'poems' && 'paypal' to this rule, seperating each with a pipe (|).
RewriteRule ^(paypal|poems|account|search|pickup|calendar |
|
Next you need to update your language file. This can also be done one of two ways.
- Upload the 'lang/english.php' file over writing your original file. This is recommended if minimal changes were made to the original language file.
- Add the new variables to your current language file. Recommended if you made lots of changes to the original language file or you translated it. To complete this option do the following:
1. Open up the 'docs/language_updates/new_lang2_1.txt' file in your text editor.
2. Open up the 'lang/english.php' file in your text editor.
3. Copy and paste the new v2.1 variables into the 'english.php' file. NOTE that some variables are new and some are updated. You should replace the existing variables with the updated ones.
If you are unsure of where to copy and paste the variables, add them directly BEFORE the closing ?> tag.
|
Delete your current 'admin' folder and all its contents and replace with the new admin folder. Note that once you have done
this, you should reset your password in the following file:
admin/inc/password.inc.php |
Also, chmod the following folder to 777 to make it world writeable:
|
Replace the following files on your server with the new ones in the v2.1 zip file. Where a folder is specified, replace ALL files
unless stated. Also, if any colour variables exist in these files, you will need to edit them again. Any defined variables set in the main
index.php file will also need re-editing:
The optional images below can be replaced if you are using the original appearance. If you have created your own table corners and/or logo etc, these may not be needed:
classes/class_eventcalendar.inc.php (Updated)
classes/class_generic.inc.php (Updated)
classes/class_paypal.inc.php (New)
classes/class_sendcard.inc.php (Updated)
/docs/ (Updated)
images/paypal.gif (New)
images/paypal_cancel.gif (New)
images/paypal_thanks.gif (New)
images/no_longer_available.gif (New)
images/poem_bg.gif (New)
/inc/ (ALL except the 'db_connection.inc.php' file)
index.php
Optional Updated Images:
images/bl.gif (Updated)
images/body_bg.gif (Updated)
images/br.gif (Updated)
images/error.gif (Updated)
images/logo.gif (Updated)
images/send.gif (Updated)
images/thanks.gif (Updated)
images/tl.gif (Updated)
images/tr.gif (Updated)
|
Upgrade Complete!
|
Check out the 'docs/history/history.txt' file to see the changes in v2.1.
Poems can be enabled in your settings if you wish to use them, as can the Paypal IPN system. If using the Paypal system,
you will need to select 'Options>Paypal IPN' to configure your settings. If you want to use the IPN system, it is probably best if you delete all your send log data and clear the
user sent cards totals before enabling the IPN system. Or you can just set a limit that people need to reach before they have to pay.
Ideally the IPN system should be used ONLY from a clean install.
Test the system and make sure your new features are working ok. Any problems, please post on the support forums.
Enjoy!
|

|