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

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

0 Members and 1 Guest are viewing this topic.

Offline Chicco

  • Full Member
  • ***
  • Posts: 211
    • View Profile
    • The Picture World
Re: [MOD] Ban v1.6.2
« Reply #120 on: March 15, 2006, 04:07:32 PM »
Ich habe nun ein riesen Problem.
Anfangs, als ich diesen Mod eingebaut hatte, hat dieser super funktioniert. Seit kurzem habe ich nun den Mod (http://www.4homepages.de/forum/index.php?topic=6220.0) drin, bei dem User verschiedene Templates auswählen können. Dabei wird unter anderem aus der global.php folgender Code herausgenommen (step 1.2):

include (ROOT_PATH.'includes/template.php');
$site_template = new Template(TEMPLATE_PATH);

Jetzt musste ich feststellen, das mein BAN-Mod nicht mehr geht!!! Bekomme die Fehlermeldung:
Fatal error: Call to a member function on a non-object in /var/www/web517/html/THEPICTUREWORLD/includes/page_header.php on line 86

Also habe ich diese beiden Zeilen wieder eingebaut. Dann geht aber meine Seite nicht mehr!!!

Was ist da los?

Sorry, das evtl. bei diesem Thread eher falsch bin und eher zu dem Thread mit dem User Templates muss...aber kann ich ja ggf. noch nachträglich machen....;-)


Wissen ist MACHT! Nix zu wissen macht aber auch nix! ;-)

Gruß
Ch¿cco

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.6.2
« Reply #121 on: March 16, 2006, 01:56:20 AM »
In Step 4 you will need insert the code below the code from members template mod...
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 Chicco

  • Full Member
  • ***
  • Posts: 211
    • View Profile
    • The Picture World
Re: [MOD] Ban v1.6.2
« Reply #122 on: March 16, 2006, 08:45:15 AM »
Perfect! Thanks V@ano. Its work! :D

I have change the code on the session.php after the mod members template. BAN and MEMBER TEMPLATE is work perfect! 8)

Thank you.


Wissen ist MACHT! Nix zu wissen macht aber auch nix! ;-)

Gruß
Ch¿cco

Offline pipemba

  • Newbie
  • *
  • Posts: 10
    • View Profile
Re: [MOD] Ban v1.6.2
« Reply #123 on: March 20, 2006, 02:20:29 PM »
Why he could enter??





Others do not work also bans.
All to whom have forbidden an input can quietly enter and to look a photo and to write the comments


4images 1.7.1

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.6.2
« Reply #124 on: March 20, 2006, 02:34:38 PM »
Try to follow our discussion for atleast 2 pages started from this reply:
http://www.4homepages.de/forum/index.php?topic=7066.msg36656#msg36656
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 pipemba

  • Newbie
  • *
  • Posts: 10
    • View Profile
Re: [MOD] Ban v1.6.2
« Reply #125 on: March 21, 2006, 06:15:32 PM »
Try to follow our discussion for atleast 2 pages started from this reply:
http://www.4homepages.de/forum/index.php?topic=7066.msg36656#msg36656
ÿ íå äðóæó ñ àíãëèéñêèì ÿçûêîì ;(
íî ìíå î÷åíü ñðî÷íî íóæíî ÷òîáû  ýòîò ìîä çàðàáîòàë
Âàíî ïîìîãè ïîæàëóéñòà....
åñëè ìîæíî â êîíêðåòíûõ ïðèìåðàõ òîãî, ÷òî íóæíî ñäåëàòü
ìîæåø ïîïðîáûâàòü çàéòè êî ìíå íà ñàéò: http://chat.compot.ru/foto
ÿ ïîñòàâèë íà òåáÿ áàí
IP 65.35.35.* 2006-03-21 20:09:57 Never test ban test ban [Ðåäàêòèðîâàòü]   [Copy]   [Óäàëèòü]   [Test]

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.6.2
« Reply #126 on: March 22, 2006, 01:16:36 AM »
Значит мод не правильно установлен. Он работает без проблем как на v1.7 так и на v1.7.1 (на v1.7.2 тоже должен работать). Попробуй переустановить ещё раз.
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 wallpapers

  • Full Member
  • ***
  • Posts: 107
    • View Profile
    • Tuned-Cars.Net
Re: [MOD] Ban v1.6.2
« Reply #127 on: March 22, 2006, 06:54:48 AM »
MOD is installed in version 1.7.2 and has no problems  :D



Offline Bear

  • Jr. Member
  • **
  • Posts: 56
    • View Profile
Re: [MOD] Ban v1.6.2
« Reply #128 on: March 22, 2006, 10:37:03 PM »
using version 1.7.1 and MySQL 4.1.12

getting an error when clicking ban in admin control, looks like its looking for the wrong table.
mine is
web16_4images_ban
web16_4images_ban_logs

how can i correct ????

thank you

Code: [Select]
DB Error: Bad SQL Query: SELECT count(id) as num FROM BAN_TABLE WHERE (type=0 OR type = BAN_IP OR type = BAN_HOSTNAME OR type = BAN_NAME OR type = BAN_EMAIL OR type = BAN_USERID) AND date <= 1143063022 OR date > 1143063022 OR (expire AND expire <= 1143063022)
Table 'web16_images.BAN_TABLE' doesn't exist

DB Error: Bad SQL Query: SELECT * FROM BAN_TABLE WHERE (type=0 OR type = BAN_IP OR type = BAN_HOSTNAME OR type = BAN_NAME OR type = BAN_EMAIL OR type = BAN_USERID) AND date <= 1143063022 OR date > 1143063022 OR (expire AND expire <= 1143063022) ORDER BY type asc LIMIT 0, 30
Table 'web16_images.BAN_TABLE' doesn't exist


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.6.2
« Reply #129 on: March 23, 2006, 12:33:03 AM »
Missed Step 2 ?
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 Bear

  • Jr. Member
  • **
  • Posts: 56
    • View Profile
Re: [MOD] Ban v1.6.2
« Reply #130 on: March 23, 2006, 01:07:11 PM »
solved that one thank you  :D

got another problem and i know whats causing it but cannot remember why the line of code was removed
in Step 4
Open includes/sessions.php
Find:
Code: [Select]
$user_info = $site_sess->return_user_info(); That line is missing i only have
Code: [Select]
$session_info = $site_sess->return_session_info();]
If i add step 4 code below this i them get this error on home page and cannot log in to home or admin control.
Code: [Select]
DB Error: Bad SQL Query: SELECT a.cat_id, a.auth_viewcat, a.auth_viewimage, a.auth_download, a.auth_upload, a.auth_directupload, a.auth_vote, a.auth_sendpostcard, a.auth_readcomment, a.auth_postcomment FROM 4images_groupaccess a, 4images_groupmatch m WHERE m.user_id = AND a.group_id = m.group_id AND m.groupmatch_startdate <= 1143114575 AND (groupmatch_enddate > 1143114575 OR groupmatch_enddate = 0)
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'AND a.group_id = m.group_id AND m.groupmatch_startdate <= 114311457' at line 4

