definitively shunt shields to top
This commit is contained in:
parent
1194223ddd
commit
ac79051db4
10
rebuild.php
10
rebuild.php
@ -172,6 +172,7 @@ class CProject {
|
|||||||
public $subtag = '';
|
public $subtag = '';
|
||||||
public $lastupdate = 0;
|
public $lastupdate = 0;
|
||||||
private $longdesc = '';
|
private $longdesc = '';
|
||||||
|
private $prefix_html = '';
|
||||||
private $images = array();
|
private $images = array();
|
||||||
private $downloads = array();
|
private $downloads = array();
|
||||||
private $downloads_hashes = array();
|
private $downloads_hashes = array();
|
||||||
@ -209,17 +210,16 @@ class CProject {
|
|||||||
|
|
||||||
// Filter longdesc
|
// Filter longdesc
|
||||||
$prefix_html = '';
|
$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 .= (
|
$prefix_html .= (
|
||||||
'<html>'.
|
'<html>'.
|
||||||
(SHIELDS_PREFIX ? mkshield('build', 'success', 'brightgreen').' ' : '').
|
(SHIELDS_PREFIX ? mkshield('build', 'success', 'brightgreen').' ' : '').
|
||||||
mkshield('written in', $matches[1], 'blue').
|
mkshield('written in', $matches[1], 'blue').
|
||||||
'<br/>'.
|
|
||||||
'</html>'
|
'</html>'
|
||||||
);
|
);
|
||||||
return '';
|
return '';
|
||||||
}, $this->longdesc);
|
}, $this->longdesc);
|
||||||
$this->longdesc = $prefix_html.$this->longdesc;
|
$this->prefix_html = $prefix_html;
|
||||||
|
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
@ -314,6 +314,10 @@ class CProject {
|
|||||||
|
|
||||||
<div class="projbody projbody_<?=(count($this->images) ? 'half' : 'full')?>w">
|
<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>
|
<strong><?=hesc(strtoupper(ARTICLE_HEADER))?></strong>
|
||||||
|
|
||||||
<p><?=text2html($this->longdesc)?></p>
|
<p><?=text2html($this->longdesc)?></p>
|
||||||
|
Reference in New Issue
Block a user