PDA

View Full Version : Programmatically add tags to threads


TiKu
10-11-2013, 06:16 AM
Hi,

I create threads by code using datamanager_init('Thread_FirstPost', ...). To add tags to the new threads, I call dataman->setr('taglist', 'tag1,tag2,tag3');
This adds the tags to the thread, so that they are listed in the thread's tag list displayed at the end of the thread. However, there must be something missing in my code. Let's say "tag3" is a new tag, i.e. a tag that has never been used before in my VB installation. My code creates a new thread and assigns the tag "tag3" to it. Now "tag3" is listed in the tag list at the end of the new thread. But if I click "tag3", VB tells me that this tag is invalid. Why? What is missing in my code?

Regards
TiKu

TiKu
10-24-2013, 07:18 PM
Noone knows?

kh99
10-24-2013, 10:08 PM
Look in includes/functions_newpost.php, in the function build_new_post(). Look for the section that starts with if ($type == 'thread' AND $post['taglist']).