• [MOD] Ban v1.7 3 0 5 1
Currently:  

Author Topic: [MOD] Ban v1.7  (Read 357395 times)

0 Members and 1 Guest are viewing this topic.

Offline dognation1

  • Newbie
  • *
  • Posts: 34
    • View Profile
Re: [MOD] Ban v1.7
« Reply #240 on: January 02, 2008, 08:25:08 PM »
I tried to ban by: username, i.p. and email...none of them work.....I checked in topic for answer....but there are a lot of different anwsers and Im not sure which one applies to me.

any help grealty appreciated


chris

Offline dognation1

  • Newbie
  • *
  • Posts: 34
    • View Profile
Re: [MOD] Ban v1.7
« Reply #241 on: January 02, 2008, 10:07:59 PM »
I believe all is working now.....I did find something that may be helpful for others...


the time in the start & end date of the ban page does not take into account any time offset you have coded in.

so you have to manually change the time accordingly.

but in you ban logs the offset time is correct.

thanks for all your help Thunder!  (hey post me a picture  www.disguiseddisciple.com/photogallery)


chris

Offline urmasmuld

  • Newbie
  • *
  • Posts: 48
    • View Profile
Re: [MOD] Ban v1.7
« Reply #242 on: January 22, 2008, 11:31:57 AM »
I've installed this mod, and in admin panel all works well, i can ban users, but when banned users goes to my homepage, he/she gets this error:

Code: [Select]
Fatal error: Call to a member function register_vars() on a non-object in /www/01/************/rskpower/includes/page_header.php on line 85
What i missed or did wrong ?
I have v 1.7.4

Offline VonHerzen

  • Newbie
  • *
  • Posts: 42
    • View Profile
Re: [MOD] Ban v1.7
« Reply #243 on: July 27, 2008, 01:53:11 PM »

Hi everybody!
I would like to install this MOD but I have tried to download the files from the link in post #1 [http://gallery.vano.org/file64dl] and it does not work. Where I can find the necessary files to install this MOD? (ban_install.php, ban.php & ban.html)
Thx!

Offline VonHerzen

  • Newbie
  • *
  • Posts: 42
    • View Profile
Re: [MOD] Ban v1.7
« Reply #244 on: July 27, 2008, 02:03:27 PM »

Hey! It is situated under a line after 1.0 (2005-03-28) I was not able to find it! sorry!  :oops: and thanks for the clue ivan!  :D

Offline Sunny C.

  • Addicted member
  • ******
  • Posts: 1.805
  • I ♥ 4I
    • View Profile
Re: [MOD] Ban v1.7
« Reply #245 on: July 29, 2008, 01:48:46 PM »
Works perfectly on 1.7.6!
Nice Mod!

Offline RatedRWHC

  • Newbie
  • *
  • Posts: 22
    • View Profile
Re: [MOD] Ban v1.7
« Reply #246 on: August 30, 2008, 02:07:54 AM »
the package u have to download link dosnt work for me :S

Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Global Moderator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
Re: [MOD] Ban v1.7
« Reply #247 on: August 30, 2008, 02:53:49 AM »
the package u have to download link dosnt work for me :S
Link corrected.
Just so you know, all my mods that have files to download have the files as attachment to the post.
Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)

Offline axlrose

  • Newbie
  • *
  • Posts: 17
    • View Profile
    • A free classified ads online
Re: [MOD] Ban v1.7
« Reply #248 on: September 08, 2008, 08:49:34 AM »
Got an error here installed on 4images 1.7.6:

