[UberCMS] Need help with php/sql coding (making another habbos figure show)

trakstarz

New Member
Jul 21, 2011
14
0
I am using ubercms. Im currently trying to create a custom page. But i need to know if anyone can help me code something.. I will provide the scenario below:

I would like to retrieve another users habbo figure and display their habbo figure to another user.

For example,

Tom logs in. He goes to his account overview page, and it shows his administrator's name is Scott. It also shows Scott's habbo figure on Tom's account overview page (as shown in picture below).

Jim logs in. He goes to his account overview page, and it shows his administrator's name is Ryan. It also shows Ryan's habbo figure on Jim's account overview page.

In order for Tom & Jim to see their administrator's name, the page must get the name from Database table "helper" inside the USERS directory.

In order for Tom & Jim to see their administrator's habbo figure, the page must get the figure data from Database table "look" inside the USERS directory.. for that specific administrator.

So with that being said, could anyone provide me with the php code to pull that information from the database and output it correctly? Thanks in advance

Screenshot Sample:
to view screenshot.
 

trakstarz

New Member
Jul 21, 2011
14
0
This code is the closest i can get (shown below), and all it does is show your own habbo figure.



Location:
profile.php
Code:
$settingsEditor = new Template('page-settings-editor');
$settingsEditor->SetParam('helper', $users->GetUserVar(USER_ID, 'helper'));



Location
: page-settings-editor.tpl
Code:
<?php

$getMember = mysql_query("SELECT * FROM users WHERE helper = '" . $helper . "'");

while ($member= mysql_fetch_assoc($getMember))


            echo '<tr>
                    
                        <img src="http://www.habbo.com/habbo-imaging/avatarimage?figure=' . $member['look'] . '">
                </tr>';
    
    echo '</div>

<script type="text/javascript">if (!$(document.body).hasClassName(\'process-template\')) { Rounder.init(); }</script> ';

?>

Database structure:
Directory: USERS
Table: helper (shows the name of the administrator for the selected habbo)
Table: look (contains the habbo figure data)
 

Users who are viewing this thread

Top