`comment_form_postcomment()` is an internal function if processing comments is allowed:
https://docs.zenphoto.org/1.5.x/function-comment_form_postcomment.html
`commentAllowed()` requires a parameter what type of comments (which item type image, album, Zenpage page or news article) you refer to. the parameter refers howecer to the option name and not the plain item name (the doc does not tell this): https://docs.zenphoto.org/1.5.x/function-commentsAllowed.html
The best is actually to use the object model like:
`if($obj->getCommentsAllowed()) { … }`
`$obj` is here the object of an item type. For example an a standard theme `image.php` page you can use the global object `$_zp_current_image->getCommentsAllowed()` to check for this image. Basic overview about the object model:
https://www.zenphoto.org/news/zenphotos-object-model-framework/