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

New built in translations for six langauges! by EzPortal
March 26, 2024, 11:15:32 pm

Smiley missing in shoutbox 2.1.4 by hustreamload
July 26, 2023, 08:14:02 am

Re: Theme Select Box question? by Shades
March 15, 2023, 06:49:49 pm

Re: Theme Select Box question? by Shades
March 09, 2023, 02:09:24 pm

Re: Theme Select Box question? by Shades
March 09, 2023, 01:55:53 pm

Re: Theme Select Box question? by EzPortal
March 09, 2023, 01:47:42 pm

Re: Theme Select Box question? by Shades
March 09, 2023, 01:34:07 pm

Re: Theme Select Box question? by EzPortal
March 09, 2023, 12:20:17 pm

+- HTML Menu


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

Recent Topics ezBlock

New built in translations for six langauges! by EzPortal
March 26, 2024, 11:15:32 pm

Smiley missing in shoutbox 2.1.4 by hustreamload
July 26, 2023, 08:14:02 am

Theme Select Box question? by Shades
March 15, 2023, 06:49:49 pm

Where is the facebook button color? by EzPortal
February 28, 2023, 06:45:09 pm

Display on Mobile - SMF 2.1.3 and EZ 5.5.2 by BugginIn
December 29, 2022, 04:07:13 pm

Blocks Help by Riggs1973
November 20, 2022, 12:59:30 pm

Surface ol lite theme release Free! by Steffen K.
November 18, 2022, 03:57:24 am

Undefined index: href by EzPortal
October 04, 2022, 08:49:59 pm

SMF-ezportal_column_5.cache): failed to open stream: No such file or directory by EzPortal
June 04, 2022, 11:40:13 am

Arcade block error: failed to open stream: No such file or directory by Shades
May 20, 2022, 02:47:13 pm

Author Topic: ezBlock for Staff... or other group  (Read 20203 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: 1299
  • Karma: 67
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: 1299
  • Karma: 67
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
6271 Views
Last post January 18, 2009, 03:19:32 pm
by EzPortal
7 Replies
10708 Views
Last post February 16, 2009, 03:52:14 am
by rockas
1 Replies
6005 Views
Last post February 22, 2009, 09:54:37 pm
by EzPortal
0 Replies
5804 Views
Last post July 11, 2009, 03:29:50 pm
by YM
1 Replies
10815 Views
Last post November 08, 2014, 11:47:54 am
by Maxx

+-SMF Gallery

Quick Menu


Powered by EzPortal