• December 15, 2017, 09:20:26 AM
• Welcome, Guest. Please login or register.
 
News: It's been a while since we started working on eFiction 5, there's been a lot of starting from scratch and half-scratch, but things are moving on.
Now we need you: please visit the eFicition 5 section of the forum and raise your voice, shape the new face of your favourite fanfiction management software.

Author Topic: Handmade "Bad behavio(u)r 2" include  (Read 3603 times)

Sheepcontrol

  • Administrator
  • Veteran
  • *****
  • Posts: 280
  • Country: de
  • Thanked: 49 times
Handmade "Bad behavio(u)r 2" include
« on: August 13, 2016, 10:11:08 AM »
Hi there!

After having included it into eFiction 5 (which is still progressing), _and_ having some fellow archives being hit by spam registration, I decided to rework the "bad behaviour" filter for eFiction 3.

If you have never heard of this project, please go to their website and check it out.

Now this is not a module that simply works by uploading, but instead requires some handwork.

#1 - Language files (start simple)
Add this at the very end of your language file, right before the closing "?>" tag:

english:
Code: [Select]
// Bad Behaviour

define ("_BADBEHAVIOUR", "Bad Behaviour");
define ("_BB_BLOCKSTRING", "has blocked <strong>%1\$s</strong> access attempts in the last 7 days.");

german:
Code: [Select]
// Bad Behaviour

define ("_BADBEHAVIOUR", "Bad Behaviour");
define ("_BB_BLOCKSTRING", "hat in den letzten 7 Tagen <strong>%1\$s</strong> Zugriffe blockiert.");

The variable encapsulated in the <strong> tags is the counter, so you can easily rewrite this for your language - or rewrite it at all.

#2 - Upload files:
Extract the attached archive, which is mainly the core bad behaviour files as found at their site, the renamed setting files, a .htaccess file to protect the ini-files (which is not exactly necessary, but hey) and the eFi3 specific loader.
The files and the folder need to be uploaded into the includes/ folder.

#3 - Enable:
Open the header.php file (since this file will be loaded by every module).
Look for the string "includes/corefunctions.php" - this should exist only once, at around line 110.
Right below, add this line:
Code: [Select]
include_once(_BASEDIR."includes/bad-behaviour-efiction3.php");
Well, technically, that's it - the module will auto-create its log table and do its work.

If you want some stats displayed, here are the steps:

#4a - Stats (1)
Open includes/pagesetup.php.
At around line #109, there should be this:
Code: [Select]
$tpl->assign( "footer", $copyright);Right below, add this:
Code: [Select]
if ( function_exists('bb2_insert_stats') )
$tpl->assign("bb2stats", bb2_insert_stats() );

#4b - Stats (2)
Open the footer.tpl for the skin you want to modify, and wherever you want to, add this:
Code: [Select]
{bb2stats}
For the stats to show, "display_stats" in the settings file has to be true.

If there's an error, simply comment or remove the line you included in step #3, this will at least keep your site running until fixed.
« Last Edit: August 13, 2016, 10:12:40 AM by Sheepcontrol »
I speak the worlds most widely used language: bad english
The following users thanked this post: artphilia, Tonya, HPFanFicArchive.Com, dsecrets, banshee, Ladama

dsecrets

  • Member
  • **
  • Posts: 30
Re: Handmade "Bad behavio(u)r 2" include
« Reply #1 on: August 14, 2016, 05:06:10 AM »
Thanks for this :) I have added this to gluttonyfiction.com without error.

Sheepcontrol

  • Administrator
  • Veteran
  • *****
  • Posts: 280
  • Country: de
  • Thanked: 49 times
Re: Handmade "Bad behavio(u)r 2" include
« Reply #2 on: August 14, 2016, 09:30:33 AM »
Well that's good to hear  :cool2:
I speak the worlds most widely used language: bad english

HPFanFicArchive.Com

  • Member
  • **
  • Posts: 72
  • Country: 00
  • Thanked: 10 times
    • HPFanFicArchive.Com
Re: Handmade "Bad behavio(u)r 2" include
« Reply #3 on: August 15, 2016, 04:18:10 AM »
Just added it to my site also.  I also didn't see any issues getting it running and it has already blocked 1 attempt according to it's stats.

Will let you know what happens.

Thanks!
Chad

HPFanFicArchive.Com

  • Member
  • **
  • Posts: 72
  • Country: 00
  • Thanked: 10 times
    • HPFanFicArchive.Com
