Members banned

    • 323 posts
    May 8, 2019 12:24 PM EDT

    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


    This post was edited by Lovea at May 8, 2019 12:25 PM EDT
    • Moderator
    • 6923 posts
    May 9, 2019 6:43 AM EDT

    It should be in the language manager. Did you check there? If not there, can you provide a screenshot of the page?

    • 323 posts
    May 9, 2019 12:44 PM EDT

    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

    • Moderator
    • 6923 posts
    May 10, 2019 5:57 AM EDT

    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. 

    • Moderator
    • 6923 posts
    May 10, 2019 5:58 AM EDT

    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.

    • 323 posts
    June 29, 2019 5:08 AM EDT

    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

    • 36 posts
    June 29, 2019 2:07 PM EDT

    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.

     

    • 323 posts
    June 30, 2019 12:03 PM EDT

    It's perfect... 

    I will try as soon as possible

    Thanks a lot !

    • 323 posts
    December 12, 2019 4:42 PM EST

    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 !


    This post was edited by socialenginestaff at December 13, 2019 3:03 AM EST
    • Moderator
    • 6923 posts
    December 13, 2019 3:04 AM EST

    @Lovea I edited your post to put the code tags. Next time I will delete code that does not conform to our posted rules. 

    • 323 posts
    December 13, 2019 6:41 AM EST

    Really sorry, I did not know.

    I'll be careful next time.

    Thank you.

    • Moderator
    • 6923 posts
    December 13, 2019 7:35 AM EST

    No problem. It happens. It's just a safety measure that everyone should do on their own sites too.

    • 323 posts
    June 4, 2021 5:26 AM EDT

    Hello.

    Be careful with the last update the file has been overwritten and it must be redone.

    Have a good day

    • Moderator
    • 6923 posts
    June 4, 2021 5:29 AM EDT

    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.

    • 323 posts
    June 4, 2021 5:46 AM EDT

    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 ...

    • Moderator
    • 6923 posts
    June 4, 2021 9:08 AM EDT

    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.

    • 323 posts
    October 8, 2023 4:53 AM EDT

    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.

    • Moderator
    • 6923 posts
    October 10, 2023 10:57 AM EDT

    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.