Updating error message "User Registration not allowed"
Tagged: child theme, registration error message
- This topic has 6 replies, 3 voices, and was last updated 11 years, 8 months ago by Ray.
-
AuthorPosts
-
February 27, 2013 at 5:57 pm #2117GordonRParticipant
Hi
[CBOX theme, WP 3.5.1, BP 1.6.4]
The groups and forums on my site are private – that is only invitees can register.
Once registered they get email updates on group/forum activity by email according to their preferences using the CBOX tools.
The problem is that if they are logged out when they get the email, they are directed to a very unhelpful page/message when they click on any of the links in the email.
The error message is “User Registration is currently not allowed”. This appears on the page http:// [site url]/register when the user is logged out.
I need to change this message.
In my case it should say something like “Please log in to access site content. If you are not registered go here for information about this site”.
How do I change this message? I can’t edit the content of the Register page. I can’t see where this message is created in CBOX settings.
Thanks.
Attachments:
You must be logged in to view attached files.February 27, 2013 at 5:58 pm #2119GordonRParticipant[I am replying to the original post due to the problem that at the moment no one seems to be able to see the original posts – this reply is the same as the original post]
Hi
[CBOX theme, WP 3.5.1, BP 1.6.4]
The groups and forums on my site are private – that is only invitees can register.
Once registered they get email updates on group/forum activity by email according to their preferences using the CBOX tools.
The problem is that if they are logged out when they get the email, they are directed to a very unhelpful page/message when they click on any of the links in the email.
The error message is “User Registration is currently not allowed”. This appears on the page http:// [site url]/register when the user is logged out.
I need to change this message.
In my case it should say something like “Please log in to access site content. If you are not registered go here for information about this site”.
How do I change this message? I can’t edit the content of the Register page. I can’t see where this message is created in CBOX settings.
Thanks.
Attachments:
You must be logged in to view attached files.February 28, 2013 at 12:39 am #2126RayKeymasterHi Gordon,
The “User Registration is currently not allowed” message can be found in the registration template:
/wp-content/themes/cbox-theme/registration/register.phpThere are two ways to modify the text:
(1) Modify the registration template
If you want to modify the template, you should consider creating a CBOX child theme:
https://commonsinabox.org/documentation/themes/developer-guideThen, you can copy /registration/register.php to your new child theme and change the text.
(2) Create a custom language file
The other approach is creating a custom language file to change the text. Here’s a guide to do that:
http://codex.buddypress.org/developer/customizing/customizing-labels-messages-and-urlsThe positives with this approach is you can also change other labels and text this way all at once.
This might be more complicated than modifying the registration template, but I list both options so you can choose which approach will fit you better.
March 2, 2013 at 6:31 am #2147GordonRParticipantThanks. I’ve implemented the Child Theme approach for now, but thanks for the tip in relation to the language file.
One possible improvement to the CBOX instructions re Child Themes is to note that if all you need to do is make some minor alternations to the .php files, then all you have to do is copy them into the main directory of the Child Theme. This arises as the CBOX child theme is more complicated than a simple child theme and non expert users like myself may be confused about how to copy the relevant file [in this case register.php] and where to put it – in this case in the CBOX Child Theme directory (not in /assetts, /engine etc).
March 2, 2013 at 8:32 am #2150GordonRParticipantHI
I spoke to soon. I have not managed to change the error message despite editing the register.php file.
I have
1. Installed the CBOX Child theme [and made the various adjustments to the CBOX Theme options make it look more or less the same as before – including adjusting the home page widgets – slightly irritating].
2. Copied the Register.php file from the parent theme.
3. Copied the file into the Child theme at root level – ie in the Child theme directory not in any of its sub directories. [?? is this the right place?]
4. Used Dashboard/Appearance/Editor to change the text of the error message in register.php [of the child theme] & saved changes and confirmed change made in php file.
5. Logged out & clicked through from a notification to a group … and unfortunately the error message has not changed – ie it is still “User registration is currently not allowed.”
Anything obviously done wrong?
6. To check I copied the register.php file from the Child theme to the parent theme (after backing up the register,php file in the parent theme of course). This DID produce the desired result. So I conclude I have correctly edited the Register.php file BUT it is not being loaded; so perhaps it is in the wrong place in the Child Theme? Or something else going wrong?
Thanks for any advice.
Gordon
March 3, 2013 at 10:31 pm #2157AnonymousInactiveHi Gordon,
The original “register.php” appears in a folder called “registration” in the Parent Theme.
Instead of copying your modified “register.php” file in your Child Theme directory at the root level, maybe you could create a folder named “registration” in your Child Theme directory, and save the modified “register.php” into it?
March 4, 2013 at 5:24 pm #2163RayKeymasterSteve is correct; make sure your custom register.php is located in /wp-content/themes/YOUR-CHILD-THEME/registration/register.php.
-
AuthorPosts
- You must be logged in to reply to this topic.