Re: Handmade "Bad behavio(u)r 2" include
« Reply #4 on: August 16, 2016, 03:31:30 AM »
So far:

Bad Behaviour has blocked 428 access attempts in the last 7 days.

Ladama

  • Member
  • **
  • Posts: 39
  • Country: us
  • Thanked: 7 times
    • MoreThanThat
Re: Handmade "Bad behavio(u)r 2" include
« Reply #5 on: August 16, 2016, 05:43:10 PM »
Thanks so much for this! Instructions were nice and easy to follow. Installed it at More Than That last night with no trouble, and 9 access attempts have been blocked so far!  :biggrin:

(just FYI to anyone lurking out there and not finding the download link, you need to be logged in to these forums to see it)
The following users thanked this post: Sheepcontrol

HPFanFicArchive.Com

  • Member
  • **
  • Posts: 72
  • Country: 00
  • Thanked: 10 times
    • HPFanFicArchive.Com
Re: Handmade "Bad behavio(u)r 2" include
« Reply #6 on: August 16, 2016, 09:07:32 PM »
Bad Behaviour has blocked 764 access attempts in the last 7 days.

No complaints from anyone that it has blocked them.

dsecrets

  • Member
  • **
  • Posts: 30
Re: Handmade "Bad behavio(u)r 2" include
« Reply #7 on: August 19, 2016, 11:48:19 AM »
I have had some spam get through from this domain name: autobestpreis.eu, that's about it so far. Bad Behaviour has blocked 171 access attempts in the last 7 days.

Ladama

  • Member
  • **
  • Posts: 39
  • Country: us
  • Thanked: 7 times
    • MoreThanThat
Re: Handmade "Bad behavio(u)r 2" include
« Reply #8 on: August 19, 2016, 08:03:44 PM »
I have had some spam get through from this domain name: autobestpreis.eu, that's about it so far. Bad Behaviour has blocked 171 access attempts in the last 7 days.
Yeah we had three spam registrations from this domain yesterday, three different IP addresses but all located in Sweden. they filled their bios with spam links and nonsense but I managed to lock them before any spam reviews were left.

HPFanFicArchive.Com

  • Member
  • **
  • Posts: 72
  • Country: 00
  • Thanked: 10 times
    • HPFanFicArchive.Com
Re: Handmade "Bad behavio(u)r 2" include
« Reply #9 on: August 19, 2016, 09:16:34 PM »
I also had the same. He hit me 6 or 8 times and I was just removing the text and link from his profile then locking the account while he was doing it. I think it was a real person doing it an not a bot. The attempts all came from different IP's but were too slow between them. I think he was changing IP's between attempts.

I wrote a little code into my site to be able to block entire email domains.  I'll clean it up a bit and post it for others to be able to use later today.

Also... Bad Behaviour has blocked 2496 access attempts in the last 7 days.  :)

Thanks,
Chad

HPFanFicArchive.Com

  • Member
  • **
  • Posts: 72
  • Country: 00
  • Thanked: 10 times
    • HPFanFicArchive.Com
Re: Handmade "Bad behavio(u)r 2" include
« Reply #10 on: August 20, 2016, 12:59:30 AM »
I just posted 3 mods that some may find helpful.  My most recent was was because of the "autobestpreis.eu" spammer: Block entire domains from registering.

They are:

Mod: Block Email Domains From Registering
http://efiction.org/forums/index.php?topic=8905.0

Mod: Registration Notice
http://efiction.org/forums/index.php?topic=8906.0

Mod: Chapter Review Notice
http://efiction.org/forums/index.php?topic=8907.0

Hope they help.

Thanks,
Chad


tagsit

  • Newbie
  • *
  • Posts: 5
  • Country: us
    • Kinnetikdreams
Re: Handmade "Bad behavio(u)r 2" include
« Reply #11 on: August 27, 2016, 07:43:25 PM »
Excellent and easy to follow instructions. Thank you so much for helping out us Newbies! Hope this helps - our site has been getting hit with about 20 of these fake registrations a week and it's really annoying. I catch them pretty quick so I don't think they've had time to spam us, but it's still a lot of work to keep up with them. Thanks for all your hard work on the coding assists either way! TAG :-D

tagsit

  • Newbie
  • *
  • Posts: 5
  • Country: us
    • Kinnetikdreams
Re: Handmade "Bad behavio(u)r 2" include
« Reply #12 on: August 31, 2016, 05:03:24 AM »
Loaded all this code without problem but not able to get the stats to show.

