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: ezPortal 4.0 Released! by EzPortal
September 07, 2018, 02:44:21 pm

Re: ezPortal 4.0 Released! by JorgeAVM
September 07, 2018, 02:28:46 pm

Re: ezPortal 4.0 Released! by JorgeAVM
September 07, 2018, 02:04:13 pm

Re: ezPortal 4.0 Released! by EzPortal
September 07, 2018, 01:56:41 pm

Re: ezPortal 4.0 Released! by JorgeAVM
September 07, 2018, 01:48:49 pm

ezPortal 4.0 Released! by EzPortal
August 13, 2018, 02:27:14 pm

Re: How to add pictures on recent post ezportal front page by Botango23
June 30, 2018, 03:38:18 am

Re: How to add pictures on recent post ezportal front page by EzPortal
June 29, 2018, 06:21:42 pm

+- HTML Menu


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

Author Topic: ezBlock for Staff... or other group  (Read 14579 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: 1181
  • Karma: 64
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.
Like ezPortal? Support me at https://www.patreon.com/vbgamer45/

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: 1181
  • Karma: 64
Re: ezBlock for Staff... or other group
« Reply #12 on: February 08, 2017, 09:58:10 pm »
No it did not.
Like ezPortal? Support me at https://www.patreon.com/vbgamer45/

 

Related Topics

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

+-SMF Gallery

Quick Menu








Members Online

21 Guests, 0 Users
Powered by EzPortal