Author Topic: Disable auto-approve on blogs  (Read 812 times)

djstormag

  • Newbie
  • *
  • Posts: 30
Disable auto-approve on blogs
« on: September 08, 2010, 06:09:46 PM »
Hello everyone!

I'm wondering if I can somehow disable auto-approve on blogs posted. I got spammers on my website, posting some not-related to my website blogs with links inside.

What I want to do is to disable auto-approve option for blogs, and change it to status "pending" when someone has posted a blog.

Any help or suggestions will be really appreciated!

djstormag

  • Newbie
  • *
  • Posts: 30
Re: Disable auto-approve on blogs
« Reply #1 on: September 10, 2010, 09:16:01 PM »
ok, finally i got it done by myself exploring file blogs.php:

All you have to do is:

Open blogs.php file and find the next code inside it:

Quote
// enter new blog info into blog table

   $sql = "INSERT INTO blogs(blog_owner, user_id, viewtime, title, title_seo, description, tags, category, category_id, blog_story,

                 date_created, allow_replies, allow_ratings, rating_number_votes, rating_total_points,

                 updated_rating, public_private, approved, number_of_views, featured, promoted)

             VALUES('$blog_owner', '$user_id', '$viewtime', '$title', '$title_seo', '$description', '$tags', '$insert_category_name',

                  '$insert_category_id', '$blog_story', NOW(), '$allow_replies', '$allow_rating', 0, 0, 0,'$public_private', 'yes', 0, 'no', 'no')";

   @mysql_query($sql);

and change it to:
Quote
// enter new blog info into blog table

   $sql = "INSERT INTO blogs(blog_owner, user_id, viewtime, title, title_seo, description, tags, category, category_id, blog_story,

                 date_created, allow_replies, allow_ratings, rating_number_votes, rating_total_points,

                 updated_rating, public_private, approved, number_of_views, featured, promoted)

             VALUES('$blog_owner', '$user_id', '$viewtime', '$title', '$title_seo', '$description', '$tags', '$insert_category_name',

                  '$insert_category_id', '$blog_story', NOW(), '$allow_replies', '$allow_rating', 0, 0, 0,'$public_private', 'pending', 0, 'no', 'no')";

   @mysql_query($sql);

so we changed only the one VALUE: 'yes' (which is associated with sql query 'approved') to 'pending', so now all the new blogs won't be auto-approved. You can easily review them and approve through Siteadmin -> Media -> Blogs -> Pending


JacksonMcGinley

  • Newbie
  • *
  • Posts: 2
Re: Disable auto-approve on blogs
« Reply #2 on: September 23, 2010, 12:26:22 PM »
Thanks and thanks again, it works great.

                                    Jackson

seimac82

  • Newbie
  • *
  • Posts: 22
Re: Disable auto-approve on blogs
« Reply #3 on: January 11, 2011, 06:31:35 PM »
 :o wow!! it works perfectly. Only, you have to modify english.php to say "your blog is pending approval" instead of "your blog has been posted"

You are good man. Good job.


www.wesharechrist.com