| 1 |
<?php |
<?php |
| 2 |
/* $Id: amazon.module,v 1.29.2.26 2007/01/04 14:40:10 prometheus6 Exp $ */ |
/* $Id: amazon.module,v 1.29.2.27 2007/02/28 20:09:34 prometheus6 Exp $ */ |
| 3 |
if (version_compare(phpversion(), '5', '<')) { |
if (version_compare(phpversion(), '5', '<')) { |
| 4 |
require_once('amazon.php4.inc'); |
require_once('amazon.php4.inc'); |
| 5 |
} |
} |
| 1056 |
} |
} |
| 1057 |
|
|
| 1058 |
function _amazon_import_format_item($node) { |
function _amazon_import_format_item($node) { |
| 1059 |
$module_dir = drupal_get_path('module', 'amazon'); |
$module_dir = base_path() . drupal_get_path('module', 'amazon'); |
| 1060 |
$output = array(); |
$output = array(); |
| 1061 |
$output['#tree'] = 1; |
$output['#tree'] = 1; |
| 1062 |
$output['startrow']= array( |
$output['startrow']= array( |
| 1338 |
$is_review = TRUE; |
$is_review = TRUE; |
| 1339 |
$review_url = url("node/$selected_book->nid"); |
$review_url = url("node/$selected_book->nid"); |
| 1340 |
} |
} |
| 1341 |
$module_dir = drupal_get_path('module', 'amazon'); |
$module_dir = base_path() . drupal_get_path('module', 'amazon'); |
| 1342 |
$book_image = $selected_book->mediumimageurl ? $selected_book->mediumimageurl : "$module_dir/images/missingm.gif"; |
$book_image = $selected_book->mediumimageurl ? $selected_book->mediumimageurl : "$module_dir/images/missingm.gif"; |
| 1343 |
$blockcontent = '<div class="amazontools_block">'; |
$blockcontent = '<div class="amazontools_block">'; |
| 1344 |
if ($is_review) { |
if ($is_review) { |
| 1362 |
|
|
| 1363 |
} |
} |
| 1364 |
if ($selected_book->rating) { |
if ($selected_book->rating) { |
| 1365 |
$module_dir = drupal_get_path('module', 'amazon'); |
$module_dir = base_path() . drupal_get_path('module', 'amazon'); |
| 1366 |
$output .= "rating: <img src=\"$module_dir/images/rating$selected_book->rating.gif\" alt=\"$selected_book->rating\" /><br />"; |
$output .= "rating: <img src=\"$module_dir/images/rating$selected_book->rating.gif\" alt=\"$selected_book->rating\" /><br />"; |
| 1367 |
} |
} |
| 1368 |
$blockcontent .= '</div>'; |
$blockcontent .= '</div>'; |
| 1370 |
} |
} |
| 1371 |
|
|
| 1372 |
function theme_amazon_node($node) { |
function theme_amazon_node($node) { |
| 1373 |
$module_dir = drupal_get_path('module', 'amazon'); |
$module_dir = base_path() . drupal_get_path('module', 'amazon'); |
| 1374 |
$output = ''; |
$output = ''; |
| 1375 |
$output .= '<table class="amazontools_table">'; |
$output .= '<table class="amazontools_table">'; |
| 1376 |
$output .= '<tr>'; |
$output .= '<tr>'; |
| 1418 |
} |
} |
| 1419 |
|
|
| 1420 |
function theme_amazon_related_link($node) { |
function theme_amazon_related_link($node) { |
| 1421 |
$module_dir = drupal_get_path('module', 'amazon'); |
$module_dir = base_path() . drupal_get_path('module', 'amazon'); |
| 1422 |
$output = ''; |
$output = ''; |
| 1423 |
$output .= "<table class=\" class=\"amazontools_related\"><tr>"; |
$output .= "<table class=\" class=\"amazontools_related\"><tr>"; |
| 1424 |
$output .= "<td><a href=\"$node->detailpageurl\" target=\"_blank\">"; |
$output .= "<td><a href=\"$node->detailpageurl\" target=\"_blank\">"; |