Forum Replies Created

Viewing 10 replies - 1 through 10 (of 10 total)
  • Thread Starter Olivier

    (@eterneige)

    I managed to activate the plugin by editing autoload_real.php fro mcomposer. Added this:

    $useStaticLoader = false;

    between lines 26 and 27.

    It’s not a long term solution, but right now, it works. And it works well, even if the admin lacks somes options (filter to display only custom shortcodes, since I don’t care for other ones, I can’t even edit them: I only care for my own shortcodes), allow to display more than 5 on a page. But for now, it does the job.

    If you can fix that bug linked to composer (did you forget to commit that file?), I my leave some stars as plugin evaluation.

    Thanks.

    Thread Starter Olivier

    (@eterneige)

    Oh, you answered while I was writing…

    No matter when, it’s not a real problem : I just find it’s useless to display an empty box ^^

    Thread Starter Olivier

    (@eterneige)

    Well, I found the file where it happens :
    ultimate-post-types/classes/UPT_Custom_Post_Type.php

    I’ve added

    if ('fields' == $m->meta_key and 'a:0:{}' == $m->meta_value) {
        return;
    }

    between lines 213 and 214 (in the foreach loop).

    It does the job, even if I’m not sure it’s a good practice πŸ™‚

    Could you please include such a modification in the plugin ? My code or another way to handle this…

    Thanks !

    Thread Starter Olivier

    (@eterneige)

    It all works great !

    Thanks a lot for your reactivity !

    Thread Starter Olivier

    (@eterneige)

    Actually, I found a way to do that, using admin_print_scripts-(page_hook) or admin_print_scripts-(plugin_page) (found in API/Action reference).

    I may not have explained correctly…
    When creating a new Custom Type and selecting the fields for that new Type, you may need some JS.
    When user uses the field to publish a post, you may need some other JS.

    Anyway, there is no real need for a specific function, since there is a WP function to handle this case ^^

    Thread Starter Olivier

    (@eterneige)

    I’ve seen all WP plugins were replicated on Github, but if I fork a plugin and push a modification, I’m not sure someone will pull it… because, as you said, it’s automatic…

    About gettext, I did not know .mo file was automatically generated. So, I’ll do it that way πŸ™‚

    Thread Starter Olivier

    (@eterneige)

    Ok, I was really tired. Of course this does the job !

    Thread Starter Olivier

    (@eterneige)

    Reading my last post, I noticed a snag…
    We must not specify template code for each field in a repeater, but for each repetition…

    Then, there would be many template code fields :
    – no data
    – before repeater content (eg: <table>)
    – after repeater content (eg: </table>)
    – before each group of repeated fields (eg: <tr>)
    – after each group of repeated fields (eg: </tr>)
    – before each field (eg: <td>)
    – after each field (eg: </td>)

    Is that not too much… ?

    Thread Starter Olivier

    (@eterneige)

    I didn’t think about filters (I’m not very familiar with all WP functions and best practices).
    For testing, I was using pure code in a new single-{posttype}.php file (which is theme-dependant, and therefore not a good solution : as I say, I’m testing). I found a sample you gave in another thread, and managed to retrieve data using get_uf(‘repeater_id’). I’m then using 2 foreach loops, which is not a big deal.
    I’ll try your way tomorrow (I’m tired right now).

    To answer your question… the first 2 solutions require either dev skills from user or an unnecessary complexity in the plugin.

    The third solution then seems more adapted, even if I’m not completely sure I understand…
    When you say : “When creating the field”, you mean within the repeater ? Is it where one would specify the content if empty or before/after post content ? It’s not clear in my mind…

    What I think I understand is :
    – You add a repeater, you can specify some template code for the cases you cited : no data, before content, after content (for instance <table> and </table>)
    – You add a field in this repeater, then you specify some template code for that field in that repeater (for instance <tr><td> and </td></tr>)

    If I understand correctly, it’s ok for me : it’s powerful and not hard to understand/use for user.

    I still have to understand how/when to use containers and I think this plugin will perfectly fit my needs.
    I may create an add_on to add opening hours management (all plugins I’ve found are either poor or not free) : all has to be handled is “Is the sotre currently open ?”, to display relevant information.

    Forum: Reviews
    In reply to: [Ultimate Fields] Wow !!
    Thread Starter Olivier

    (@eterneige)

    I was wondering if there was a way to write add-ons for the plugin (to add new fields, for instance).

    Anyway, I’ll certainly provide a french translation via GitHub πŸ™‚

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