Перейти к содержанию
CMSTOOLS.org - форум поддержки и развития CMS

праблема слайками


Рекомендуемые сообщения

тут пытался выдернуть лайки на каментарии но после их установки ани пачемута не работают выдергивал из сборки vk cms 2014

 

templates\Default\wall/one_record.tpl

 

<div  style="[owner-record]margin-top:-120px;margin-left: 451px;height:78px;[/owner-record]" class="public_likes_user_block1 no_display" id="public_likes_user_block1{comm-id}" onMouseOver="groups.wall_like_users_five1('{comm-id}')" onMouseOut="groups.wall_like_users_five_hide1('{comm-id}')">
   <div onClick="wall.all_liked_users1('{comm-id}', '', '{likes1}')">Понравилось {likes-text1}</div>
   <div class="public_wall_likes_hidden">
    <div class="public_wall_likes_hidden2">
     <a href="/id{viewer1-id}" id="like_user1{viewer1-id}_{comm-id}" class="no_display" onClick="Page.Go(this.href); return false"><img src="{viewer1-ava}" width="32" /></a>
     <div id="likes_users1{comm-id}"></div>
    </div>
   </div>
 
templates\Default\wall/record.tpl
 
<div  [owner-record]style="margin-top:-105px;height:78px;"[/owner-record] class="public_likes_user_block1 no_display" id="public_likes_user_block1{comm-id}" onMouseOver="groups.wall_like_users_five1('{comm-id}')" onMouseOut="groups.wall_like_users_five_hide1('{comm-id}')">
   <div onClick="wall.all_liked_users1('{comm-id}', '', '{likes1}')">Понравилось {likes-text1}</div>
   <div class="public_wall_likes_hidden">
    <div class="public_wall_likes_hidden2">
     <a href="/id{viewer1-id}" id="like_user1{viewer1-id}_{comm-id}" class="no_display" onClick="Page.Go(this.href); return false"><img src="{viewer1-ava}" width="32" /></a>
     <div id="likes_users1{comm-id}"></div>
    </div>
   </div>
 
 
system\classes/wall.php
 
//Мне нравится
if(stripos($row_comments['likes_users'], "u{$user_id}|") !== false){
$tpl->set('{yes-like1}', 'public_wall_like_yes');
$tpl->set('{yes-like-color1}', 'public_wall_like_yes_color');
$tpl->set('{like-js-function1}', 'groups.wall_remove_like1('.$row_comments['id'].', '.$user_id.', \'uPages\')');
} else {
$tpl->set('{yes-like1}', '');
$tpl->set('{yes-like-color1}', '');
$tpl->set('{like-js-function1}', 'groups.wall_add_like1('.$row_comments['id'].', '.$user_id.', \'uPages\')');
}
 
if($row_comments['likes_num']){
$tpl->set('{likes1}', $row_comments['likes_num']);
$tpl->set('{likes-text1}', '<span id="like_text_num'.$row_comments['id'].'">'.$row_comments['likes_num'].'</span> '.gram_record($row_comments['likes_num'], 'like'));
} else {
$tpl->set('{likes1}', '');
$tpl->set('{likes-text1}', '<span id="like_text_num'.$row_comments['id'].'">0</span> человеку');
}
 
if($row_comments['likes_num'] >= 1){
$tpl->set('{likes_cnt}', 'likes_cnt');
 
} else {
$tpl->set('{likes_cnt}', '');
}

 

Ссылка на комментарий
Поделиться на другие сайты

 

тут пытался выдернуть лайки на каментарии но после их установки ани пачемута не работают выдергивал из сборки vk cms 2014

 

templates\Default\wall/one_record.tpl

 

<div  style="[owner-record]margin-top:-120px;margin-left: 451px;height:78px;[/owner-record]" class="public_likes_user_block1 no_display" id="public_likes_user_block1{comm-id}" onMouseOver="groups.wall_like_users_five1('{comm-id}')" onMouseOut="groups.wall_like_users_five_hide1('{comm-id}')">
   <div onClick="wall.all_liked_users1('{comm-id}', '', '{likes1}')">Понравилось {likes-text1}</div>
   <div class="public_wall_likes_hidden">
    <div class="public_wall_likes_hidden2">
     <a href="/id{viewer1-id}" id="like_user1{viewer1-id}_{comm-id}" class="no_display" onClick="Page.Go(this.href); return false"><img src="{viewer1-ava}" width="32" /></a>
     <div id="likes_users1{comm-id}"></div>
    </div>
   </div>
 
templates\Default\wall/record.tpl
 
<div  [owner-record]style="margin-top:-105px;height:78px;"[/owner-record] class="public_likes_user_block1 no_display" id="public_likes_user_block1{comm-id}" onMouseOver="groups.wall_like_users_five1('{comm-id}')" onMouseOut="groups.wall_like_users_five_hide1('{comm-id}')">
   <div onClick="wall.all_liked_users1('{comm-id}', '', '{likes1}')">Понравилось {likes-text1}</div>
   <div class="public_wall_likes_hidden">
    <div class="public_wall_likes_hidden2">
     <a href="/id{viewer1-id}" id="like_user1{viewer1-id}_{comm-id}" class="no_display" onClick="Page.Go(this.href); return false"><img src="{viewer1-ava}" width="32" /></a>
     <div id="likes_users1{comm-id}"></div>
    </div>
   </div>
 
 
system\classes/wall.php
 
//Мне нравится
if(stripos($row_comments['likes_users'], "u{$user_id}|") !== false){
$tpl->set('{yes-like1}', 'public_wall_like_yes');
$tpl->set('{yes-like-color1}', 'public_wall_like_yes_color');
$tpl->set('{like-js-function1}', 'groups.wall_remove_like1('.$row_comments['id'].', '.$user_id.', \'uPages\')');
} else {
$tpl->set('{yes-like1}', '');
$tpl->set('{yes-like-color1}', '');
$tpl->set('{like-js-function1}', 'groups.wall_add_like1('.$row_comments['id'].', '.$user_id.', \'uPages\')');
}
 
if($row_comments['likes_num']){
$tpl->set('{likes1}', $row_comments['likes_num']);
$tpl->set('{likes-text1}', '<span id="like_text_num'.$row_comments['id'].'">'.$row_comments['likes_num'].'</span> '.gram_record($row_comments['likes_num'], 'like'));
} else {
$tpl->set('{likes1}', '');
$tpl->set('{likes-text1}', '<span id="like_text_num'.$row_comments['id'].'">0</span> человеку');
}
 
if($row_comments['likes_num'] >= 1){
$tpl->set('{likes_cnt}', 'likes_cnt');
 
} else {
$tpl->set('{likes_cnt}', '');
}

 

а js?

Ссылка на комментарий
Поделиться на другие сайты

Гость
Эта тема закрыта для публикации ответов.
×
×
  • Создать...