Concerning the pnGroups module, is it possible to simply click on a hyperlink and be assigned to a public group? I'm trying to save the user a few clicks in going thru the pnGroup module to assign themselves to a group. It seems that this could be done in a single hyperlink....can it?
Thx,
JQ
Watch
GitHub Core
Show your support for Zikula! Sign up at Github account and watch the Core project!
GitHub Modules
- internetking created topic »password problem« 25. May
- mesteele101 responded to »ERR (3): E_USER_ERROR: Smarty error: [in pagesvar:pagesitem2en line XXX]…« 25. May
- mazdev responded to »Pages 2.5.0 and updating - Page not found« 25. May
- ehdwma created topic »Hide "Register new account" and change template to 3 col« 25. May
- mesteele101 responded to »Zikula 1.3.3 - Selecting a category in Pages not working« 25. May
- mdee created topic »How to implement returnpage ?« 25. May
- nestormateo responded to »Fillters in Clip« 24. May
Zikula Blog
- Anatomy of Open Source Projects on Mar 07
- Continuous Review on Mar 01
- Not Invented Here on Feb 24
- How to Contribute Your Code at Github on Jan 13
- 10 Steps to Coding-Nirvana: Tips for Successful Module Writing on Nov 12
- Submitting Bug Report Tickets That Get Results on Aug 17
- Cozi Tricks #1: Syntax Highlighting on Aug 07
Login
pnGroups...
-
**unknown user**
- Registered: Mar 16, 2002
- Last visit: Oct 21, 2009
- Posts: 1097
Nope... The function registering the user into a group needs the unique key generated by the form. Without it, it's a no go.
Besides, I wouldn't recommand to give people direct access too much on things...
They should confirm that they are sure they want to be part of a group.
-
**unknown user**
- Rank: Registered User
- Registered: Mar 16, 2002
- Last visit: Oct 21, 2009
- Posts: 6
Thank you for the reply--in this case though, I'd only have 2 public groups and depending on which they choose would determine which block menu they would see. So, not a big deal in terms of security.
It would be an excellent feature though in terms of user friendliness. I'm not suggesting doing away with all of the verification screens to become membership of a group, but instead offer another option for those who could benefit from making it easier to become a member of a group if they wish. Hence 2 paths to accomplish the same goal.
I can certainly understand circumstances where you would need to make sure that was the group they wanted to become a member of. However, let's please consider the "user friendliness" of what exists today. The user would have to have some intuitive knowledge of what group they need to become a member of and go through the process of being assigned to that group. This may or may not be intuitive.
My suggestion would be to add the ability to simply allow them to click on a link to become a member (if this is possible technically). That way you could have a screen explaining what each hyperlink would do and be much more friendly than the current process.
Maybe the "development gods" at be could consider this to be an addition to what is there already now.
Please understand, I'm not being critical, but am only trying to offer some insight from a usage standpoint. This kind of functionality would be fantastic IMHO.
The current syntax of the link has all of the requirements already--it just doesn't work automagically... You have to validate and click a few more times.
index.php?module=pnGroups&func=membership&action=subscribe&gid=4
Adding one more parameter...
index.php?module=pnGroups&func=membership&action=subscribe&gid=4&verify=no
or something like that would be PERFECT!
Possible???
Thanks again,
JQ -
**unknown user**
- Registered: Mar 16, 2002
- Last visit: Oct 21, 2009
- Posts: 1097
I won't change the mod, you'll have to hack it this way
Find this part :
Code
function pnGroups_user_userupdate()
{
list($gid, $action, $gtype, $tag) = pnVarCleanFromInput('gid', 'action', 'gtype', 'tag');
if (empty($gid) || !is_numeric($gid) || empty($action)) {
return pnVarPrepHTMLDisplay(_MODARGSERROR);
}
if (!pnSecConfirmAuthKey()) {
pnSessionSetVar('errormsg', _BADAUTHKEY);
pnRedirect(pnModURL('pnGroups', 'user', 'main'));
return true;
}
//........ the rest
And put // in front of the lines :
Code
// if (!pnSecConfirmAuthKey()) {
// pnSessionSetVar('errormsg', _BADAUTHKEY);
// pnRedirect(pnModURL('pnGroups', 'user', 'main'));
// return true;
// }
You'll then be able to change your template and use a link
Code
<a href="<!--[pnmodurl modname='pnGroups' func='userupdate' gid=$gid action=$action]-->">sub</a>
You might have a problem with the action param... I'm doing this from memory and I don't know if it is set yet. -
**unknown user**
- Rank: Registered User
- Registered: Mar 16, 2002
- Last visit: Oct 21, 2009
- Posts: 6
Again Chestnut, thank you for the response.
I found the lines in the code and commented per your illustration above. The URL was generated as:
index.php?module=pnGroups&func=userupdate&action=subscribe&gid=3
Error message was this:
Quote
_PNCG_GRPMUSTCONFIRM
Pardon my ignorance in the PHP language, but the next statement after the commented lines is this:
Code
Could $tag need to be populated with a confirmation syntax of some sort?
Again, many thanks
JQ
- Moderated by:
- Support
