Invision Community 4: SEO, prepare for v5 and dormant account notifications By Matt Monday at 02:04 PM
Jibeji Posted December 25, 2016 Posted December 25, 2016 Hello, I was using classPost.php with IPS 3. After having created a topic, I was able to retrieve some information like SEO Title with: $classPost = new classPost( ipsRegistry::instance() ); [...] $classPost->addTopic() $topic = $classPost->getTopicData(); $title_seo=$topic['title_seo']; I have found how to create a topic on IPS 4 with: $topic = \IPS\forums\Topic::createItem($member, $member->ip_address, \IPS\DateTime::ts( time() ), $forum ); $topic->title = $topic_title; $topic->save(); $post = \IPS\forums\Topic\Post::create($topic_title, $topic_content, TRUE, NULL, TRUE, $member, \IPS\DateTime::ts( time() )); $topic->topic_firstpost = $post->pid; $topic->save(); Is there a way to retrieve some information on the recently created topic?
Jibeji Posted December 25, 2016 Author Posted December 25, 2016 Answering myself, simply with $topic->title_seo
Recommended Posts
Archived
This topic is now archived and is closed to further replies.