Kodas į forumą
Pirmoje eilėje reikia atsisiųsti Nario Skype iš čia: http://modai.webdnd.com/infusion...mod_id=910
Atidaryti:
forum/viewthread.php
Surasti:
Eil.~142.
$user_field = array("user_sig" => false, "user_web" => false);
Pakeisti:
$user_field = array("user_sig" => false, "user_skype" => false, "user_web" => false);
Surasti:
Eil.~148.
if (isset($userdata['user_sig'])) { $user_field['user_sig'] = true; }
Ir iškart po pridėti:
if (isset($userdata['user_skype'])) { $user_field['user_skype'] = true; }
Surasti:
Eil.~152.
$result = dbquery("SELECT field_name FROM ".DB_USER_FIELDS." WHERE field_name='user_sig' OR field_name='user_web'");
Pakeisti:
$result = dbquery("SELECT field_name FROM ".DB_USER_FIELDS." WHERE field_name='user_sig' OR field_name='user_skype' OR field_name='user_web'");
Surasti:
Eil.~217.
$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"
);
Pakeisti:
$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"
);
Surasti:
Eil.~354.
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> ";
}
Ir iškart po pridėti:
//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";
}
Testuota:v7.02.04
Straipsnio autorius:Maksas http://modai.webdnd.com/
| Straipsnio informacija
AutoriusMaksas
Parašymo data2012 vasario 23 21:02:54
Komentarų4
Skaityta5056 Spausdinti |