MyBB Community Forums

Full Version: Task image (hardcoded HTML)
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
After trying to validate 1.8 output as HTML5 (after stripping html down) i stumbled upon on validation error. I wanted to remove border attribute (since it's obsolete in HTML5) but i couldn't find any template reference to task image variable. After digging around in global.php i have noticed that $task_image is hardcoded into php. Is it possible to move that hardcoded part into a template.

Something like:

Global.php (line 698 - 701, beta 2)

if($task_cache['nextrun'] <= TIME_NOW)
{
	$task_image = '<img src="'.$mybb->settings['bburl'].'/task.php" border="0" width="1" height="1" alt="" />';
}


To

if($task_cache['nextrun'] <= TIME_NOW)
{
     eval("\$task_image .= \"".$templates->get("task_image")."\";");

}

and template task_image with following content:

<img src="{$mybb->settings['bburl']}/task.php" border="0" width="1" height="1" alt="" />
Or we could just remove the border attribute from the current code? It's not needed for anything after all...
There shouldn't be any hard coded HTML in 1.8. Starpaul worked on it, I'll search the ticket.

Edit: [Issue #756]
Oh $%^&$*%&!Angry

I knew I forgot some...

EDIT: Fixed in 4fa0ddf8. I also removed the border attribute as it's not needed.
Nice one guys Smile