generated event code and up/downvote images