HTML Logo by World Wide Web Consortium (www.w3.org). Click to learn more about our commitment to accessibility and standards.

Moving forward with Composr

ocPortal has been relaunched as Composr CMS, which is now in beta. ocPortal 9 will be superseded by Composr 10.

Head over to compo.sr for our new site, and to our migration roadmap. Existing ocPortal member accounts have been mirrored.


Which file contains the "join" or "register" feature?

Login / Search

 [ Join | More ]
 Add topic 
Posted
Rating:
#66812 (In Topic #14242)
box
Avatar

Fan in action

Hi,

I'm trying to create different registration values for different sets of users, yet I
can't find the actual registration form.

Where can I find it?

Thanks.
Back to the top
 
Posted
Rating:
#66817
Avatar

ocPortal forms are built up in PHP code from form field templates put together for what fields ocPortal thinks are needed, there's no single template for it. You can however add CPFs that are for specific usergroups and set them as required – this will make them show on the join form, for those usergroups.

It is possible to completely customise the form, including for different usergroups, but it's a very advanced thing (we've done it once for one of our clients, and not through choice, lol). You have to set a hidden option in OcCLE that tells ocPortal to ignore fields it considers missing, save a copy of the HTML, then put that HTML back into the OCF_JOIN_STEP2_SCREEN template instead of the normal reference to the form built in PHP, then mess around a lot to ensure the CAPTCHA hasn't got broken. In short: I wouldn't go there unless you're a PHP programmer.


Become a fan of ocPortal on Facebook or add me as a friend. Add me on on Twitter.
Was I helpful?
  • If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
  • If so, please let others know about ocPortal whenever you see the opportunity.
  • If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying ocPortal on fun personal projects.
  • If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
Back to the top
 
Posted
Rating:
#66820
box
Avatar

Fan in action

I'm not a PHP programmer, so the in-depth surgical method isn't an option.

>>You can however add CPFs that are for specific usergroups and set them as required - this will make them show on the join form, for those usergroups

How do I route different visitors into different usergroups– that is, force some users to join Group A and others to join Group B?

Thanks.
Back to the top
 
Posted
Rating:
#66822
Avatar

  1. Set which usergroups to show on the join form via setting 'Initial primary usergroup' on those usergroups.
  2. There's a config option "Require rule-acceptance upon joining". If you disable that, people will go direct to the form, skipping the rules/choose-group screen.
  3. Adjust your signup links to include usergroup=<groupid>. E.g. a page-link like :join:usergroup=12.


Become a fan of ocPortal on Facebook or add me as a friend. Add me on on Twitter.
Was I helpful?
  • If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
  • If so, please let others know about ocPortal whenever you see the opportunity.
  • If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying ocPortal on fun personal projects.
  • If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
Back to the top
 
Posted
Rating:
#66829

Non-joined user

So to recap,

1. There is no "join" file; it's created by OCP on the fly.

2. >>Set which usergroups to show on the join form
– You can specify which usergroups are available to join
– Unless you create a completely custom join file, all visitors must register with the same OCP-created join file.

3. >>There's a config option "Require rule-acceptance upon joining". If you disable that, people will go direct to the form, skipping the rules/choose-group screen.
– Doing this forces a visitor into some default usergroup.

4. >>adjust your signup links to include usergroup=<groupid>. E.g. a page-link like :join:usergroup=12.
– QUESTION: Is this page-link the link that brings them to the registration form?
(e.g., a href="www.domain.com/myocportal/index.php&join:usergroup=12"
)

or…

is this the link that submits the registration info via a form? If so, where in OCP do I find the code for that form?

Thanks.
Back to the top
 
Posted
Rating:
#66831
Avatar

Doing this forces a visitor into some default usergroup.

It probably does, if you don't specify the usergroup=<whatever> bit.

QUESTION: Is this page-link the link that brings them to the registration form?
(e.g., a href="www.domain.com/myocportal/index.php&join:usergroup=12"

Yes, but you need to read up on page-links.
I could have said a URL like:
www.domain.com/myocportal/index.php?page=join&usergroup=12 but I prefer to tell people page-links rather than URLs because:
a) You don't need to hard-code domain names
b) They don't lose other things ocPortal might choose to pass in the URL

You can create a page-link in Comcode like…
[page]:join:usergroup=12[/page] or easily put them into menus directly.


Become a fan of ocPortal on Facebook or add me as a friend. Add me on on Twitter.
Was I helpful?
  • If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
  • If so, please let others know about ocPortal whenever you see the opportunity.
  • If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying ocPortal on fun personal projects.
  • If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
Back to the top
 
Posted
Rating:
#66838
box
Avatar

Fan in action

I found a passing reference to "page-link" on page 23 of the Code Book, and a search for "page-link" on the OCP site yields 320-odd results… where should I look for a concise explanation?

