WordPress.org

Ready to get started?Download WordPress

Forums

NEW! Amazon Media Manager 1.5 (*Finally!*) (218 posts)

  1. nowtech
    Member
    Posted 7 years ago #

    I am having trouble getting this plugin to display on more than one page. I put this on one page:
    <!—amm_getMedia(`amm_my_first_go’,30)—>
    and it worked fine.

    If I put that or any other variation on another page, it doesn't show up. If I look at the source of the page, it just has the comment in the code.

    Also, in the instructions it talks about the "Custom Fields" when adding this to a post or page. I do not have the "Custom Fields" option when adding a page (it is there for posts). Could this be the problem?

    Thanks!

  2. archshrk
    Member
    Posted 7 years ago #

    Also, in the instructions it talks about the "Custom Fields" when adding this to a post or page. I do not have the "Custom Fields" option when adding a page (it is there for posts). Could this be the problem?

    Yes, this is a problem. You should have custom fields in posts and pages. You may need to expand it.

  3. Daisyhead
    Member
    Posted 7 years ago #

    I am having problems getting this plugin to work with my WP (2.0.5). After activating it, I get the following error messages:

    WordPress database error: [You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'xxxx_wordpress' at line 1]
    SHOW TABLES FROM xxxx_wordpress;
    Warning: in_array() [function.in-array]: Wrong datatype for second argument in /home/xxxx/public_html/wp-content/plugins/amm.php on line 41
    Warning: Cannot modify header information - headers already sent by (output started at /home/xxxx/public_html/wp-includes/wp-db.php:104) in /home/xxxx/public_html/wp-content/plugins/post-levels.php on line 103
    Warning: Cannot modify header information - headers already sent by (output started at /home/xxxx/public_html/wp-includes/wp-db.php:104) in /home/xxxx/public_html/wp-content/plugins/post-levels.php on line 104

    When I deactivate the Post Levels plugin (V1.0), the errors go away. Obviously there is some kind of conflict between my Post Levels plugin and the AMM plugin but I'm not savvy enough to know if there's anything I can do to remedy this. I would REALLY love to use this plugin. Thanks!

  4. Daisyhead
    Member
    Posted 7 years ago #

    And this is line 104 in my Post Levels plugin:

    header('Pragma: no-cache'); and line 105 is a blank line.

    Also, I went through every file in the AMM plugin and did not find any white spaces.

  5. Daisyhead
    Member
    Posted 7 years ago #

    Does anyone know how to solve this problem?

  6. Daisyhead
    Member
    Posted 7 years ago #

    Well, the plugin apparently still works and the only page that throws the above errors is my plugin manager page within WP so I guess for now I can live with it. I would still like to figure out what the conflict is between the AMM and Post Levels plugin is though.

    Now I am having a problem formatting. You can see the plugin in use in the sidebar under the "Currently" section of http://www.daisyhead.org. I'm trying to get the small image to show up with a link to the item on Amazon. Here's the code I have:

    <?php for ($x = 0; $x < $amm->totalItems(); $x++ ) :?>
    <?php echo $amm->imageLink();?><img src="<?=$amm->autoImage('small');?>" />
    <?php echo $amm->title();?>
    <?php echo $amm->autoAuthorLabel();?>: <?php echo $amm->autoAuthor();?>
    Rating: <?php echo $amm->fancyRatings();?>

    My problem is that two images are showing up and it appears the second image is the one I want but there is no link around it and I'd like the text to wrap around it. Anyone have any idea what I'm doing wrong with the code?

    Thanks!

  7. Daisyhead
    Member
    Posted 7 years ago #

    Okay, it appears I got the image size issue fixed by modifying my code to this:

    <?php for ($x = 0; $x < $amm->totalItems(); $x++ ) :?>
    <img class="blogimage" align="left" hspace="3" src="<?=$amm->autoImage('small');?>" />
    <?php echo $amm->title();?>
    by <?php echo $amm->autoAuthor();?>
    <?php echo $amm->userComments();?>
    Rating: <?php echo $amm->fancyRatings();?>

    However, I now have no link to the book on Amazon. Any ideas on how to get the image to link back to the product on Amazon?

    Hell, at this point if I could make the title of the book a link, I'd take that too! I have tried messing with the code based on other responses I have seen here in the thread, but no such luck. I keep getting syntax errors and I'm not sure what I'm doing wrong.

  8. Daisyhead
    Member
    Posted 7 years ago #

    Well, I figured it out myself. In case anyone else is having any problems, here's what I did:

    1. Used <?php echo $amm->imageLink(50);?>
    2. Went into amm_output.php and modified the image code to look like function imageLink($size='small'){
    $imagelink = '<a href="'. $this->URL() .'" title="'. __('Click to view item at Amazon') .'"><img align="left" hspace="3" class="blogimage" src="'. $this->autoImage($size) .'" alt="'. $this->currentItem['amm_title'] .'" /></a>';
    return $imagelink;
    }

    And my images are back to being links and formatted the way I wanted them to be. Whew!

Topic Closed

This topic has been closed to new replies.

About this Topic