Show member info

Started by GalaticNetwork, March 03, 2011, 02:56:31 PM

Previous topic - Next topic

GalaticNetwork

The html code is <table border="0"
                        cellpadding="0" cellspacing="0" width="620" height="97">
                        <tr>
                        <td width="97" height="97" valign="top"><p align="center"><br>
                        <img src="images/Pixel3_Avatar.jpg" width="50" height="50"
                        alt="Pixel3_Avatar.jpg (19028 bytes)"><br>
                        04/03/11<br>
                        12:11PM EST</td>
                        <td width="523" height="97" valign="top"><table border="0" cellpadding="6" cellspacing="0"
                        width="100%" height="99">
                        <tr>
                        <td height="99" valign="top"><p>Member Details: 
                          This is where i want the info to be displayed...
                        </p>
                          <p>&nbsp;</p></td>
                        </tr>
                        </table>
                        </td>
                        </tr>
                        </table>
I want it to show all the info in the picture below i will cross out the unwanted info.  Thanks
Time controlls everyone, if we could master time we could master anything.
_________________________________________
Where space folds into one :D

Arantor

You've just given a blank space inside table to dump the content into. If that's truly what you want, fine, but it'll be a mess.

GalaticNetwork

Sorry i coppied the table code out of dreamweaver, I can always adjust the html in dreamweaver. Thanks
Time controlls everyone, if we could master time we could master anything.
_________________________________________
Where space folds into one :D

Arantor

Except that I'm putting in PHP in the middle of HTML, which can't so easily be modified...

GalaticNetwork

Quote from: Arantor on March 03, 2011, 06:38:34 PM
Except that I'm putting in PHP in the middle of HTML, which can't so easily be modified...
Haha true sorry im not exactly helpful am i. If it's easier for you, you can put it in a html script easy for you and i'll check it out when i wake up as it's late now. Thank you for helping me i will check the code when im up

Thankss
Time controlls everyone, if we could master time we could master anything.
_________________________________________
Where space folds into one :D

Arantor

But it's still going to be PHP, strictly speaking it's going to be PHP producing HTML, and a single apostrophe out of place will break it. That's why I wanted the full code you wanted to use, like a mock-up, before writing a single line of code for it.

GalaticNetwork

Ok heres the full script of the html im useing. I've named it test.php but if it works will name it member.php.  <?php
require_once('forum/SSI.php');
$_SESSION['login_url'] = 'http://galaticnetwork.co.uk' $_SERVER['PHP_SELF'];
$_SESSION['logout_url'] = 'http://galaticnetwork.co.uk' $_SERVER['PHP_SELF'];
global 
$context$memberContext;
if (
$context['user']['is_logged'])
{
  
$return loadMemberData($context['user']['id'], false'profile');
  if (!empty(
$return))
    
loadMemberContext($context['user']['id']);
}
?>


<html>

<head>
<title>GalaticNetwork</title>
<link rel="stylesheet" href="style.css" type="text/css">
<script language="JavaScript1.2">

function high(which2){
theobject=which2
highlighting=setInterval("highlightit(theobject)",50)
}
function low(which2){
clearInterval(highlighting)
if (which2.style.MozOpacity)
which2.style.MozOpacity=0.3
else if (which2.filters)
which2.filters.alpha.opacity=30
}

function highlightit(cur2){
if (cur2.style.MozOpacity<1)
cur2.style.MozOpacity=parseFloat(cur2.style.MozOpacity)+0.1
else if (cur2.filters&&cur2.filters.alpha.opacity<100)
cur2.filters.alpha.opacity+=10
else if (window.highlighting)
clearInterval(highlighting)
}

</script>
</head>

<body background="images/bg3.jpg">
<div align="center">

