Forum Replies Created

Viewing 15 replies - 31 through 45 (of 107 total)
  • Thread Starter denyerec

    (@denyerec)

    Bald_technologist:

    The symptom you describe is usually due to a malformed Developer ID from Amazon. The one we supply is quite OK to use, so you do not need to replace it with your own unless you have specific requirements.

    To restore the default Amazon Developer ID, simply clear the contents of the DevID textbox on the options page and save the changes. When you go to another WordPress admin page, and return to the AMM options page, you should see our default Developer ID re-instated and it should work.

    For reference, the default Dev ID is: 1B66SC36ZAZ0WY71QH02

    If you have anything different to this, please let me know.

    Thread Starter denyerec

    (@denyerec)

    My explaination of this is as follows:

    We store the thumbnail returned in the amaon result set in the database as a fallback.

    For some reason, the image returned in the amazon XML request is the internal image, not the cover image. This may be due to a change with amazon’s web service, we’re looking into it right away.

    Thread Starter denyerec

    (@denyerec)

    archshrk, I tried to check your page and got a “Server not Found”…
    Please let me know when it’s back online.

    Thread Starter denyerec

    (@denyerec)

    etoile:

    There are several ways Amazon lets you format images and I picked the one that would be the most “rounded”.

    However if you want to modify the behaviour (I agree in retrospect that the white borders are a bit ugly!!) then you want to look at lines 506->520 in amm_output.php

    You should see there how the amazon image URL’s are built.
    Look along the lines for :


    ._AA' . $size . '_.jpg';

    And change the AA to SY if you want a fixed height and SX if you want a fixed width.

    Check out this page for more information:

    https://aaugh.com/imageabuse.html

    Thread Starter denyerec

    (@denyerec)

    Sorry for not responding sooner, I’ve been sick in bed for a good number of days now and have only just managed to get back to my computer.

    Archshrk : Putting the results into columns would be a challenge for the CSS you use on the output page, rather than something you’d control strictly with the template. However, you COULD control it to some extent in your output template function as follows:

    In the output loops provided and explained in the AMM, only one item is output in each iteration of the loop. There’s nothing stopping you using the NextItem() function to move on and output 2 items in each iteration, allowing you to build rows of 2. You would have to do some checking to make sure you didn’t output the last item twice in the case of an odd number of results though. (Due to NextItem() staying at the end if it’s already at the end.)

    I will check to make sure the recordset functions return true or false values to make this testing easier and will upload new source to the website later.

    Another approach would be simply to echo each book into its own DIV, then style it into two columns using CSS (Float all the book divs left and give them a width, then put them in a container DIV that’s twice as wide… Bingo, 2 columns.)

    Thread Starter denyerec

    (@denyerec)

    I believe there *may* be a small error in the tutorial which I am checking out now.

    You have to have a slight grasp of how a PHP file fits together to be able to modify them. Usually most of these errors occur when you have rogue whitespace outside your <?php ?> tags and so on.

    It’s *VERY* important in the amm_extras.php file that there is absolutely NO whitespace (THat is, empty lines, spaces or suchlike) between sections of PHP.

    Go through your file, make sure this is the case and try again.

    If you’re still having trouble, contact me through my website and send me a zipfile with your amm_extras.php file in. I’ll then help you sort it out.

    Thread Starter denyerec

    (@denyerec)

    Not sure if you’re the person I helped recently by email or not, but it’s definately the same problem.

    In the code the image URLS are automatically generated and then checked to see if they are valid. If the check fails, the URL stored in the AMM database is used (This comes from the Amazon search results).

    Some servers do not support the remote checking and, until we get chance to fix it, this fact will remain “un-reported” to the user.

    Now, if you open up amm_output.php and head down to line 591 (If you are using the latest code, which is on the website) and change line 591 to read:


    // if ( $imageinfo === FALSE ) $image = $this->currentItem['amm_smallImageURL'];

    The check will be disabled and your multi-size images should work. bear in mind though, that should the item you search for have broken images, you won’t get a safe fallback anymore. It’s an unfortunate compromise :/

    (Usually though, the only amazon items that screw up are their user-submitted marketplace items so it’s not much of a problem)

    As for the Search-For dropdown box in the console, please check you don’t have JavaScript disabled and let me know which browser you’re using, we had a report that the JS wasn’t behaving in Safari but we thought we’d resolved it…

    Thread Starter denyerec

    (@denyerec)

    Say what now? Which site?

    Thread Starter denyerec

    (@denyerec)

    Hi there,

    Please use Pastecode or noPaste, and copy the whole of your HTML source for the broken page into it, then post the link here or contact me via email.

    The problem is likely some conflict between your AMM template output and the HTML in your new page template, but without being able to see ther sourcecode I cannot give you a clearer answer.

    Thread Starter denyerec

    (@denyerec)

    Echoing Beel on this one, what is not a concern for you yeilds 3287 support emails for us ??
    If we acted without concern, it’d be written in pure PHP5, or perhaps Ruby, you see where I’m going with that…

    Anyhow, what appears to be the best solution at present would be to allow the user to specify an optional cache of user-defined size to keep the N latest images requested. OK it’s not fantastic, especially if you’re displaying random books, but for index pages or large displays it’ll certainly cut down load times. Bear in mind that wherever the images are stored, the end user still has to download them.

    Looking on amazon, the average small thumbnail is approximately 4kb. Assuming you have 20 books listed on your page, you’ve just given a modem user a 20-25 second load time without really trying, regardless of the the location of the images.

    There will be a version 2.0 (Or maybe a 1.6 to co-incide with WordPress) and the presence of a cache will most likely be there.

    Don’t forget you can request items from your AMM by ID, so it wouldn’t be hard to draw up a scheme whereby your index has a list of links to individual items. If i get time, I’ll demonstrate how to do this on the AMM website.

    Thread Starter denyerec

    (@denyerec)

    Oh also VGrauper : could you please test if my assumption is correct by removing all the image tags from your template and seeing if you setill get the same delay? Don’t want to be chasing wild geese…

    Thread Starter denyerec

    (@denyerec)

    VGrauper : All the information you use is held locally, with the exception of the images from Amazon. We did this partly for the sake of simplicity and partly because if storing copies of the images locally was required you’d run into people over-running their hosting space allocation and all that jazz.

    I’ve been scratching my head for a little while over the best compromise to the problem, I was thinking perhaps a user-defined space limit on a folder to which the N most recently requested images would be copied. The system would check there 1st, and check Amazon second.

    This feature is however going to have to wait until all our other deadlines and jobs are clear, or until someone gives us some money ??

    Splunk : Your assumption is correct, but the error is inexplicable as tests both on our local server and my own blog showed the upgrade script functioning correctly. Please contact me via my website with more details about your setup and I’ll see what I can do.

    Thread Starter denyerec

    (@denyerec)

    Right. Cracked it with a bit of help from IRC. This is *NOT* a nice clean fix, it’s computationally heavy (So I’m told) so I would greatly appreciate someone coming in with a better solution.

    Anyhow…

    At the top of the standard wordpress .htaccess file you should see the following:

    RewriteCond %{REQUEST_FILENAME} -f [OR]
    RewriteCond %{REQUEST_FILENAME} -d
    RewriteRule ^.*$ – [S=45]

    What this is saying is (To my limited understanding) if the requested URL is a valid file or directory, do nothing and skip the next 45 rules.

    However, directories without trailling slashes don’t seem to get the correct treatment. mod_dir or something in apache is supposed to re-write directories with a trailling slash by default but at least on my server this wasn’t hapenning.

    So, I modified the .htaccess file to read as follows:


    # BEGIN WordPress
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteCond %{REQUEST_FILENAME} -d
    RewriteRule ^(.+[^/])$ $1/ [R,L]
    RewriteCond %{REQUEST_FILENAME} -f [OR]
    RewriteCond %{REQUEST_FILENAME} -d
    RewriteRule ^.*$ - [S=45]
    ...etc....

    As you can see, I only had to add lines 3 and 4. What they say is if the requested URL is a valid directory, rewrite it with a trailling slash and stop right there. So far WordPress permalinks appear to be working, but Im told this way of doing things is a little process intensive on the server.

    If anyone can come up with a better way of doing it I’m all ears. Hope this helps in the meantime though!

    Thread Starter denyerec

    (@denyerec)

    Surely then I would have to write a mod-rewrite for every explicit subfolder on my site? That wouldn’t be particularly desirable, it would be better to handle things “normally” but I don’t know if that’s possible.

    Thread Starter denyerec

    (@denyerec)

    the forum is at https://www.denyerec.co.uk/vforum/ sorry, was using an example earlier.

    Trailling slash and it works, no trailling slash and it breaks… That’s why links in automated emails are failling, as they don’t have trailling slashes. At least I’m nearer to a conclusion.

    With that known, any offers as to how to approach a fix? Many thanks for your fast replies!

Viewing 15 replies - 31 through 45 (of 107 total)