collapse

* Simple Portal Archived Forum

This is an Archive Forum.

The content in this forum may be out-of-date or have been superseded by newer information, and links in forum pages to other sites may not work.
This forum contains archives for future reference.

Visit our thread at Simple Machines Forum for current support.

SMF 2.1 users: EhPortal is a ported version of Simple Portal specifically designed for the SMF 2.1 branch.
Please visit web-develop.ca to download EhPortal and for its support.

* User Info

 
 
Welcome, Guest. Please login or register.

* Who's Online

  • Dot Guests: 392
  • Dot Hidden: 0
  • Dot Users: 0

There aren't any users online.

* Shoutbox

Refresh History
  • Shoutbox is not for support!
  • {OCS}MasterSeal: Yup, Still adore SP
    April 21, 2019, 07:08:06 PM
  • {OCS}MasterSeal: STILL love SP :)
    November 24, 2018, 05:05:50 AM
  • ♦ Ninja ZX-10RR ♦: <3 aegersz
    September 13, 2018, 03:36:09 PM
  • aegersz: I STILL <3 LOVE SimplePortal
    September 13, 2018, 07:11:39 AM
  • aegersz: o LOVE you guys - Simple Portal rocks !
    May 09, 2018, 05:18:59 AM
  • Chen Zhen: our apologies for the site being down.. please read server issues topic
    March 22, 2018, 05:32:38 AM
  • {OCS}MasterSeal: LOL PLEASE forget I just posted that. I found the answer in my own dang post back in 2015. lol sorry!
    July 04, 2017, 10:47:55 PM
  • {OCS}MasterSeal: I know this SB isnt' for support, but I just have a general question. Who would I contact to find out where SP stores its block info? Is it DB driven or files? I searched the site but came up with nothing. probably my fault any insight is appreciated.
    July 04, 2017, 10:43:36 PM
  • ♦ Ninja ZX-10RR ♦: Excuse me but what does Simpleportal have to deal with that?
    February 05, 2017, 08:21:14 PM
  • WhiteEagle: of course IMHO that site appears to be dead :(
    February 04, 2017, 01:08:05 PM
  • WhiteEagle: If I can get that, then I'll use it for that site...
    February 04, 2017, 01:07:35 PM
  • WhiteEagle: decided to not use SMF for any projects, unless I can get a copy of the premium version of the fanfiction archive plugin
    February 04, 2017, 01:06:54 PM
  • expertdecisions: cloudflare
    January 28, 2017, 08:01:47 AM
  • aegersz: SM release 2.0.13 !
    January 12, 2017, 06:00:13 AM
  • raffo: Tks Emanuele, even if I didn't understand the fix :D
    November 07, 2016, 02:01:20 AM
  • emanuele: [link]
    November 01, 2016, 12:43:50 PM
  • emanuele: raffo: the English support board is a good place. ;)
    November 01, 2016, 12:43:38 PM
  • raffo: Where can I find the fix for the shoutbox?
    November 01, 2016, 05:06:09 AM
  • {OCS}MasterSeal: To the SP team, I make a point to come here and thank you as much as possible for your work.  so again, THANK YOU!
    October 28, 2016, 10:38:05 AM
  • emanuele: That's indeed funny, the limit is present only in the patch and not the full install.
    October 22, 2016, 06:14:58 PM

* Recent Posts

Adding Forums Button to Nav bar by jirapon
[August 01, 2019, 09:07:12 AM]


Re: Board Icons by ♦ Ninja ZX-10RR ♦
[July 30, 2019, 04:03:41 PM]


MOVED: Czech translation???? by ♦ Ninja ZX-10RR ♦
[July 30, 2019, 03:04:51 PM]


Board Icons by jirapon
[July 30, 2019, 07:28:44 AM]


Re: Thankyou Simpleportal, by ♦ Ninja ZX-10RR ♦
[July 29, 2019, 09:41:29 AM]

Blocks speak! Do you have an interest in getting more blocks - or even making your own? The Blocks Board is for you!

Author Topic: Team Page help...  (Read 4863 times)

0 Members and 1 Guest are viewing this topic.

Offline codnerd

  • Semi Newbie
  • *
  • Posts: 25
  • SMF Version: 2 RC1
  • SP Version: 2.2
Team Page help...
« on: April 17, 2009, 05:14:48 AM »
I made a post on Dziner Studio regarding the Team Page they have.

I have the team page source from the person who made it, but when I put it on and try to go to it, I get a "could not load Database query" error.

They said to come to you to find out how to intergrate it into SP or to make it just standalone.

Code: [Select]
<?php 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);
/////////////////////////////////////////////////////////////////
$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 DS Team!</h2>
<span class="middletext">These are the people you will run into while visiting dzinerstudio.com.</span><br /><br />
</td></tr></table>';


