/** * Sets the publishdate and (optionally) the unpublish date of a node * @param integer The node id * @param integer The timestamp for publish date * @param integer The timestamp for unpublish date if applicable * * @return boolean */ public function setPublishDate($nodeid, $datefrom, $dateto = null) { if (!intval($nodeid) or !intval($datefrom)) { throw new Exception('invalid_node_id'); } if (!vB::getUserContext()->getChannelPermission('forumpermissions2', 'canpublish', $nodeid)) { throw new Exception('no_publish_permissions'); } return $this->library->setPublishDate($nodeid, $datefrom, $dateto); }