Jump to content
Sign in to follow this  
api

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

Recommended Posts

тут пытался выдернуть лайки на каментарии но после их установки ани пачемута не работают выдергивал из сборки 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}', '');
}

 

Share this post


Link to post
Share on other sites

 

тут пытался выдернуть лайки на каментарии но после их установки ани пачемута не работают выдергивал из сборки 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?

Share this post


Link to post
Share on other sites

на основе обычных лайков делай.

зачем примеры если есть гатовае решение но внем какаета проблема 

Share this post


Link to post
Share on other sites

незнаю где js я в js не панемаю вабще

Ну чюваки так дело не пойдет если хотите соц сеть хотябы Фреймворк JQuery выучите

Share this post


Link to post
Share on other sites
Guest
This topic is now closed to further replies.
Sign in to follow this  

×