EzPortal - Portal Software for Forums

EzPortal - Made to Fit Your SMF Forum - Glad You Found Us!
+- +-

UserBox

Welcome, Guest.
Please login or register.
 
 
 
Forgot your password?

+- Recent Posts

Re: Converting to HTTPS by EzPortal
September 24, 2017, 07:11:26 pm

Converting to HTTPS by Padisha
September 24, 2017, 12:22:45 pm

Re: Mobile Only Blocks by EzPortal
September 23, 2017, 03:15:10 pm

Re: Mobile Only Blocks by morenos
September 23, 2017, 12:04:30 pm

Re: Members online block not displaying. by EzPortal
September 19, 2017, 12:02:55 pm

Re: Members online block not displaying. by Kocsis
September 19, 2017, 12:29:13 am

Re: EZPoll block by Julian
August 17, 2017, 03:43:31 am

Re: EZPoll block by EzPortal
August 16, 2017, 12:37:26 pm

+- HTML Menu


Sample HTML Block Usage - You May Custom Code it, as needed!

Author Topic: ezBlock for Staff... or other group  (Read 13654 times)

0 Members and 1 Guest are viewing this topic.

Offline npereira

  • Posts: 7
  • Karma: 0
  • Gender: Male
ezBlock for Staff... or other group
« 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.

Offline npereira

  • Posts: 7
  • Karma: 0
  • Gender: Male
Re: ezBlock for Staff... or other group
« Reply #1 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> ';


Offline npereira

  • Posts: 7
  • Karma: 0
  • Gender: Male
Re: ezBlock for Staff... or other group
« Reply #2 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.

Offline npereira

  • Posts: 7
  • Karma: 0
  • Gender: Male
Re: ezBlock for Staff... or other group
« Reply #3 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");

Offline computel

  • Posts: 20
  • Karma: 0
  • Gender: Male
Re: ezBlock for Staff... or other group
« Reply #4 on: September 20, 2009, 07:33:52 pm »
How can I get this to work on SMF 1.1.10?

Thanks

Offline FireDitto

  • Posts: 37
  • Karma: 0
  • Gender: Female
Re: ezBlock for Staff... or other group
« Reply #5 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

Offline EzPortal

  • Administrator
  • *****
  • Posts: 1159
  • Karma: 63
Re: ezBlock for Staff... or other group
« Reply #6 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.

Offline FireDitto

  • Posts: 37
  • Karma: 0
  • Gender: Female
Re: ezBlock for Staff... or other group
« Reply #7 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]. =)

Offline Vertigo

  • Posts: 7
  • Karma: 0
Re: ezBlock for Staff... or other group
« Reply #8 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)

Offline napat

  • Posts: 1
  • Karma: 0
Re: ezBlock for Staff... or other group
« Reply #9 on: November 03, 2010, 05:17:12 am »
good code

Offline zerah98

  • Posts: 1
  • Karma: 0
Re: ezBlock for Staff... or other group
« Reply #10 on: November 05, 2010, 09:41:24 am »
Thanks for this code. ;)

Offline landyvlad

  • Newbie
  • *
  • Posts: 16
  • Karma: 0
Re: ezBlock for Staff... or other group
« Reply #11 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?

Offline EzPortal

  • Administrator
  • *****
  • Posts: 1159
  • Karma: 63
Re: ezBlock for Staff... or other group
« Reply #12 on: February 08, 2017, 09:58:10 pm »
No it did not.

 

Related Topics

  Subject / Started by Replies Last post
1 Replies
3503 Views
Last post January 18, 2009, 03:19:32 pm
by EzPortal
7 Replies
5686 Views
Last post February 16, 2009, 03:52:14 am
by rockas
1 Replies
3297 Views
Last post February 22, 2009, 09:54:37 pm
by EzPortal
0 Replies
3100 Views
Last post July 11, 2009, 03:29:50 pm
by YM
1 Replies
5941 Views
Last post November 08, 2014, 11:47:54 am
by Maxx

+-SMF Gallery

Quick Menu








Members Online

26 Guests, 1 User
naughty_gurl
Powered by EzPortal