Jump to content

Tags and prefix in Topics API


Adriano Faria

Recommended Posts

  • 1 month later...
Posted
I didn't find solution, and I did so
$_POST['ipsTags'] = "tag1,tag2,";
$_REQUEST['ipsTags_prefix'] = 1;
$this->post->addTopic();

I will thank if somebody help to do it safely

Posted

I didn't find solution, and I did so
$_POST['ipsTags'] = "tag1,tag2,";
$_REQUEST['ipsTags_prefix'] = 1;
$this->post->addTopic();

I will thank if somebody help to do it safely

In my case, I was retrieving topics and the API doesn't support tags.

  • 1 year later...
Posted

I have a issue with permissions, addTopic work but tags are not added after first topic.

this issue only for restricted forum(confused), also if I recall anytime $this->post->setBypassPermissionCheck( true ) it lock on permission

		//-----------------------------------------
		// Check if we're ok with tags
		//-----------------------------------------
		
		$where		= array( 'meta_parent_id'	=> $this->getForumData('id'),
							  'member_id'		=> $this->getAuthor('member_id'),
							  'existing_tags'	=> explode( ',', IPSText::cleanPermString( $this->request['ipsTags'] ) ) );
									  
		if ( $this->registry->tags->can( 'add', $where ) AND $this->settings['tags_enabled'] AND ( !empty( $_POST['ipsTags'] ) OR $this->settings['tags_min'] ) )
		{						
			$this->registry->tags->checkAdd( $_POST['ipsTags'], array(
																  'meta_parent_id' => $topic['forum_id'],
																  'member_id'	   => $this->memberData['member_id'],
																  'meta_visible'   => $topic['approved'] ) );

			if ( $this->registry->tags->getErrorMsg() )
			{
				$this->_postErrors = $this->registry->tags->getFormattedError();
				return FALSE;
			}
			
			$_storeTags	= true;
		}

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...