Kaip pridėti Skype į forumą v7.02.xx?
Parašė Maksas 2012 vasario 23 21:02:54
[b]Kodas į forumą[/b]
Pirmoje eilėje reikia atsisiųsti Nario Skype iš čia: http://modai.webdnd.com/infusions/moddb/view.php?mod_id=910

[b]Atidaryti:[/b]
forum/viewthread.php
[b]Surasti:[/b]
Eil.~142.
[code]$user_field = array("user_sig" => false, "user_web" => false);[/code]
[b]Pakeisti:[/b]
[code]$user_field = array("user_sig" => false, "user_skype" => false, "user_web" => false);[/code]
[b]Surasti:[/b]
Eil.~148.
[code]if (isset($userdata['user_sig'])) { $user_field['user_sig'] = true; }[/code]
[b]Ir iškart po pridėti:[/b]
[code]if (isset($userdata['user_skype'])) { $user_field['user_skype'] = true; }[/code]
[b]Surasti:[/b]
Eil.~152.
[code]$result = dbquery("SELECT field_name FROM ".DB_USER_FIELDS." WHERE field_name='user_sig' OR field_name='user_web'");[/code]
[b]Pakeisti:[/b]
[code]$result = dbquery("SELECT field_name FROM ".DB_USER_FIELDS." WHERE field_name='user_sig' OR field_name='user_skype' OR field_name='user_web'");[/code]
[b]Surasti:[/b]
Eil.~217.
[code]$result = dbquery(
"SELECT p.forum_id, p.thread_id, p.post_id, p.post_message, p.post_showsig, p.post_smileys, p.post_author,
p.post_datestamp, p.post_ip, p.post_ip_type, p.post_edituser, p.post_edittime, p.post_editreason,
u.user_id, u.user_name, u.user_status, u.user_avatar, u.user_level, u.user_posts, u.user_groups, u.user_joined,
".($user_field['user_sig'] ? " u.user_sig," : "").($user_field['user_web'] ? " u.user_web," : "")."
u2.user_name AS edit_name, u2.user_status AS edit_status
FROM ".DB_POSTS." p
LEFT JOIN ".DB_USERS." u ON p.post_author = u.user_id
LEFT JOIN ".DB_USERS." u2 ON p.post_edituser = u2.user_id AND post_edituser > '0'
WHERE p.thread_id='".$_GET['thread_id']."' AND post_hidden='0'
ORDER BY post_datestamp LIMIT ".$_GET['rowstart'].",$posts_per_page"
);[/code]
[b]Pakeisti:[/b]
[code]$result = dbquery(
"SELECT p.forum_id, p.thread_id, p.post_id, p.post_message, p.post_showsig, p.post_smileys, p.post_author,
p.post_datestamp, p.post_ip, p.post_ip_type, p.post_edituser, p.post_edittime, p.post_editreason,
u.user_id, u.user_name, u.user_status, u.user_avatar, u.user_level, u.user_posts, u.user_groups, u.user_joined,
".($user_field['user_sig'] ? " u.user_sig," : "").($user_field['user_skype'] ? " u.user_skype," : "").($user_field['user_web'] ? " u.user_web," : "")."
u2.user_name AS edit_name, u2.user_status AS edit_status
FROM ".DB_POSTS." p
LEFT JOIN ".DB_USERS." u ON p.post_author = u.user_id
LEFT JOIN ".DB_USERS." u2 ON p.post_edituser = u2.user_id AND post_edituser > '0'
WHERE p.thread_id='".$_GET['thread_id']."' AND post_hidden='0'
ORDER BY post_datestamp LIMIT ".$_GET['rowstart'].",$posts_per_page"
);[/code]
[b]Surasti:[/b]
Eil.~354.
[code]if (!strstr($data['user_web'], "http://")) { $urlprefix = "http://"; } else { $urlprefix = ""; }
echo "<a href='".$urlprefix."".$data['user_web']."' target='_blank'><img src='".get_image("web")."' alt='".$data['user_web']."' style='border:0;vertical-align:middle' /></a> ";
}[/code]
[b]Ir iškart po pridėti:[/b]
[code]//Skype
if (isset($data['user_skype']) && $data['user_skype']) {
echo "<a href='skype:".$data['user_skype']."?add'> <img src='http://mystatus.skype.com/smallclassic/".$data['user_skype']."' alt='".$data['user_skype']."' title='".$data['user_skype']."' style='border: 0px none; vertical-align: middle;'></a>\n";
}[/code]

[b][i]Testuota:v7.02.04[/i][/b]

Straipsnio autorius:[b]Maksas [/b] http://modai.webdnd.com/