DB Error: Bad SQL Query: SELECT a.cat_id, a.auth_viewcat, a.auth_viewimage, a.auth_download, a.auth_upload, a.auth_directupload, a.auth_vote, a.auth_sendpostcard, a.auth_readcomment, a.auth_postcomment FROM 4images_groupaccess a, 4images_groupmatch m WHERE m.user_id = AND a.group_id = m.group_id AND m.groupmatch_startdate <= 1143114576 AND (groupmatch_enddate > 1143114576 OR groupmatch_enddate = 0)
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'AND a.group_id = m.group_id AND m.groupmatch_startdate <= 114311457' at line 4
If i add the missing line then every thing works fine but i am not sure why the line of code was removed, just checking through my mods as i feel it must have been removed due to one of them.
Is there a work round to this missing line.
Thank you again

Offline RoadDogg

  • Sr. Member
  • ****
  • Posts: 488
    • View Profile
    • Düsipixel
suggestions
« Reply #131 on: April 03, 2006, 08:17:35 PM »
In "secure code at comment"-thread we´ve worked some suggestions out, how this Ban Mod can be improved
http://www.4homepages.de/forum/index.php?topic=11405.msg66532#msg66532

You´re right, I´ve tested this Mod now.

An Improvement would be to ban
- selected comment headline
- selected comment text

- to add an obligatory email field und ban selected email adresses

just some ideas :)
For support requests please don´t forget link to your Gallery/to phpinfo.php
Code: [Select]
<?
phpinfo()
?>
safe_mode must turned OFF
Please check Error Messages

Offline sau4scr

  • Newbie
  • *
  • Posts: 34
    • View Profile
Re: [MOD] Ban v1.6.2
« Reply #132 on: April 04, 2006, 03:47:37 AM »
Great mod!

I searched through the code, but I want to add the ban ability on the comments page in ACP to be able to just click ban and it automatically bans them? I can not find the code where it spits out the url to take it to the ban page. Any help would be great.

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.6.2
« Reply #133 on: April 04, 2006, 04:22:30 AM »
You can try replace in details.php
Code: [Select]
      $comment_user_ip = ($user_info['user_level'] == ADMIN) ? $comment_row[$i]['comment_ip'] : "";with:
Code: [Select]
      $comment_user_ip = ($user_info['user_level'] == ADMIN) ? "<a href=\"".$site_sess->url(ROOT_PATH."admin/plugins/ban.php?ip=".$comment_row[$i]['comment_ip'])."\" target=\"_blank\">".$comment_row[$i]['comment_ip']."</a>" : "";
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 motorhead85021

  • Pre-Newbie
  • Posts: 7
    • View Profile
Re: [MOD] Ban v1.6.2
« Reply #134 on: May 08, 2006, 07:04:24 AM »
I have a question before I install this MOD:

Will this record the IP Address of whoever uploads a picture to my gallery?
I'm allowing Guests access to upload pictures.    And I'd like to able to ban an IP Address if a Guest uploads something bad.

Thanks.