yavasilek
Мой дом здесь!
- Регистрация
- 5 Окт 2008
- Сообщения
- 1.200
- Реакции
- 454
Вроде небыло еще.
[мод] Уведомление о новых комментариях
MOD Title: SocialEngine Profile Comment Notification
MOD Author: LancXeon MusicK
MOD Description: Allows members get an alert just as they do with messages.
MOD Version: 1.0.0
-----[ SQL ЗАПРОС ]------------------------------------------
ALTER TABLE `se_users` ADD `newpcomment` INT( 9 ) NOT NULL ;
-----[ ОТКРОЙТЕ ]------------------------------------------
profile_comments.php
-----[ НАЙДИТЕ ]------------------------------------------
$database->database_query("INSERT INTO se_profilecomments (profilecomment_user_id, profilecomment_authoruser_id, profilecomment_date, profilecomment_body) VALUES ('".$owner->user_info[user_id]."', '".$user->user_info[user_id]."', '$comment_date', '$comment_body')");
-----[ ДОБАВЬТЕ НИЖЕ ]------------------------------------------
$database->database_query("UPDATE se_users SET newpcomment = 1 WHERE user_id = " . $owner->user_info[user_id] . "");
-----[ ОТКРОЙТЕ ]------------------------------------------
user_editprofile_comments.php
-----[ НАЙДИТЕ ]------------------------------------------
// GET TOTAL COMMENTS
$total_comments = $comment->comment_total();
-----[ ДОБАВЬТЕ НИЖЕ ]------------------------------------------
//RESET NEW COMMENT STATUS
$database->database_query("UPDATE se_users SET newpcomment = 0 WHERE user_id = " . $user->user_info[user_id] . "");
-----[ ОТКРОЙТЕ ]------------------------------------------
user_home.php
-----[ НАЙДИТЕ ]------------------------------------------
// GET PLUGIN NOTIFICATIONS IF NECESSARY
$notifications = Array();
for($g=0;$g<count($global_plugins);$g++) {
if(function_exists('notification_'.$global_plugins[$g])) {
call_user_func_array('notification_'.$global_plugi ns[$g], array(&$notifications));
}
}
-----[ ДОБАВЬТЕ НИЖЕ ]------------------------------------------
$newpcommentdata = $database->database_query("SELECT newpcomment FROM se_users WHERE user_id = ".$user->user_info[user_id]."");
$newpcomment = $database->database_fetch_assoc($newpcommentdata);
$newcommentx = $newpcomment[newpcomment];
-----[ НАЙДИТЕ ]------------------------------------------
$smarty->assign('total_friend_requests', $total_friend_requests);
-----[ ДОБАВЬТЕ НИЖЕ ]------------------------------------------
$smarty->assign('newcommentx', $newcommentx);
-----[ ОТКРОЙТЕ ]------------------------------------------
templates/user_home.tpl
-----[ НАЙДИТЕ ]------------------------------------------
{* SHOW NEW FRIEND REQUESTS NOTIFICATION *}
{if $total_friend_requests > 0}
<div style='margin-bottom: 5px;'><a href='user_friends_requests.php'><img src='./images/icons/newfriends16.gif' border='0' class='icon'>{$total_friend_requests} {$user_home15}</a></div>
{/if}
-----[ ДОБАВЬТЕ НИЖЕ ]------------------------------------------
{* SHOW NEW COMMENTS *}
{if $newcommentx == 1}
<div style='margin-bottom: 5px;'><a href='user_editprofile_comments.php'><img src='./images/icons/action_postcomment.gif' border='0' class='icon'>Новый Комментарий!</a></div>
{/if}
[мод] Уведомление о новых комментариях
MOD Title: SocialEngine Profile Comment Notification
MOD Author: LancXeon MusicK
MOD Description: Allows members get an alert just as they do with messages.
MOD Version: 1.0.0
-----[ SQL ЗАПРОС ]------------------------------------------
ALTER TABLE `se_users` ADD `newpcomment` INT( 9 ) NOT NULL ;
-----[ ОТКРОЙТЕ ]------------------------------------------
profile_comments.php
-----[ НАЙДИТЕ ]------------------------------------------
$database->database_query("INSERT INTO se_profilecomments (profilecomment_user_id, profilecomment_authoruser_id, profilecomment_date, profilecomment_body) VALUES ('".$owner->user_info[user_id]."', '".$user->user_info[user_id]."', '$comment_date', '$comment_body')");
-----[ ДОБАВЬТЕ НИЖЕ ]------------------------------------------
$database->database_query("UPDATE se_users SET newpcomment = 1 WHERE user_id = " . $owner->user_info[user_id] . "");
-----[ ОТКРОЙТЕ ]------------------------------------------
user_editprofile_comments.php
-----[ НАЙДИТЕ ]------------------------------------------
// GET TOTAL COMMENTS
$total_comments = $comment->comment_total();
-----[ ДОБАВЬТЕ НИЖЕ ]------------------------------------------
//RESET NEW COMMENT STATUS
$database->database_query("UPDATE se_users SET newpcomment = 0 WHERE user_id = " . $user->user_info[user_id] . "");
-----[ ОТКРОЙТЕ ]------------------------------------------
user_home.php
-----[ НАЙДИТЕ ]------------------------------------------
// GET PLUGIN NOTIFICATIONS IF NECESSARY
$notifications = Array();
for($g=0;$g<count($global_plugins);$g++) {
if(function_exists('notification_'.$global_plugins[$g])) {
call_user_func_array('notification_'.$global_plugi ns[$g], array(&$notifications));
}
}
-----[ ДОБАВЬТЕ НИЖЕ ]------------------------------------------
$newpcommentdata = $database->database_query("SELECT newpcomment FROM se_users WHERE user_id = ".$user->user_info[user_id]."");
$newpcomment = $database->database_fetch_assoc($newpcommentdata);
$newcommentx = $newpcomment[newpcomment];
-----[ НАЙДИТЕ ]------------------------------------------
$smarty->assign('total_friend_requests', $total_friend_requests);
-----[ ДОБАВЬТЕ НИЖЕ ]------------------------------------------
$smarty->assign('newcommentx', $newcommentx);
-----[ ОТКРОЙТЕ ]------------------------------------------
templates/user_home.tpl
-----[ НАЙДИТЕ ]------------------------------------------
{* SHOW NEW FRIEND REQUESTS NOTIFICATION *}
{if $total_friend_requests > 0}
<div style='margin-bottom: 5px;'><a href='user_friends_requests.php'><img src='./images/icons/newfriends16.gif' border='0' class='icon'>{$total_friend_requests} {$user_home15}</a></div>
{/if}
-----[ ДОБАВЬТЕ НИЖЕ ]------------------------------------------
{* SHOW NEW COMMENTS *}
{if $newcommentx == 1}
<div style='margin-bottom: 5px;'><a href='user_editprofile_comments.php'><img src='./images/icons/action_postcomment.gif' border='0' class='icon'>Новый Комментарий!</a></div>
{/if}