Viewing 8 reply threads
  • Author
    Posts
    • #3256
      alicegege
      Member

      Hello, and thank you for this amazing framework. It used to work at the bigining, but now, it doen’t, and maybe you can help me to find where I’m wrong!

      I installed Piklist Version 0.9.4.24 in my wordpress, I created folders and my meta boxes are in my editing posts. But even when I create a new post or I update one, the meta boxes don’t save…

      I tryied to use piklist_pre_update_option (in functions OR in the .php of my metaboxe because I didn’t found where to try it) but nothing is hapening… Would you have any idea? I could be so nice for me to use it!

      And I was wondering if some another jquery would interfer with it…?
      Thank you a lot!

      Here is one of my metabox :

      /*
      Title: Difficulté tutoriels
      Post Type: post
      context:side
      */
      
      piklist('field', array(
          'type' => 'select'
      	,'scope' => 'post_meta'
          ,'field' => 'tuto-diff-sel'
          ,'label' => 'Choisir une difficulté'
      	,'description' => 'Choisir une difficulté entre 1 et 5.'
          ,'attributes' => array(
            'class' => 'text'
          )
          ,'choices' => array(
            'option1' => '1 = Très facile'
            ,'option2' => '2 = Facile'
            ,'option3' => '3 = Moyen'
            ,'option4' => '4 = Difficile'
            ,'option5' => '5 = Très difficile'
          )
        ));
      Attachments:
      You must be logged in to view attached files.
    • #3258
      Steve
      Keymaster

      @alicegege– Welcome to the Piklist community!

      Your code is working fine for me. Usually when you are having an issue like this, you have duplicated the field name on another field. Try changing the field name and see if that works.

      If you are still having issues, feel free to email your entire plugin or theme to [email protected], and we’ll take a look.

      Also, in most cases it is best NOT to include the scope parameter and let Piklist figure it out automatically.

    • #3266
      alicegege
      Member

      Thank you Steve, a lot, for your time, your help, and your welcome!
      I had this code without the scope parameter, and I added just yesterday, but I read your different answer, and I’m sure I have to take it off.

      I don’t think I have duplicated field, I just use a few, and even when I just have this one, it’s not working.

      Also, when I go i n parameters of Piklist in dashboard, and try to change “Multiple Users Roles”, it’s not saving changes, so I’m wondering if the pluggin is saving at all…

      What can I send you, and where?
      And again thank you,
      have a nice evening

    • #3267
      Steve
      Keymaster

      @alicegege– Send us the plugin you are writing, or the theme. Which ever has the Piklist code. Zip it up and email to [email protected]

    • #3268
      Steve
      Keymaster

      @alicegege– I received your files and tested… and it looks good to me. Saving fine.

      I’m thinking it might be a plugin conflict. Please try disabling your plugins, except Piklist, and then enable them one-by-one and try saving. Hopefully this can help narrow it down.

    • #3277
      alicegege
      Member

      Thank you a lot Steve, to have taken time for this.
      You are so right, I test all my pluggins, and the problem was with “Total cache”, I had lots of jquery problems with other websites, and I disabled the minimified option for js, and all my problems disapear. But for Piklist it hasn’t resolved the problem. So for now I have to disable this pluggin for my piklist issue, and I will see in the future, if another plggin can make my website more light and betterfluid…
      Thank you again 🙂

      Your piklist is so cool, I haven’t yet seen all of possibilities, but I’m sure I will…

    • #3278
      Steve
      Keymaster

      Great find! However we want to fix this.

      Please activate Total Cache with the same settings so Piklist doesn’t work. Now go to the sidebar navigation menu of your site’s dashboard, click on the link for General Settings under the Performance tab. Find the EXPORT button and click it.

      Email us the export file.

      Thanks.

    • #7456
      mouskni
      Member

      Hello,
      I have a problem with piklist meta box. when add a preview file it do not save. here is the code of the meta-box
      <script>
      var api = ‘https://api.soundcloud.com/resolve.json?url=&#8217;,
      clientid = ‘&client_id=<?php echo get_theme_mod( “soundcloud-clientid”)?>’;
      jQuery(document).ready(function(){
      var el = jQuery(‘._post_meta_soundcloud_trackurl’);
      el.parent().append(‘Get‘);

      jQuery(document).on(‘click’, ‘.get_sc_id’, function(){
      var url = el.val(),
      _url = api+url+clientid,
      that = jQuery(this);
      if(that.hasClass(‘disabled’)) return;
      that.addClass(‘disabled’);
      if(url == ”) return;
      jQuery.ajax({
      url: _url,
      method: “GET”
      }).done(function( obj ) {
      jQuery(‘._post_meta_soundcloud_trackid’).val(obj.id);
      that.removeClass(‘disabled’);
      }).fail(function( jqXHR, textStatus ) {
      that.removeClass(‘disabled’);
      alert( “Request failed: ” + textStatus );
      });
      })
      });
      </script>

      <?php
      /*
      Title: Music Fields
      Description: this is the description
      Post Type: download
      Order: 1
      Collapse: false
      */
      piklist(‘field’, array(
      ‘type’ => ‘select’
      ,’field’ => ‘music_type’
      ,’label’ => esc_html__(‘Type’,’musik’)
      ,’description’ => esc_html__(‘Default is single, select bundle when this is a bundle product.’,’musik’)
      ,’choices’ => array(
      ‘single’ => ‘Single’
      ,’bundle’ => ‘Bundle’
      )
      ,’value’ => ‘single’
      ,’on_post_status’ => array(
      ‘value’ => ‘lock’
      )
      ));

      piklist(‘field’, array(
      ‘type’ => ‘select’
      ,’field’ => ‘preview_type’
      ,’label’ => esc_html__(‘Preview’,’musik’)
      ,’choices’ => array(
      ‘local’ => ‘Local’
      ,’remote’ => ‘Remote’
      )
      ,’conditions’ => array(
      array(
      ‘field’ => ‘music_type’
      ,’value’ => ‘single’
      )
      )
      ,’on_post_status’ => array(
      ‘value’ => ‘lock’
      )
      ));

      piklist(‘field’, array(
      ‘type’ => ‘file’
      ,’field’ => ‘preview’
      ,’scope’ => ‘post_meta’
      ,’label’ => esc_html__(‘Preview file’,’musik’)
      ,’description’ => esc_html__(‘Preview audio file, you can add mp3, ogg, mp4 file(s).’,’musik’)
      ,’conditions’ => array(
      array(
      ‘field’ => ‘preview_type’
      ,’value’ => ‘local’
      ),
      array(
      ‘field’ => ‘music_type’
      ,’value’ => ‘single’
      )
      )
      ,’on_post_status’ => array(
      ‘value’ => ‘lock’
      )
      ));

      piklist(‘field’, array(
      ‘type’ => ‘group’
      ,’field’ => ‘preview_url’
      ,’label’ => esc_html__(‘Preview file’,’musik’)
      ,’add_more’ => true
      ,’fields’ => array(
      array(
      ‘type’ => ‘select’
      ,’field’ => ‘preview_media_type’
      ,’label’ => esc_html__(‘Format’,’musik’)
      ,’columns’ => 2
      ,’choices’ => array(
      ‘mp3’ => ‘mp3′
      ,’m4a’ => ‘mp4′
      ,’m4v’ => ‘m4v’
      ,’oga’ => ‘ogg’
      ,’webma’ => ‘webm’
      )
      )
      ,array(
      ‘type’ => ‘text’
      ,’field’ => ‘preview_media_url’
      ,’label’ => esc_html__(‘URL’,’musik’)
      ,’columns’ => 10
      )
      )
      ,’conditions’ => array(
      array(
      ‘field’ => ‘preview_type’
      ,’value’ => ‘remote’
      ),
      array(
      ‘field’ => ‘music_type’
      ,’value’ => ‘single’
      )
      )
      ,’on_post_status’ => array(
      ‘value’ => ‘lock’
      )
      ));

      piklist(‘field’, array(
      ‘type’ => ‘group’
      ,’label’ => ‘Soundcloud’
      ,’description’ => esc_html__(‘Input the soundcloud url and click the get button’,’musik’)
      ,’fields’ => array(
      array(
      ‘type’ => ‘text’
      ,’field’ => ‘soundcloud_trackid’
      ,’label’ => ‘trackid’
      ,’columns’ => 3
      )
      ,array(
      ‘type’ => ‘text’
      ,’field’ => ‘soundcloud_trackurl’
      ,’label’ => ‘url’
      ,’columns’ => 7
      )
      )
      ));

      piklist(‘field’, array(
      ‘type’ => ‘text’
      ,’field’ => ‘youtube’
      ,’label’ => esc_html__(‘Youtube url’,’musik’)
      ,’attributes’ => array(
      ‘class’ => ‘regular-text’
      ,’placeholder’ => ”
      )
      ));

      piklist(‘field’, array(
      ‘type’ => ‘text’
      ,’field’ => ‘year’
      ,’label’ => esc_html__(‘Publish year’,’musik’)
      ,’attributes’ => array(
      ‘class’ => ‘regular-text’
      ,’placeholder’ => ‘2015’
      )
      ));
      piklist(‘field’, array(
      ‘type’ => ‘text’
      ,’field’ => ‘time’
      ,’label’ => esc_html__(‘Duration’,’musik’)
      ,’attributes’ => array(
      ‘class’ => ‘regular-text’
      ,’placeholder’ => ’00:00′
      )
      ));
      piklist(‘field’, array(
      ‘type’ => ‘text’
      ,’field’ => ‘itunes’
      ,’label’ => esc_html__(‘iTunes’,’musik’)
      ,’attributes’ => array(
      ‘class’ => ‘regular-text’
      ,’placeholder’ => ‘http://&#8217;
      )
      ));
      piklist(‘field’, array(
      ‘type’ => ‘text’
      ,’field’ => ‘googleplay’
      ,’label’ => esc_html__(‘Google Play’,’musik’)
      ,’attributes’ => array(
      ‘class’ => ‘regular-text’
      ,’placeholder’ => ‘http://&#8217;
      )
      ));

      piklist(‘field’, array(
      ‘type’ => ‘group’
      ,’field’ => ‘links’
      ,’label’ => esc_html__(‘Links’,’musik’)
      ,’add_more’ => true
      ,’fields’ => array(
      array(
      ‘type’ => ‘text’
      ,’field’ => ‘link_text’
      ,’label’ => esc_html__(‘Text’,’musik’)
      ,’columns’ => 4
      )
      ,array(
      ‘type’ => ‘text’
      ,’field’ => ‘link_url’
      ,’label’ => esc_html__(‘URL’,’musik’)
      ,’columns’ => 8
      ,’attributes’ => array(
      ‘class’ => ‘regular-text’
      ,’placeholder’ => ‘http://&#8217;
      )
      )
      )
      ,’on_post_status’ => array(
      ‘value’ => ‘lock’
      )
      ));

      piklist(‘field’, array(
      ‘type’ => ‘checkbox’
      ,’field’ => ‘hide_play’
      ,’label’ => esc_html__(‘Hide play btn’,’musik’)
      ,’choices’ => array(
      ‘first’ => ”
      )
      ,’on_post_status’ => array(
      ‘value’ => ‘lock’
      )
      ));

      piklist(‘field’, array(
      ‘type’ => ‘checkbox’
      ,’field’ => ‘download’
      ,’label’ => esc_html__(‘Allow download music’,’musik’)
      ,’description’ => esc_html__(‘Download the preview file’,’musik’)
      ,’choices’ => array(
      ‘first’ => ”
      )
      ,’on_post_status’ => array(
      ‘value’ => ‘lock’
      )
      ));

      piklist(‘field’, array(
      ‘type’ => ‘text’
      ,’field’ => ‘plays’
      ,’label’ => esc_html__(‘Play count’,’musik’)
      ,’attributes’ => array(
      ‘class’ => ‘regular-text’
      )
      ,’capability’ => ‘administrator’
      ));

      ?>

      Please can you help ?

    • #7471
      Steve
      Keymaster

      The formatting didn’t come through correctly, but you may want to remove the field name once you define a group.

      For example, you can change this:

      ‘type’ => ‘group’
      ,’field’ => ‘preview_url’
      

      to this:

      ‘type’ => ‘group’
      
Viewing 8 reply threads
  • You must be logged in to reply to this topic.