Forum Replies Created
-
AuthorPosts
-
cantchoos
ParticipantAwesome. Hopefully someone can benefit from it..
Is it hard to associate an existing media library item (or image url) with a business connections entry programmatically?
cantchoos
Participantcantchoos
ParticipantHey Steven,
Sorry for my delay i been juggling projects.
This is really horrible code but it gets the job done:In registration magic I just set the post submission url to: http://www.yoursite.com/wp-admin/admin-ajax.php
Feel free to do whatever you want with it. Figured it’d be nice to have a bridge between RM and your plugin.
Best wishes,
PS: can you tell me how to add images to an entry programmatically? I can’t figure it out you may see the commented out line i started.
cantchoos
ParticipantThank you once again for the excellent support, Steven.
cantchoos
ParticipantHey Steven, I was wondering if you had some time to provide an example of adding a website link programmatically?
I would really appreciate it, as always!
cantchoos
ParticipantSteven,
You can have the full source code once I’m finished. It’s not published yet. I’m creating it for a non-profit i work with. Feel free to do whatever you want with it ^_^
I am having difficulties resolving a category name to an id.. I’m still quite new to WordPress. I am using the following code:
$category_id = get_cat_ID($category); txtlog("category id for: ".$category." : ".$category_id); if($category_id > 0) Connections_Directory()->term->setTermRelationships( $entry->getId(), array($category_id), 'category' );log:
2018-11-20 04:56:08pm : category id for: Law, Finance & Insurance : 0is there a different way I’m supposed to resolve connection category names/slugs to ids?
Thanks again for the help
cantchoos
ParticipantI created a proper WordPress plugin and took your advice and did it without manual SQL. It automatically populates the directory based on RegistrationMagic submissions.
Everything is working great however I had a couple simple questions:
- How do I assign the user column to a new cnEntry? I see private fields in the code but no way to set them. I tried instantiating an $entry via constructor but must be doing it wrong. Can you give an example?
- Can you explain further on how to assign multiple categories to the cnEntry?
Thanks again for the help.
cantchoos
ParticipantI will leave a review shortly!
The site was using wishlist members i have a feeling that is doing something.. I will find in files and update with my findings at a later date.
cantchoos
ParticipantI was setting it using mysql workbench using the spreadsheet interface (not doing a manual query but now i see this is why we should)
Perhaps the issue is my interface is saving the value with extra spaces.. that would be dumb but explain it.
Thanks again for all your help and hard work! Not many people support their software products right like you..
- How do I assign the user column to a new cnEntry? I see private fields in the code but no way to set them. I tried instantiating an $entry via constructor but must be doing it wrong. Can you give an example?
-
AuthorPosts
