TP-Docs
HTML5 Icon HTML5 Icon HTML5 Icon
TP on Social Media

Recent

Welcome to TinyPortal. Please login or sign up.

May 18, 2024, 02:29:41 PM

Login with username, password and session length
Members
  • Total Members: 3,886
  • Latest: Grendor
Stats
  • Total Posts: 195,189
  • Total Topics: 21,220
  • Online today: 112
  • Online ever: 3,540 (September 03, 2022, 01:38:54 AM)
Users Online
  • Users: 1
  • Guests: 54
  • Total: 55
  • @rjen

Team page

Started by Moto, April 26, 2009, 07:36:29 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Moto

Hey
Ive done a team page ,but i need to know how to center the user info,its making the background image repeat??

http://www.studioshop.us/index.php?page=4.0

Heres the code i used...in the article

global $txt, $scripturl, $user_info;
global $context, $modSettings, $ID_MEMBER;
global $board_info, $settings, $db_prefix;

/////////////////////////////////////////////////////////////////  Enter the desired groups
$groups_list = array(1,2,9,11,12);
/////////////////////////////////////////////////////////////////
$groups_query1 = 'mem.ID_GROUP IN (' . implode(', ', $groups_list) . ')';
$groups_query2 = '';
// $groups_query2 = ' OR FIND_IN_SET(' . implode(', mem.additionalGroups) OR FIND_IN_SET(', $groups_list) . ', mem.additionalGroups)';


        echo '<table align="center" width="95%" cellpadding="0" cellspacing="0"><tr>
                <td style="border-bottom: 2px solid #282828; padding-bottom: 2px; "><h2>Meet the Studio<font color="#3899e6">Shop</font> staff!</h2>
<span class="middletext">These are the people you will run into while visiting www.studioshop.us</span><br /><br />
</td></tr></table>';


$loaded_ids = array();
    $user_profile=array();
    $memberContext=array();
    $profile=array();
    $context['TPortal']['team']=array();

