definitively shunt shields to top

This commit is contained in:
mappu 2015-11-07 18:25:48 +13:00
parent 1194223ddd
commit ac79051db4

View File

@ -172,6 +172,7 @@ class CProject {
public $subtag = '';
public $lastupdate = 0;
private $longdesc = '';
private $prefix_html = '';
private $images = array();
private $downloads = array();
private $downloads_hashes = array();
@ -209,17 +210,16 @@ class CProject {
// Filter longdesc
$prefix_html = '';
$this->longdesc = preg_replace_callback('~Written in ([^\\r\\n]+)~', function($matches) use (&$prefix_html) {
$this->longdesc = preg_replace_callback('~\r?\nWritten in ([^\\r\\n]+)~ms', function($matches) use (&$prefix_html) {
$prefix_html .= (
'<html>'.
(SHIELDS_PREFIX ? mkshield('build', 'success', 'brightgreen').'&nbsp;' : '').
mkshield('written in', $matches[1], 'blue').
'<br/>'.
'</html>'
);
return '';
}, $this->longdesc);
$this->longdesc = $prefix_html.$this->longdesc;
$this->prefix_html = $prefix_html;
continue;
}
@ -314,6 +314,10 @@ class CProject {
<div class="projbody projbody_<?=(count($this->images) ? 'half' : 'full')?>w">
<?php if (strlen($this->prefix_html)) { ?>
<p><?=$this->prefix_html?></p>
<?php } ?>
<strong><?=hesc(strtoupper(ARTICLE_HEADER))?></strong>
<p><?=text2html($this->longdesc)?></p>