ADD подсветка урлов в доп. информаци
This commit is contained in:
parent
fd58b965d1
commit
68e576d441
|
|
@ -96,6 +96,13 @@ class Helper
|
|||
return $string;
|
||||
}
|
||||
|
||||
static function replaceUrls($string)
|
||||
{
|
||||
$pr = '((https{0,1}:\/\/[\da-z\.-]+\.[a-z]{2,6})([\/\w\?=&#%+,-]|(\.[^\s]))*\/?)';
|
||||
$rep = '<a href="$0" title="Ссылка откроется в новом окне" target="_blank">$0</a>';
|
||||
return preg_replace($pr, $rep, $string);
|
||||
}
|
||||
|
||||
public static function getFirstImg($string)
|
||||
{
|
||||
preg_match_all("(\[img[\|]#(\d+)\])", $string, $images);
|
||||
|
|
|
|||
|
|
@ -84,7 +84,7 @@ $index = 0;
|
|||
<?php foreach ($extraParams as $extraParam) {
|
||||
print '<tr>';
|
||||
print '<td>'.$extraParam->name.'</td>';
|
||||
print '<td>'.$extraParam->value.'</td>';
|
||||
print '<td>'. Helper::replaceUrls($extraParam->value).'</td>';
|
||||
print '</tr>';
|
||||
}
|
||||
?>
|
||||
|
|
|
|||
Loading…
Reference in New Issue