The following warnings occurred:
Warning [2] Undefined variable $settings - Line: 32 - File: inc/plugins/avatarep.php PHP 8.0.30 (Linux)
File Line Function
/inc/class_error.php 153 errorHandler->error
/inc/plugins/avatarep.php 32 errorHandler->error_callback
/inc/class_plugins.php 38 require_once
/inc/init.php 235 pluginSystem->load
/global.php 20 require_once
/showthread.php 28 require_once
Warning [2] Trying to access array offset on value of type null - Line: 32 - File: inc/plugins/avatarep.php PHP 8.0.30 (Linux)
File Line Function
/inc/class_error.php 153 errorHandler->error
/inc/plugins/avatarep.php 32 errorHandler->error_callback
/inc/class_plugins.php 38 require_once
/inc/init.php 235 pluginSystem->load
/global.php 20 require_once
/showthread.php 28 require_once
Warning [2] Undefined array key "action" - Line: 1545 - File: inc/plugins/avatarep.php PHP 8.0.30 (Linux)
File Line Function
/inc/class_error.php 153 errorHandler->error
/inc/plugins/avatarep.php 1545 errorHandler->error_callback
/inc/class_plugins.php 142 avatarep_popup
/global.php 100 pluginSystem->run_hooks
/showthread.php 28 require_once
Warning [2] Undefined variable $captcha - Line: 15 - File: global.php(587) : eval()'d code PHP 8.0.30 (Linux)
File Line Function
/inc/class_error.php 153 errorHandler->error
/global.php(587) : eval()'d code 15 errorHandler->error_callback
/global.php 587 eval
/showthread.php 28 require_once
Warning [2] Undefined variable $redirect_url - Line: 21 - File: global.php(587) : eval()'d code PHP 8.0.30 (Linux)
File Line Function
/inc/class_error.php 153 errorHandler->error
/global.php(587) : eval()'d code 21 errorHandler->error_callback
/global.php 587 eval
/showthread.php 28 require_once
Warning [2] Undefined array key "usergroup" - Line: 637 - File: inc/plugins/avatarep.php PHP 8.0.30 (Linux)
File Line Function
/inc/class_error.php 153 errorHandler->error
/inc/plugins/avatarep.php 637 errorHandler->error_callback
/inc/plugins/avatarep.php 1079 avatarep_format_avatar
/inc/class_plugins.php 142 avatarep_threads
/showthread.php 1619 pluginSystem->run_hooks
Warning [2] Undefined array key "displaygroup" - Line: 638 - File: inc/plugins/avatarep.php PHP 8.0.30 (Linux)
File Line Function
/inc/class_error.php 153 errorHandler->error
/inc/plugins/avatarep.php 638 errorHandler->error_callback
/inc/plugins/avatarep.php 1079 avatarep_format_avatar
/inc/class_plugins.php 142 avatarep_threads
/showthread.php 1619 pluginSystem->run_hooks
Warning [2] Undefined property: MyLanguage::$avatarep_user_alt_thread_contributor - Line: 1108 - File: inc/plugins/avatarep.php PHP 8.0.30 (Linux)
File Line Function
/inc/class_error.php 153 errorHandler->error
/inc/plugins/avatarep.php 1108 errorHandler->error_callback
/inc/class_plugins.php 142 avatarep_threads
/showthread.php 1619 pluginSystem->run_hooks



Hasan   07-05-2018, 12:40 AM
#1
Remove all spam comments from the database
This SQL query removes all comments marked as “spam” from the database:

DELETE FROM wp_comments WHERE wp_comments.comment_approved = 'spam';

Works great in all versions of WordPress including 3.0!

Disabling and enabling comments
In the WordPress database, the “wp_posts” table includes a column called “comment_status”, which may contain one of the following values for each row (i.e., post):

open (comments open to everyone)
closed (comments closed to everyone)
registered_only (comments open for registered/logged-in users)
Given this information, we may execute the following SQL queries (via phpMyAdmin or any other method of querying the database) to manipulate our discussion-management settings for comments:

Note: Remember to backup your database!
Globally enable comments for all users
UPDATE wp_posts SET comment_status = 'open';
Globally disable comments for all users
UPDATE wp_posts SET comment_status = 'closed';
Globally enable comments for registered users only
UPDATE wp_posts SET comment_status = 'registered_only';
Globally enable/disable comments before a certain date
For this query, specify the comment_status as either open, closed, or registered_only. Also, specify the date by editing the 2008-01-01 to match whatever date you want to target.

UPDATE wp_posts SET comment_status = 'closed' WHERE post_date < '2008-01-01' AND post_status = 'publish';
I run this query a few times each year (or as often as I can remember it) to disable comments on old posts. Ultimately, I will combine this query with a similar one (provided below) for pingbacks and trackbacks to manage discussion options with a single step.

Disabling and enabling Trackbacks & Pingbacks
Similar as before, the “wp_posts” table also includes a column called “ping_status”, which applies to both pingbacks and trackbacks, and may contain one of the following values for each row (i.e., post):

open (pingbacks/trackbacks open to everyone)
closed (pingbacks/trackbacks closed to everyone)
Given this information, we may execute the following SQL queries (via phpMyAdmin or any other method of querying the database) to manipulate our discussion-management settings for pingbacks and trackbacks:

Globally enable pingbacks/trackbacks for all users
UPDATE wp_posts SET ping_status = 'open';
Globally disable pingbacks/trackbacks for all users
UPDATE wp_posts SET ping_status = 'closed';
Globally enable/disable pingbacks/trackbacks before a certain date
For this query, specify the ping_status as either open or closed. Also, specify the date by editing the 2008-01-01 to suit your needs.

UPDATE wp_posts SET ping_status = 'closed' WHERE post_date < '2008-01-01' AND post_status = 'publish';
As before, this last query is one that I will be using a few times each year (or as often as I can remember it) to disable comments on old posts. Ultimately, I will combine this query with the comments query to produce the one-step discussion-management query provided below.

Complete, one-step discussion management
Given the queries described above, we may fashion the following “one-step” SQL queries, perfect for complete, plugin-free discussion management:

Globally enable/disable all discussion: comments, pingbacks and trackbacks
For this query, specify the comment_status as either open, closed, or registered_only. Also, specify the ping_status as either open or closed.

UPDATE wp_posts SET comment_status = 'open', ping_status = 'open' WHERE comment_status = 'closed' AND post_status = 'publish';
Globally enable/disable comments, pingbacks and trackbacks before a certain date
For this query, specify the comment_status as either open, closed, or registered_only. Also, specify the ping_status as either open or closed. Finally, specify the date by editing the 2008-01-01 to suit your needs.

UPDATE wp_posts SET comment_status = 'closed', ping_status = 'closed' WHERE post_date < '2008-01-01' AND post_status = 'publish';
That last query is perfect for manual control over the closing of both comments and xbacks for posts from a specific time period. Sure there are plugins for this, but there are also plugins that enable direct SQL commands, making it convenient for granular control over discussion intervals.

Hello World!:

- tes
- Hello Friends . Welcome Back

Hasan
  
Users browsing this thread: 1 Guest(s)
Powered By MyBB, © 2002-2024 MyBB Group.
Made with by Curves UI.