Hello,
We would like to arrange the landing page for banned members.
Currently, there is only the word banned at the top left of the page.
Do you know where we can change this text and the layout?
Thanks in advance
It should be in the language manager. Did you check there? If not there, can you provide a screenshot of the page?
No need for a screenshot. It's a blank page with "Banned" written in very small at top left.
And nothing in the language manager.
I can not find the code to arrange this page.
Thanks in advance
Ok when I ask for a screenshot, it's because it would help me. Especially the url to the page (you can blur out your main domain name and any other details you might need to.
Actually, aren't you using a third party product for this? We don't have a ban setting in SEPHP other than banned emails and IP addresses.
Sorry, I did not answer ...
here is a screenshot. Whatever the page on which we are, the message is the same.
I would like to change this message and customize it.
I also understand that the ban is on the email address and IP address. It works perfectly.
Thank you in advance
Yes, this function is not a standalone file nor in the language manager. The location for the aforementioned is located here: /application/modules/Core/Bootstrap.php
Once the file is open, search for:
protected function _initBannedIps()
(or scroll down to the very bottom of the file)
Locate:
// tell them they're banned
if ($isBanned) {
//@todo give appropriate forbidden page
if (!headers_sent()) {
header('HTTP/1.0 403 Forbidden');
}
die('banned');
}
The above reference is how you're seeing the "banned" text when loading your site. 2 choices you have in this situation.. 1.) Either change up the 'banned' text (die('banned')) so that the page remains blank with some different text -OR- 2.) Design a banned landing page html file then include that .html file. The end result would look like this:
// tell them they're banned
if ($isBanned) {
//@todo give appropriate forbidden page
if (!headers_sent()) {
header('HTTP/1.0 403 Forbidden');
}
include('./path/to/your/html/file.html') ;
die();
}
Notice I removed the 'banned' text from the die function because if left, it will print the word 'banned' and the bottom of your html file. My walk through above should be pretty straightforward but let me know if you have any additional questions in regards to this.
It's perfect...
I will try as soon as possible
Thanks a lot !
It's really perfect.
For find the relative path...
<?php
$chemin = getcwd();
echo "The path is :";
echo $chemin;
?>
... in a file on your server...
Thanks a lot !
@Lovea I edited your post to put the code tags. Next time I will delete code that does not conform to our posted rules.
Really sorry, I did not know.
I'll be careful next time.
Thank you.
No problem. It happens. It's just a safety measure that everyone should do on their own sites too.
Hello.
Be careful with the last update the file has been overwritten and it must be redone.
Have a good day
Yes this is why we recommend not editing source files. It can also break the upgrade process and it does void support. It's best to do changes via creating a plugin.
Thank you for that clarification.
What would be nice if SocialEngine created a simple page to fix this problem.
Adding addons over and over again, it gets a bit tricky.
Especially for a simple page that doesn't look like anything with that word! BANNED ...
Finally, this fix no longer works. There is an error on the page ...
Thank you Donna for the clarification concerning the upgrades,
I did not know ...
If you will put a feature request for exactly what you want and try to include a screenshot so we know for sure what you are asking for, we can consider it.
Hello,
This brilliant little tip no longer works with the SE version.
Do you have the problem too. Another solution ?
Thank you in advance and have a good Sunday.
Did you add the feature request? We already have a feature request to add a banned member level which I had put in a few years ago. Still waiting for that improvement lol.
For this, if you add a feature request for what you want, I am sure it would be handy for other clients and it might be a small improvement so easier to implement.