I'd assume the ellipsis to be: ON tblA.fld2 = tblB.fld2
No subquery needed in the simplified example above, since
SELECT fld1, fld2 FROM tblA LEFT JOIN (SELECT fld2 FROM tblB WHERE fld2 = 'whatever') ON tblA.fld2 = tblB.fld2)
is the same as
SELECT fld1, fld2 FROM tblA LEFT JOIN tblB ON tblA.fld2 = tblB.fld2 AND tbl.fld2 = 'whatever'
Since it's a LEFT JOIN, all results from tblA will be used, even if there are no results found in tblB. If there are no results for tblB, its fields will all be null. As such, the result of using a WHERE clause in the subquery corresponds to what you get by moving the things in the subqyery's WHERE clause to the ON clause in ordinary join.
Moreover, since it's a 1-N relation, each row in friend_photo_comment will relate only to one row in friend_user_photo, which means one simple query is enough to get everything you need.
$sql = "SELECT FUP.*, COUNT(FPC.photoid) AS newCommentCount FROM friend_user_photo AS FUP LEFT JOIN friend_photo_comment AS FPC ON FUP.photoid = FPC.photoid AND alert_message LIKE 'yes'
WHERE userid= $userid
GROUP BY FPC.photoid
ORDER BY $sort $order_by2
LIMIT $start, $pagesize";
And if you use a double quoted string, you don't have to use the concatenation operator to piece together string literals with string variables.