Add new function for creating star html

Add a new function that creates the html code for the star and use it
from the tpl_starred and the render function.