Tagged: 

Viewing 6 reply threads
  • Author
    Posts
    • #94
      mcdonna
      Member

      I modified a copy of the demo to create a single post type “project” and a metabox for configuring a post_meta text field (_mcw_project_url). I put them into a folder /wp-content/plugins/piklist/add-ons/mcmaster and activated the add-on using the Piklist settings.

      The post type is fine, and the metabox displays but the URL input is overlaid with the WP footer code. (See screen cap.)

      I looked at the code and it appears there is no end-table tag. Also there seem to be extra end-div tags? I’m not sure whether this is a bug or I messed something up.

      I put a copy of the mcmaster folder here.


      Project Configuration

      URL

      class="text"

      if (typeof piklist_fields == 'undefined')
      {
      var piklist_fields = [];
      }

      piklist_fields['993677b8074b2fce2dea3fe96c6f446b'] = {"post_meta":{"meta_box_nonce":{"field":"meta_box_nonce","label":false,"description":false,"capability":false,"choices":false,"scope":"post_meta","value":"ac85dbf62a","attributes":{"class":["post_meta_meta_box_nonce"],"title":false,"alt":false,"tabindex":false},"template":"field","wrapper":"[field]","rows":1,"columns":null,"type":"hidden","embed":false,"child_field":false,"label_position":"after","serialize":false,"unique":true,"disable_label":false,"conditions":false,"position":false,"options":false,"on_post_status":false,"on_comment_status":false,"display":false,"list":true,"add_more":false,"id":"post_meta_meta_box_nonce","name":"post_meta[meta_box_nonce]"},"_mcw_project_url":{"field":"_mcw_project_url","label":"URL","description":"class="text"","capability":false,"choices":false,"scope":"post_meta","value":"","attributes":{"class":["text","post_meta__mcw_project_url"]},"template":"meta","wrapper":"n [field_wrapper]n n n [field_label]n n n [field]n [field_description_wrapper]n [field_description]n [/field_description_wrapper]n n n [/field_wrapper]n ","rows":1,"columns":null,"type":"text","embed":false,"child_field":false,"label_position":"after","serialize":false,"unique":true,"disable_label":false,"conditions":false,"position":"start","options":false,"on_post_status":false,"on_comment_status":false,"display":false,"list":true,"add_more":false,"id":"post_meta__mcw_project_url","name":"post_meta[_mcw_project_url]"}}};

    • #95
      mcdonna
      Member

      hmmm … clearly the code tags didn’t do the trick … so I added two more files to the folder on the server. “admin-source.html” is the source for the post edit page, and “admin-excerpt.html” is what I believe to be the section of that page that is generating the metabox.

    • #100
      Steve
      Keymaster

      @mcdonna– The first thing we would like to recommend is to never modify or add to the core plugin files. As soon as you update to the next version, your changes will be deleted. This goes for any WordPress plugin, and WordPress itself.

      You can either include your Piklist code in your theme or create a Piklist Plugin. Either way you would need to create the proper folder structure

      As for the code, we can’t view the files you posted. Please paste the code on Pastebin and we’ll take a look.

    • #103
      Kevin
      Keymaster

      Hi Donna-

      I think the problem you are having has to do with the position attribute. From the source it looks like you have it set to ‘start’, try setting it to ‘wrap’ and this should wrap the template container around your input.

      Let me know how it goes 🙂

      Thanks,

      Kevin

    • #104
      mcdonna
      Member

      Thanks, Steve & Kevin! Kevin, you were right, changing it to “wrap” did the trick. I guess I need to read the documentation more carefully.

      Steve, my apologies, not sure why the files were not viewable. I got busy and by the time I got back here, Kevin had posted his answer. Good point about not embedding my code in your plugin … I do know that but when I put the folder into my theme it didn’t get picked up. This isn’t an active project, just a testbed, and I didn’t have a lot of time to play with Piklist. So I figured I’d throw my code into the addons folder to eliminate variables and just get an idea of what Piklist does. I’ll dig into it more this weekend.

    • #105
      Steve
      Keymaster

      @mcdonna– Don’t blame yourself for not reading the documentation more carefully… we haven’t documented the fields variables, yet. We’ll get this up and running asap.

      Also, please make sure you are running v0.5.3 of Piklist. The Piklist folder structure for themes was fixed in this version.

      Let us know if you need any more help, or have questions.

    • #106
      Steve
      Keymaster

      @mcdonna– Just added documentation for field parameters, including the position parameter.

      Let me know if something on that page needs further documentation.

Viewing 6 reply threads
  • You must be logged in to reply to this topic.