| 1 |
INSTALLATION: |
Drupal pay2publish.module README.txt |
| 2 |
|
============================================================= |
| 3 |
|
|
|
1. Install the module |
|
|
2. Create a 'Levels' (or any other name) vocabulary under /admin/category |
|
|
3. Add to the vocabulary your levels categories (es: basic, silver, gold) |
|
|
4. Go to /admin/taxonomyactions and click the 'Add Actions' tab to create your levels (choose name, select content types, default and upgrade level, price) |
|
|
5. Create the needed duration times (in months) by clicking on the 'Add Duration' tab |
|
| 4 |
|
|
|
Now the content types affected by the actions will get the basic level attached to them by default. The level can |
|
|
be upgraded upon the payment of the price you setted up. |
|
| 5 |
|
|
| 6 |
To decide which fields to display for each level, you need to act in your node-content_type.tpl.php file: |
|
| 7 |
|
Installing pay2publish (first time installation) |
| 8 |
|
----------------------------------------------------------------------------------------------------------- |
| 9 |
|
|
| 10 |
|
1. Backup your database |
| 11 |
|
|
| 12 |
|
2. Download, untar and copy the complete Pay2Publish and Category modules directories (required) into |
| 13 |
|
the 'modules/' directory of your Drupal install. |
| 14 |
|
|
| 15 |
|
3. Download, untar and copy the complete Views and CCK modules directories (optional but strongly suggested) into the |
| 16 |
|
'modules/' directory of your Drupal install. |
| 17 |
|
|
| 18 |
|
4. Enable the following modules from Drupal's admin pages (Administer >> Site building |
| 19 |
|
>> Modules): |
| 20 |
|
- Category |
| 21 |
|
- Taxonomy_action |
| 22 |
|
|
| 23 |
|
and optionally: |
| 24 |
|
|
| 25 |
|
- Category Views |
| 26 |
|
- Views |
| 27 |
|
- CCK |
| 28 |
|
|
| 29 |
|
The needed tables will be automatically created. |
| 30 |
|
|
| 31 |
|
|
| 32 |
|
Configuration |
| 33 |
|
----------------------------------------------------------------------------------------------------------- |
| 34 |
|
|
| 35 |
|
Levels (Categories): |
| 36 |
|
|
| 37 |
|
1. Check that the Taxonomy wrapper is correctly installed in the Category settings page (Content Management >> Categories >> Settings). |
| 38 |
|
|
| 39 |
|
2. Create your Levels container (Content Management >> Categories >> Add container). IMPORTANT: do not check any content type under 'Container information >> Types' in the container edit form. |
| 40 |
|
|
| 41 |
|
3. Create your levels categories in the container you just created (Content Management >> Categories >> Add categories). Be sure to specify at least one basic category assigned by default to each node listing (ie: basic), and at least one level category to which upgrade to (ie: premium). |
| 42 |
|
|
| 43 |
|
Pay 2 Publish: |
| 44 |
|
|
| 45 |
|
4. Add the first default action in the Pay 2 Publish settings page (admin/pay2publish). Follow on page instructions. |
| 46 |
|
|
| 47 |
|
5. Add the other payed actions to fit your needs. |
| 48 |
|
|
| 49 |
|
6. Add as many durations as you need (admin/pay2publish/add/duration). |
| 50 |
|
|
| 51 |
|
7. Customize your mail notifications settings (admin/pay2publish/settings). |
| 52 |
|
|
| 53 |
|
|
| 54 |
|
Make it work |
| 55 |
|
----------------------------------------------------------------------------------------------------------- |
| 56 |
|
|
| 57 |
|
Things are now setted up. You can now use Views and/or CCK modules to respectively add visibility and/or show more information to each level of your node listings. |
| 58 |
|
|
| 59 |
|
Views: |
| 60 |
|
Use the corresponding term level to filter which nodes to show. Publish your view in specific sections of your site as best suits your needs. Advanced users may want to theme their views in PHPTemplate to evidence each level of nodes in a peculiar way. |
| 61 |
|
|
| 62 |
|
CCK: |
| 63 |
|
Advanced users may use PHPTemplate to choose which fields to show depending on the term level the node is currently tagged with. See a basic example below: |
| 64 |
|
|
| 65 |
<?php foreach ((array)$taxonomy_actions as $act) |
<?php foreach ((array)$taxonomy_actions as $act) |
| 66 |
if ($act->payment > 0){ ?> |
if ($act->payment > 0){ ?> |
| 67 |
|
|
| 68 |
<?php if (($act->vid == 3)or($act->vid == 1)or($act->vid == 2)) {?> |
<?php if (($act->vid == 3)or($act->vid == 1)or($act->vid == 2)) {?> |
| 69 |
<h3 class="field-label">Field Basic</h3> |
<h3 class="field-label">Field basic</h3> |
| 70 |
<?php print $item['view'] ?> |
<div class="field-item"><?php print $item['view'] ?></div> |
| 71 |
<?php } ?> |
<?php } ?> |
| 72 |
|
|
| 73 |
<?php if (($act->vid == 1)or($act->vid == 2)) {?> |
<?php if (($act->vid == 1)or($act->vid == 2)) {?> |
| 74 |
<h3 class="field-label">Field Silver</h3> |
<h3 class="field-label">Field gold</h3> |
| 75 |
<?php print $item['view'] ?> |
<div class="field-item"><?php print $item['view'] ?></div> |
| 76 |
<?php } ?> |
<?php } ?> |
| 77 |
|
|
| 78 |
<?php if ($act->vid == 2) {?> |
<?php if ($act->vid == 2) {?> |
| 79 |
<h3 class="field-label">Field Gold</h3> |
<h3 class="field-label">Field platinum</h3> |
| 80 |
<?php print $item['view'] ?> |
<div class="field-item"><?php print $item['view'] ?></div> |
| 81 |
<?php }?> |
<?php }?> |
| 82 |
|
|
| 83 |
<?php }?> |
<?php }?> |
| 84 |
|
|
| 85 |
|
|
| 86 |
|
|
| 87 |
|
To Do |
| 88 |
|
----------------------------------------------------------------------------------------------------------- |
| 89 |
|
. Make the module fully compatible with core Taxonomy AND Category. |
| 90 |
|
. More granular selection of duration periods (months, days, years). |
| 91 |
|
|
| 92 |
|
|
| 93 |
|
|
| 94 |
|
Credits / Contacts |
| 95 |
|
----------------------------------------------------------------------------------------------------------- |
| 96 |
|
The module was contributed by Marco Bauli (Tecnomeme.it). |