Answer the question
In order to leave comments, you need to log in
How to change the output of the Favorite button in dle 10.1 in php?
In Dle 10.1, the Favorite style is formed by this code
if( $is_logged ) {
$fav_arr = explode( ',', $member_id['favorites'] );
if( ! in_array( $row['id'], $fav_arr ) or $config['allow_cache'] == "yes" ) $tpl->set( '{favorites}', "<a id=\"fav-id-" . $row['id'] . "\" href=\"$PHP_SELF?do=favorites&doaction=add&id=" . $row['id'] . "\"><img src=\"" . $config['http_home_url'] . "templates/{$config['skin']}/dleimages/plus_fav.gif\" onclick=\"doFavorites('" . $row['id'] . "', 'plus'); return false;\" title=\"" . $lang['news_addfav'] . "\" style=\"vertical-align: middle;border: none;\" alt=\"\" /></a>" );
else $tpl->set( '{favorites}', "<a id=\"fav-id-" . $row['id'] . "\" href=\"$PHP_SELF?do=favorites&doaction=del&id=" . $row['id'] . "\"><img src=\"" . $config['http_home_url'] . "templates/{$config['skin']}/dleimages/minus_fav.gif\" onclick=\"doFavorites('" . $row['id'] . "', 'minus'); return false;\" title=\"" . $lang['news_minfav'] . "\" style=\"vertical-align: middle;border: none;\" alt=\"\" /></a>" );
$tpl->set( '[complaint]', "<a href=\"javascript:AddComplaint('" . $row['id'] . "', 'news')\">" );
$tpl->set( '[/complaint]', "</a>" );
} else {
$tpl->set( '{favorites}', "" );
$tpl->set_block( "'\\[complaint\\](.*?)\\[/complaint\\]'si", "" );
}
<label class="btn btn-lg btn-block btn-default text-default">
<input type="radio" name="options" id="option2" autocomplete="off">
<i class="fa fa-circle-o fa-3x"></i>
<br />
Плей-лист
</label>
<label class="btn btn-lg btn-block btn-success text-success active">
<input type="radio" name="options" id="option1" autocomplete="off" checked>
<i class="fa fa-check-circle-o fa-3x animated fadeIn"></i>
<br />
В плей-листе
</label>
<div class="" data-toggle="buttons"></div>
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question