// Load the member's data.
$request = db_query("
SELECT IFNULL(lo.logTime, 0) AS isOnline, IFNULL(a.ID_ATTACH, 0) AS ID_ATTACH, a.filename, a.attachmentType,
mem.personalText, mem.avatar, mem.ID_MEMBER, mem.memberName, mem.realName , mem.lastLogin, mem.websiteTitle,
mem.websiteUrl, mem.location, mem.posts, them.value AS teamtext, g.groupName
FROM ({$db_prefix}members AS mem, {$db_prefix}membergroups AS g)
LEFT JOIN {$db_prefix}log_online AS lo ON (lo.ID_MEMBER = mem.ID_MEMBER)
LEFT JOIN {$db_prefix}attachments AS a ON (a.ID_MEMBER = mem.ID_MEMBER)
LEFT JOIN {$db_prefix}themes AS them ON (mem.ID_MEMBER = them.ID_MEMBER AND them.variable = 'teamtext' AND them.ID_THEME=1)
WHERE mem.ID_GROUP = g.ID_GROUP
AND ($groups_query1 $groups_query2)
ORDER BY mem.posts DESC", __FILE__, __LINE__);
$new_loaded_ids = array();
while ($row = mysql_fetch_assoc($request))
{

$avatar_width = '';
$avatar_height = '';

$context['TPortal']['team'][] = array(
'username' => $row['memberName'],
'name' => $row['realName'],
'groupname' => $row['groupName'],
'posts' => $row['posts'],
'location' => $row['location'],
'href' => $scripturl . '?action=profile;u=' . $row['ID_MEMBER'],
'link' => '<a href="' . $scripturl . '?action=profile;u=' . $row['ID_MEMBER'] . '" title="' . $txt[92] . ' ' . $row['realName'] . '">' . $row['realName'] . '</a>',
'blurb' => $row['personalText'],
'avatar' => array(
'name' => $row['avatar'],
'image' => $row['avatar'] == '' ? ($row['ID_ATTACH'] > 0 ? '<img  src="' . (empty($row['attachmentType']) ? $scripturl . '?action=dlattach;attach=' . $row['ID_ATTACH'] . ';type=avatar' : $modSettings['custom_avatar_url'] . '/' . $row['filename']) . '" alt="" class="avatar2" border="0" />' : '') : (stristr($row['avatar'], 'http://') ? '<img src="' . $row['avatar'] . '"' . $avatar_width . $avatar_height . ' alt="" class="avatar2" border="0" />' : '<img src="' . $modSettings['avatar_url'] . '/' . htmlspecialchars($row['avatar']) . '" alt="" class="avatar2" border="0" />'),
'href' => $row['avatar'] == '' ? ($row['ID_ATTACH'] > 0 ? (empty($row['attachmentType']) ? $scripturl . '?action=dlattach;attach=' . $row['ID_ATTACH'] . ';type=avatar' : $modSettings['custom_avatar_url'] . '/' . $row['filename']) : '') : (stristr($row['avatar'], 'http://') ? $row['avatar'] : $modSettings['avatar_url'] . '/' . $row['avatar']),
'url' => $row['avatar'] == '' ? '' : (stristr($row['avatar'], 'http://') ? $row['avatar'] : $modSettings['avatar_url'] . '/' . $row['avatar'])
),
'last_login' => empty($row['lastLogin']) ? $txt['never'] : timeformat($row['lastLogin']),
'last_login_timestamp' => empty($row['lastLogin']) ? 0 : forum_time(0, $row['lastLogin']),
'website' => array(
'title' => $row['websiteTitle'],
'url' => $row['websiteUrl']),
'online' => array(
'is_online' => $row['isOnline'],
'text' => &$txt[$row['isOnline'] ? 'online2' : 'online3'],
'image_href' => $settings['images_url'] . '/' . ($row['isOnline'] ? 'useron' : 'useroff') . '.gif',
),
'teamtext' => $row['teamtext'],
);


}
mysql_free_result($request);

echo '<table align="center" width="95%" cellpadding="5" cellspacing="0" style="margin-top: 10px;"><tr>';

    $newrow=0;
foreach($context['TPortal']['team'] as $team)
        {
            echo '

<td valign="top" width="3%">
<td valign="top" align="right" width="5%" class="team_left">'.$team['avatar']['image'].'</td>
<td valign="top" width="40%" class="team_right" style="padding: 0px;">
<h2 style="margin-top: 0; margin-bottom: 6px;">'.$team['link'].'</h2>
<b>Position</b>: '.$team['groupname'].'<br />
<b>Last seen</b>: '.$team['last_login'].'<br />
<b>Posts</b>: '.$team['posts'].'<br />
' , !empty($team['location']) ? '<b>Location</b>: '.$team['location'].'<br />' : '' , '
' , !empty($team['website']['title']) ? '<b>Website</b>: <a href="'.$team['website']['url'].'" target="_blank">'.$team['website']['title'].'</a><br />' : '' , '
' ,  $team['online']['is_online'] ? '<img src="'.$team['online']['image_href'].'" alt="" /> '.$team['online']['text'].'<br />' : $team['online']['text'].'<br /><br /><br /><br /><br />' , '

' , !empty($team['blurb']) ? '<i>- '.$team['blurb'].'</i><br />' : '' , '

' ,  !empty($team['teamtext']) ? $team['teamtext'].'<br />' : '' , '

    </div></td>';
            $newrow++;
            if($newrow>1){
               $newrow=0;
               echo '</tr><tr><td colspan="4"><br /><br /> </td></tr><tr>';
            }
        }
echo '</tr></table>';


and in my css

.avatar2 {
   width: 65px;
   height: 65px;
}
.team_left {
    background: url(images/staffbg.png) 0 0 no-repeat;
}
.team_right {
    background: url(images/staffbg.png) 100% 0 no-repeat;

}


any help woul be great :)

Crip

Looks like you need less padding above the Avatar's ? .... or add a [margin-top: -1em;] might align it better ?
I have become comfortably numb!

Cripzone | Crip's Free 2.0.2 Themes



IchBin

I don't see the background image repeating. Does it only happen in a certain browser?

Moto

#3
Quote from: IchBinâ„¢ on April 27, 2009, 01:07:07 AM
I don't see the background image repeating. Does it only happen in a certain browser?

Hi IchBin
Well its repeating for me in firefox and IE7,what browser you using?

i can just see it repeat under the user avatar ,by the drop shadow.

cheers Paul..

Renegd98

I don't see it repeating either. I do see that it is pushed down on the bottom with the same width as the pictures which is probably caused by the picture (avatar) size.

Zetan

I think you should be asking this at DZinerStudio as it's their theme and their Team Page script.

Moto

Quote from: Zetan on April 27, 2009, 11:55:39 AM
I think you should be asking this at DZinerStudio as it's their theme and their Team Page script.
I have, but no reply,so since its to do with tinyportal,here i am..

