Jump to content

goodwords.txt


rocknrollover

Recommended Posts

If anyone can add some insight I would appreciate it.

 

L

 

 

FFAScript Advertising Discussion Forum

FFAScript.com => FFAScript Project - Troubleshooting and Problems => Topic started by: rocknrollover on January 17, 2011, 06:42:40 PM

 

 

--------------------------------------------------------------------------------

Title: goodwords.txt

Post by: rocknrollover on January 17, 2011, 06:42:40 PM

--------------------------------------------------------------------------------

 

Anyone customize your script? 

 

I've done that extensively (dogffa.com) but I'm stuck on goodwords.txt

 

How can I change this part of the script so that a goodwords.txt list is required in the description to post.

 

For example unless the discription contains "German Shepard" or "GSD" then the submission is rejected

 

Thanks, L

 

##################################################################################################

 

  $filename = "badwords.txt";

  if (file_exists($filename))

  {

    chmod($filename,0666);

    $x = 0;

    $fil = fopen($filename,"r");

    while(!feof($fil))

    {

      $badword = fgets($fil,4096);

      $badword = trim($badword);

      if ($badword)

      {

        if (strpos($title,$badword))

        {

          $x = 1;

          break;

        }

      }

    }

    fclose($fil);

    chmod($filename,0000);

  }

 

  if ($x)

  {

    echo "<center><b>You have forbidden words in your description<br>";

    echo "<a href=\"javascript:window.history.go(-1)\">Click here to go back</b></a></center>";

    exit;

  }

 

#####################################################################################################

 

 

 

--------------------------------------------------------------------------------

Title: Re: goodwords.txt

Post by: webnet on January 17, 2011, 07:15:58 PM

--------------------------------------------------------------------------------

 

This is the code you need...

Just replace the new code with the old code.

Then you can use the badwords text field in the admin area to put in the good words.

 

###################################

 

$filename = "badwords.txt";

  if (file_exists($filename))

  {

    chmod($filename,0666);

    $x = 0;

    $fil = fopen($filename,"r");

    while(!feof($fil))

    {

      $badword = fgets($fil,4096);

      $badword = trim($badword);

      if ($badword)

      {

        if (!strpos($title,$badword))

        {

          $x = 1;

          break;

        }

      }

    }

    fclose($fil);

    chmod($filename,0000);

  }

 

  if ($x)

  {

    echo "<center><b>You need some special words in your description before you can submit<br>";

    echo "<a href=\"javascript:window.history.go(-1)\">Click here to go back</b></a></center>";

    exit;

  }

 

###########################################################

 

 

--------------------------------------------------------------------------------

Title: Re: goodwords.txt

Post by: rocknrollover on January 17, 2011, 07:53:37 PM

--------------------------------------------------------------------------------

 

Talk about a fix... I'm in one... I have changed a great deal.

 

I modified the script a long time ago... never noticed the badwords didn't work.

 

Now I have the same problem as "Script Not Blocking Bad Words or Duplicate Posts!"

 

And I can download the new script that is fixed but weeding through it to find the changes ... what a job!

 

Can you give me a hint what correction and what file makes the badword funtion work?

 

 

 

 

--------------------------------------------------------------------------------

Title: Re: goodwords.txt

Post by: webnet on January 17, 2011, 08:10:23 PM

--------------------------------------------------------------------------------

 

The badword function is in the submit.php file.

 

 

--------------------------------------------------------------------------------

Title: Re: goodwords.txt

Post by: rocknrollover on January 17, 2011, 08:17:22 PM

--------------------------------------------------------------------------------

 

Thanks. I found that and replaced it with your new modification.

 

But where is the fix to ""Script Not Blocking Bad Words or Duplicate Posts!"

 

The bad word didn't used to work... you fixed it. I don't think it was at submit.php.

 

THanks for your time. I appreciate it.

 

 

 

--------------------------------------------------------------------------------

Title: Re: goodwords.txt

