This mod allows users to add any other user's account to his comments
Creat share.php
PHP:
<?
include"header.php";
header('Content-type:text/html;charset="windows-1251"');
$act = $_GET['act'];
if($act == 'group')
{
$aid=$_GET['aid'];
$name=$_GET['name'];
$photo=$_GET['photo'];
$comment=$_GET['comment'];
$u_id=$_GET['u_id'];
$comment_text="
<div class=itsme_cb>
<div style=height: 140px; border-radius: 8px 8px 8px 8px; class=itsme_lb>
<div class=itsme_ll>
<div class=text style=overflow: hidden; width: 315px;>
<table border=0 cellpadding=1>
<tbody>
<tr>
<td rowspan=2 height=24 width=24>
<a href=group.php?group_id=$aid><img src=".$photo." width=24 height=24 border=1></a>
</td>
<td height=12 width=260>
<img src=http://195.88.240.251/images/icons/published.gif>
<b><a href=group.php?group_id=$aid>".$comment."</a></b></td></tr><tr>
<td height=12>
</td>
</tr>
</tbody>
</table>
<table border=0>
<tbody>
<tr>
<td width=300> ".$name."</td></tr></tbody></table></div></div></div></div>";
$plus_text_query = mysql_query("
INSERT INTO se_profilecomments (profilecomment_id, profilecomment_user_id, profilecomment_authoruser_id, profilecomment_body, profilecomment_date)
VALUE ('', '".$u_id."', '".$u_id."', '$comment_text', '".time()."')");
header("Location: ./profile.php?user_id=".$uid.""); exit();
}
else if($act == 'photo1')
{
$aid=$_GET['aid'];
$u_id=$_GET['u_id'];
$id_url=$_GET['id_url'];
$photo=$_GET['photo'];
$comment=$_GET['comment'];
$album_id=$_GET['album_id'];
$media_id=$_GET['media_id'];
$comment_text="
<div class=text style=overflow: hidden; width: 315px;>
<td height=12 width=260>
<img src=http://195.88.240.251/images/icons/published.gif>
<b><a href=$id_url&album_id=$album_id&media_id=$media_id>".$comment."</a> , <font style=color: #C8BF85;>I like this photo!</font></b></td></tr><tr>
<td height=12>
</td>
<table border=0 cellpadding=1>
<tbody>
<tr>
<td rowspan=2 height=24 width=24>
<a href=$id_url&album_id=$album_id&media_id=$media_id><img src=".$photo." width=240 height=240 border=1></a>
</td>
</tr>
</tbody>
</table></div>";
$plus_text_query = mysql_query("
INSERT INTO se_profilecomments (profilecomment_id, profilecomment_user_id, profilecomment_authoruser_id, profilecomment_body, profilecomment_date)
VALUE ('', '".$u_id."', '".$u_id."', '$comment_text', '".time()."')");
header("Location: ./profile.php?user=".$u_id.""); exit();
}
else if($act == 'admin_blog')
{
$aid=$_GET['aid'];
$name=$_GET['name'];
$photo=$_GET['photo'];
$comment=$_GET['comment'];
$u_id=$_GET['u_id'];
$id_url=$_GET['id_url'];
$classified_id=$_GET['classified_id'];
$comment_text="
<div class=text style=overflow: hidden; width: 315px;>
<table border=0 cellpadding=1>
<tbody>
<tr>
<td rowspan=2 height=44 width=44>
<a href=group.php?group_id=$aid><img src=".$photo." width=54 height=54 border=1></a>
</td>
<td height=12 width=260>
<img src=http://195.88.240.251/images/icons/published.gif>
<b><a href=$id_url&classified_id=$classified_id>".$comment."</a></b></td></tr><tr>
<td height=12>
</td>
</tr>
</tbody>
</table>
<table border=0>
<tbody>
<tr>
<td width=300> ".$name."</td></tr></tbody></table></div>";
$plus_text_query = mysql_query("
INSERT INTO se_profilecomments (profilecomment_id, profilecomment_user_id, profilecomment_authoruser_id, profilecomment_body, profilecomment_date)
VALUE ('', '".$u_id."', '".$u_id."', '$comment_text', '".time()."')");
header("Location: ./profile.php?user_id=".$uid.""); exit();
}
?>
For group
in group.tpl add
PHP:
<tr>
<td class='profile_menu1'>
<a href='share.php?act=group&u_id={$user->user_info.user_id}&aid={$group->group_info.group_id}&name={$group->group_info.group_desc}&photo={$group->group_photo("./images/nophoto.gif")}&comment={$group->group_info.group_title}'><small><img src='http://195.88.240.251/images/icons/published.gif' border='0' class='icon'>Share to friends!</small></a>
</td>
</tr>
For photo
In album_file.tpl add
PHP:
<a href='like.php?act=photo1&u_id={$user->user_info.user_id}&id_url=album_file.php?user={$owner->user_info.user_username}&album_id={$album_info.album_id}&media_id={$media_info.media_id}&photo={$media_path}&comment={$media_info.media_title}'><small><img src='http://195.88.240.251/images/icons/published.gif' border='0' class='icon'>Share to friends!</small></a>