Forum Replies Created

Viewing 14 posts - 1 through 14 (of 14 total)
  • Author
    Posts
  • in reply to: Meta box does not update when post is Published #6405
    wdrescher
    Member

    FYI

    I just tried making FeedWordpress schedule all posts as drafts. I then set up a draft to publish scheduler plugin to grab all drafts and schedule them from that post type thinking maybe it will save anything in that field correctly.

    This did not work like I was expecting and instead it only worked when hitting update like usual. I wanted to rule out FeedWordpress as the culprit, that means FeedWordpress sent the info to the fields and marked it as draft correctly just the fields never saved in that format in my previous post.

    The theme author got back to me and said this:

    There are two preview types. local media and remote url. the local media(preview field) is a ID of the media from Media Library.

    and remote url(preview_url field) is a json data eg.
    a:2:{i:0;a:2:{s:18:”preview_media_type”;s:3:”mp3″;s:17:”preview_media_url”;s:52:”http://www.jplayer.org/audio/mp3/Miaow-02-Hidden.mp3″;}i:1;a:2:{s:18:”preview_media_type”;s:3:”oga”;s:17:”preview_media_url”;s:52:”http://www.jplayer.org/audio/ogg/Miaow-02-Hidden.ogg”;}}
    Use the Feedwordpress can not save the data as json format.

    in reply to: Meta box does not update when post is Published #6404
    wdrescher
    Member

    I am sorry with my phrasing – it added an entry to the database like it normally does when I hit update but this time not in the same style that the theme needs.

    Before code change: preview_media_url a:2:{s:18:"preview_media_type";a:1:{i:0;s:3:"mp3";}s:17:"preview_media_url";a:1:{i:0;s:97:"https://audioboom.com/boos/4481292-13-take-a-lovely-journey-to-westeros.mp3?source=rss&stitched=1";}}

    After code change: preview_media_url https://audioboom.com/boos/4450141-12-all-aboard-the-e3-hypetrain.mp3?source=rss&stitched=1

    in reply to: Meta box does not update when post is Published #6401
    wdrescher
    Member

    So I swapped the code out with that section and then noticed the published databases look the same and nothing could play. Then I updated one of the posts and watch as it added another post meta field but this time just did the url without that structure it had before. It must need that structure to read the url because it doesn’t work even if you update the post now.

    in reply to: Meta box does not update when post is Published #6394
    wdrescher
    Member

    Nope just one remote file url – essentially that field is used by the themes music player to play an mp3 (podcast) from that field

    in reply to: Meta box does not update when post is Published #6392
    wdrescher
    Member

    No I have been trashing all the posts and resyndicating the feed to publish them again so they are all fresh everytime so not worried about old post meta.

    in reply to: Meta box does not update when post is Published #6390
    wdrescher
    Member

    I see so when I detach that from the group it will then correctly add the field like the screenshots I sent.

    I will have to figure out how to do that since I never touched Piklist until this project and this is another devs theme. Is it as easy as grabbing that field info and putting it after said group?

    Music.php file for reference: https://drive.google.com/file/d/0B6gTiZfhhWDDRlBPbTJmc25LZzQ/view?usp=sharing

    in reply to: Meta box does not update when post is Published #6386
    wdrescher
    Member

    Alright so I noticed when looking in the DB there’s preview_media_url and enclosure below it. I was clicking on enclosure by accident and that is where I was seeing that it was appending audio/mpeg to the end of the preview media url.

    Now I found something that does change in the DB after publish. At the very end of the DB once published it adds another meta value with the same key name but does it in I believe a serialized way.

    I added some pictures of what I mean from the first preview media url to what the update adds in…

    Attachments:
    You must be logged in to view attached files.
    in reply to: Meta box does not update when post is Published #6383
    wdrescher
    Member

    I have tried a few things in FeedWordpress to send some line break to the PikList field and the database doesn’t render these as new lines, just renders it as code.

    Is there a way to make the output of Piklist append a couple return lines then my audio/mpeg text in to the database?

    in reply to: Meta box does not update when post is Published #6379
    wdrescher
    Member

    Alright obviously if I add a “space audio/mpeg” to the end of the url that FeedWordpress sends it puts it in the field AND in the database. I only would like it to send to the database. Is there a way to append audio/mpeg to the field that it will send a couple return lines and audio/mpeg to the database? I did run a test by adding a couple return lines and then audio/mpeg inside ones that weren’t updated yet and then saved the database and it worked so I believe I am very close.

    Maybe it already does add audio/mpeg to the field and is only getting triggered upon update?

    in reply to: Meta box does not update when post is Published #6378
    wdrescher
    Member

    Well now I feel embarrassed and happy all at once haha!

    It changed from:

    https://audioboom.com/boos/4481292-13-take-a-lovely-journey-to-westeros.mp3?source=rss&stitched=1

    to

    https://audioboom.com/boos/4481292-13-take-a-lovely-journey-to-westeros.mp3?source=rss&stitched=1

    audio/mpeg

    -So what it looks like it’s doing is adding audio/mpeg below that line with a space. I am going to try to replicate that using feedwordpress and send that to the field and see if that works. You might of just helped me over my roadblock.

    in reply to: Meta box does not update when post is Published #6376
    wdrescher
    Member

    Yup it shows up in the database

    in reply to: Meta box does not update when post is Published #6374
    wdrescher
    Member

    preview_media_url is what I use right now and the RSS Syndication plugin throws the url in there perfectly, just seems like it doesn’t stick until I hit update on the post.

    in reply to: Meta box does not update when post is Published #6372
    wdrescher
    Member

    Steve thanks for the help on this. I removed ,'field' => 'preview_url' and replaced the original file inside the theme and it did not fix the issue.

    By the way I really do appreciate the support so far, I am at a dead end and you have been awesome in response.

    Website: http://www.optinondemand.com.php56-29.ord1-1.websitetestlink.com/

    in reply to: Meta box does not update when post is Published #6370
    wdrescher
    Member
    <script>
        var api = 'https://api.soundcloud.com/resolve.json?url=',
            clientid = '&client_id=<?php echo get_theme_mod( "soundcloud-clientid")?>';
        jQuery(document).ready(function(){
          var el = jQuery('._post_meta_soundcloud_trackurl');
          el.parent().append('<a class="button get_sc_id" style="margin-top:25px">Get</a>');
    
          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' => '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://'
        )
      ));
      piklist('field', array(
        'type' => 'text'
        ,'field' => 'googleplay'
        ,'label' => esc_html__('Google Play','musik')
        ,'attributes' => array(
          'class' => 'regular-text'
          ,'placeholder' => 'http://'
        )
      ));
    
      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://'
            )
          )
        )
        ,'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'
      ));
      
    ?>
    
Viewing 14 posts - 1 through 14 (of 14 total)