goxy63 Posted July 3, 2014 Share Posted July 3, 2014 Hi My knowledge about this stuff is less than basic, I am using this code which I found, changed it little bit with help of logic as original one was not working and make it work but.... I would like to place frames around avatars while avatars are in horizontal order one next to each other...and under them there is nick names So all this is done on Vbulletin board, within one custom widget This is my code now, what I need is frames and that nick names are centered : $member_count = 6; ob_start(); require_once('./includes/functions_user.php'); require_once('./includes/functions_bigthree.php'); // Get Random Members $newusers_get = vB::$db->query_read(" SELECT ".TABLE_PREFIX."user.userid AS userid, ".TABLE_PREFIX."user.username AS username, ".TABLE_PREFIX."user.avatarrevision AS avatarrevision, ".TABLE_PREFIX."customavatar.dateline AS dateline FROM ".TABLE_PREFIX."customavatar LEFT JOIN ".TABLE_PREFIX."user ON ".TABLE_PREFIX."customavatar.userid=".TABLE_PREFIX."user.userid WHERE ".TABLE_PREFIX."customavatar.visible = 1 ORDER BY RAND() LIMIT $member_count"); $output_bits = '<table cellpadding="5" align="center"><tr>'; while($newuser = vB::$db->fetch_array($newusers_get)) { $output_bits .= '<td><a href="member.php?u='.$newuser[userid].'"><img src="image.php?u='.$newuser[userid].'&dateline='.$newuser[dateline].'" alt="'.$newuser[username].'"/ width="120" height="120"><br />'.$newuser[username].'</a></td>'; } $output_bits .= '</tr></table>'; $output = $output_bits; ob_end_clean(); And in attached photo you can see how it looks At least point me in a right direction, not sure what tor read or where to look Thank you Goran Quote Link to comment https://forums.phpfreaks.com/topic/289418-random-member-avatars-need-help-with-table/ Share on other sites More sharing options...
Ch0cu3r Posted July 3, 2014 Share Posted July 3, 2014 what I need is frames and that nick names are centered : That has nothing to do with PHP. You'd use CSS to stylize elements on the the page. Example: http://jsfiddle.net/DgPVR/ Quote Link to comment https://forums.phpfreaks.com/topic/289418-random-member-avatars-need-help-with-table/#findComment-1483698 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.