WordPress.org

Ready to get started?Download WordPress

Forums

Advanced Custom Fields - NextGEN Gallery Field add-on
[resolved] Migrate to afc version 4? (28 posts)

  1. justintense
    Member
    Posted 1 year ago #

    Just wondering if there are any plans to migrate this plugin to the new afc 4 structure. current one only works with version 3 of afc.

    thx

    http://wordpress.org/extend/plugins/advanced-custom-fields-nextgen-gallery-field-add-on/

  2. Ricardo
    Member
    Posted 1 year ago #

    In case it helps, I found a tutorial in the official website:

    http://www.advancedcustomfields.com/docs/tutorials/creating-a-new-field-type/

    Cheers,

    Ricardo

  3. rover87
    Member
    Posted 1 year ago #

    Did anyone manage to make a custom field with this approach?

  4. davelankford
    Member
    Posted 1 year ago #

    This plugin just broke for me, as I needed to upgrade to ACF 4.

    Has anyone had any success hacking the plugin to make it work with ACF 4?

    To the plugin developers: are there any plans to upgrade the plugin, or are you no longer supporting it? Please advise. Thank you, in advance. It's a great plugin (and is greatly missed in ACF 4).

  5. jayque9
    Member
    Plugin Author

    Posted 1 year ago #

    I've used the ACF guides, and one of the free plugins as an example to rewrite the code to make it work with version 4. I haven't fully tested it yet, since I only needed to make relations to specific galleries, and we are still developing the site.

    It seems to work so far. I'll follow up if the author does not release an updated version.

  6. barclay_reg
    Member
    Plugin Contributor

    Posted 1 year ago #

    hi jayque9,

    sounds great - can't await to see your code, could you share it anyway? (may post it to dropbox or put it to github)?

    cheers
    Barclay

  7. jayque9
    Member
    Plugin Author

    Posted 1 year ago #

    This will only work with the v4 of the ACF. There is a way to call a different file if v3 is installed, but didn't bother with it since I don't have any sites where I have to run the older version any longer.

    Let me know if you find any problems with it. I mainly needed it for relationships to a single gallery. I have not tested it with relationships to albums, or with a multi-select option. I did copy the same code from the original plugin, so it should work.

    http://bit.ly/14aSanX

  8. sardbaba
    Member
    Posted 1 year ago #

    thanks Jay, it works like a charm.

  9. barclay_reg
    Member
    Plugin Contributor

    Posted 1 year ago #

    hey jayque,

    works fine, even albums and multiselsect
    great work, hope you can commit soon

    many thanks
    barclay

  10. justintense
    Member
    Posted 1 year ago #

    Awesome, I will give this a test too... Thx jay and others!

  11. brightweb1
    Member
    Posted 1 year ago #

    The link is broken ;/

  12. jayque9
    Member
    Plugin Author

    Posted 1 year ago #

    I haven't removed the file. I just clicked the link and was able to download the file without a problem.

    The file is being downloaded from my public dropbox folder. Does your internet service block bit.ly or dropbox?

  13. lelininkas
    Member
    Posted 1 year ago #

    Thank you jayque9! Works like a charm!

  14. redsundesign
    Member
    Posted 1 year ago #

    Please could you advise where I place the two files in the zipdownload. I created a "fields" directory within my theme folder and called the files through a function without any luck.

    add_action('acf/register_fields', 'my_register_fields');
    function my_register_fields()
    {
    	include_once('fields/acf-nextgen-relationship.php');
    	include_once('fields/nextgen_relationship-v4.php');
    }
  15. jayque9
    Member
    Plugin Author

    Posted 1 year ago #

    It's a plugin. You don't need to add an action in your theme to register the fields.

    This zip file needs to go in your plugins folder (/wp-content/plugins/acf-field-nextgen-relationship/), and you will need to activate it in the admin just like any other plugin. The ACF plugin will need to be installed and activated first, as this extends the functionality of ACF.

  16. redsundesign
    Member
    Posted 1 year ago #

    Thank you for getting back to me so quickly.

    I uploaded and activated your plug-in and activated the latest version of ACF without any success (I also de-activated the "NextGEN Gallery Field add-on"). I then de-activated all other plug-ins except NextGen just in case of a plug-in conflict, but again no success.

    I'm working with an extremely bare-bones theme - is there something basic in functions.php that could be missing that would prevent this from working?

  17. redsundesign
    Member
    Posted 1 year ago #

    Sincere apologies - have got it working now. I had assumed that the plug-in would automatically create the custom field. What it does is provide the fieldtype for creating a relationship when creating your own custom field.

  18. Dinesh Kesarwani
    Member
    Posted 1 year ago #

    Data is saved. But, its not return the value in field. So, next time when editing the entry the selected gallery for the current is not displaying selected in the field.
    So, each time it requires to select the gallery. Other wise its loosing the setting.

  19. jayque9
    Member
    Plugin Author

    Posted 1 year ago #

    It was working for ACF v4.1.4. It appears that a change to the current version (ACF v4.1.6), didn't like one of the assigned variable names. I've updated the code, and tested with the site that I'm using this add-on with, and it appears to be working again.

    Try downloading the current update, and see if it will work for you now.

    http://bit.ly/14aSanX

  20. Dinesh Kesarwani
    Member
    Posted 1 year ago #

    Hi @jayque9, Thanks a lot... :)

  21. Apollo139
    Member
    Plugin Author

    Posted 1 year ago #

    Hi to all,
    I'm sorry fot long silent. I'm back and I'm working on updates. Please, be patience still a few days. Thank you.
    Ales

  22. Apollo139
    Member
    Plugin Author

    Posted 1 year ago #

    Hi @jayque9,
    thank you so much for your work. It seems that update my plugin doesn't make sense. May I ask you to public your plugin to wordpress repository? I would like to write on my plugin description that it works till v3 of ACF and that users of ACF v4 should to use your plugin.

    Or if you can, I can public your plugin under my account with your teamwork.

    Thanks again!
    Ales

  23. aurevilly
    Member
    Posted 1 year ago #

    Thanks a lot! That worked without resetting all the current post types using this field.

  24. barclay_reg
    Member
    Plugin Contributor

    Posted 11 months ago #

    Hi @Apollo139, @jayque9,

    I would like to see the v4 Version in wordpress repository and I can add it.
    But I would like to see if within this plugin as it's maybe possible to include a version-switch ... what do you think?

    Contact me ...

    cheers
    Barclay

  25. Apollo139
    Member
    Plugin Author

    Posted 11 months ago #

    Hi @jayque9,
    yeas that would be great. Can you do it or do you need my help?
    Ales

  26. barclay_reg
    Member
    Plugin Contributor

    Posted 11 months ago #

    Hi @Apollo139,

    jayque9 didn't answered yet.

    I found a way to check for the ACF version, but need to find the right way, to add the switch.

    To be honest - instead of creating a new plugin (which then would be the 3rd ACF NextGEN plugin), I would like to extend your plugin. Would you like to give me access to this plugin - add me as a commiter?

    cheers Barclay

  27. barclay_reg
    Member
    Plugin Contributor

    Posted 10 months ago #

    Hi @Apollo139

    work's done. I merged your code and the code from jayque9.
    This code now offers a smooth migration from acf3 to acf4, without the need to redefine the ngg fields.

    Could you give it a try (at dropbox).

    https://www.dropbox.com/sh/gy6aiqiflvxm90f/FweyH0rXy-/advanced-custom-fields-nextgen-gallery-field-add-on

    Again: it would be great, if I can contribute to your existing plugin.

    regards
    Barclay

  28. Apollo139
    Member
    Plugin Author

    Posted 10 months ago #

    Hi, sorry for late. The plugin has been updated.
    Ales

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic

Tags

No tags yet.