EzPortal - Portal Software for Forums

EzPortal Forums => ezBlocks => Topic started by: npereira on July 15, 2009, 07:40:19 am

Title: ezBlock for Staff... or other group
Post by: npereira on July 15, 2009, 07:40:19 am
Hi,

How can I show, in an ezblock, members of a specific group? Like for instance, the moderators...

Please advise.
Title: Re: ezBlock for Staff... or other group
Post by: npereira on July 15, 2009, 12:12:48 pm
After doing some coding with the help of guys from the SMF coding, here is the final code you can add to a php block to show, in my case, members of the id_group = 37 which is my supporters.

This ONLY works in SMF 2.0 with EZportal.

If this could be put in as a exblock, that would be awsome..

Code: [Select]
echo'<p><b>Here is a list of the Supporters of the site for 2009</b>:</p>';
echo '<p align="center">';
echo '<img src="/Themes/default/images/dollar.gif"><img src="/Themes/default/images/dollar.gif"><img src="/Themes/default/images/dollar.gif"><img src="/Themes/default/images/dollar.gif"><img src="/Themes/default/images/dollar.gif"><img src="/Themes/default/images/dollar.gif"></p><p align="center">';
global $db_prefix, $scripturl, $smcFunc;
$request = $smcFunc['db_query']('', '
                SELECT id_member, real_name
                FROM smf_members
                WHERE id_group = 37
                ORDER BY real_name',array());
while ($row = $smcFunc['db_fetch_assoc']($request))
  echo '  <a href="'.$scripturl.'?action=profile;u='.$row['id_member'].'">'.$row['real_name'].'</a>,<br>  ';
echo ' </P> ';

Title: Re: ezBlock for Staff... or other group
Post by: npereira on July 15, 2009, 12:17:08 pm
You can also do it as a php block with the SSI functions for ease of use:

Code: [Select]
echo '<center>';
ssi_fetchGroupMembers(37);
echo'</center>';

Although this code will put it in a list with alot more info like there tag lines, there avatars, and more...

That's why i used the above more flexible code and set it up only to show the members realname.
Title: Re: ezBlock for Staff... or other group
Post by: npereira on July 15, 2009, 12:20:00 pm
you also may need the bellow line at the top of the code if you have no other php block in that section...
this is a bug in ezportal i think...
Code: [Select]
require("/home/ottmoto/public_html/SSI.php");
Title: Re: ezBlock for Staff... or other group
Post by: computel on September 20, 2009, 07:33:52 pm
How can I get this to work on SMF 1.1.10?

Thanks
Title: Re: ezBlock for Staff... or other group
Post by: FireDitto on September 21, 2009, 02:13:31 am
After doing some coding with the help of guys from the SMF coding, here is the final code you can add to a php block to show, in my case, members of the id_group = 37 which is my supporters.

This ONLY works in SMF 2.0 with EZportal.

If this could be put in as a exblock, that would be awsome..

Code: [Select]
echo'<p><b>Here is a list of the Supporters of the site for 2009</b>:</p>';
echo '<p align="center">';
echo '<img src="/Themes/default/images/dollar.gif"><img src="/Themes/default/images/dollar.gif"><img src="/Themes/default/images/dollar.gif"><img src="/Themes/default/images/dollar.gif"><img src="/Themes/default/images/dollar.gif"><img src="/Themes/default/images/dollar.gif"></p><p align="center">';
global $db_prefix, $scripturl, $smcFunc;
$request = $smcFunc['db_query']('', '
                SELECT id_member, real_name
                FROM smf_members
                WHERE id_group = 37
                ORDER BY real_name',array());
while ($row = $smcFunc['db_fetch_assoc']($request))
  echo '  <a href="'.$scripturl.'?action=profile;u='.$row['id_member'].'">'.$row['real_name'].'</a>,<br>  ';
echo ' </P> ';



>_> I get this in the block:

Quote
Database Error
Table 'dsrpg_1.smf_members' doesn't exist
File: ... /rpgs/forum/Sources/Load.php(2184) : eval()'d code(1393) : eval()'d code
Line: 9
Title: Re: ezBlock for Staff... or other group
Post by: EzPortal on September 24, 2009, 05:18:06 pm
I was thinking about adding a Staff EzBlock to the next release if it would be of use to people.
Title: Re: ezBlock for Staff... or other group
Post by: FireDitto on September 25, 2009, 11:18:14 pm
I personally would find it very useful, especially if you could choose from any existing member group.

Setting up an RPG, so I'd love to be able to put on display, for example, the leading members of a selected area [eg, King & Queen of Kingdomland]. =)
Title: Re: ezBlock for Staff... or other group
Post by: Vertigo on September 25, 2010, 02:23:17 pm
Sorry for revive this topic, but this is very useful and i want to know if this was added to new version of ezportal or have ony other way to do it

(bad english :P)
Title: Re: ezBlock for Staff... or other group
Post by: napat on November 03, 2010, 05:17:12 am
good code
Title: Re: ezBlock for Staff... or other group
Post by: zerah98 on November 05, 2010, 09:41:24 am
Thanks for this code. ;)
Title: Re: ezBlock for Staff... or other group
Post by: landyvlad on February 08, 2017, 09:44:35 pm
I was thinking about adding a Staff EzBlock to the next release if it would be of use to people.

Did this happen?
Title: Re: ezBlock for Staff... or other group
Post by: EzPortal on February 08, 2017, 09:58:10 pm
No it did not.