collapse

* Simple Portal Archived Forum

This is an Archive Forum.

The content in this forum may be out-of-date or have been superseded by newer information, and links in forum pages to other sites may not work.
This forum contains archives for future reference.

Visit our thread at Simple Machines Forum for current support.

SMF 2.1 users: EhPortal is a ported version of Simple Portal specifically designed for the SMF 2.1 branch.
Please visit web-develop.ca to download EhPortal and for its support.

* User Info

 
 
Welcome, Guest. Please login or register.

* Who's Online

  • Dot Guests: 196
  • Dot Hidden: 0
  • Dot Users: 0

There aren't any users online.

* Shoutbox

Refresh History
  • Shoutbox is not for support!
  • {OCS}MasterSeal: Yup, Still adore SP
    April 21, 2019, 07:08:06 PM
  • {OCS}MasterSeal: STILL love SP :)
    November 24, 2018, 05:05:50 AM
  • ♦ Ninja ZX-10RR ♦: <3 aegersz
    September 13, 2018, 03:36:09 PM
  • aegersz: I STILL <3 LOVE SimplePortal
    September 13, 2018, 07:11:39 AM
  • aegersz: o LOVE you guys - Simple Portal rocks !
    May 09, 2018, 05:18:59 AM
  • Chen Zhen: our apologies for the site being down.. please read server issues topic
    March 22, 2018, 05:32:38 AM
  • {OCS}MasterSeal: LOL PLEASE forget I just posted that. I found the answer in my own dang post back in 2015. lol sorry!
    July 04, 2017, 10:47:55 PM
  • {OCS}MasterSeal: I know this SB isnt' for support, but I just have a general question. Who would I contact to find out where SP stores its block info? Is it DB driven or files? I searched the site but came up with nothing. probably my fault any insight is appreciated.
    July 04, 2017, 10:43:36 PM
  • ♦ Ninja ZX-10RR ♦: Excuse me but what does Simpleportal have to deal with that?
    February 05, 2017, 08:21:14 PM
  • WhiteEagle: of course IMHO that site appears to be dead :(
    February 04, 2017, 01:08:05 PM
  • WhiteEagle: If I can get that, then I'll use it for that site...
    February 04, 2017, 01:07:35 PM
  • WhiteEagle: decided to not use SMF for any projects, unless I can get a copy of the premium version of the fanfiction archive plugin
    February 04, 2017, 01:06:54 PM
  • expertdecisions: cloudflare
    January 28, 2017, 08:01:47 AM
  • aegersz: SM release 2.0.13 !
    January 12, 2017, 06:00:13 AM
  • raffo: Tks Emanuele, even if I didn't understand the fix :D
    November 07, 2016, 02:01:20 AM
  • emanuele: [link]
    November 01, 2016, 12:43:50 PM
  • emanuele: raffo: the English support board is a good place. ;)
    November 01, 2016, 12:43:38 PM
  • raffo: Where can I find the fix for the shoutbox?
    November 01, 2016, 05:06:09 AM
  • {OCS}MasterSeal: To the SP team, I make a point to come here and thank you as much as possible for your work.  so again, THANK YOU!
    October 28, 2016, 10:38:05 AM
  • emanuele: That's indeed funny, the limit is present only in the patch and not the full install.
    October 22, 2016, 06:14:58 PM

* Recent Posts

Adding Forums Button to Nav bar by jirapon
[August 01, 2019, 09:07:12 AM]


Re: Board Icons by ♦ Ninja ZX-10RR ♦
[July 30, 2019, 04:03:41 PM]


MOVED: Czech translation???? by ♦ Ninja ZX-10RR ♦
[July 30, 2019, 03:04:51 PM]


Board Icons by jirapon
[July 30, 2019, 07:28:44 AM]


Re: Thankyou Simpleportal, by ♦ Ninja ZX-10RR ♦
[July 29, 2019, 09:41:29 AM]

Installation errors? Mod incompatibilities? Upgrade problems? Make your way over to the Install and Upgrade Support board for all your solutions!

Author Topic: code for profile group  (Read 8313 times)

0 Members and 2 Guests are viewing this topic.

Offline smithc6

  • Semi Newbie
  • *
  • Posts: 47
  • SMF Version: 1.1.11
  • SP Version: 2.2
code for profile group
« on: January 08, 2011, 02:23:26 PM »
Hi i use SMF 2.0 RC4

i have added a description on some members profile for a prayer group
they are already members of dif groups so that was the only way i could do it as they can't be members of 2 dif groups for some reason SMF won't allow that

what i'm after is an info box on SP that shows these members
i presume i would have to do it via custom html or php not sure

what code would i add please does anyone know?

Offline smithc6

  • Semi Newbie
  • *
  • Posts: 47
  • SMF Version: 1.1.11
  • SP Version: 2.2
Re: code for profile group
« Reply #1 on: January 08, 2011, 02:34:17 PM »
sorry i have now managed to create an additional group

so i'm actually after some code which will list people in this additional group called 'Prayer Team'

sorry for confusion

Thanks