Post by: webnet on January 17, 2011, 08:47:28 PM

--------------------------------------------------------------------------------

 

it is a good idea if you download the latest version of the ffa script.

Then you take the submit.php file from the latest version and replace

the code shown above and then use it in the version you are running right now.

 

 

--------------------------------------------------------------------------------

Title: Re: goodwords.txt

Post by: rocknrollover on January 17, 2011, 08:55:34 PM

--------------------------------------------------------------------------------

 

I'm sorry. I did that... ran the 4.1 original submit.php it didn't catch badwords.

 

And then I substituted the news code.. and it didn't exclude words other than those in badwords.txt.

 

Is there anything other than this... permissions... other modifications in other places?

 

It is almost like it is still running... the old old version... hang on I have an idea...

 

L

 

 

--------------------------------------------------------------------------------

Title: Re: goodwords.txt

Post by: webnet on January 17, 2011, 09:07:21 PM

--------------------------------------------------------------------------------

 

Use this code...

 

#######################################

 

$filename = "badwords.txt";

  if (file_exists($filename))

  {

    chmod($filename,0666);

    $x = 0;

    $fil = fopen($filename,"r");

    while(!feof($fil))

    {

      $badword = fgets($fil,4096);

      $badword = trim($badword);

      if ($badword)

      {

        if (!strpos(strtolower($title),strtolower($badword)))

        {

          $x = 1;

          break;

        }

      }

    }

    fclose($fil);

    chmod($filename,0000);

  }

 

 

  if ($x)

  {

    echo "<center><b>You need some special words in your description before you can submit</b><br>";

    echo "<a href=\"javascript:window.history.go(-1)\">Click here to go back</a></center>";

    exit;

  }

 

#######################################################

 

 

--------------------------------------------------------------------------------

Title: Re: goodwords.txt

Post by: rocknrollover on January 17, 2011, 09:28:31 PM

--------------------------------------------------------------------------------

 

That seems to prevent all words...

 

Listen, I got to run. I appreciate your time.

 

I will have to start all over again on a different day.

 

Thanks,

 

LEe

 

 

--------------------------------------------------------------------------------

Title: Re: goodwords.txt

Post by: rocknrollover on January 18, 2011, 02:33:58 PM

--------------------------------------------------------------------------------

 

Well, I created a new FFA.. from the 4.1 and it does exclude the bad words as it is snd upposed to.

However I take 4.1 submit.php to my modified dog FFA pages and it fails.

 

and I tried both of the suggested dogs pasted into the new FFA and neither work to require the words in badwords.txt

 

Forget about fixing my modifications problem ... I would be happy find a code that will require certain words in 4.1.

 

If something comes to mind please let me know.

 

Appreciate it.

 

Lee

 

 

 

Powered by SMF 1.1.12 | SMF © 2006-2009, Simple Machines LLC 

 

Link to comment
Share on other sites

Okay, we will start all over...

 

Anyone customize a FFA script? 

 

I've done that extensively (dogffa.com) but I'm stuck on goodwords.txt

 

How can I change this part of the script so that a goodwords.txt list is required in the description to post.

 

For example unless the discription contains "German Shepard" or "GSD" then the submission is rejected

 

Thanks, L

 

##################################################################################################

 

  $filename = "badwords.txt";
  if (file_exists($filename))
  {
    chmod($filename,0666);
    $x = 0;
    $fil = fopen($filename,"r");
    while(!feof($fil))
    {
      $badword = fgets($fil,4096);
      $badword = trim($badword);
      if ($badword)
      {
        if (strpos($title,$badword))
        {
          $x = 1;
          break;
        }
      }
    }
    fclose($fil);
    chmod($filename,0000);
  }

  if ($x)
  {
    echo "<center><b>You have forbidden words in your description<br>";
    echo "<a href=\"javascript:window.history.go(-1)\">Click here to go back</b></a></center>";
    exit;
  }

#####################################################################################################

 

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.