• Resolved Abstract Mindfreak

    (@mungorodnaneve)


    Hello! You made really good plugin. Thanks!
    I have quiestion:
    I use Calibre sofware to collect books archive, sorted it, collected metadata and covers. I have about 2800books. I used xml export of this base, imported it with All import plugin to Recencio. With that import I have all my books added image attachments automatically but (!)not covers. It is a real problem to me to pressing edit book – Add Book Cover – enter search name of image, add image and update post for 2800 times. I use recencio default book template to output book info with pdf.
    How can I apply all attached books images to covers automatically? Maybe throght phpmyadmin using sql or function.php hook or something else?
    Thank you!

    The page I need help with: [log in to see the link]

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Author Kemory Grubb

    (@w33zy)

    Hello @mungorodnaneve

    I have been thinking about your issue for a while now and it seems I too have always had issues with attaching images to WP post types via importing data. Give me some time to step-through how WordPress treats image attachments and how my code interacts with it.

    How are the actual book cover images named in your system, is there a pattern to it?

    Thread Starter Abstract Mindfreak

    (@mungorodnaneve)

    On my site book covers placed in libs/ directory and all named
    like {id-of-book}-gorodnaneve-com.jpg ( id tooked from calibre software and placed in custom taxomonie (bids) in recencio.)
    so full path to image is gorodnaneve.com/ru/uploads/libs/7837-gorodnaneve-com.jpg

    Thread Starter Abstract Mindfreak

    (@mungorodnaneve)

    Some addition – Fetch Book Cover extension is turned off.
    Book Cover Custom URL setting – is on.
    Default WP Taxonomy setting – is off.

    And i have Media library assistant that shows me that attachment metadata of image is:
    ‘rcno-book-cover-lg’ =>
    array (
    ‘file’ => ‘7837-gorodnaneve-com-380×500.jpg’,
    ‘width’ => 380,
    ‘height’ => 500,
    ‘mime-type’ => ‘image/jpeg’,
    ),
    ‘rcno-book-cover-sm’ =>
    array (
    ‘file’ => ‘7837-gorodnaneve-com-85×130.jpg’,
    ‘width’ => 85,
    ‘height’ => 130,
    ‘mime-type’ => ‘image/jpeg’,
    ),

    and other images that were not attached like book cover but like post image have that sizes too.
    Maybe this info helps.

    I have another question to you, Master =) :
    While import, I added description of every book in excerpt field, because I dont have Book Description/synopsis field in import.
    And now I see that the default template uses Book Description/synopsis text. Its a problem too – to copy/past all them by hand.
    Maybe there is some solution to copy all automatically? SQL? changing template code?
    Thanks for helping!!

    Plugin Author Kemory Grubb

    (@w33zy)

    Hello again,

    In your example, is the Calbre ID (the 7837 number) of the book stored in any of the book’s custom meta on the WordPress website?

    If not, if you can you create a new custom meta using the “Custom User Metadata” extension called “Calibre ID”. Then using the WP All Import plugin add the value of each book’s Calibre ID to the “rcno_calibreid_meta” custom meta field.

    Then I can give code that will generate a book cover for each book.

    Thread Starter Abstract Mindfreak

    (@mungorodnaneve)

    Hey, thanks for quick reply. I added that metadata field, tried to import to it, but nothing was added, because I have a free version of All import plugin, and for custom fields update i need paid. I search now for alternative plugin..

    Thread Starter Abstract Mindfreak

    (@mungorodnaneve)

    All my calibre ids of the book stored is the taxonomy called bids gorodnaneve.com/libs/bids/7837/ (example for 7837 calibre id)
    I really dont want to strain you with my problems.. Is there another way to generate a book cover without meta field creation? Maybe using taxomonies, or meta-field inside image that already attached? I still continue search the way to update that “Calibre ID” meta field without pay for plugin..

    Thread Starter Abstract Mindfreak

    (@mungorodnaneve)

    @w33zy , Wow!, I’ve done it! I use WP Imp Exp plugin https://wordpress.org/plugins/wp-import-export-lite/ it looks like WP All import plugin, but with custom fields functions. First I export my libs, then used Notepad++ changed the fields(I could not doing this, but it helped with names of fields.
    I added this fields to each book:
    <rcno_reviews_book_cover_url><![CDATA[https://gorodnaneve.com/ru/uploads/libs/7837-gorodnaneve-com.jpg]]></rcno_reviews_book_cover_url>

    <imagesfilename><![CDATA[7837-gorodnaneve-com.jpg]]></imagesfilename>

    <rcno_reviews_book_cover_src><![CDATA[https://gorodnaneve.com/ru/uploads/libs/7837-gorodnaneve-com.jpg]]></rcno_reviews_book_cover_src>

    <rcno_reviews_book_cover_id><![CDATA[29665]]></rcno_reviews_book_cover_id>
    <rcno_reviews_book_cover_title><![CDATA[7837-gorodnaneve-com]]></rcno_reviews_book_cover_title>

    and they were
    <imageurl><![CDATA[https://gorodnaneve.com/ru/uploads/libs/1071-gorodnaneve-com.jpg]]></imageurl>
    <imagesfilename><![CDATA[1071-gorodnaneve-com.jpg]]></imagesfilename>

    <imagespath><![CDATA[/is/htdocs/*******_********/www/ru/uploads/libs/1071-gorodnaneve-com.jpg]]></imagespath>
    <imagesid><![CDATA[27837]]></imagesid>
    <imagestitle><![CDATA[1071-gorodnaneve-com]]></imagestitle>
    (**** -is my full path that added to attachment in book)

    —also i added rcno_description field

    —Maybe its not a good solution but it helps in my situation.. I dont know, but maybe you should pay attention to fix problem on that is <imagespath> was the full path and <rcno_reviews_book_cover_src> is like <rcno_reviews_book_cover_url> the same. Its my opinion. By the way thank you for that good plugin, good luck!

Viewing 7 replies - 1 through 7 (of 7 total)

The topic ‘Mass covers update’ is closed to new replies.