<table border="0" cellpadding="0" cellspacing="0" height="92" width="657">
  <tr>
    <td height="1" width="802" colspan="2"><img src="images/top_bar.jpg" width="800"
    height="27"></td>
  </tr>
  <tr>
    <td width="802" height="1" colspan="2"><img src="images/GalacticFederationBanner.png" width="800"
    height="110"></td>
  </tr>
  <tr>
    <td width="401" height="1" background="images/nav_bg.jpg"><img src="images/nav_left.jpg"
    width="76" height="23" alt="nav_left.jpg (14891 bytes)"></td>
    <td width="401" height="1" background="images/nav_bg.jpg"><p align="right"><a href="index.php"><img
    src="images/button_home.jpg" width="34" height="23"></a><img
    src="images/button_spacer.jpg" width="2" height="23"><a href="about.php"><img
    src="images/button_roster.jpg" width="48" height="23"></a><img
    src="images/button_spacer.jpg" width="2" height="23"><a href="/forum"><img
    src="images/button_forums.jpg" width="50" height="23"></a><img src="images/spacer1.jpg"
    width="1" height="23"><img src="images/nav_right.jpg" width="76" height="23"></td>
  </tr>
  <tr>
    <td background="images/bg2.jpg" height="428" width="802" valign="top" colspan="2"><table
    border="0" cellpadding="4" cellspacing="0" width="800" height="132">
      <tr>
        <td height="124" valign="top"><table border="0" cellpadding="0" cellspacing="0"
        width="779" height="429">
          <tr>
            <td height="3" width="788"><img src="images/content_top.jpg" width="791" height="16"></td>
          </tr>
          <tr>
            <td height="426" valign="top" width="788"><table border="0" cellpadding="0"
            cellspacing="0" width="782">
              <tr>
                <td width="162" valign="top"><table border="0" cellpadding="0" cellspacing="0"
                height="147">
                  <tr>
                    <td height="11" valign="top" background="images/side_bg.jpg"><img
                    src="images/bar_main.jpg" width="162" height="14"></td>
                  </tr>
                  <tr>
                    <td height="10" valign="top" background="images/side_bg.jpg">&nbsp;&nbsp; _<a href="index.php">Home</a><br>
                    &nbsp;&nbsp; _<a href="trailers.php">Trailers</a><br>
                    &nbsp;&nbsp; _<a href="/downloads">Downloads</a><br>
                    &nbsp;&nbsp; _<a href="/media">Media</a><br>
                    &nbsp;&nbsp; _<a href="/member">Members</a><br>
                    &nbsp;&nbsp; _<a href="/forum">Forums</a><br>
                    &nbsp;&nbsp; _<a href="about.php">About</a></td>
                  </tr>
                  <tr>
                    <td height="3" valign="top" background="images/side_bg.jpg"><img
                    src="images/bar_serverstats.jpg" width="162" height="14"></td>
                  </tr>
                  <tr>
                    <td height="2" valign="top" background="images/side_bg.jpg">&nbsp;<?php ssi_boardStats(); ?></td>
                  </tr>
                  <tr>
                    <td height="4" valign="top" background="images/side_bg.jpg"><img
                    src="images/bar_newmembers.jpg" width="162" height="14"></td>
                  </tr>
                  <tr>
                    <td height="5" valign="top" background="images/side_bg.jpg">&nbsp;
                     
                            <?php
