Hi friends. You know after Click at to user photo album list. Shown the option,
user photo
Rating: 0 (Against: 0, For: 0)
Vote: << -1| 1 >>
So my Question is how i can change to <<-1 | 1>> syntex in more texts or images ? Please help.
album.php
if ($user_id != $arg['user_id'] && !$ban && $datauser['postforum'] > 10 && $datauser['total_on_site'] > 1200) {
// Проверяем, имеет ли юзер право голоса
$req = mysql_query("SELECT * FROM `cms_album_votes` WHERE `user_id` = '$user_id' AND `file_id` = '" . $arg['id'] . "' LIMIT 1");
if (!mysql_num_rows($req))
$out .= '<br />' . $lng['vote'] . ': <a href="album.php?act=vote&mod=minus&img=' . $arg['id'] . '"><< -1</a> | ' .
'<a href="album.php?act=vote&mod=plus&img=' . $arg['id'] . '">+1 >></a>';
}
$out .= '</div>';
# fanatos (14.01.2016 / 18:11)
album.php
if ($user_id != $arg['user_id'] && !$ban && $datauser['postforum'] > 10 && $datauser['total_on_site'] > 1200) {
// Проверяем, имеет ли юзер право голоса
$req = my
Thank you for nice help. But after + or - Rating the syntex <<- | +>> was hidden. So how i can show to this code
Votes: ' . $lng['vote_against'] . ': ' . $arg['vote_minus'] . ', ' . $lng['vote_for'] . ': ' . $arg['vote_plus'] . ')';
After Rating ?
Azhar-Ali, hidden after vote?
need code to properly copy and paste , +/- replace on your code
code (+/-)
/*
-----------------------------------------------------------------
Функция голосований за фотографии
-----------------------------------------------------------------
*/
function vote_photo($arg = null)
{
global $lng, $datauser, $user_id, $ban;
if ($arg) {
$rating = $arg['vote_plus'] - $arg['vote_minus'];
if ($rating > 0)
$color = 'C0FFC0';
elseif ($rating < 0)
$color = 'F196A8';
else
$color = 'CCC';
$out = '<div class="gray">' . $lng['rating'] . ': <span style="color:#000;background-color:#' . $color . '">  <big><b>' . $rating . '</b></big>  </span> ' .
'(' . $lng['vote_against'] . ': ' . $arg['vote_minus'] . ', ' . $lng['vote_for'] . ': ' . $arg['vote_plus'] . ')';
if ($user_id != $arg['user_id'] && !$ban && $datauser['postforum'] > 10 && $datauser['total_on_site'] > 1200) {
// Проверяем, имеет ли юзер право голоса
$req = mysql_query("SELECT * FROM `cms_album_votes` WHERE `user_id` = '$user_id' AND `file_id` = '" . $arg['id'] . "' LIMIT 1");
if (!mysql_num_rows($req))
$out .= '<br />' . $lng['vote'] . ': <a href="album.php?act=vote&mod=minus&img=' . $arg['id'] . '"></a> | ' .
'<a href="album.php?act=vote&mod=plus&img=' . $arg['id'] . ' "></a>';
}
$out .= '</div>';
return $out;
} else {
return false;
}
}
fanatos, я думаю он имел ввиду, после голосования чтоб скрывало вывод
то есть
$out = '<div class="gray">' . $lng['rating'] . ': <span style="color:#000;background-color:#' . $color . '">  <big><b>' . $rating . '</b></big>  </span> ' .
'(' . $lng['vote_against'] . ': ' . $arg['vote_minus'] . ', ' . $lng['vote_for'] . ': ' . $arg['vote_plus'] . ')';
ниже в условие опустить, там где кнопки
Koenig, okay then, I understood correctly the translation from Yandex
Gues my Question was. You know frist shown the syntexs << like | unlike->>
if you click at like or unlike then the code show to ' . $rating . ' 1 right ? But after Like or unlike << like | unlike->> syntexs are hidden not shown. So i need after vote shown to any more texts.
Links to the vote after the vote, disappear, that's what you mean?