Community

Forums » SEPHP Help and Tips

Members banned

    • 100 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
    • 3842 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?

    • 100 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
    • 3842 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
    • 3842 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.

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

     

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

    It's perfect... 

    I will try as soon as possible

    Thanks a lot !