$loaded_ids = array();
    $user_profile=array();
    $memberContext=array();
    $profile=array();
    $context['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['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" style="margin-top: 10px;"><tr>';

    $newrow=0;
foreach($context['team'] as $team)
        {
            echo '
<td valign="top" align="right" width="5%">'.$team['avatar']['image'].'</td>
<td valign="top" width="45%" class="windowbg3 team" style="padding: 5px;">
<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 />' , '

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

?>

Please help me make this into a standalone page... :)

Here is my Dziner Studio post.

Offline [SiNaN]

  • Mr. SimplePortal
  • Developer
  • *
  • Posts: 6782
  • SMF Version: 2.0.15
  • SP Version: 2.3.7
Re: Team Page help...
« Reply #1 on: May 03, 2009, 08:32:23 AM »
You have to use Custom Action mod for that. SP doesn't support such pages yet. However, it will soon.
And slowly, you come to realize... It's all as it should be...

Offline Mick.

  • Comrade
  • *
  • Posts: 77
  • Gender: Male
  • Premium SMF Themes
    • idesignSMF
  • SMF Version: 2.0.15
  • SP Version: 2.3.7
Re: Team Page help...
« Reply #2 on: November 09, 2009, 10:53:26 PM »
Hey guys,   any word on this?

Offline ccbtimewiz

  • Hero Member
  • *****
  • Posts: 2185
  • Gender: Male
  • $("div.content:dd").hide();
  • SMF Version: None
  • SP Version: None
  • Elkarte Version: None
  • EhPortal Version: None
Re: Team Page help...
« Reply #3 on: November 09, 2009, 10:59:09 PM »
Yes, CoDNerd ended up using my team page modification.

You can see it here: http://customcod.com/community/index.php?action=teampage

And download it from my site.
« Last Edit: November 09, 2009, 11:02:59 PM by ccbtimewiz »

Offline JOKES

  • Semi Newbie
  • *
  • Posts: 10
  • SMF Version: 1.1.12
  • SP Version: 2.3.3
Re: Team Page help...
« Reply #4 on: November 29, 2009, 12:38:57 AM »
i think i messed up with manage team page. i got this error ....

Wrong value type sent to the database. Array of integers expected. (groups)

how do i fix it? i try to reinstalling it and it didnt work. I filled it out wrong i think lol :P

please help some ;D

Offline ccbtimewiz

  • Hero Member
  • *****
  • Posts: 2185
  • Gender: Male
  • $("div.content:dd").hide();
  • SMF Version: None
  • SP Version: None
  • Elkarte Version: None
  • EhPortal Version: None
Re: Team Page help...
« Reply #5 on: November 29, 2009, 02:26:25 PM »
Known issue, you're probably using an older version of it.

You will need to forcefully clean up the fields in the database.

Offline JOKES

  • Semi Newbie
  • *
  • Posts: 10
  • SMF Version: 1.1.12
  • SP Version: 2.3.3
Re: Team Page help...
« Reply #6 on: November 29, 2009, 10:04:40 PM »
this is the error page  cod 109 line 109

89:     

   

// Combining both together to make it easier on the call.
90:    

   

$include_groups = array_merge_recursive($left_sort, $right_sort, $bottom_sort);
91:    
92:    

   

// No groups defined? Diasterific. If the user is an admin, redirect them to the page to set it up.
93:    

   

if (empty($include_groups) && $context['user']['is_admin'])
94:    

   

   

redirectexit('action=teampage;sa=manage');
95:    
96:    

   

// Else, send them back to the forums, foo.
97:    

   

else if (empty($include_groups))
98:    

   

   

redirectexit();
99:    
100:    

   

// Grab the groups that were defined.
101:    

   

$query_groups = $smcFunc['db_query']('', '
102:    

   

   

SELECT mg.id_group, mg.group_name, mg.online_color, mg.stars
103:    

   

   

FROM {db_prefix}membergroups AS mg
104:    

   

   

WHERE mg.id_group IN ({array_int:groups})
105:    

   

   

ORDER BY mg.id_group ASC',
106:    

   

   

array(
107:    

   

   

   

'groups' => $include_groups,
108:    

   

   

)
==>109:    

   

);
110:    
111:    

   

// Parameters for the avatars.
112:    

   

if ($modSettings['avatar_action_too_large'] == 'option_html_resize' || $modSettings['avatar_action_too_large'] == 'option_js_resize')
113:    

   

{
114:    

   

   

$avatar_width = !empty($modSettings['avatar_max_width_external']) ? ' width="' . $modSettings['avatar_max_width_external'] . '"' : '';
115:    

   

   

$avatar_height = !empty($modSettings['avatar_max_height_external']) ? ' height="' . $modSettings['avatar_max_height_external'] . '"' : '';
116:    

   

}
117:    

   

else
118:    

   

{
119:    

   

   

$avatar_width = '';
120:    

   

   

$avatar_height = '';
121:    

   

}
122:    
123:    

   

while ($row = $smcFunc['db_fetch_assoc']($query_groups))
124:    

   

{
125:    

   

   

// If the group is less than 0, they're defining either guests or all users. That's just stupid.
126:    

   

   

if ($row['id_group'] < 0)
127:    

   

   

   

fatal_lang_error('error_group_bad');
128:    

   

129:    

   

   

// A bit of a check to see if this group exists or not..





how can i clean up my database?

Offline JOKES

  • Semi Newbie
  • *
  • Posts: 10
  • SMF Version: 1.1.12
  • SP Version: 2.3.3
Re: Team Page help...
« Reply #7 on: November 30, 2009, 11:43:19 PM »
Its working now thanks for all the help :)

Offline ccbtimewiz

  • Hero Member
  • *****
  • Posts: 2185
  • Gender: Male
  • $("div.content:dd").hide();
  • SMF Version: None
  • SP Version: None
  • Elkarte Version: None
  • EhPortal Version: None
Re: Team Page help...
« Reply #8 on: December 01, 2009, 01:00:46 AM »
No problem.

Glad you got it.  8)