Forum Replies Created

Viewing 9 replies - 1 through 9 (of 9 total)
  • Regis

    (@regiswordpress)

    I am having trouble with playing videos on IOS as well, but from your shortcode, it looks like you are calling a Flash Video (flv). IOS will not play Flash. All the documentation I could find points to using mp4 (h.264 encoding)… which I still cannot get to play on IOS… I have yet to try jplayer. Let me know if you get it working!
    Thanks,
    Regis

    Regis

    (@regiswordpress)

    Hi @stesvis – I just wanted to follow up about customizing the comments and adding data to them. I asked the question on Stack Overflow and got a great answer. Just don’t make the same mistake as I did, and post your questions to the right forum ??
    here is the link

    Cheers,
    Regis

    Regis

    (@regiswordpress)

    @poil11 and @silentgap: Thanks! Thanks! This is great! I had been looking for hours how to use a custom column in the comments table, but this is MUCH simpler!! I read here and there that custom comment type exist, but I have not seen them anywhere. Anyone know if they exit?

    Regis

    (@regiswordpress)

    You need to add ‘comments’ to your ‘supports’ array.

    Regis

    (@regiswordpress)

    Hi stesvis – did you ever find an answer? I have the exact same need..
    thanks,

    Thread Starter Regis

    (@regiswordpress)

    Thank you Marc. I found out was I was doing wrong — my nonce was badly named. But in the meantime I discovered something else. After setting a page hierarchy in the quick edit mode, I would loose the info when saving in the full edit mode. I’d created a custom post type with the option ‘hierarchical’ set to ‘true’, but I had not added support for ‘page-attributes’. So I guess that when I updated my post from the full edit mode, the hierarchy info was overwritten as empty… here is my updated code, working like a charm:

    // the custom post type declaration:
    $custom_args = array(
    	'labels' => array(
    	'name' => __( 'Things' ),
    	'singular_name' => __( 'Thing' ),
    	'add_new' => _x('Add New', 'Thing'),
    	'add_new_item' => __('Add New Thing'),
    	'edit_item' => __('Edit Thing'),
    	'new_item' => __('New Thing'),
    	'view_item' => __('View Thing'),
    	'search_items' => __('Search Things'),
    	'not_found' =>  __('No Things found'),
    	'not_found_in_trash' => __('No Things found in Trash'),
            'parent_item_colon' => ''
    	),
       'public' => true,
       'publicly_queryable' => true,
       'show_ui' => true,
       'query_var' => true,
       'rewrite' => true,
       'capability_type' => 'post',
       'hierarchical' => true,
       'menu_position' => 9,
       'supports' =>array('title','editor','author','thumbnail','excerpt','comments', 'page-attributes') );
    register_post_type ('things', $custom_args );

    I have also added a function to sanitize the input from the user.

    function save_options(){
    [...]
    update_post_meta($post->ID, "textsubtitle",cleanInput( $_POST["textsubtitle"], 'text') );
    update_post_meta($post->ID, "textauthor", cleanInput($_POST["textauthor"],'text') );
    update_post_meta($post->ID, "textshowchildren", cleanInput( $_POST["textshowchildren"], 'checkbox') );
    update_post_meta($post->ID, "textforceprocess", cleanInput( $_POST["textforceprocess"], 'checkbox') );
    update_post_meta($post->ID, "textclearformat", cleanInput( $_POST["textclearformat"], 'checkbox') );
    update_post_meta($post->ID, "subtexttitle", cleanInput( $_POST["subtexttitle"], 'text') );
    update_post_meta($post->ID, "subtextauthor", cleanInput( $_POST["subtextauthor"],'text') );</p>
    <p>return $_POST; //I am still not sure why or if I have to
                   // return anything here...
    }

    and finally, my very simple function to verify input:

    function cleanInput( $input, $type ) {
    	global $allowedposttags;
    	$cleanInput = false;
    	switch ($type) {
    	  case 'text':
    	    $cleanInput = wp_filter_nohtml_kses ( $input );
    	    break;
              case 'checkbox':
                $input === 'on'? $cleanInput = 'on' : $cleanInput = '';
    	    break;
              case 'html':
                $cleanInput = wp_kses( $input, $allowedposttags);
    	    break;
    	default:
    	    $cleanInput = false;
    	    break;
    	}
    	return $cleanInput;
    }

    Thread Starter Regis

    (@regiswordpress)

    Also, when I save data in the ‘Edit’ section, if deletes the data I saved in the ‘Quick Edit’ section…. like page hierarchy…

    Regis

    (@regiswordpress)

    Thanks @paul for the links to registered users only and members only. I tried both and both worked for me. I was inclined at first to use “Registered Users” because it is more recent, but it blocked access to XML-RPC which prevented me from updating my blog from the WP iPhone app. “Members Only” has a smart option to allow XML-RPC one time access from your current DNS. That was enough to make it work for me!

    Regis

    (@regiswordpress)

    I have a very comparable problem. I am trying to show a post on a static page. This post has some podpress movies associated to it. The movies show on the blog page but not on the static page. I only get the [display_podcast] tag displayed in the browser window… I have done a lot of research without any luck. Did you ever find a solution?
    Thanks,

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