Viewing 6 posts - 1 through 6 (of 6 total)
Mirko

CSV Import – DirectoryPress

Hi, I have two problems with your CSV import plugin ... First I can not find any documentation on how the 'image_array' field works ('image' just contains a URL, and that works fine). But if i want to add several images I just can't get it to work (same applies for 'doc_array'). And second, the plugin is not PHP7 compatible, as it uses eg 'mysql_error()' functions, not the WP wrappers ... 'mysql_...()' functions are deprecated since PHP 5.5 Thanks for your help, Mirko

Created: February 22, 2016 at 4:00 pm


  • Mirko
    February 22, 2016 at 4:25 pm

    One other thing: Is there a way to create a new user (based on the given email in the csv) and asign the directory entry accordingly, so that every user can manage his entry himself??¿¿

  • Clive
    Clive
    February 22, 2016 at 4:51 pm

    Just use any of the free CSV import plugins available at WordPress.org – they work better anyway 🙂


  • Mirko
    February 22, 2016 at 4:57 pm

    OK, but how does the DirectoryTheme save the associated images or documents?¿

  • zarko
    zarko
    February 22, 2016 at 5:18 pm

    hi Mirko

    CSV plugin will not copy or insert any images for you, it can just update related custom fields. If you provide direct link to ‘image’ custom field than it will show that image

    As for the ‘image_array’ field, it requires serialized array with image links and some metadata about the image. Now the problem is that plugin doesn’t support inserting values as arrays into custom field. It can only import key => value pair so that value is in form of string. Even if you provide array it will be converted to a string

    To make it import array of images you will need to edit CSV import plugin and add condition which will check whether value which is being imported is array. If it is, it should be passed as array to update_post_meta() function

  • Neil
    Neil
    April 21, 2016 at 3:03 pm

    There has to be a better way to do this. I done this a lot and never had an issue. Why doesn’t ‘image’ and ‘images’ in the header work anymore?

Copyright © 2010-2020 PremiumPress Limited.

secure payments