More generally, I'm still confused by the link/join relationship. Perhaps some scenarios can clarify matters.
1. Betty has just made a purchase at shoesite.com, and its thank-you page is meant to guide her to register with usergroup12 at ocpclothing.com/ocp/index.php.

2. Fred, on the other hand, has just made a purchase that is meant to lead him to register with usergroup15.

So, given that each is arriving from a non-ocp site…

Do I

a) send Betty and Fred to separate pages, using a onventional link? Each page would then have different ComCode embedded in a link on that page:
BettyRegistrationPage.php – :join:usergroup=12
FredRegistrationPage.php
:join:usergroup=15

If this is a link on a page, how is the text (example: "Join Now") fitted to the link?

b) send Fred and Betty to the same page (ocpclothing.com/ocp/index.php), but with ComCode somehow embedded in the URL?

It seems improbable that ComCode would work in an URL, so I suppose I'm still misunderstanding this…

Thanks.
Back to the top
 
Posted
Rating:
#66851
Avatar

Hi,

Actually if you're linking from something external to ocPortal you will need to use URLs not page-links, as page-links are for linking internally. In my past post I assumed you were working just within ocPortal, sorry about that.

You seem to have some misunderstandings about things here though. It's nothing to do with Comcode or page-links or PHP scripts or pages, if I've indicated so I'm just explaining how to best make links inside ocPortal. It's solely a matter of directing users to the correct URL, with the &usergroup=<whatever> bit according to the usergroup ID you want them to sign up with.
The URLs are all to the join page, but with different URL parameters.

I'm not sure what you mean about carrying through bits of text to be honest, I think you have conceived a certain view of things that you might have based on experience with another system or possibly assumed, and it might be something you are needing that I haven't understood, but it doesn't seem to relate to how ocPortal is structured.

A word of wisdom if I may, and I want to be as polite as possible, because on one hand we really try and promote personal empowerment with ocPortal, but on the other hand it does lead to a lot of what could be considered over-ambition, trying to achieve that last small percentage of thornier things on non-'standard' sites that really should only be tackled by a programmer. And that ultimately leads to a lot of stress/disappointment/wasted-time. In ocPortal, you can get really close to fully implementing all kinds of novel/complex things from your imagination, and that saves huge amounts of time and money on projects, but there's a point of getting one's custom technical details right that with any system that goes beyond the use-cases that system was designed for out-of-the-box, and for that last bit on these non-'standard' projects, is where a programmer really should get hired/cajoled/bribed/whatever.

This is why we do warn that once people stray from the normal/tested usage path of ocPortal features, people shouldn't be overly-optimistic that these 'wildcard' things will be straight-forward in ocPortal without extra help or a lot of personal time investment (we say it on ocPortal.com's "What ocPortal is not" page and at the start of the Setup Wizard). We say it's inevitable that most serious projects will have a few of these things.

I'm certain what you're trying to do is completely legitimate, and it may also be common on a number of sites out there. But there are so many sites out there, so many structures, that we can't capture them all perfectly.

Personally I can't really help in detail as it can end up taking up to hours of explanation stepping through individual advanced problems in sufficient detail (except as part of ocProducts services, where I can earn a living back from the time outlay). You're extremely welcome to ask on the forums like you are but I think once you get past a certain level of what people have tried before, or what is easy to answer, you'll probably end up without any replies unfortunately. I wish it weren't the case, but it unfortunately is inevitably (unavoidable economics), and it would be more so I think on forums of Drupal/Joomla/etc too that have a smaller set of core functionality for people to answer about.

Sorry if this sounded at all patronising here. I'm sure you have given this some thought, and you are probably under quite high constraints like most people are. I just think you are on a potentially difficult path for yourself to get to the end to, and I want to make sure you have a plan to get to your destination in a viable way without causing yourself a lot of pain.


Last edit: by Chris Graham


Become a fan of ocPortal on Facebook or add me as a friend. Add me on on Twitter.
Was I helpful?
  • If not, please let us know how we can do better (please try and propose any bigger ideas in such a way that they are fundable and scalable).
  • If so, please let others know about ocPortal whenever you see the opportunity.
  • If my reply is too Vulcan or expressed too much in business-strategy terms, and not particularly personal, I apologise. As a company & project maintainer, time is very limited to me, so usually when I write a reply I try and make it generic advice to all readers. I'm also naturally a joined-up thinker, so I always express my thoughts in combined business and technical terms. I recognise not everyone likes that, don't let my Vulcan-thinking stop you enjoying ocPortal on fun personal projects.
  • If my response can inspire a community tutorial, that's a great way of giving back to the project as a user.
Back to the top
 
There are too many online users to list.
Control functions:

Quick reply   Contract

Your name:
Your message: