Home page: transform registration form into a link

laurent amsaleg Posted in Technical Support 2 years ago

Hi. I am trying to implement what is discussed in an existing thread where someone explains how to remove the registration form from the home/index page and replace it by a link. This thread is here: https://www.opensource-socialnetwork.org/discussion/view/4123/remove-registration-form-on-index-page-and-add-it-as-a-link-goblue-theme

I think I followed all instructions, but something is broken somewhere. When clicking on the new red button that should trigger the load of the new register.php file, nothing happens, i.e., the link is followed but nothing is displayed on screen, like if the php script was not properly executed. The action is known, there is no error 404. Is the content of the register.php file that is detailed in the thread mentioned above correct? Is there anything missing in the details in that thread?
That thread is 2 years old -- is there any other way to have that feature, i.e., remove the registration for new users from the home page and turn it into a link.
thank you very much.

Replies
French Laurent amsaleg Replied 2 years ago

OK, I understand. Now, how can that home page be changed?

German Michael Zülsdorff Replied 2 years ago

Yes, you are wrong.
Or maybe I was not clear enough: You don't have to - and you should not - patch any core file in order to customize Ossn.

French Laurent amsaleg Replied 2 years ago

In fact I installed your component in a fresh and new install of OSSN -- reverting Roman changes is out of my scope so far. I see your registration page when loading https://YOURSITE/register but the home page is still having that "create an account" right hand side part. this is what I would like to remove and instead, in order to get to your registration page, add a button "register" somewhere in that home page. Although I understand that your registration page is nicely installed as a component, I see no other option that patching the home page PHP code to implement the feature i am describing. Or maybe I'm wrong... Thanks.

German Michael Zülsdorff Replied 2 years ago

I'm almost sure you didn't revert all those changes suggested by Roman.
In doubt re-install Ossn and you will get the registration page on https://YOURSITE/register
And remember to disable Ossn cache while doing code changes

French Laurent amsaleg Replied 2 years ago

Dear michael. Thank you very much for this wise advice. I downloaded the component you created, installed into OSSN, enabled it, and then what? I see no difference after compared to before the install. Maybe what you propose is a partial solution to my question? Thank you.

German Michael Zülsdorff Replied 2 years ago

I can only recommend not to patch Ossn's core with any code. Especially if you have no idea what it's good for.
Instead, take the time and study the documentation.
Learn how to develop components - since enhancements/changes like this can be easily implemented without changing one line of code of the core system.
You wanted a new page? Okay, then create a component doing right this.
It's not that complicate ... see https://www.opensource-socialnetwork.org/component/view/6044