Originalmente inviato da
gabryhacker
Posta un pezzo di codice, esempio dalla linea 600 alla 640-645
Ecco dalla 600 alla 650
Codice:
function generate_backlink($forum_id = 0, $topic_id = 0, $post_id = 0, $user_id = 0)
{
global $user, $phpEx;
$viewtopic = false;
if ($post_id)
{
$message = $user->lang['KARMA_NOTIFY_BACKLINK_POST'];
$viewtopic = true;
}
else if ($topic_id)
{
$message = $user->lang['KARMA_NOTIFY_BACKLINK_TOPIC'];
$viewtopic = true;
}
else
{
$message = $user->lang['KARMA_NOTIFY_BACKLINK_PROFILE'];
}
if ($viewtopic)
{
$url = generate_board_url() . "/viewtopic.$phpEx?" . (($forum_id) ? "f=$forum_id&") . (($topic_id) ? "t=$topic_id&" : '') . (($post_id) ? "p=$post_id#p$post_id" : '');
}
else
{
$url = generate_board_url() . "/memberlist.$phpEx?mode=viewprofile&u=$user_id";
}
$backlink = $message . $url;
return $backlink;
}
/**
* Prepare profile data
* Used on viewcomments page
* Copied from memberlist.php
*/
function show_profile($data)
{
global $config, $auth, $template, $user, $phpEx, $phpbb_root_path;
$username = $data['username'];
$user_id = $data['user_id'];
$rank_title = $rank_img = $rank_img_src = '';
get_user_rank($data['user_rank'], $data['user_posts'], $rank_title, $rank_img, $rank_img_src);
if (!empty($data['user_allow_viewemail']) || $auth->acl_get('a_email'))
{