For the stats to show, "display_stats" in the settings file has to be true.


I'm not sure I've done this part correctly. I don't see anything in my settings about this. Anyone able to walk me through this part?

Thanks.

TAG

HPFanFicArchive.Com

  • Member
  • **
  • Posts: 72
  • Country: 00
  • Thanked: 10 times
    • HPFanFicArchive.Com
Re: Handmade "Bad behavio(u)r 2" include
« Reply #13 on: August 31, 2016, 05:13:06 AM »
Loaded all this code without problem but not able to get the stats to show.

For the stats to show, "display_stats" in the settings file has to be true.


I'm not sure I've done this part correctly. I don't see anything in my settings about this. Anyone able to walk me through this part?

Thanks.

TAG

In the bb-settings.ini file that is in /includes:

Code: [Select]
display_stats = true
Thanks,
Chad

SLWatson

  • Newbie
  • *
  • Posts: 1
  • Country: 00
    • Ad Astra :: Star Trek Fanfiction Archive
Re: Handmade "Bad behavio(u)r 2" include
« Reply #14 on: September 18, 2016, 06:10:17 AM »
This is brilliant stuff, but I'm not able to get stats to appear at the footer myself.  Have checked that logging and displaying are true, doublechecked that all code goes where it's supposed to, but no joy.  As long as it works, I'm happy, but if anyone's run into this issue and figured a way around it, let me know?

ETA: Oi.  I musta done something wrong, we got whacked with spammers last night.
« Last Edit: September 18, 2016, 06:39:06 PM by SLWatson »
eFiction user since 2009!

lucy

  • Member
  • **
  • Posts: 20
  • Country: au
  • Thanked: 1 times
Re: Handmade "Bad behavio(u)r 2" include
« Reply #15 on: October 26, 2016, 06:38:02 AM »
I got hit by spammers the other day, and I have no idea why.

Sheepcontrol

  • Administrator
  • Veteran
  • *****
  • Posts: 280
  • Country: de
  • Thanked: 49 times
Re: Handmade "Bad behavio(u)r 2" include
« Reply #16 on: October 27, 2016, 05:00:07 PM »
I got hit by spammers the other day, and I have no idea why.

Because they can and it's at almost no cost to them - sadly.
This add-on only does so much, it keeps some rude bots away, but better bots can still get past it, sadly.
I speak the worlds most widely used language: bad english

Kate

  • Veteran
  • ***
  • Posts: 120
    • Millenium Psychics
Re: Handmade "Bad behavio(u)r 2" include
« Reply #17 on: February 02, 2017, 06:36:02 PM »
Hi

Sheepcontrol - I cant get open the attachement to download. I uploaded the bad behaviour files and did the modify changes to the files that you said and its not showing on the footer yet. I take it that shows up once the site has been hit on? I hope i uploaded the right files i did not see a version for efiction 3 in their list of downloads so I got their current stable release. I hope these are the right files. Im using efiction 3.55 http://www.adrfitindreams.com

thank you i was wondering how to add in bad behaviour you been very helpful :) can u supply a download link please i not sure i got the right files. thank you

many thanks
Kate
« Last Edit: February 02, 2017, 07:10:56 PM by Kate »

artphilia

  • Administrator
  • Veteran
  • *****
  • Posts: 256
  • Country: de
  • Thanked: 12 times
  • Artphilia Designs
    • Artphilia's Blog
Re: Handmade "Bad behavio(u)r 2" include
« Reply #18 on: May 14, 2017, 09:25:53 AM »
Did you download the files that are attached to the first post?
I've just downloaded and installed Bad Bahaviour successfully at 3 archives and it works perfectly.  :think:

Kate

  • Veteran
  • ***
  • Posts: 120
    • Millenium Psychics
Re: Handmade "Bad behavio(u)r 2" include
« Reply #19 on: July 30, 2017, 07:40:54 PM »
don't worry I missed the download link in your post I re read it all again.

Ive now installed it, followed the steps to install the mod and the bbstats is not printing out for me. What am I missing and doing wrong here please? I have had a hacker already on the site this week and I have just deleted the account, so this mod would be really appreciated by me to help stop hacking and spam attempts further.

I added the code to the files as said in your instructions and added {bb2stats} to the footer. All that happens is the bb2stats shows and it does not print bad behaviour has blocked ... etc.
many thanks

will the mod work even though the stats wont print please?

kate
« Last Edit: July 31, 2017, 12:15:28 PM by Kate »

 

anything
anything