Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
amazon: added Pagination, Template support
git-svn-id: http://svn.habariproject.org/habari-extras/plugins/amazon@222 f4a90942-1786-4aa1-b092-57c31935ddc3
- Loading branch information
ayunyan
authored and
ayunyan
committed
May 19, 2008
1 parent
75ec3ac
commit 58c8c55
Showing
8 changed files
with
144 additions
and
46 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
.amazon-result-nav { | ||
margin: 20px 0px; | ||
padding: 10px 0px; | ||
background-color: #1e1e1e; | ||
border-radius: 6px; | ||
-moz-border-radius: 6px; | ||
-webkit-border-radius: 6px; | ||
-khtml-border-radius: 6px; | ||
text-align: center; | ||
} | ||
|
||
.amazon-result-nav img { | ||
margin: 0px; | ||
padding: 0px; | ||
vertical-align: middle; | ||
} | ||
|
||
.amazon-result-nav span { | ||
margin: 0px 15px; | ||
padding: 0px; | ||
} | ||
|
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
<div class="amazon-item"> | ||
<div class="amazon-image" style="width: 160px; float: left;"> | ||
<a href="<?php echo (string)$item->DetailPageURL; ?>"><img src="<?php echo (string)$item->MediumImage->URL; ?>" style="width: <?php echo (int)$xml->Items->Item->MediumImage->Width; ?>; height: <?php echo (int)$item->MediumImage->Height; ?>px; border: 0px;" alt="<?php echo (string)$item->ItemAttributes->Title; ?>" /></a> | ||
</div> | ||
<div class="amazon-detail" style="float: left; margin-left: 8px;"> | ||
<div class="amazon-title"><a href="<?php echo (string)$xml->Items->Item->DetailPageURL; ?>"><?php echo (string)$item->ItemAttributes->Title; ?></a></div> | ||
<?php | ||
if ( isset( $item->ItemAttributes->Creator[0] ) ) echo (string)$item->ItemAttributes->Creator[0] . '<br />'; | ||
if ( isset( $item->ItemAttributes->Publisher ) ) echo (string)$item->ItemAttributes->Publisher . '<br />'; | ||
if ( isset( $item->SalesRank ) ) echo _t('Sales Rank: ') . (int)$item->SalesRank . '<br />'; | ||
if ( isset( $item->CustomerReviews->AverageRating ) ) { | ||
echo '<br />'; | ||
echo _t('Average Rating: ') . $this->ratingToStarImage( (float)$item->CustomerReviews->AverageRating ) . '<br />'; | ||
for ( $i = 0; $i < 5; $i++ ) { | ||
if ( !isset( $item->CustomerReviews->Review[$i]) ) break; | ||
echo $this->ratingToStarImage( (int)$item->CustomerReviews->Review[$i]->Rating ) . ' ' . (string)$item->CustomerReviews->Review[$i]->Summary . '<br />'; | ||
} | ||
} | ||
?> | ||
|
||
</div> | ||
<div class="amazon-clear" style="clear: both;"></div> | ||
</div> |