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

Recent

Welcome to TinyPortal. Please login or sign up.

Members
  • Total Members: 3,966
  • Latest: safir45
Stats
  • Total Posts: 195,989
  • Total Topics: 21,322
  • Online today: 1,228
  • Online ever: 8,223 (February 19, 2025, 04:35:35 AM)
Users Online
  • Users: 0
  • Guests: 942
  • Total: 942

Link, Teampage and Gallery Module

Started by Inflame, December 17, 2006, 07:12:31 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.


tossican

Quote from: brianjw on January 12, 2007, 09:16:18 PM
As for the TeamPage.
...
I have a whole topic on this on my site here
...
Brianjw :) (hope this helps ;))

I hope it does too :) .. Seems your site requires not only registration to view said topic, but also your personal approval *Chuckles* .. So I look forward to your acceptance email.

-- Tossi

brianjw

Quote from: tossican on February 20, 2007, 08:39:06 AM
Quote from: brianjw on January 12, 2007, 09:16:18 PM
As for the TeamPage.
...
I have a whole topic on this on my site here
...
Brianjw :) (hope this helps ;))

I hope it does too :) .. Seems your site requires not only registration to view said topic, but also your personal approval *Chuckles* .. So I look forward to your acceptance email.

-- Tossi
WHOOPS! I did get your approval message but i hit reject because i have a rule that i have to know them from another website or i know them as friends.. :-\
You can either register again and I will approve it or you can just login with the following info:

USERNAME: test
PASSWORD: test

Brianjw

tossican

Quote from: brianjw on February 20, 2007, 11:53:34 PM
WHOOPS! I did get your approval message but i hit reject because i have a rule that i have to know them from another website or i know them as friends.. :-\
You can either register again and I will approve it or you can just login with the following info:

USERNAME: test
PASSWORD: test

Brianjw

Ah! That's what the username and password were for :P .. Thanks much! .. I appreciate the look at the code :) .. Unfortunately it wasn't what I was hoping it'd be *chuckles* so now I guess I get to ask for what I want elsewhere on this site.

-- Tossi

brianjw

Quote from: tossican on February 21, 2007, 01:21:55 AM
Quote from: brianjw on February 20, 2007, 11:53:34 PM
WHOOPS! I did get your approval message but i hit reject because i have a rule that i have to know them from another website or i know them as friends.. :-\
You can either register again and I will approve it or you can just login with the following info:

USERNAME: test
PASSWORD: test

Brianjw

Ah! That's what the username and password were for :P .. Thanks much! .. I appreciate the look at the code :) .. Unfortunately it wasn't what I was hoping it'd be *chuckles* so now I guess I get to ask for what I want elsewhere on this site.

-- Tossi
Well, im not sure if you saw the demo and the snippet to get it.
It is like the TP Team page here on this site....

DEMO: http://brianjwilson.com/index.php?action=team
GET IT: http://brianjwilson.com/index.php?topic=38.0

Remember to login with the username:
test
and the password as:
test

;)
Brianjw

tossican

Thanks again :)

I did see enough to know it's not what I was thinking of ..

I'd go into what I was hoping for, but I don't want to hi-jack the thread with something in another direction completely .. I'll do more searching of the forums tomorrow (later today), and if need be, post a new topic ... What I'm wanting, if not currently possible, would make a really nice future feature.

-- Tossi

brianjw

#16
If you are using TinyPortal (as you should if you have an account and are asking support here) then you can go to
Admin>>TinyPortal>>Article Manager
and... if you are talking about the php code i gave you on my website, then you simply create an article (by clicking Add PHP) with that php code (grouped or ungrouped) then you can save it. Then modify the options how you want them to appear and click save. ;) [Read More...]

Brianjw

Sledge HaMMeR

#17
Great site Brian. You've did some great stuff on your side-bars.
I'm trying your staff page, but i'm getting a error

Parse error: syntax error, unexpected T_STRING in /home/zmvcnl/public_html/forum/Sources/Load.php(1748) : eval()'d code(209) : eval()'d code on line 19

If i take a look in Load.php, i think it's a template-issue. But i can't find a recall in your code. Well, i'm not that kind of php-freak  :-\
If this has a simple solution, i would like your help.

Tnx in advange

edit: i'm running the latest versions. SMF 1.1.2 en TPortal 0.9.8.

brianjw

Someone else got the same error. Im so stupid. Try this code...

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,11);
/////////////////////////////////////////////////////////////////
$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 #C7A276; padding-bottom: 4px; "><h2>Meet the BWA Team</h2>
<span class="smalltext">The people you will run into while visiting brianjwilson.com.</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.realName ASC", __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="5"><tr>';

    $newrow=0;
foreach($context['TPortal']['team'] as $team)
        {
            echo '
<td valign="top">'.$team['avatar']['image'].'</td>
<td valign="top" width="50%" class="middletext" style="padding: 5px;">
<h2 style="margin-top: 0; margin-bottom: 6px;">'.$team['link'].'</h2>
<b>'.$team['groupname'].'</b><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 />' , '

' , !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>';


Brianjw
QuoteFor more support on what I am giving you as the teampage code and if you want it upfront or quickly, then you may want to join my website.

This website is proudly hosted on Crocweb Cloud Website Hosting.