Hi there,
I've a problem (...of course, otherwise I would not use the board). I wanted to show the Skype status of the comment's authors.
I already read many things about this mod in the board and I added it to my page, BUT I think the value, whitch I get from my database is empty I and don't understand why. I already checked the table and the cell is not empty.
I added .get_user_table_field(", u.", "user_skype") as follows in details.php:
$sql = "SELECT c.comment_id, c.image_id, c.user_id, c.user_name AS comment_user_name, c.comment_headline, c.comment_text, c.comment_ip, c.comment_date".get_user_table_field(", u.", "user_level").get_user_table_field(", u.", "user_name").get_user_table_field(", u.", "user_email").get_user_table_field(", u.", "user_showemail").get_user_table_field(", u.", "user_invisible").get_user_table_field(", u.", "user_joindate").get_user_table_field(", u.", "user_lastaction").get_user_table_field(", u.", "user_comments").get_user_table_field(", u.", "user_homepage").get_user_table_field(", u.", "user_icq").get_user_table_field(", u.", "user_skype")."
FROM ".COMMENTS_TABLE." c
LEFT JOIN ".USERS_TABLE." u ON (".get_user_table_field("u.", "user_id")." = c.user_id)
WHERE c.image_id = $image_id
ORDER BY c.comment_date ASC";
$result = $site_db->query($sql);
And I added lines 6 to 11 to show the status, if a Skype name is set:
$comment_user_icq = (isset($comment_row[$i][$user_table_fields['user_icq']])) ? format_text($comment_row[$i][$user_table_fields['user_icq']]) : "";
if (!empty($comment_user_icq)) {
$comment_user_icq_button = "<a href=\"http://www.icq.com/people/about_me.php?uin=".$comment_user_icq."\" target=\"_blank\"><img src=\"http://status.icq.com/online.gif?icq=".$comment_user_icq."&img=5\" width=\"18\" height=\"18\" border=\"0\" alt=\"".$comment_user_icq."\" /></a>";
}
// ***** Skype Status 04.06.09 *****************************************
$comment_user_skype = (isset($comment_row[$i][$user_table_fields['user_skype']])) ? format_text($comment_row[$i][$user_table_fields['user_skype']]) : "";
if (!empty($comment_user_skype)) {
$comment_user_skype_button = "<a href=\"callto://".$comment_user_skype."\">Test1</a>Test2<img src=\"http://mystatus.skype.com/smallicon/".$comment_user_skype."\" /></a>";
}
// ***** Skype Status 04.06.09 *****************************************
But it look like that $comment_user_skype is empty, because nothig is shown as long I remove the ! in front of empty in line 8.
Of course I added the variable to comment_bit.html:
{comment_user_icq_button}
<!-- ***** Skype Status 04.06.09 ***********************************-->
{comment_user_skype_button}
<!-- ***** Skype Status 04.06.09 ***********************************-->
I'm not familiar with mySQL and I don't know what kind of mistake I made. So please feel free to help me.
Regards
clubsociety