if ($context['user']['is_guest'])
{
ssi_login();
}
else
{

ssi_welcome();
ssi_logout();
}
?>
</td>
                  </tr>
                  <tr>
                    <td height="5" valign="top" background="images/side_bg.jpg"><img
                    src="images/bar_affiliates.jpg" width="162" height="14"></td>
                  </tr>
                  <tr>
                    <td height="5" valign="top" background="images/side_bg.jpg"></td>
                  </tr>
                  <tr>
                    <td height="45" valign="top" background="images/side_bg.jpg"><p align="left">&nbsp;Comming soon...<br>
                    <br>
                    </td>
                  </tr>
                  <tr>
                    <td bgcolor="#000000" height="1"></td>
                  </tr>
                </table>
                </td>
                <td width="620" valign="top"><table border="0" cellpadding="0" cellspacing="0">
                  <tr>
                    <td>&nbsp;&nbsp;&nbsp; </td>
                    <td><table border="0" cellpadding="0" cellspacing="0" height="266">
                      <tr>
                        <td height="1" valign="top" background="images/content_bg.jpg"><img
                        src="images/bar_news.jpg" width="620" height="14"></td>
                      </tr>
                      <tr>
                        <td height="132" valign="top" background="images/content_bg.jpg"><table border="0"
                        cellpadding="0" cellspacing="0" width="620" height="97">
                        <tr>
                        <td width="97" height="97" valign="top"><p align="center">INFO TO GO HERE!!!!!</td>
                        </tr>
                        </table>
                        </td>
                      </tr>
                      <tr>
                        <td height="1" valign="top" bgcolor="#000000"></td>
                      </tr>
                      <tr>
                        <td height="2" valign="top"></td>
                      </tr>
                      <tr>
                        <td height="0" valign="top" background="images/content_bg.jpg"><img
                        src="images/bar_news.jpg" width="620" height="14"></td>
                      </tr>
                      <tr>
                        <td height="160" valign="top" background="images/content_bg.jpg"><table border="0"
                        cellpadding="0" cellspacing="0" width="620">
                        <tr>
                        <td width="97" valign="top"><p align="center"><br>
                        <img src="images/Pixel3_Avatar.jpg" width="50" height="50"
                        alt="Pixel3_Avatar.jpg (19028 bytes)"><br>
                        04/03/11<br>
                        12:09PM EST</td>
                        <td width="523" valign="top"><table border="0" cellpadding="6" cellspacing="0" width="100%"
                        height="148">
                        <tr>
                        <td height="136" valign="top"><p>Welcome to GalaticNetwork here you will find, the latest Trailers for Movies,Games and Music so have a browse sign up to the forums, and start posting about all the new films comming out, or any other subject.</p>
                          <p>&nbsp;</p></td>
                        </tr>
                        </table>
                        </td>
                        </tr>
                        </table>
                        </td>
                      </tr>
                      <tr>
                        <td height="1" bgcolor="#000000"></td>
                      </tr>
                      <tr>
                        <td height="16"></td>
                      </tr>
                    </table>
                    </td>
                  </tr>
                </table>
                </td>
              </tr>
            </table>
            </td>
          </tr>
        </table>
        </td>
      </tr>
    </table>
    </td>
  </tr>
  <tr>
    <td width="802" height="1" colspan="2" bgcolor="#000000"></td>
  </tr>
  <tr>
    <td width="802" height="0" colspan="2"></td>
  </tr>
</table>
<p>Copyright<strong> GalaticNetwork 2011, </strong><strong>Template by <a href="http://www.clantemplates.com">ClanTemplates</a></strong></p>
<p>&nbsp;</p>
</div>
</body>
</html>
or if you like i can send you the test.php   Thanks
Time controlls everyone, if we could master time we could master anything.
_________________________________________
Where space folds into one :D

Arantor

That still doesn't answer what it is I wanted to know.

What I would like you to do is provide a mock-up of the HTML that should be used. You've set aside some space for the profile information but I don't know if it should be a paragraph or a long list or a two column table like the profile page is, or how that should be set up. So if you make a mock up of how the information should look with some dummy values, I can then modify it to put the PHP inside it.

GalaticNetwork

Quote from: Arantor on March 04, 2011, 10:14:16 AM
That still doesn't answer what it is I wanted to know.

What I would like you to do is provide a mock-up of the HTML that should be used. You've set aside some space for the profile information but I don't know if it should be a paragraph or a long list or a two column table like the profile page is, or how that should be set up. So if you make a mock up of how the information should look with some dummy values, I can then modify it to put the PHP inside it.

Ohhh i understand now sure thing i will make the mock now and post code once done. Thanks
Time controlls everyone, if we could master time we could master anything.
_________________________________________
Where space folds into one :D

GalaticNetwork

Hopefully i have it correct now.

Heres the script  <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
</head>

<body>
<table width="200" border="1">
  <tr>
    <td>Member Info:</td>
  </tr>
</table>
<table width="200" border="1">
  <tr>
    <td>Name</td>
    <td>Output here</td>
  </tr>
  <tr>
    <td>Posts</td>
    <td>Output here</td>
  </tr>
  <tr>
    <td>Postion</td>
    <td>Output here</td>
  </tr>
  <tr>
    <td>Last Active</td>
    <td>Output here</td>
  </tr>
</table>
<table width="200" border="1">
  <tr>
    <td height="26">Contact Info:</td>
  </tr>
</table>
<table width="200" border="1">
  <tr>
    <td>Msn</td>
    <td>Output here</td>
  </tr>
  <tr>
    <td>Email</td>
    <td>Output here</td>
  </tr>
  <tr>
    <td>Status</td>
    <td>Output here</td>
  </tr>
</table>
<table width="200" border="1">
  <tr>
    <td>Extra Info</td>
  </tr>
</table>
<table width="200" border="1">
  <tr>
    <td>Gender</td>
    <td>Output here</td>
  </tr>
  <tr>
    <td>Age</td>
    <td>Output here</td>
  </tr>
  <tr>
    <td>Location</td>
    <td>Output here</td>
  </tr>
