Forum Replies Created

Viewing 4 replies - 1 through 4 (of 4 total)
  • smortenson

    (@smortenson)

    Hi everyone,

    Anyone else having trouble with the shortcode part of this?

    Everything is working and I can set $this->options[‘text’] in the related class extension to anything straight text and it works great.

    My shortcode works great on it’s own.
    Combined it will not render the shortcode of even a variable.

    $this->options[‘text’] = do_shortcode(‘test: [myshortcode course_id=”’ . $data[‘course_id’] . ‘]’);

    displays as ‘test:’ on the certification but [myshortcode] anywhere else on the site works.

    Can you change the post order by to post ID in the pro version?

    Hi Vincent,

    I am trying to create a custom field code for my smart groups plugin add-on using the method you laid out for Paul. It is generating my post alright and it is showing up in my smart groups admin area but the criteria is not setting or throwing any exceptions. I’m not too sure what else could be wrong. Here is my code:

    	$sg_addon = cuar_addon('smart-groups');
    			
    			//Generate smart group
    			$sg_addon->enable_meta_criteria(
    			$group_id,'OR',array(
    			array(
    			'compare'  => '=',
    			'field'    => 'company',
    			'value'    => $this->user_company
    			)//I removed the comma since I only have the one criteria but it doesn't seem to make a difference, if I use it with or without the comma
    			// Add more such arrays here to combine multiple criteria
    			)
    			);

    Where $group_id is the id of my post that is showing up in the smart group area. When I print out the class property user_company I am getting the right result and I can create the group manually.

    Any thoughts on what I’m doing wrong? Thanks in advance.

    Thanks for the input. It’s been really helpful. I’m wondering if either of you have had an issues assigning an owner to the file? I am using the user ID number and it is generating the link but the owner is left as Unknown. I am testing if the user exists and am getting an ID returned.

    if(username_exists($ownerd)){
    $user = get_user_by('login',$ownerd);
    $userid = $user -> ID;
    echo("User Exists and had ID ".$userid."\r\n");
    $postdata = array(
    'post_title' => $t,
    'post_content' => $content,
    'post_status' => 'publish',
    'post_author' => $author->ID
    );
    $owner = array(
    'type' => 'usr',
    'ids' => array($userid)
    );
    $files = array(array(

    'name' => $filen,
    'path' => $path,
    'method' => 'move'
    ));

    Any help is greatly appreciated. I’ve been fighting with this for awhile.

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