ADD показ доп. информации по платным точкам только по запросу, но пока отключено; регистрация переходов с доп. информации через go-away
This commit is contained in:
parent
6ba76ab818
commit
7388643a15
|
|
@ -99,7 +99,7 @@ class Helper
|
||||||
static function replaceUrls($string)
|
static function replaceUrls($string)
|
||||||
{
|
{
|
||||||
$pr = '((https{0,1}:\/\/[\da-z\.-]+\.[a-z]{2,6})([\/\w\?=&#%+,-]|(\.[^\s]))*\/?)';
|
$pr = '((https{0,1}:\/\/[\da-z\.-]+\.[a-z]{2,6})([\/\w\?=&#%+,-]|(\.[^\s]))*\/?)';
|
||||||
$rep = '<a href="$0" title="Ссылка откроется в новом окне" target="_blank">$0</a>';
|
$rep = '<a href="/go/away/?url=$0" title="Ссылка откроется в новом окне" target="_blank">$0</a>';
|
||||||
return preg_replace($pr, $rep, $string);
|
return preg_replace($pr, $rep, $string);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -84,7 +84,14 @@ $index = 0;
|
||||||
<?php foreach ($extraParams as $extraParam) {
|
<?php foreach ($extraParams as $extraParam) {
|
||||||
print '<tr>';
|
print '<tr>';
|
||||||
print '<td>'.$extraParam->name.'</td>';
|
print '<td>'.$extraParam->name.'</td>';
|
||||||
print '<td>'. Helper::replaceUrls($extraParam->value).'</td>';
|
if(false && $point->isPaid()) {
|
||||||
|
print '<td>';
|
||||||
|
print '<span id="extraHolder'.$extraParam->id.'" class="extraHolder" onclick="showExtraParam('.$extraParam->id.')" style="display: block;">'.mb_substr($extraParam->value, 0, 5, 'UTF-8').'… <span class="glyphicon glyphicon-chevron-right"></span></span>';
|
||||||
|
print '<span style="display: none;" id="extraData'.$extraParam->id.'" class="extraData">'.Helper::replaceUrls($extraParam->value).'</span>';
|
||||||
|
print '</td>';
|
||||||
|
} else {
|
||||||
|
print '<td>'.Helper::replaceUrls($extraParam->value).'</td>';
|
||||||
|
}
|
||||||
print '</tr>';
|
print '</tr>';
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
|
@ -172,3 +179,11 @@ $index = 0;
|
||||||
<!--googleon: all-->
|
<!--googleon: all-->
|
||||||
<?= self::renderPartial('randomPoint.php', array('randomPoint'=>$randomPoint), true)?>
|
<?= self::renderPartial('randomPoint.php', array('randomPoint'=>$randomPoint), true)?>
|
||||||
</div>
|
</div>
|
||||||
|
<script>
|
||||||
|
function showExtraParam(id){
|
||||||
|
// $('#extraHolder'+id).hide();
|
||||||
|
// $('#extraData'+id).show();
|
||||||
|
$('.extraHolder').hide();
|
||||||
|
$('.extraData').show();
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue