Forum Replies Created

Viewing 12 posts - 1 through 12 (of 12 total)
  • Author
    Posts
  • in reply to: May have found a bug with shortcodes #6927
    Rachel
    Member

    I figured it out!

    Turns out, this is a bug only in Chrome and is fixed in the latest version of TinyMCE. Going off of the bug explanation, that you can’t have editable items nested within a non editable item, if you change <div class="wpview-body" contenteditable="false"> -> to <div class="wpview-body">.

    You guys might want to add to the next release. 🙂

    in reply to: [0.9.9.6] shortcode interface not working with IIS #6177
    Rachel
    Member

    Cool. Thank you!

    in reply to: [0.9.9.6] shortcode interface not working with IIS #6167
    Rachel
    Member

    Did you figure anything out related to this? Still seeing this issue in 0.9.9.7.

    in reply to: update condition in add_more group not working in v 9.9.7 #6131
    Rachel
    Member

    @Steve, is there a fix for this yet?

    in reply to: Checkbox with only one choice #6017
    Rachel
    Member

    @Steve I wanted to see if there was an explicit false value that could be set, but I can make this work.

    Thanks!
    Rachel

    in reply to: Creating conditional field for something not equal to 'none' #4761
    Rachel
    Member

    That makes sense. I was trying to see if part of the condition could get the post info once the select option changes.

    in reply to: Numbering order based on drag and drop #4750
    Rachel
    Member

    That does, I was just hoping there was some way of adding an index to the data model… any suggestions?

    I am now using the WP-API plugin and see that they come in the correct order, but I’d like to harden things a bit more by having an index if possible.

    in reply to: Numbering order based on drag and drop #4746
    Rachel
    Member

    Hmmm, there appears to be an a and s key in the array, but it seems to not have anything to do with source order.

    Here’s my piklist code:

    piklist('field', array(
      'type' => 'group'
      ,'label' => __('Sources')
      ,'description' => __('Any additional sources to cite')
      ,'field' => 'sources_group'
      ,'add_more' => true
      ,'fields' => array(
        array(
          'type' => 'text'
          ,'field' => 'source_title'
          ,'label' => 'Source Title'
          ,'columns' => 12
          ,'attributes' => array(
            'class' => 'large-text'
          )
        )
        ,array(
          'type' => 'text'
          ,'field' => 'source_text'
          ,'label' => 'Source Text'
          ,'columns' => 12
          ,'attributes' => array(
            'class' => 'large-text'
          )
        )
        ,array(
          'type' => 'text'
          ,'field' => 'source_url'
          ,'label' => 'Source URL'
          ,'columns' => 12
          ,'attributes' => array(
            'class' => 'large-text'
          ),
          'validate' => array(
            array(
              'type' => 'url'
            )
          )
        )
      )
    ));

    and the JSON:

    {
        "status": "ok",
        "post": {
            "id": 31,
            "type": "post",
            "slug": "testing-a-cited-post",
            "url": "http://localhost:8888/2015/10/26/testing-a-cited-post/",
            "status": "publish",
            "title": "Testing a cited post",
            "title_plain": "Testing a cited post",
            "content": "<p>Body text</p>\n",
            "excerpt": "<p>Hello excerpt here</p>\n",
            "date": "2015-10-26 14:58:10",
            "modified": "2015-10-26 14:58:19",
            "categories": [
                {
                    "id": 2,
                    "slug": "memos",
                    "title": "Memos",
                    "description": "",
                    "parent": 0,
                    "post_count": 2
                }
            ],
            "tags": [],
            "author": {
                "id": 1,
                "slug": "admin",
                "name": "admin",
                "first_name": "",
                "last_name": "",
                "nickname": "admin",
                "url": "",
                "description": ""
            },
            "comments": [],
            "attachments": [],
            "comment_count": 0,
            "comment_status": "open",
            "custom_fields": {
                "media_label": [
                    ""
                ],
                "author_name": [
                    ""
                ],
                "author_title": [
                    ""
                ],
                "author_twitter": [
                    ""
                ],
                "demo_add_more": [
                    "single"
                ],
                "sources_group": [
                    "a:3:{s:12:\"source_title\";a:2:{i:0;s:25:\"Title of source somewhere\";i:1;s:30:\"Title of Source somewhere else\";}s:11:\"source_text\";a:2:{i:0;s:9:\"more text\";i:1;s:9:\"some text\";}s:10:\"source_url\";a:2:{i:0;s:24:\"http://www.somewhere.com\";i:1;s:28:\"http://www.somewhereelse.com\";}}"
                ]
            }
        },
        "previous_url": "http://localhost:8888/2015/10/14/another-post/"
    }
    in reply to: Creating conditional field for something not equal to 'none' #4745
    Rachel
    Member

    How would I go about replacing them with the selected post title, image, and excerpt?

    in reply to: Numbering order based on drag and drop #4743
    Rachel
    Member

    Is there a way to expose this in the same array? I’m using this with the JSON API plugin

    in reply to: Numbering order based on drag and drop #4718
    Rachel
    Member

    Essentially I want to get some awareness in the data model of the user chosen sorting order of the add more fields which are draggable.

    sources

    Perhaps the json would look something like this:

    {
        "sources_group": {
            "order": "0",
            "source_title": "Title of source",
            "source_text": "some text",
            "source_url": "http://www.somewhere.com"
        },
            "order": "1",
            "source_title": "Title of source",
            "source_text": "more text",
            "source_url": "http://www.somewhereelse.com"
        }
    }
    Attachments:
    You must be logged in to view attached files.
    in reply to: Creating conditional field for something not equal to 'none' #4704
    Rachel
    Member

    Great! That worked, now I just need to replace the image, title, and excerpt with the real thing.

     piklist('field', array(
         'type' => 'select'
         ,'field' => 'featured_post_id'
         ,'label' => 'Choose post to feature'
         ,'columns' => 6
         ,'choices' => array('none' => '-') + piklist(
           get_posts(
              array(
               'post_type' => 'post'
               ,'orderby' => 'post_date'
              )
              ,'objects'
            )
            ,array(
              'ID'
              ,'post_title'
            )
         )
       ));
    
       piklist('field', array(
         'type' => 'html'
         ,'label' => 'Post Selected'
         ,'field' => 'featured_post_preview'
         ,'description' => 'The selected post to be featured'
         ,'value' => '<img src="Post image"/><h2>Post Title</h2><p>Excerpt</p>'
         ,'conditions' => array(
           array(
             'field' => 'featured_post_id'
             ,'value' => 'none'
             ,'compare' => '!='
           )
         )
       ));
Viewing 12 posts - 1 through 12 (of 12 total)