I’ve been messing around with this and first when I read your post and the linked tutorial in the wiki I realised I might have made things more complicated than I had to. Oh, well...
The script by alconpez that Mark links to doesn’t work.
I first made a solution of my own that did work for my specific purpose. Your post brought me back to the original script. I have made the corrections needed for it to work properly.
Use it like this:
- In your NewsEditor chunk add [+tags+] where you want the tag checkboxes to appear.
- In the NewsEditor snippet call add the tv you want to use with &tvtags=`tvcategories`. Add "tv" in front of the TV name.
A small addition to NewsManager is also needed for it to work properly. The code at line 351 should be changed to the following. This ensures that when deleting a post, the corresponding TV value is deleted along with it since it is no longer needed.
if ($deleteid == $resource[$x]['id']) {
$tbltv = $modx->getFullTableName("site_tmplvar_contentvalues");
$modx->db->delete($tbltv, "contentid = $deleteid");
$modx->db->delete($tbl, "id = $deleteid");
nm_clear_cache();
$modx->sendRedirect($modx->makeUrl($postid));
}