View Full Version : Redirect instead of ban members?
NobodysHero
08-15-2016, 12:54 PM
I'd like to know if anyone could help with giving me direction on setting up my site to redirect members to a different page when they've refreshed, instead of banning them. Unbanning them is getting quite exhausting, but I don't want to remove the function altogether.
Also, is it possible that bans can be set to lift after so many days? If so, how involved/complex would that be?
NobodysHero
08-27-2016, 03:20 PM
http://stackoverflow.com/questions/4142809/simple-post-redirect-get-code-example
I saw this and thought this would work great for those who'd like an alternative to the autoban, however I have no idea how to implement it. If anyone could help, that'd be great! 8D
Hall of Famer
08-27-2016, 05:21 PM
Actually there is a ban function in Mysidia in file /functions/functions_users.php. All you need is to modify this function, remove the code inside it, so it does nothing.
NobodysHero
08-27-2016, 08:29 PM
Thanks for the quick reply! 8D
What I'd really like to do, however, is redirect them so they don't end up on the same page again. Like maybe it reloads instead of just brings them back to the page with the old information on it.
If it's super complex, I'll just remove the ban portion, but I don't want them to be able to exploit it, which I believe is why you implemented the autoban to begin with. I mean, most, if not all, are doing it on accident, but just in case for that ONE person (or... maybe two?) that is trying to get around things, would be nice to have the autoban still in play for now.
Hall of Famer
08-27-2016, 08:54 PM
Its not super complex, you can just change the code to ban user to redirect user instead.
NobodysHero
08-28-2016, 03:17 PM
Thanks, babe! <3
Um... >.> Any chance you could post the code string(s) I would need to do that? I'm very slowly (Like turtle speed) learning PHP. XD Normally, I'd ask my coder to do it, but he's not available, because life keeps happening. T_T
Hall of Famer
08-28-2016, 09:30 PM
Well just change the code in function banuser($user) in file /functions/functions_users.php:
header('Location: http://yoursite.com/');
It should be at around line 108 assuming you have never edited functions_users.php file before. Dont forget to change http://yoursite.com to the actual url on your website.
NobodysHero
08-29-2016, 12:05 AM
Oh, that simple. Cool. 8D Thanks, HoF!
EDITING MY EDIT!: I get it now. It was late, shouldn't ask questions when sleepy. Thanks again! WORK'S PERFECT! 8D
Hall of Famer
08-29-2016, 11:31 AM
You are welcome, glad it worked for you.
vBulletin® v3.8.11, Copyright ©2000-2025, vBulletin Solutions Inc.