Link to join group?

Looking for a MOD? Have a MOD request? Post here for help. (Note: This forum is community supported; phpBB does not have official MOD authors)
Anti-Spam Guide
User avatar
BiggDawgg
Registered User
Posts: 356
Joined: Tue Oct 19, 2004 8:46 am
Location: USA, Illinois
Contact:

Link to join group?

Post by BiggDawgg »

Is it possible to post a simple link to join or unjoin a group?

If so can anyone help please?
User avatar
BiggDawgg
Registered User
Posts: 356
Joined: Tue Oct 19, 2004 8:46 am
Location: USA, Illinois
Contact:

Re: Link to join group?

Post by BiggDawgg »

I found this post here on phpbb but I can't figure it out

any help would be greatly appreciated
.m.
Registered User
Posts: 539
Joined: Wed Nov 04, 2009 8:39 pm

Re: Link to join group?

Post by .m. »

well, I tried

Code: Select all

.../ucp.php?action=join&mode=group&g=4
and my forum says "General Error Module not accessible ..."
User avatar
BiggDawgg
Registered User
Posts: 356
Joined: Tue Oct 19, 2004 8:46 am
Location: USA, Illinois
Contact:

Re: Link to join group?

Post by BiggDawgg »

Anyone? .. I just need a couple simple links .. one that will join group when clicked .. and one that will unjoin the same group when clicked

If the code in the link above works for anyone please explain how to use it .. ie where it goes
User avatar
BiggDawgg
Registered User
Posts: 356
Joined: Tue Oct 19, 2004 8:46 am
Location: USA, Illinois
Contact:

Re: Link to join group?

Post by BiggDawgg »

Anyone? Please
User avatar
BiggDawgg
Registered User
Posts: 356
Joined: Tue Oct 19, 2004 8:46 am
Location: USA, Illinois
Contact:

Re: Link to join group?

Post by BiggDawgg »

Someone has to know how to do this ... Help please?
User avatar
BiggDawgg
Registered User
Posts: 356
Joined: Tue Oct 19, 2004 8:46 am
Location: USA, Illinois
Contact:

Re: Link to join group?

Post by BiggDawgg »

Help?
User avatar
4_seven
I've Been Banned!
Posts: 5155
Joined: Wed Apr 30, 2008 1:41 am

Re: Link to join group?

Post by 4_seven »

some code-fragments of this mod will be a perfect base for what u want
http://www.phpbb.com/community/viewtopi ... 5#p4333245
.m. wrote:well, I tried

Code: Select all

.../ucp.php?action=join&mode=group&g=4
and my forum says "General Error Module not accessible ..."
the link looks this way for joining group 14

Code: Select all

ucp.php?i=groups&mode=membership&join=14
Current Mods | Mod Base | php(BB) programming | No help via PM
User avatar
BiggDawgg
Registered User
Posts: 356
Joined: Tue Oct 19, 2004 8:46 am
Location: USA, Illinois
Contact:

Re: Link to join group?

Post by BiggDawgg »

Hello, you lost me on how that mod could help me .. as far as I see it does nothing even close to what I want.
User avatar
4_seven
I've Been Banned!
Posts: 5155
Joined: Wed Apr 30, 2008 1:41 am

Re: Link to join group?

Post by 4_seven »

oh, i lost nothing.
first i correct the link from .m. to join a group
secondly i show, how u can realize you personal desire.

just take some modified code-parts from the named mod, make a new varaiable to this link
eg. ucp.php?i=groups&mode=membership&join=14&autojoin=true,
mix it with some own code and u have 100% what u want.
Current Mods | Mod Base | php(BB) programming | No help via PM
.m.
Registered User
Posts: 539
Joined: Wed Nov 04, 2009 8:39 pm

Re: Link to join group?

Post by .m. »

perhaps a confirm_key and session id are also used hence it is difficult to get it to work ...
User avatar
BiggDawgg
Registered User
Posts: 356
Joined: Tue Oct 19, 2004 8:46 am
Location: USA, Illinois
Contact:

Re: Link to join group?

Post by BiggDawgg »

Thank you for trying, but what you are saying is way beyond what I understand .. I need someone to say add this here, and this here, etc.. I know nothing about doing any code myself
trickoff
Registered User
Posts: 513
Joined: Mon Jan 07, 2008 12:23 am

Re: Link to join group?

Post by trickoff »

I'm also looking for a solution to this!
.m.
Registered User
Posts: 539
Joined: Wed Nov 04, 2009 8:39 pm

Re: Link to join group?

Post by .m. »

well, let us have a look at the required fields

below is an html equivalent of the form used for confirmation of joining a group
<form name="confirm" action="./ucp.php?i=groups&mode=membership&confirm_key=23N57RQP52" method="post">

<table class="tablebg" width="100%" cellspacing="1">
<tr>
<th>Request to join group</th>
</tr>
<tr>
<td class="row1" align="center"><br /><p class="gen">Are you sure you want to request joining the selected group?</p><br /><input type="hidden" name="selected" value="8" />
<input type="hidden" name="action" value="join" />
<input type="hidden" name="submit" value="1" />
<input type="hidden" name="confirm_uid" value="2" />
<input type="hidden" name="sess" value="2162e1dba3b09a3b50898c57dffa676f" />
<input type="hidden" name="sid" value="2162e1dba3b09a3b50898c57dffa676f" />
<input type="submit" name="confirm" value="Yes" class="btnmain" />&nbsp;&nbsp;<input type="submit" name="cancel" value="No" class="btnlite" /></td>
</tr>
</table>

</form>
we need confirmation key and the session id to complete joining of a group
AND
all other fields in the above form are also required in the "link to join/un-join a group"
the pips
Registered User
Posts: 511
Joined: Sat Mar 21, 2009 5:33 pm

Re: Link to join group?

Post by the pips »

The best way would be to use the group_user_add and group_user_del functions. There's more info in the Wiki.
Getting this to work would mean editing both the PHP and HTML. Where would you like the button to appear?


Regards
Doug
Locked

Return to “[3.0.x] MOD Requests”