Viewing 11 replies - 1 through 11 (of 11 total)
  • Plugin Author hugmin42

    (@hugmin42)

    Hi, Thank you for your post.

    Do you mean you just want the covers in a sort of grid view? I’m working on adding more layout templates. Will post here if there is an update.

    Thread Starter blueprairie

    (@blueprairie)

    I’m hoping it can look similar to the section titled “New Arrivals” on this site https://library.arlingtonva.us

    Also, is it possible to randomly select books on page load instead of displaying only the top 3 (for example).

    I really appreciate your help!

    Plugin Author hugmin42

    (@hugmin42)

    Hi.
    I made a new layout template for displaying four books in a row.
    Just replace the current my-google-books-library.php with this one https://dl.dropbox.com/u/48209398/my-google-books-library.php

    If you were using shortcode add layout=”2″. For example: [my_google_books_library shelf=”4″ max = “10” layout = “2”]
    If you are using the function just add the variable 2.
    E.g: my_google_books_library(“4”, “10”, “1”);

    Please let me know if this is what you had in mind.

    I haven’t started on the randomization yet. Will look into it.

    Regards

    Plugin Author hugmin42

    (@hugmin42)

    I just checked out the possibility of retrieving random results.

    The problem is that the google API requests a max number of results. $url = “https://www.googleapis.com/books/v1/users/”.$idNumber.”/bookshelves/”.$shelf.”/volumes?maxResults=” . $max;

    Which then only returns the top x (whatever you input as max) results.

    If I apply a shuffle it will only shuffle the top let’s say four books that was selected.

    In order to really display four random books from your whole shelf I would have to make the max a 100 or a 1000 (how many books would someone have in a shelf?) which will return that amount of books (slower performance) that I have to read into an array in order to randomly select four.

    Let me know if you have more ideas on this.

    Plugin Author hugmin42

    (@hugmin42)

    Sorry for all the posts. Everytime I think I’m done for the night (GMT+2), I quickly do some more programming/testing.

    My prelimanary limited tests show no signaficant increase in execution time when I select say 50 books and the randomly dislpaying 8 of them and just displaying the top 8. I don’t have a big enough shelf (or the time to create one) to test more extreme values.

    This php has the shuffle code by default.
    https://dl.dropbox.com/u/48209398/New/my-google-books-library.php

    Please test it and let me know if it works for you. I will then add the option to the settings page and release an update.

    Thank you for helping me improve this plugin.

    Were you ever able to make the horizontal view work? Also, would it be possible to add a short code to make this a carousel that displays the book data in a lightbox? Or do you know where something like that would be? Thanks ever so much.

    Plugin Author hugmin42

    (@hugmin42)

    Hi, in the code that I linked above there is a horizontal display option. I am still waiting for feedback from blueprairie before I update plugin.

    Could you explain what it is you want more thoroughly or give an link to something similar? (English is not my first language, neither is programming ;-))

    Regards.

    Thread Starter blueprairie

    (@blueprairie)

    Sorry for the delay. I did load the updated code but it didn’t seem to change anything for me. However I didn’t have time to look at it then. I will try to find some time tomorrow to review. But it didn’t break anything either so I think you could likely post it out for anyone.

    Thank you! (and programming isn’t my first language either ?? )

    Plugin Author hugmin42

    (@hugmin42)

    Hi, It won’t change anything by default. You need to add the layout you choose to the shortcode:

    If you were using shortcode add layout=”2″. For example: [my_google_books_library shelf=”4″ max = “10” layout = “2”]
    If you are using the function just add the variable 2.
    E.g: my_google_books_library(“4”, “10”, “2”);

    Hope this works.

    Thread Starter blueprairie

    (@blueprairie)

    I posted it again but instead of placing the book covers horizontally across the width of the page such as

    X X X X X X X X

    They are displaying in a table with descriptions
    X description
    X description

    Its a nice display option, but doesn’t do what I hoped for. I do appreciate your work though. Thank you.

    Plugin Author hugmin42

    (@hugmin42)

    Hi
    That is strange. I suggest you completely remove the plugin and install the new one from scratch (it’s version 1.1)

    See my blog for how it will look when you correctly select layout=”2″.

    https://hugo.activesquirrel.com/my-library/

    Hope this works.

Viewing 11 replies - 1 through 11 (of 11 total)
  • The topic ‘Horizontal display possible?’ is closed to new replies.