</table>
</body>
</html>

Let me know if it's wrong again lol

Thanks  :D
Time controlls everyone, if we could master time we could master anything.
_________________________________________
Where space folds into one :D

Arantor

<?php
require_once('forum/SSI.php');
$_SESSION['login_url'] = 'http://galaticnetwork.co.uk' $_SERVER['PHP_SELF'];
$_SESSION['logout_url'] = 'http://galaticnetwork.co.uk' $_SERVER['PHP_SELF'];
global 
$context$memberContext;
if (
$context['user']['is_logged'])
{
  
$return loadMemberData($context['user']['id'], false'profile');
  if (!empty(
$return))
  {
    
loadMemberContext($context['user']['id']);
    
$member = &$memberContext[$context['user']['id']];
  }
}
else
{
  
is_not_guest();
}
?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
</head>

<body>
<table width="200" border="1">
  <tr>
    <td>Member Info:</td>
  </tr>
</table>
<table width="200" border="1">
  <tr>
    <td>Name</td>
    <td><?php echo $member['realName']; ?></td>
  </tr>
  <tr>
    <td>Posts</td>
    <td><?php echo $member['posts']; ?></td>
  </tr>
<?php
  
if (!empty($member['group']))
    echo 
'  <tr>
    <td>Position</td>
    <td>'
$member['realName'], '</td>
  </tr>'
;
?>

  <tr>
    <td>Last Active</td>
    <td><?php echo $member['last_login']; ?></td>
  </tr>
</table>
<table width="200" border="1">
  <tr>
    <td height="26">Contact Info:</td>
  </tr>
</table>
<table width="200" border="1">
<?php
  
if (!empty($member['MSN']['href']))
    echo 
'  <tr>
    <td>MSN</td>
    <td>'
$member['MSN']['link_text'], '</td>
  </tr>'
;

  if (!empty(
$member['email_public']))
    echo 
'  <tr>
    <td>Email</td>
    <td><a href="mailto:'
$member['email'], '">'$member['email'], '</a></td>
  </tr>'
;
?>

  <tr>
    <td>Status</td>
    <td><img src="<?php echo $member['online']['image_href']; ?>" /> <?php echo $member['online']['label']; ?></td>
  </tr>
</table>
<table width="200" border="1">
  <tr>
    <td>Extra Info</td>
  </tr>
</table>
<table width="200" border="1">
<?php
  
if (!empty($member['gender']['image']))
    echo 
'  <tr>
    <td>Gender</td>
    <td>'
$member['gender']['image'], ' '$member['gender']['name'], '</td>
  </tr>'
;

  if (!empty(
$member['birth_date']) && $member['birth_date'] != '0000-00-00' && $member['birth_date'] != '0001-01-01')
  {
    list (
$birth_year$birth_month$birth_day) = sscanf($member['birth_date'], '%d-%d-%d');
    
$datearray getdate(forum_time());
    echo 
'  <tr>
    <td>Age</td>
    <td>'
$birth_year <= $txt[470] : $datearray['year'] - $birth_year - (($datearray['mon'] > $birth_month || ($datearray['mon'] == $birth_month && $datearray['mday'] >= $birth_day)) ? 1), '</td>
  </tr>'
;
  }

  if (!empty(
$member['location']))
    echo 
'  <tr>
    <td>Location</td>
    <td>'
$member['location'], '</td>
  </tr>'
;
?>

</body>
</html>

GalaticNetwork

Thanks it worked, but there are a few issues

Postion doesn't show and neither does real name.

So i changed the Real Name to show Username

But not sure why Postion isn't working just shows blank

Thanks
Time controlls everyone, if we could master time we could master anything.
_________________________________________
Where space folds into one :D

Arantor

Let me guess, you're using 2.0 now? There were a few changes to the underlying code between 1.1 and 2.0...

As for position, I screwed up as you can see it uses $member['realName'] when it should be $member['group'] if I remember rightly.

GalaticNetwork

No still running 1.1.13 i have 2.0 setup but its in a private place for testing.

I will update the code and see if it works

Thanks
Time controlls everyone, if we could master time we could master anything.
_________________________________________
Where space folds into one :D

GalaticNetwork

Yup that seemed to fix the Postion problem. Everything is working how i wanted it

Thank you very much i will close this as resolved
Time controlls everyone, if we could master time we could master anything.
_________________________________________
Where space folds into one :D

Advertisement: