WordPress.org

Ready to get started?Download WordPress

Forums

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

  1. adb
    Member
    Posted 8 years ago #

    How can I change the display text below each image? I'd prefer to have just the item name below each image.

  2. debwire
    Member
    Posted 8 years ago #

    Is it even possible to display a products page versus the template sidebar? Can this or any other amazon related plugin be put on a page (using pages)?

  3. adb
    Member
    Posted 8 years ago #

    I've listed products on a separate page using CG-Amazon. I just copied the page template and labeled it "media" and then put the code under the page content area.

  4. nhall
    Member
    Posted 8 years ago #

    I am a word press beginner, I am a little confused. I thought I had followed the directions correctly. I inserted this

    <?php
    function amm_my_first_go($amm){
    ?>

    <?php for ($x = 0; $x < $amm->totalItems(); $x++ ) :?>

    <strong>Title: </strong> <?php echo $amm->title();?>
    <strong>Author: </strong> <?php echo $amm->author();?>

    <?php $amm->nextItem(); endfor; ?>

    <?php
    return $content;
    }
    ?>

    at the bottom of "amm_extras.php".
    I then inserted this
    <?php amm_getMedia('amm_my_fist_go',10); ?>
    at the bottom of sidebar.php.</p
    It is coming back with this error

    "Fatal error: Call to undefined function: amm_my_fist_go() in ../wp-content/plugins/amm/amm_output.php on line 137"

    I am confused, should I have modified amm_output.php? I am only modifying amm_extras.php, correct? Can anyone let me see thier modified amm_extras.php file?

    Thank you in advance for yout time and help

  5. Beel
    Member
    Posted 8 years ago #

    Debwire, I don't care for using a specific product thread and "plugin" another product, so though I now use CG-Amazon, I see no reason why you couldn't do the same with this plugin. If it will run in a sidebar, it will run in a page template (someone will now come up with an exception ;-). With the use of CG-Quickphp (or similar plugin) and a little work, you might even get it to run in a page post.

  6. davidchait
    Member
    Posted 8 years ago #

    I'll 'plugin' CG-Amazon myself... ;) But yes, something like CG-QuickPHP is a good way to embed complex calls to AMM or CG-Amazon. Note that CG-Amazon comes with cgaindex.php, a sample index file for both full-database paged listings AND individual product page listings, made to be theme-integrated, and ALSO is packed up with CG-Inline, which allows you to embed any product within a page or post with just <!--amazon:SOMEASIN-->.

    But I agree with Beel, without knowing more about AMM, I'd assume you could make a custom page template, or use RunPHP or CG-QuickPHP to embed something into a post or page.

    -d
    (BTW, folks looking to see CG-Amazon in action, it's sprinkled all over CHAITGEAR, obviously... :) )

  7. athomemom
    Member
    Posted 8 years ago #

    I've been a long time user of WordPress 1.2 and Amazon Media Manager 1.0. I am getting ready to upgrade WordPress to the latest version and I want to make sure my Amazon stuff carries over too, so I'm also planning to upgrade to AMM 1.5. I know the ropes on upgrading WP because I've just completed it on another blog that doesn't have AMM.

    The documentation for upgrading AMM is a little unclear (I understand that you've just released this, so I'm not trying to be critical when I say that...), but I'm not sure which files I'll have to delete before upgrading? Do I upload the contents of the upgrade zip and the 1.5 zip, or just the upgrade zip? With upgrading both WP and AMM, will my media info still be there when I'm done?

    If you want to see how I'm currently using AMM, my blog is: http://www.athomemom.net/wp Scroll down about half way and there is media content on both of my sidebars. Thanks for any help you can give me!

  8. denyerec
    Member
    Posted 8 years ago #

    OK, I've been away for a few days so I'll have to catch up with people on at a time.

    Please, if you want to support CG-Amazon or other plugins, do so in their respective threads so as not to confuse this one. Thankyou.

    Digink: With respect to the styling of the default output, it will assume whatever your site specifies for an unordered list. If you wish to change this, or change the HTML that comes out with your AMM items, you'll have to edit your CSS and edit the template in the amm_extras.php file. If you want more help with this, email me!

    douglsmith: There is no way in AMM to sub-categorise items. It's a flexible plugin but the emphasis is on keeping the stored data as simple as possible. You can go about subcategorising things if you wish by using the 'untouched' fields in certain items. For example a book never has an "Artist", so this could be used. However, I'll be the first to admit that this is a rather makeshift solution to categorisation. The next release of AMM (Coming with greater frequency than this last update I assure!) will allow advanced users to submit full custom queries to their AMM database, further expanding the potential for what you describe. We're also looking into supporting Amazon's categories in the next release which, naturally, will support fully what you ask for.

    nhall: Check your spelling of 'my_fist_go'

    -continuing in next post-

  9. denyerec
    Member
    Posted 8 years ago #

    Debwire: you can indeed dedicate whole pages to AMM output and you can do it in two ways. One is to write a page, then write a standard WordPress template and include the usual WordPress hooks to get your AMM data where you want it.

    The other method is to use the "Inline" amm_getMedia() call from directly within the post. If you refer to this page: http://www.sozu.co.uk/software/amm/getmedia_function.php and look down to the section called "Calling the Function" you'll see an example of an inline amm_getMedia() call , with a couple of screenshots and a description.

    If you still can't achieve what you want, please contact me via my blog at http://www.denyerec.co.uk and I'll talk you through it via IM or Email.

    Beel: Thankyou. As I pointed out, you can put your AMM stuff anywhere you like. Posts, pages, sidebars, header or footers. It's all there :)

    athomemom: To upgrade you must:
    0) BACKUP EVERYTHING
    1) Install the latest WordPress
    2) remove the old AMM 1.0 / 1.2 files (Just the amm files, not your old wordpress files!)
    3) Install the latest AMM 1.5 code
    4) THEN before you do anything else, upload the upgrade script from the second archive as instructed in the readme, browse to it and bingo, the data should be ported across.

    If you run it without a backup and it breaks anything, no-one will have any sympathy :)

    If you'd like me to talk you through it in realtime, email me via my website and I can contact you via ICQ, MSN or Email.

  10. denyerec
    Member
    Posted 8 years ago #

    Oh,

    There are lots of blogs running amm but the one that springs first to mind is http://www.gabbages.net , look down on the left for a "currently reading" section. If you want me to find more just ask.

  11. mosaiclife
    Member
    Posted 8 years ago #

    I'm sure I'm probably missing something simeple but I can't get teh inline post function to work and that is how I want to use AMM.

    I have this <!-- amm_getMediaID('amm_first',1)-->
    in my post but either nothing displays or I an error.
    amm_first is the template I use which I copied from amm_extra but made no changes.

    What am I missing?

  12. denyerec
    Member
    Posted 8 years ago #

    Please make sure there is no whitespace in the inline tag, thus:

    <!--amm_getMediaID('amm_first',1)-->

    The docs might be in error here, I will check them now. Also make sure you've added the custom field 'amm' with the value 'enabled' to the post in which you want AMM to be active.

  13. athomemom
    Member
    Posted 8 years ago #

    denyerec, I just wanted to say thanks for the advice! I'm up and running and I really like the new goodies that you've added to AMM! A great plugin that's now even better. Thank you!!

  14. Amulet
    Member
    Posted 8 years ago #

    Ok, I'm lost and confused. First, you should know I don't know PHP, but have worked with it and usually can get scripts to work. I can't write a script from scratch, though. Anyway, I got AMM installed, but I'm confused with the template editing and stuff. I'll re-read the instructions later, and hopefully understand it better, but I assume I [em]need[/em] to edit some files, and certainly I need to put some kind of code into the sidebar and/or posts, correct? I think I get the part with what to put in the sidebar or posts, but I'm not completely clear on the plugin files. I edited amm_extras.php with the following:

    [code]
    <?php
    function amm_my_first_go($amm){
    ?>
    <?php for ($x = 0; $x < $amm->totalItems(); $x++ ) :?>

    Title: <?php echo $amm->title();?>
    Author: <?php echo $amm->author();?>

    <?php $amm->nextItem(); endfor; ?>

    <?php
    return $content;
    }
    ?>
    [/code]

    Do I need to edit any other AMM files? And can I put the code that outputs the booklist or whatever I want to put there in BOTH the sidebar and individual posts, or just one of those? Thanks.

  15. denyerec
    Member
    Posted 8 years ago #

    You can put the code into the sidebar AND anywhere else you wish, it really is up to you as to where you want it to appear.

    There are also instructions in the documentation to allow you to add AMM output directly in a post, without having to edit any templates. This allows you to, for example, create a "book list" page.

    This is done using WP style 'quicktags' (Which are really just HTML comments)

    For example, you can drop this in at any point in a post or page:

    <!--amm_getMedia('template', 3)-->

    And it will return the 3 latest things in your database, formatted by the 'template' template. You are correct in that you need to edit amm_extras.php if you wish to build your own templates.

  16. adb
    Member
    Posted 8 years ago #

    By default, the name of the item, author and rating display. How can I have just the item name and author display? I've read the documentation and am still confused.

  17. denyerec
    Member
    Posted 8 years ago #

    You need to dive into amm_extras.php and write your own template, or modify an existing one.

    Then in the amm_getMedia() function call, you put the name of your new template or the name of the one you modified.

    There is an example of a basic template here:

    http://www.sozu.co.uk/software/amm/editing_templates.php

    If you follow that page through from start to finish, you should end up with a decent idea of how things fit together. If not, email me via my website and I'll walk you through it.

  18. Amulet
    Member
    Posted 8 years ago #

    Ok, I seem to have gotten a lot further. It took me several minutes to remember I didn't have anything added to the database, and that was why nothing was showing up (DUH!). But I got that working. I have a couple of questions, mostly concerning HTML. I know I can align the content center with <DIV> tags, but is there a way to do it in the amm_extras.php file? I tried sticking align="center" to the first <DIV> tag in the file, and then the <UL> tag, followed by the <LI> tag, but none of that worked. I don't mind doing it through my template, but I was just wondering. More of interest is, can I remove the link border around the image? I'd prefer to do it in the script, but I don't care if I have to do it in the template; I just prefer my images not be bordered.

    Although I haven't done much with it yet, it looks like a great script. Thanks for creating it!

  19. denyerec
    Member
    Posted 8 years ago #

    Hey Amulet,

    Everything you describe can be controlled in CSS and, really, should be. The tricky part about AMM is whether you want to control your styling in the AMM template (amm_extras.php) or go adding things to your blog's template CSS files. The latter I would recommend for permanent stuff, it's really the best way.

    If you want to centre a div using inline styling, you would have something like this:


    <div style="text-align: center;"> my content </div>

    Basically using the style="put_css_here" inside a tag lats you apply styling from your custom templates if you want to get something cheeky done quick but, as I say, the best long term plan is to add some class="name" tags to elements, and style them from your site-wide CSS.

    TO remove borders from link images in CSS, simply use this style rule:


    a img {border: none;}

    (If that doesn't work, remove the a)
    You may want to add classnames to things in your HTML so you can style *just* those things too.

  20. Amulet
    Member
    Posted 8 years ago #

    Thanks, denyerec! That's a good idea. I thought I have all my image borders set to none, but I might be thinking of my previous CSS file, before I installed WordPress. I'll do that. Much appreciated.

  21. Amulet
    Member
    Posted 8 years ago #

    Ok, a couple of other things: Can I change the text called by [code]<?php echo $amm->autoAuthorLabel();?>: <?php echo $amm->autoAuthor();?>[/code] to say "By" instead of "Author:"? Also, can I make the title link text link to the item page, like the image does (I think I want both the image and the title to link there)?

    And, is there a way to make it choose a template, based on the kind of item showing? For instance, if the item is a book, it would choose the template that lists title and author, but if the item were an electronic, it would list the model and brand? How about the price? Can I show that?

  22. denyerec
    Member
    Posted 8 years ago #

    1) The price is not stored. We were not interested in bulding in things that were totally specific to Amazon. If a user is sufficiently interested by something to be interested in the price, they'll click through :)

    2) Different templates for different items... This is achievable in two ways. Either a) Write multiple templates and make multiple AMM calls, calling the individual templates (EG 'amm_book_display' with AMM_BOOKS and 'amm_music_display' for AMM_MUSIC) or b) writing a single complex template with some CASE or IF statements in it. The flexibility of the system relies on users doing as they please with templates, rather than us building in 12974 potentially buggy features than don't suit everyone anyway! :)

    You could change the autoAuthor text by modifying the function in amm_output.php, it should be easy to find. Alternatively you could build some logic into your custom template, testing against productGroup to decide what to output.

    3) Remember that most of the things that the AMM output functions return are plain text. So, if you want to make something clickable, just use basic HTML and an AMM function call, like so:


    <a href="<?php URL(); ?>"><?php echo $amm->title(); ?></a>

    Again, the AMM output functions are intended to supply the user with the bare data, allowing you to mould it around whatever HTML/CSS layout you wish.

  23. Shobhit Prabhakar
    Member
    Posted 8 years ago #

    Thank you very much, for this Great plugin!

  24. hawke2
    Member
    Posted 8 years ago #

    Oh MAN! This is PERFECT. I am up and running. Question though,

    I have two blogs on the same server sharing a database. I got it working on the gay agenda but if I try to install it for North South, I get the following errors:
    ?>
    Warning: Cannot modify header information - headers already sent by (output started at /home/unfilter/public_html/North_South_Blog/wp-content/plugins/amm/amm_extras.php:98) in /home/unfilter/public_html/North_South_Blog/wp-admin/admin.php on line 10

    Warning: Cannot modify header information - headers already sent by (output started at /home/unfilter/public_html/North_South_Blog/wp-content/plugins/amm/amm_extras.php:98) in /home/unfilter/public_html/North_South_Blog/wp-admin/admin.php on line 11

    Warning: Cannot modify header information - headers already sent by (output started at /home/unfilter/public_html/North_South_Blog/wp-content/plugins/amm/amm_extras.php:98) in /home/unfilter/public_html/North_South_Blog/wp-admin/admin.php on line 12

    Warning: Cannot modify header information - headers already sent by (output started at /home/unfilter/public_html/North_South_Blog/wp-content/plugins/amm/amm_extras.php:98) in /home/unfilter/public_html/North_South_Blog/wp-admin/admin.php on line 13

    Just to try something, I changed the name of my function for the north south template. Didn't seem to work. Any ideas how I can get it running on my other blog?

  25. denyerec
    Member
    Posted 8 years ago #

    Please check the beginning and end of every AMM file for stray whitespace, especially the amm_extras file. Any rogue whitespace outside of <?php ?> tags will be sent to the browser which, when the plugin initialises, is a bad thing.

    If this still doesn't help, contact me via my website and I'll see what I can do.

  26. hawke2
    Member
    Posted 8 years ago #

    Yeah I simply copied over the files from the blog that works. Double-checked...

    It works on North South, just have the header errors.

  27. hawke2
    Member
    Posted 8 years ago #

    OK Thanks to denyerec's outstanding tech support, we debugged my issue which was an errant closing tag.

    I can now confirm this will work on blogs sharing the same database. I am a very happy camper.

  28. Xarcell
    Member
    Posted 8 years ago #

    Hi, I'm a noobie here and I'm trying to get it working on my wordpress site. I have the latest version of amm and wordpres running. I'm using the default theme, I have the amm plugin installed, and adjust/view all options via admin panel.

    However, I cannot see it on my site. What do I need to do?

    Thanx,

  29. yas
    Member
    Posted 8 years ago #

    A great plugin! This is something I've wanted for a while, and I'm glad I don't have to reinvent the wheel...

  30. denyerec
    Member
    Posted 8 years ago #

    Xarcell, please refer to the following page:

    http://www.sozu.co.uk/software/amm/getmedia_function.php

    If you read through that, and the page that follows it about editing templates, you should have a fairly good idea of how to display your AMM output. If you still can't figure it out, contact me through my website and I'll give you a hand.

Topic Closed

This topic has been closed to new replies.

About this Topic