Im looking around but i cant seem to find a working roaster member list code. i was wondering if anyone has one? :P
thanks :smitten:
There are working Team Page code snippets in the block code snippets board, if that is what you are talking about. Of course whether they are working or not depends on what version of SMF and/or TP you are using. One that works great on SMF 1.1.x and TP versions prior to the latest may not work at all for the new versions.
ZarPrime
i know there is one for 1.1.x, which is what i used. but i need something for rc3 with current tp.
also ZP do you know if there is a code for scrolling news or something of that nature? by scrolling news i mean with image and code at the bottom like is used in Joolma.
I was wondering if A) we can some how put images to news, and B) can we make the news scroll?
basically looking for something found in mmorpg.com or fileplanet.com where you see and image, text at the bottom and it changes
(https://www.tinyportal.net/proxy.php?request=http%3A%2F%2Fimg8.imageshack.us%2Fimg8%2F4783%2F32080250.png&hash=ddc682f8584ad2f6b6f126431d118a82c1ea4396)
thanks ;D
Can you post the code for the Roster you were using and I will see if I can get it working in SMF 2.
http://www.tinyportal.net/index.php?topic=5423.msg44257#msg44257
thanks freddy
Not really sure how this is supposed to function, there's things like Xfire in there and I don't know why.
Here's the converted code anyway, see what you think :
global $db_prefix, $scripturl, $txt, $user_info,$settings, $modSettings;
$groups = '';
//Does all the real work here for showing groups.
$query = tp_query("SELECT id_group, group_name, min_posts, online_color
FROM {$db_prefix}membergroups WHERE group_name = 'General'
ORDER BY group_name", __FILE__, __LINE__);
while ($row = mysql_fetch_assoc($query))
{
$groups[$row['id_group']] = array(
'id' => $row['id_group'],
'name' => $row['group_name'],
'color' => empty($row['online_color']) ? '' : $row['online_color'],
);
}
tpdb_free_result($query);
foreach ($groups as $id => $data)
{
//Now get all the user's
$query2 = tp_query("SELECT id_group, id_member, real_name, usertitle, email_address, hide_email, last_login, location, personal_text, total_time_logged_in, date_registered, icq, aim, yim, msn
FROM {$db_prefix}members WHERE id_group = " . $data['id'] . " ", __FILE__, __LINE__);
if(mysql_affected_rows() != 0)
{
echo '<table border="0" cellspacing="1" cellpadding="4" align="center" width="100%" class="bordercolor">
<tr><td colspan="12" class="titlebg">
<font size="4" face="verdana"><b>[GeN] : ' . $data['name'] . '</b></font></td></tr><tr><td rowspan="70" width="75" class="windowbg" valign="top"><br><center><img src="http://www.the-rota.com/Themes/Sullen_Madness/images/medium/rank_21.png"></center></td>';
echo '';
echo '<td class="catbg2" width="280">Alias</td>';
echo '<td class="catbg2" width="100">Name</td>';
echo '<td class="catbg2" width="145">Location</td>';
echo '<td class="catbg2" width="255">Last Active</td>';
echo '<td class="catbg2" width="155">Contact</td>';
echo '</tr><tr>';
while ($row2 = mysql_fetch_assoc($query2))
{
echo '<td class="windowbg" height="40"><a href="' . $scripturl . '?action=profile;u=' . $row2['id_member'] . '">~RoTa~ <b><font color="' . $data['color'] . '" size="3" face="verdana">' . $row2['real_name'] . '</b></font> [GeN]</font></a><br><font size="1"> ' . $row2['personal_text'] . '</font></a><td class="windowbg">' . $row2['usertitle'] . '</td>';
echo '<td class="windowbg">' . $row2['location'] . '</td>';
echo '<td class="windowbg">' . timeformat($row2['last_login']) . '</td>';
//echo '<td class="windowbg">' . timeformat($row2['dateRegistered']) . '</td>';
echo '<td class="windowbg">';
//Send email row
if($row2['hide_email'] == 0)
echo '<a href="mailto:', $row2['email_address'], '"><img src="' . $settings['images_url'] . '/email_sm.gif" alt="email" /></a> ';
if($row2['icq'] != '')
echo '<a href="http://www.icq.com/whitepages/about_me.php?uin=' . $row2['icq'] . '" target="_blank"><img src="http://status.icq.com/online.gif?img=5&icq=' . $row2['icq'] . '" alt="' . $row2['icq'] . '" width="18" height="18" border="0" /></a> ';
if($row2['aim'] != '')
echo '<a href="aim:goim?screenname=' . urlencode(strtr($row2['aim'], array(' ' => '%20'))) . '&message=' . $txt['aim_default_message'] . '"><img src="' . $settings['images_url'] . '/aim.gif" alt="' . $row2['aim'] . '" border="0" /></a> ';
if($row2['yim'] != '')
echo '<a href="http://edit.yahoo.com/config/send_webmesg?.target=' . urlencode($row2['yim']) . '"><img src="http://opi.yahoo.com/online?u=' . urlencode($row2['yim']) . '&m=g&t=0" alt="' . $row2['yim'] . '" border="0" /></a> ';
if($row2['msn'] != '')
echo '<a href="http://members.msn.com/' . $row2['msn'] . '" target="_blank"><img src="' . $settings['images_url'] . '/msntalk.gif" alt="' . $row2['msn'] . '" border="0" /></a> ';
if (!empty($message['member']['options']['Xfire']))
echo '<a href="http://www.xfire.com/xf/modules.php?name=XFire&file=profile&uname=', $message['member']['options']['Xfire'], '" target="_blank"><img border="0" src="' . $settings['images_url'] . '/Xfire.gif"></a>';
//Send PM row
echo '<a href="' . $scripturl . '?action=pm;sa=send;u=' . $row2['id_member'] . '"><img src="' . $settings['images_url'] . '/im_on.gif" alt="email" /></a></a>';
echo '</td>';
echo '</tr>';
}
echo '</table>';
}
}
echo'<br>';
From the original thread it looks like they were doing multiple copies of the same code to do each member group. This is initially set to look for the member group called 'General' so I left it like that.
Also it is getting the image of stars from the original authors site, so you would likely want to change that.
On that other question about the images, you need to be looking around the web for javascript image galleries and sliders. There are loads of them, here's one example that is close that allows captions :
http://tutorialdog.com/javascript-image-gallery-using-mootools-part-2/
Here's another one :
http://css-tricks.com/creating-a-slick-auto-playing-featured-content-slider/
And Xarcell has some nice links here :
http://www.tinyportal.net/index.php?topic=32152.msg258235#msg258235
tyvm ill try it out :)
just where do i stick which groups i need on the llist?
Well the way it's coded you have to do it piece meal with one set of code for each group.
Look for this line near the top :
FROM {$db_prefix}membergroups WHERE group_name = 'General'
So you would want to replace "General" with whatever names your groups are.
it adds some stuff from another site
global $db_prefix, $scripturl, $txt, $settings, $options;
// These must be in the order you wish them to print out on your roster.
// VERY IMPORTANT!!!! -- they must be exactly the same as the group names in the database, including
// capitalization and spaces.
$rankorder = array(
'Council Elder',
'Council Member',
'Dragox Coder',
'Dragoon',
'Xuardian',
'DraX',
'Hatchling',
);
$groups = '';
//Does all the real work here for showing groups.
$query = db_query("SELECT ID_GROUP, groupName, onlineColor, stars
FROM {$db_prefix}membergroups", __FILE__, __LINE__);
while ($row = mysql_fetch_assoc($query))
{
$groups[$row['groupName']] = array(
'id' => $row['ID_GROUP'],
'color' => empty($row['onlineColor']) ? '' : $row['onlineColor'],
'stars' => empty($row['stars']) ? '' : substr($row['stars'],2),
);
}
mysql_free_result($query);
foreach ($rankorder as $rank)
{
//Now get all the users
$query2 = db_query("
SELECT ID_GROUP, ID_MEMBER, realName, avatar, usertitle,
emailAddress, hideEmail, lastLogin, location, personalText,
totalTimeLoggedIn, dateRegistered, ICQ, AIM, YIM, MSN,
hideEmail, emailAddress
FROM {$db_prefix}members
WHERE ID_GROUP = '" . $groups[$rank]['id'] . "' ", __FILE__, __LINE__);
if(db_affected_rows() != 0)
{
echo '<table border="0" cellspacing="1" cellpadding="5" align="center" class="bordercolor">
<tr><td colspan="7" class="catbg"><font size="3" color="' . $groups[$rank]['color'] . '""><b>' . $rank . '</b></font></td></tr>
<tr><td rowspan="70" width="85" class="profilebg" valign="top">
<center><img src="' . $settings['images_url'] . '/' . $groups[$rank]['stars'] . '">
<br>
<img src="/images/custom/r2/' . $rank . '.png">
</center></td>';
echo '<td class="catinfo" width="270"><b><center>User Name</center></b></td>';
echo '<td class="catinfo" width="170"><b><center>Last Online</center></b></td>';
echo '<td class="catinfo" width="100"><b><center>Awards</center></b></td>';
echo '<td class="catinfo" width="175"><b><center>Contact</center></b></td></tr><tr>';
while ($row2 = mysql_fetch_assoc($query2))
{
echo '<td class="windowbg2"><center><font size="2"> ' . '<a href="' . $scripturl . '?action=profile;u=' . $row2['ID_MEMBER'] . '"><font color="' . $groups[$rank]['color'] . '"">' . $row2['realName'] . '</b></center></font></a></td></td>';
echo '<td class="windowbg">' . timeformat($row2['lastLogin']) . '</td>';
echo '<td class="windowbg2" align="center">';
echo '<div style="overflow: auto; width: 100%;"><a href="', $scripturl, '?action=profile;sa=awards;u=', $row2['ID_MEMBER'], '"> Members Awards</a> ', '</div><br />';
echo '</td><td class="windowbg">';
//Send email row
if($row2['hideEmail'] == 0)
echo '<a href="mailto:', $row2['emailAddress'], '"><img src="' . $settings['images_url'] . '/email_sm.gif" alt="email" /></a> ';
if($row2['ICQ'] != '')
echo '<a href="http://www.icq.com/whitepages/about_me.php?uin=' . $row2['ICQ'] . '" target="_blank"><img src="http://status.icq.com/online.gif?img=5&icq=' . $row2['ICQ'] . '" alt="' . $row2['ICQ'] . '" width="18" height="18" border="0" /></a> ';
if($row2['AIM'] != '')
echo '<a href="aim:goim?screenname=' . urlencode(strtr($row2['AIM'], array(' ' => '%20'))) . '&message=' . $txt['aim_default_message'] . '"><img src="' . $settings['images_url'] . '/aim.gif" alt="' . $row2['AIM'] . '" border="0" /></a> ';
if($row2['YIM'] != '')
echo '<a href="http://edit.yahoo.com/config/send_webmesg?.target=' . urlencode($row2['YIM']) . '"><img src="http://opi.yahoo.com/online?u=' . urlencode($row2['YIM']) . '&m=g&t=0" alt="' . $row2['YIM'] . '" border="0" /></a> ';
if($row2['MSN'] != '')
echo '<a href="http://members.msn.com/' . $row2['MSN'] . '" target="_blank"><img src="' . $settings['images_url'] . '/msntalk.gif" alt="' . $row2['MSN'] . '" border="0" /></a> ';
//Send PM row
echo '<a href="' . $scripturl . '?action=pm;sa=send;u=' . $row2['ID_MEMBER'] . '"><img src="' . $settings['images_url'] . '/im_on.gif" alt="email" /></a></a>';
echo '</td>';
echo '</tr>';
}
echo '</table><br>';
}
}
thats the exact code i used b4
I wish you had done that before I spent an hour working on the other script - I did ask. :o
Nevermind I will take a look.
Try this out. I couldn't test it properly because my forum is not set up for it. I think it should work :
global $db_prefix, $scripturl, $txt, $settings, $options;
// These must be in the order you wish them to print out on your roster.
// VERY IMPORTANT!!!! -- they must be exactly the same as the group names in the database, including
// capitalization and spaces.
$rankorder = array(
'Council Elder',
'Council Member',
'Dragox Coder',
'Dragoon',
'Xuardian',
'DraX',
'Hatchling'
);
$groups = '';
//Does all the real work here for showing groups.
$query = tp_query("
SELECT id_group, group_name, online_color, stars
FROM {$db_prefix}membergroups", __FILE__, __LINE__);
while ($row = mysql_fetch_assoc($query))
{
$groups[$row['group_name']] = array(
'id' => $row['id_group'],
'color' => empty($row['online_color']) ? '' : $row['online_color'],
'stars' => empty($row['stars']) ? '' : substr($row['stars'],2),
);
}
tpdb_free_result($query);
foreach ($rankorder as $rank)
{
//Now get all the users
$query2 = tp_query("
SELECT id_group, id_member, real_name, avatar, usertitle,
email_address, hide_email, last_login, location, personal_text,
total_time_logged_in, date_registered, icq, aim, yim, msn
FROM {$db_prefix}members
WHERE id_group = '" . $groups[$rank]['id'] . "' ", __FILE__, __LINE__);
if(mysql_affected_rows() != 0)
{
echo '<table border="0" cellspacing="1" cellpadding="5" align="center" class="bordercolor">
<tr><td colspan="7" class="catbg"><font size="3" color="' . $groups[$rank]['color'] . '""><b>' . $rank . '</b></font></td></tr>
<tr><td rowspan="70" width="85" class="profilebg" valign="top">
<center><img src="' . $settings['images_url'] . '/' . $groups[$rank]['stars'] . '">
<br>
<img src="/images/custom/r2/' . $rank . '.png">
</center></td>';
echo '<td class="catinfo" width="270"><b><center>User Name</center></b></td>';
echo '<td class="catinfo" width="170"><b><center>Last Online</center></b></td>';
echo '<td class="catinfo" width="100"><b><center>Awards</center></b></td>';
echo '<td class="catinfo" width="175"><b><center>Contact</center></b></td></tr><tr>';
while ($row2 = mysql_fetch_assoc($query2))
{
echo '<td class="windowbg2"><center><font size="2"> ' . '<a href="' . $scripturl . '?action=profile;u=' . $row2['id_member'] . '"><font color="' . $groups[$rank]['color'] . '"">' . $row2['real_name'] . '</b></center></font></a></td></td>';
echo '<td class="windowbg">' . timeformat($row2['last_login']) . '</td>';
echo '<td class="windowbg2" align="center">';
echo '<div style="overflow: auto; width: 100%;"><a href="', $scripturl, '?action=profile;sa=awards;u=', $row2['id_member'], '"> Members Awards</a> ', '</div><br />';
echo '</td><td class="windowbg">';
//Send email row
if($row2['hide_email'] == 0)
echo '<a href="mailto:', $row2['email_address'], '"><img src="' . $settings['images_url'] . '/email_sm.gif" alt="email" /></a> ';
if($row2['icq'] != '')
echo '<a href="http://www.icq.com/whitepages/about_me.php?uin=' . $row2['icq'] . '" target="_blank"><img src="http://status.icq.com/online.gif?img=5&icq=' . $row2['icq'] . '" alt="' . $row2['icq'] . '" width="18" height="18" border="0" /></a> ';
if($row2['aim'] != '')
echo '<a href="aim:goim?screenname=' . urlencode(strtr($row2['aim'], array(' ' => '%20'))) . '&message=' . $txt['aim_default_message'] . '"><img src="' . $settings['images_url'] . '/aim.gif" alt="' . $row2['aim'] . '" border="0" /></a> ';
if($row2['yim'] != '')
echo '<a href="http://edit.yahoo.com/config/send_webmesg?.target=' . urlencode($row2['yim']) . '"><img src="http://opi.yahoo.com/online?u=' . urlencode($row2['yim']) . '&m=g&t=0" alt="' . $row2['yim'] . '" border="0" /></a> ';
if($row2['msn'] != '')
echo '<a href="http://members.msn.com/' . $row2['msn'] . '" target="_blank"><img src="' . $settings['images_url'] . '/msntalk.gif" alt="' . $row2['msn'] . '" border="0" /></a> ';
//Send PM row
echo '<a href="' . $scripturl . '?action=pm;sa=send;u=' . $row2['id_member'] . '"><img src="' . $settings['images_url'] . '/im_on.gif" alt="email" /></a></a>';
echo '</td>';
echo '</tr>';
}
echo '</table><br>';
}
}
thanks and sorry. a co-admin saved it and i didnt know until i started testing yours :/
Sweet works great!
No problemo and glad it works :)