Zetan

Quote from: Moto on April 27, 2009, 03:57:54 PM
Quote from: Zetan on April 27, 2009, 11:55:39 AM
I think you should be asking this at DZinerStudio as it's their theme and their Team Page script.
so since its to do with tinyportal,here i am..

lol.. The only thing to do with TP is the Article it's in.

Moto

Quote from: Zetan on April 27, 2009, 04:06:30 PM
Quote from: Moto on April 27, 2009, 03:57:54 PM
Quote from: Zetan on April 27, 2009, 11:55:39 AM
I think you should be asking this at DZinerStudio as it's their theme and their Team Page script.
so since its to do with tinyportal,here i am..

lol.. The only thing to do with TP is the Article it's in.
Ok ,so your another one that likes the title of "Support" but just posts useless argumentative posts instead of actually helping. :idiot2:
Anyhow ive it fixed myself...

G6Cad

Glad you got it soreted, but...
Zetan are correct, it's not related to any of our themes, or our software, so no reason for us to help with support if we dont like to..
We do everything in support when it comes to OUR software and OUR themes, if you expect us to give support to any other software out there or theme we have no hands in, then your out in the bush totally regarding this site or the people helping out here.

We have no obligations what so ever to help on anything else, if any of us do, it's up to them to do it, plain and simple.

Feel free to ask questions about support, but never expect anyones help if it's not related to tp or any of the themes we offer on THIS site, if you demand more then that, then i feel quite sorry for you.

This topic is solved, and i will lock it down.

Renegd98

Quote from: Moto on April 27, 2009, 04:22:07 PM
Quote from: Zetan on April 27, 2009, 04:06:30 PM
Quote from: Moto on April 27, 2009, 03:57:54 PM
Quote from: Zetan on April 27, 2009, 11:55:39 AM
I think you should be asking this at DZinerStudio as it's their theme and their Team Page script.
so since its to do with tinyportal,here i am..

lol.. The only thing to do with TP is the Article it's in.
Ok ,so your another one that likes the title of "Support" but just posts useless argumentative posts instead of actually helping. :idiot2:
Anyhow ive it fixed myself...
Moto, you have no idea what he does, has done or will do in the future.  Zetan provides great support to many TP users, yet because he stated your issue is with the script and not TP peculiar you decide to run off at the mouth. How much support help do you believe that will get you in the future?

Zetan

I will answer this.. my Support title is totally irrelevant.

You are using a theme from Dziner Studio.. So is my site. You are using a script that was originally written for TinyPortal. The team at DZinerStudio have adapted (changed) it to suit their needs/site. People asked.. "Hey, where can I get your great team page"?.. You are using that adapted script for your site.. therefore, the best place to now ask for support for the changes that DZinerStudio have made.. is DZinerStudio.


Topic Unlocked.




Moto

QuoteMoto, you have no idea what he does, has done or will do in the future.  Zetan provides great support to many TP users, yet because he stated your issue is with the script and not TP peculiar you decide to run off at the mouth. How much support help do you believe that will get you in the future?

Well if thats the way you work around here than probably no help..lmao

You guys get very easily offended dont you?

I meant no harm to Zetan and i appologise to him...

as this topic is solved maybe it should stay locked,unless anyone else wants to get there post count up...

G6Cad

Yes, thats the way we work here, we dont support whats not ours if we dont want to, and thats it, if you cant live with that, then sorry for you then.

OH, 1 up in post count  ;D

Inny

This kind of topic exists both here and Dzinerstudio.

As far as i know Bikken has the exact code hes using in Dzinerstudio forums, only thing you had to do is to play a bit with CSS values.


Moto

Quote from: Inny on April 28, 2009, 12:56:33 PM
This kind of topic exists both here and Dzinerstudio.

As far as i know Bikken has the exact code hes using in Dzinerstudio forums, only thing you had to do is to play a bit with CSS values.


Who pulled your strings..??
If you bothered reading this stupid out of control thread ,youd know its been sorted...

Inny

Quote from: Moto on April 28, 2009, 03:47:21 PM
Who pulled your strings..??

Control Anger before it controls you

Read carefully the above topic as you had to do with both of those TeamPage topics that exist in these forums.

Zetan

Okay guys. I'm all for a discussion, but I'm not about to let it turn into f'arting contest.

Topic locked.