boardom Forum Index boardom
b2 message board
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

[Hack] Comments Blacklist
Goto page Previous  1, 2, 3, 4, 5, 6, 7, 8, 9, 10  Next
 
Post new topic   Reply to topic    boardom Forum Index -> Hacks
View previous topic :: View next topic  
Author Message
Cyberian75



Joined: 26 Sep 2002
Posts: 1278
Location: Oregon

PostPosted: Tue Dec 21, 2004 6:42 pm    Post subject: Reply with quote

Use this instead...
Code:
[^http:\/\/]?[a-z0-9]*\.?[a-z0-9\-]+\.[a-z]{2,6}

_________________
Michael P.

Back to top
View user's profile Send private message AIM Address
ReiXou



Joined: 06 Aug 2003
Posts: 10

PostPosted: Wed Dec 22, 2004 8:58 am    Post subject: Reply with quote

Cyberian75 wrote:
Actually, "http://www.google.com" should come out as ".google.com" which is used to compared with the URLs in the database. I just did my own testing, and it passed. In your case, you may have a term "google" in your database.


No I have not. And the same happens with every adress starting with "www." !
I must have a problem somewhere. Or maybe a different version of php.
_________________
Olivier
Back to top
View user's profile Send private message Visit poster's website
Cyberian75



Joined: 26 Sep 2002
Posts: 1278
Location: Oregon

PostPosted: Thu Dec 30, 2004 2:53 am    Post subject: Reply with quote

Could someone please provide me with a pattern that can take (or match) only the domain name portion of an URL??? For example, from "http://www.example.com," it should be able to take only ".example."

I will credit you accordingly. Thanks. Smile
_________________
Michael P.

Back to top
View user's profile Send private message AIM Address
stevem



Joined: 15 Mar 2003
Posts: 326

PostPosted: Thu Dec 30, 2004 12:40 pm    Post subject: Reply with quote

Regular expressions can be somewhat of a pain so why don't you use something like the following, which is simple to use if turned into a function
Code:
$host=str_replace("http://","",$host);
$array=explode(".",$host);
if (substr($array[0],0,3)=="www"){
     $answer=$array[1];
} else {
     $answer=$array[0];
}
echo $answer;

Ths will give you example (easy to add in . if you want) for
Code:
$host="http://www.example.com"
$host="www.example.com"
$host="http://www2.example.com"
$host="http://example.com"
etc
Back to top
View user's profile Send private message
Cyberian75



Joined: 26 Sep 2002
Posts: 1278
Location: Oregon

PostPosted: Thu Dec 30, 2004 6:45 pm    Post subject: Reply with quote

Thanks for the idea. Smile
_________________
Michael P.

Back to top
View user's profile Send private message AIM Address
Cyberian75



Joined: 26 Sep 2002
Posts: 1278
Location: Oregon

PostPosted: Thu Dec 30, 2004 8:45 pm    Post subject: Reply with quote

Code:
//CHANGELOG
//
//0.8.0: Implemented a smarter URL matching (step 4).
//

_________________
Michael P.

Back to top
View user's profile Send private message AIM Address
ReiXou



Joined: 06 Aug 2003
Posts: 10

PostPosted: Thu Jan 06, 2005 9:41 am    Post subject: Reply with quote

Your modification is working fine, thank you.

But now I have another pb (gasp !) :

for EVERY comment that I want to add to the balcklist, I have the same message :
Quote:
Deleting...
Comment ID #13430 (insert error: Duplicate entry '127' for key 1)


Do you know where this comes from ?
_________________
Olivier
Back to top
View user's profile Send private message Visit poster's website
turtelina



Joined: 25 Jan 2002
Posts: 45
Location: Austria

PostPosted: Thu Jan 06, 2005 3:19 pm    Post subject: Reply with quote

EDIT:

See this is what happens when you dont check the thread regularly like I did. Michael posted a bugfix for it on page 7.
Back to top
View user's profile Send private message Visit poster's website
ReiXou



Joined: 06 Aug 2003
Posts: 10

PostPosted: Thu Jan 06, 2005 3:45 pm    Post subject: Reply with quote