Offline Ares

  • Jr. Member
  • **
  • Posts: 50
  • Gender: Male
  • World Of Mass Distruction
    • [SoW] Spoils of War
  • SMF Version: 2.0.5
  • SP Version: 2.3.5
Re: code for profile group
« Reply #2 on: January 10, 2011, 05:18:33 PM »
what is it you are wanting?
A page to show the ppl in the secondary group
or show the badge on post of secondary group
bc both of those options can be achieved with 2 mods

first mod stars and badges for 2.0rc4
awesome mod love it
this mod will display the persons secondary group image in posts
Download Here

second mod
Team Page
display any groups in a page
woks great for gaming clans
Download Here

Offline smithc6

  • Semi Newbie
  • *
  • Posts: 47
  • SMF Version: 1.1.11
  • SP Version: 2.2
Re: code for profile group
« Reply #3 on: January 11, 2011, 02:02:46 AM »
neither of those things
i want the code to add the group into a box on SP

like the staff list for example lists everyone on the staff

but i want it for the 'prayer team'

Offline Ares

  • Jr. Member
  • **
  • Posts: 50
  • Gender: Male
  • World Of Mass Distruction
    • [SoW] Spoils of War
  • SMF Version: 2.0.5
  • SP Version: 2.3.5
Re: code for profile group
« Reply #4 on: January 11, 2011, 07:38:07 AM »
what is the group #
you will find it in the url like
go to
admin panel
member groups
click prayer team
then look at the url
http://yoursite.com/index.php?action=admin;area=membergroups;sa=members;group=1

Offline smithc6

  • Semi Newbie
  • *
  • Posts: 47
  • SMF Version: 1.1.11
  • SP Version: 2.2

Offline smithc6

  • Semi Newbie
  • *
  • Posts: 47
  • SMF Version: 1.1.11
  • SP Version: 2.2
Re: code for profile group
« Reply #6 on: January 13, 2011, 10:52:13 AM »
can anyone help me with this please????????

Offline AngelinaBelle

  • Comrade
  • *
  • Posts: 4870
  • Gender: Female
  • SMF Version: 2 RC3
  • SP Version: 2.3.2
Re: code for profile group
« Reply #7 on: January 13, 2011, 11:31:28 AM »
I'm stuck on your first post. SMF does allow members to belong to 2 different groups.
 
They can have one primary group, and any number of other groups. If you are having problems assigning users to groups, please ask for support at simplemachines.org.  Support helpers and specialists there are probably familiar with your problem.
Please to keep this website running, if you like SimplePortal, make a
one-time subscription. Thank you for your support.

Have you tried the SimplePortal documentation?

Offline smithc6

  • Semi Newbie
  • *
  • Posts: 47
  • SMF Version: 1.1.11
  • SP Version: 2.2
Re: code for profile group
« Reply #8 on: January 13, 2011, 12:02:51 PM »
yes i figured out how to do additional groups
what i'm after is a box on SP that shows these member f the additional group

'Prayer team'

thanks

Offline AngelinaBelle

  • Comrade
  • *
  • Posts: 4870
  • Gender: Female
  • SMF Version: 2 RC3
  • SP Version: 2.3.2
Re: code for profile group
« Reply #9 on: January 13, 2011, 12:29:34 PM »
SSI.php has a function to do exactly what you want.
It will even print it out for you.
Call it from your custom php block.
Please to keep this website running, if you like SimplePortal, make a
one-time subscription. Thank you for your support.

Have you tried the SimplePortal documentation?

Offline smithc6

  • Semi Newbie
  • *
  • Posts: 47
  • SMF Version: 1.1.11
  • SP Version: 2.2
Re: code for profile group
« Reply #10 on: January 13, 2011, 12:36:59 PM »
sorry you've lost me completely

Offline AngelinaBelle

  • Comrade
  • *
  • Posts: 4870
  • Gender: Female
  • SMF Version: 2 RC3
  • SP Version: 2.3.2
Re: code for profile group
« Reply #11 on: January 13, 2011, 12:40:09 PM »
Make a custom php block.
In the custom php block, call the ssi function that does what you want.
 
Look through ssi.php to find the name of the function you want -- one to get all members from a group.
You only have to tell the function the group_id. It does the rest.
Please to keep this website running, if you like SimplePortal, make a
one-time subscription. Thank you for your support.

Have you tried the SimplePortal documentation?

Offline smithc6

  • Semi Newbie
  • *
  • Posts: 47
  • SMF Version: 1.1.11
  • SP Version: 2.2
Re: code for profile group
« Reply #12 on: January 14, 2011, 01:58:25 AM »
i know where the custom.php block is
but you are loosing me with this ssi.php
i think that you forget sometimes that not everyone is an expert coder or good with programmes etc

i'm still really new i'm learning as i go along slowly

can you explain in detail pls what you meant thank you :)

Offline AngelinaBelle

  • Comrade
  • *
  • Posts: 4870
  • Gender: Female
  • SMF Version: 2 RC3
  • SP Version: 2.3.2
