Is it the ribbon cable above the small one and between the long horizontal cable and the fan? Best bet would be some little piece of blue tac or a bad of hotglue then. Unless someone else knows how to put the snappy thing back?
The easiest & safest method would be to wedge a piece of plastic into the connector to forcefully hold the cable in. Make sure the plastic wedge is thick enough to fill the gap, snug/tight enough to keep the cable from moving, and sturdy enough to not bend when being inserted.