turtelina wrote:
EDIT:

See this is what happens when you dont check the thread regularly like I did. Michael posted a bugfix for it on page 7.


Thanks a lot I try it immediatly (and yes, I missed that message).

EDIT (OK it works I was limited to only 127 IPs, that is, mmmh)
_________________
Olivier
Back to top
View user's profile Send private message Visit poster's website
Cyberian75



Joined: 26 Sep 2002
Posts: 1278
Location: Oregon

PostPosted: Thu Jan 06, 2005 7:03 pm    Post subject: Reply with quote


_________________
Michael P.

Back to top
View user's profile Send private message AIM Address
salterbomb



Joined: 11 Jan 2005
Posts: 6

PostPosted: Sat Jan 15, 2005 11:16 pm    Post subject: Reply with quote

well i seem to have a small problem now. someone hacked my b2 files to where i couldn't see anything when i logged into b2. i re-installed b2 (forgot to save my templates!!!) but now when i install the blacklist from fresh i get a blank page when i click the link on the admin page.

any ideas?
Back to top
View user's profile Send private message
Cyberian75



Joined: 26 Sep 2002
Posts: 1278
Location: Oregon

PostPosted: Sat Jan 15, 2005 11:29 pm    Post subject: Reply with quote

salterbomb wrote:
well i seem to have a small problem now. someone hacked my b2 files to where i couldn't see anything when i logged into b2. i re-installed b2 (forgot to save my templates!!!) but now when i install the blacklist from fresh i get a blank page when i click the link on the admin page.

any ideas?


Do your posts show up on the admin page???
_________________
Michael P.

Back to top
View user's profile Send private message AIM Address
salterbomb



Joined: 11 Jan 2005
Posts: 6

PostPosted: Sat Jan 15, 2005 11:40 pm    Post subject: Reply with quote

yeah, i see everything now. i can click on ban and delete when i view the comments but when i click on the blacklist link to go to the blacklists page and search for IP's, etc, i get a blank white page.

i'm going over the coding in the instructions again but i am 100% sure i did it right. it used to work except i had that bug that was fixed on page 7. now that i had to reinstall everything due to some jerk, it's not coming up correctly.
Back to top
View user's profile Send private message
Cyberian75



Joined: 26 Sep 2002
Posts: 1278
Location: Oregon

PostPosted: Sat Jan 15, 2005 11:46 pm    Post subject: Reply with quote

salterbomb wrote:
yeah, i see everything now. i can click on ban and delete when i view the comments but when i click on the blacklist link to go to the blacklists page and search for IP's, etc, i get a blank white page.


Perhaps there are no commemts...? I haven't seen or had a problem like that.
_________________
Michael P.

Back to top
View user's profile Send private message AIM Address
salterbomb



Joined: 11 Jan 2005
Posts: 6

PostPosted: Sat Jan 15, 2005 11:51 pm    Post subject: Reply with quote

hmmmmm, let me try to explain it better.

if i log into b2, i am immediately taken to the "post/edit" page. from there i can scroll down and see every post i've ever made and the comments made in them. from there i can click on the comments link and it will show me comments from the post i am looking at. in that instance i can click on "ban & delete" under each comment made for said post and it will go away.

however, if i click on the "blacklist" link on the top of the b2 menu (blacklist is next to "template" in the menu) i get nothing but a blank white page. it just doesn't display the normal blacklist page at all. i see nothing therefore i can't do the normal thing like search for IP's or search for keywords or even see the dropdown list of who has been banned.

edit: i just fixed it. here's what needs to be redone in the blacklist instructions:

when you make the blacklist.php file, there are 2 things wrong. one is that there's one extra <?php in the beginning of the coding. that needs to be deleted. the next is at the very bottom it should read /* </Blacklist> */ but it reads /* </Blanklist> */. just change the N to a C and all is well.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    boardom Forum Index -> Hacks All times are GMT + 1 Hour
Goto page Previous  1, 2, 3, 4, 5, 6, 7, 8, 9, 10  Next
Page 9 of 10

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB 2 © 2001, 2002 phpBB Group