Re: code for profile group
« Reply #13 on: January 14, 2011, 08:45:40 AM »
Welcome to custom coding! This is a good way to learn.
 
All SMF files are found on your server.
You can copy them to your desktop using ftp, or else extract a fresh copy from the SMF archive available from SMF's downloads page.
 
Get a copy of ssi.php to your desktop, so you can have a look at it.
You will want to open it in notepad.
 
You might want something better than notepad, like notepad++ or one of the other programmer's text editors.
Please to keep this website running, if you like SimplePortal, make a
one-time subscription. Thank you for your support.

Have you tried the SimplePortal documentation?

Offline smithc6

  • Semi Newbie
  • *
  • Posts: 47
  • SMF Version: 1.1.11
  • SP Version: 2.2
Re: code for profile group
« Reply #14 on: January 14, 2011, 09:56:02 AM »
i've had a look through this and can't actually find anything in there about my group called
'prayer team'

mind you even if i could find it i still wouldn't have a clue what to do  :0

Offline AngelinaBelle

  • Comrade
  • *
  • Posts: 4870
  • Gender: Female
  • SMF Version: 2 RC3
  • SP Version: 2.3.2
Re: code for profile group
« Reply #15 on: January 17, 2011, 11:15:24 AM »
That code doesn't know anything about the data on your forum.
But -- one step at a time.
 
First step: find a function (you'll recognize where a function definition begins, because it begins with the word function at the beginning of a line) that has to do with getting membergroup information.
Please to keep this website running, if you like SimplePortal, make a
one-time subscription. Thank you for your support.

Have you tried the SimplePortal documentation?

Offline smithc6

  • Semi Newbie
  • *
  • Posts: 47
  • SMF Version: 1.1.11
  • SP Version: 2.2
Re: code for profile group
« Reply #16 on: January 20, 2011, 05:38:41 PM »
sorry Angelina but i am totally lost here
as in baffled beyond belief

all i want is a box to show this membergroup :(
please help me

Offline AngelinaBelle

  • Comrade
  • *
  • Posts: 4870
  • Gender: Female
  • SMF Version: 2 RC3
  • SP Version: 2.3.2
Re: code for profile group
« Reply #17 on: January 21, 2011, 10:02:08 AM »
Yes. You are learning a little about custom coding now.
 
Please look in the file ssi.php.
Search this file until you find a function to Get all members of a group
 
This is the function you will wish to use.
Please to keep this website running, if you like SimplePortal, make a
one-time subscription. Thank you for your support.

Have you tried the SimplePortal documentation?

Offline Ares

  • Jr. Member
  • **
  • Posts: 50
  • Gender: Male
  • World Of Mass Distruction
    • [SoW] Spoils of War
  • SMF Version: 2.0.5
  • SP Version: 2.3.5
Re: code for profile group
« Reply #18 on: March 01, 2011, 07:17:38 PM »
AngelinaBelle I know you are trying to help but most of your post you tell ppl about the ssi but we don't know how to code or call the functions so if somone is asking for help instead of telling the person about the ssi and a bunch of stuff that they don't even understand how about you help with coming up with the code that they are wanting

sorry if it sound mean but not everyone knows php

Offline AngelinaBelle

  • Comrade
  • *
  • Posts: 4870
  • Gender: Female
  • SMF Version: 2 RC3
  • SP Version: 2.3.2
Re: code for profile group
« Reply #19 on: March 01, 2011, 09:44:19 PM »
I know what you are saying. I am not very quick at writing code.
I'm sorry.  I'm a support specialist and a doc writer, not a customizer.
Any piece of code I come up with, I also struggle to learn what I need to know.
 
So I know that if I can use the ctrl-F key while editing a file, so can the next guy. And, if they follow my instructions, they will succeed.
Please to keep this website running, if you like SimplePortal, make a
one-time subscription. Thank you for your support.

Have you tried the SimplePortal documentation?

Offline [SiNaN]

  • Mr. SimplePortal
  • Developer
  • *
  • Posts: 6782
  • SMF Version: 2.0.15
  • SP Version: 2.3.7
Re: code for profile group
« Reply #20 on: March 02, 2011, 04:21:59 AM »
Ares, that's not really true. For instance, I could have given such a code:

Code: [Select]
$members = ssi_queryMembers('FIND_IN_SET({int:id_group}, additional_groups)', array('id_group' => 12), '', 'real_name', 'array');

$member_list = array();
foreach ($members as $member)
    $member_list[] = $member['link'];

if (empty($member_list))
    echo 'There are no members.';
else
    echo implode(', ', $member_list);

But you wouldn't learn anything from that. The next time you need to make a little modification to that, you'll need to ask for help again.

I admire the way AngelinaBelle helps. (she is a brilliant support specialist, by the way) I just didn't have the time to do same. So I guess I'm one to blame for making people expect to get what they need without much effort.

If I actually used the time I spent on customizing people's portal for developing SimplePortal, we would have long released SimplePortal 3.0 and I'm pretty sure it would have had all those features built-in.

By the way, that above code will list members who has the group with the id of 12 as their additional group.
And slowly, you come to realize... It's all as it should be...