the errors:
/* MOD BAN START INSERT */ $lang['ban_banned'] = "You've been banned"; /* MOD BAN END INSERT *//* MOD BAN START INSERT */ define("BAN_TABLE", $table_prefix."ban"); define("BAN_LOGS_TABLE", $table_prefix."ban_logs"); define("BAN_IP", 1); define("BAN_HOSTNAME", 2); define("BAN_USERID", 3); define("BAN_NAME", 4); define("BAN_EMAIL", 5); /* MOD BAN END INSERT *//* MOD BAN START INSERT */ function check_ban() { global $user_info, $site_sess, $config, $lang, $site_db, $HTTP_GET_VARS; $types = array("ip", "hostname", "name", "user_id", "email"); if (!$config['ban_update']) { return false; } if ($user_info['user_level'] == ADMIN) { if (!isset($HTTP_GET_VARS['bantest'])) return false; $return = true; foreach ($types as $key) { if (isset($HTTP_GET_VARS[$key]) && $$key = $HTTP_GET_VARS[$key]) $return = false; else $$key = ""; } if ($return) return false; $force = true; } else { $ip = $site_sess->session_info['session_ip']; $email = $user_info['user_email']; $user_id = $user_info['user_id']; $name = $user_info['user_name']; $hostname = ""; $force = false; } $ban = false; $ban_checked = $site_sess->get_session_var("ban_checked"); $ban_userid = $site_sess->get_session_var("ban_userid"); $ban_banned = $site_sess->get_session_var("ban_banned"); if (get_magic_quotes_gpc() != 0) { $ban_banned = stripslashes($ban_banned); } // $ban_banned = stripslashes($ban_banned); //uncomment this line if magic_quotes_gpc is turned on on your server $ban_banned = ($ban_banned) ? unserialize($ban_banned) : ""; if ($force || (!$ban_checked || !$ban_userid || ($ban_userid && $ban_userid != $user_info['user_id']) || ($ban_checked && $ban_checked < $config['ban_update']) || ($ban_banned && $ban_banned['expire'] < time()))) { $query = array(); if (preg_match('/^(\d{1,3})\.(\d{1,3})\.(\d{1,3})\.(\d{1,3})$/', $ip, $ip_chop) == 1) { $query[] = "(type = ".BAN_IP." AND ($ip_chop[1] BETWEEN ip1_start AND ip1_end) AND ($ip_chop[2] BETWEEN ip2_start AND ip2_end) AND ($ip_chop[3] BETWEEN ip3_start AND ip3_end) AND ($ip_chop[4] BETWEEN ip4_start AND ip4_end))"; if ($config['look_hostname'] && !$hostname) { $hostname = @gethostbyaddr($ip); } } if ($hostname) { $query[] = "(type = ".BAN_HOSTNAME." AND ('$hostname' LIKE hostname))"; } if ($email) { $query[] = "(type = ".BAN_EMAIL." AND ('".addslashes($email)."' LIKE email))"; } if ($user_id && $user_id > GUEST) { $query[] = "(type = ".BAN_USERID." AND user_id = ".$user_id.")"; } if ($name) { $query[] = "(type = ".BAN_NAME." AND ('".addslashes($name)."' LIKE name))"; } if (!empty($query)) { $sql = "SELECT id, type, message, date, expire FROM ".BAN_TABLE." WHERE (".implode(' OR ', $query).")"; if ($result = $site_db->query($sql)) { while ($row = $site_db->fetch_array($result)) { $site_sess->set_session_var("ban_banned", addslashes(serialize($row))); if ($row['date'] <= time() && (!$row['expire'] || $row['expire'] > time())) { $ban = $row; break; } } } else { $site_sess->set_session_var("ban_banned", ""); } } $site_sess->set_session_var("ban_checked", time()); $site_sess->set_session_var("ban_userid", $user_info['user_id']); } elseif ($ban_banned && $ban_banned['date'] <= time() && (!$ban_banned['expire'] || $ban_banned['expire'] > time())) { $ban = $ban_banned; } return $ban; } /* MOD BAN END INSERT */
Parse error: syntax error, unexpected '}' in /home/freeads/public_html/includes/sessions.php on line 497

Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Global Moderator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
Re: [MOD] Ban v1.7
« Reply #249 on: September 08, 2008, 10:47:30 AM »
Oh wow, this is a first.
Have you installed any mods before? I'm not sure what to blame, your editor, FTP client or...

All I can suggest is restore your backups and try again.
Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)

Offline axlrose

  • Newbie
  • *
  • Posts: 17
    • View Profile
    • A free classified ads online
Re: [MOD] Ban v1.7
« Reply #250 on: September 08, 2008, 11:41:27 AM »
Oh wow, this is a first.
Have you installed any mods before? I'm not sure what to blame, your editor, FTP client or...

All I can suggest is restore your backups and try again.

No, this is my first to do it.
Already restored my back-up?

hmmm... what's wrong in there?

Offline V@no

  • If you don't tell me what to do, I won't tell you where you should go :)
  • Global Moderator
  • 4images Guru
  • *****
  • Posts: 17.849
  • mmm PHP...
    • View Profile
    • 4images MODs Demo
Re: [MOD] Ban v1.7
« Reply #251 on: September 08, 2008, 11:46:51 AM »
hmmm... what's wrong in there?

I have no clue. But I'd guess its your editor? What did you use to edit files?
Your first three "must do" before you ask a question:
Please do not PM me asking for help unless you've been specifically asked to do so. Such PMs will be deleted without answer. (forum rule #6)
Extension for Firefox/Thunderbird: Master Password+    Back/Forward History Tweaks (restartless)    Cookies Manager+    Fit Images (restartless for Thunderbird)

Offline axlrose

  • Newbie
  • *
  • Posts: 17
    • View Profile
    • A free classified ads online
Re: [MOD] Ban v1.7
« Reply #252 on: September 08, 2008, 11:55:14 AM »
hmmm... what's wrong in there?

I have no clue. But I'd guess its your editor? What did you use to edit files?

I am using dreamweaver...

Offline Sunny C.

  • Addicted member
  • ******
  • Posts: 1.805
  • I ♥ 4I
    • View Profile
Re: [MOD] Ban v1.7
« Reply #253 on: September 08, 2008, 03:02:43 PM »
Works finde with 1.7.6

Offline komsho24

  • Newbie
  • *
  • Posts: 24
    • View Profile
Re: [MOD] Ban v1.7
« Reply #254 on: November 22, 2008, 05:13:01 PM »
V@no Great mod realy... thank you !


I have question.. first sorry on my bad english...

secund..

how i can set a ban link on user profile !?  So when i (like administrator) go on some user profil and click a ban link, new windows should be open in control napel.. so i have automactly set a ban on user nick or ip...

I need something like... when i on control napel click on ban link, and have link above "Who's online ?" when i click on this link, i see online users and BAN link, so if i click on ban i can ban a user without typing anything... !?

P.S. Sorry on my bad english :-)


Thank you !