Where communities thrive


  • Join over 1.5M+ people
  • Join over 100K+ communities
  • Free without limits
  • Create your own community
People
Repo info
Activity
Leon Francis Shelhamer
@twoelevenjay
I ran an svn ci command and it showed my readme.txt upload from trunk but nothing from assets.
Yeah on my local machine I have an assets directory in the same root as the trunk directory and that is where I places the images.
Leon Francis Shelhamer
@twoelevenjay
It feels like it only checks in the trunk directory. No worries, I will do some more searches later, I was stumped but not a critical issue. THANK YOU for all the help!
Justin Sternberg
@jtsternberg
The assets directory cannot be INSIDE trunk. It needs to be adjacent to it.
Oh, maybe that's what you're saying you did
cggit
@cggit
Is there a CMB way to hide default fields like Wysiwyg or you have to use remove_post_type_support()?
Justin Sternberg
@jtsternberg
No, CMB2 does not handle hiding default fields.
cggit
@cggit
thx
cggit
@cggit
I'd like to use a group_fields field title as a group_title in a repeatable group. aka replace Entry {#} with a field title if its set. So the relevant fields in an array but cant figure out how to iterate with without the {#}
So = I have
get_post_meta( $cmb_group->object_id, $prefix . 'demo' )[0][0]['title'];
cggit
@cggit
i need to increment the second [0] to get the appropriate titles..
Is there a better way to do this?
cggit
@cggit
i guess i could write JS that does this instead but would like to know if theres a simple way to do it with PHP
cggit
@cggit
thought id be able to use (int) '{#}' to iterate over the array but it doesnt work
Justin Sternberg
@jtsternberg
No matter how you do it, you'll still need to implement some JS to handle the change when you add fields
cggit
@cggit
i'm ok with new fields being Entry # since it wouldn't have a title field yet
Juan Rangel
@JuanRangel
Anybody pretty familiar with the javascript for adding repeating fields? I need some help.
Justin Sternberg
@jtsternberg
What kind of help?
Juan Rangel
@JuanRangel
I am trying to conditionally show a setup of fields depending on the value of the select box. So I created a select field with my options and using JS I hide all other fields in that metabox. I then use a switch case block to show the necessary fields. This is inside of a repeating field.
The issue I am having is this; I show the fields using .on('change') so when the page loads all fields are hidden until the select box is changed. Also when I add a new repeater block the .on(change) has no effect.
James DiGioia
@mAAdhaTTah
got a full code example? you might need to add event bindings to the newly added repeater block
Juan Rangel
@JuanRangel
I'd really appreciate if anyone can help me out. I can send some $$ via paypal.
Justin Sternberg
@jtsternberg
.on events won't work if you're attaching them to selectors which get injected to the Dom. E.g. $('.selector-which-gets-added').on( 'event' won't work, but $('body').on( 'event', '.selector-which-gets-added' should.
James DiGioia
@mAAdhaTTah
also you dont need to keep passing your variables into the jquery selector, they're already jquery objects
lines 4,5 & 6 can just be module.find
cggit
@cggit
is there a built in way to get group styles without repeater support? I want all my cmb2 cpt fields to look like they're in one metabox.
cggit
@cggit
my bad I got it
Justin Sternberg
@jtsternberg
Was just about to respond. Nice.
cggit
@cggit
ha thanks anyways.
Juan Rangel
@JuanRangel
Hey Fellas, I am still having the same issues on customizing the conditional logic. If someone wouldn't mind helping me out via skype or something I can send some $$ via paypal. Im asking here because we are all familiar with CMB2.
cggit
@cggit
Is it recommended to setup all fields with one hook to cmb2_init or is it fine to break up logical groups with multiple cmb2_init hooks?
Justin Sternberg
@jtsternberg
@cggit I prefer to break them up. You can actually see them broken up in the example-functions.php file
Juan Rangel
@JuanRangel
I did a tutorial using CMB2 for GenesisCamp today. Just wanted to let you know @jtsternberg https://www.youtube.com/watch?v=Pj3ODB9ENrs
Justin Sternberg
@jtsternberg
@JuanRangel nice! This is somewhat similar to the wpsessions session I did, http://wpsessions.com/sessions/custom-meta-and-settings-with-cmb2/
It's a good resource
Juan Rangel
@JuanRangel
I watched that live and ordered the video as well. :-)
Scott Kingsley Clark
@sc0ttkclark
@jtsternberg anything you can point me to in terms of direction on best way to help you guys rewrite the repeater field into backbone or whatever so there can be multiple repeaters on the same page / repeaters in repeaters? or are those working now?
Justin Sternberg
@jtsternberg
@sc0ttkclark they are not working yet, and I don't believe Camden ever started on it. I honestly don't think there will be too much to fix there, because it seems that the jQuery selectors are just too greedy
Scott Kingsley Clark
@sc0ttkclark
so, best way forward -- any way you or Camden can walk me through it so i can put time into it?
we absolutely need it to move forward with Pods 3.0 + CMB2
Scott Kingsley Clark
@sc0ttkclark
so it's a priority for me, although i may pass it on to another person on our team, i should be versed in it so i can divvy up tasks as necessary
maybe there's a github issue for it too
and i was wondering if that was the block of code that needed tweaking
Justin Sternberg
@jtsternberg
Yah, addAjaxRow and addGroupRow are probably the culprits. I'm super-slammed since I was out of town this week, but best bet would be to add multiple repeat groups to a page and see how it breaks.. I think that will help narrow it down. I'd fix that problem first, and see if it fixes the repeat groups w/in repeat groups problem
Scott Kingsley Clark
@sc0ttkclark
ok, thx, i'll try going through that and see what i can do
that person who posted the CMB2 admin UI plugin, i tested that code and saw it affecting that, so i might just use that as a quick and easy way to test / fix
Justin Sternberg
@jtsternberg
ok, sorry I can't do more. Maybe we could setup a call next week if it would be helpful? But as of right now, that's all I know