200

WP-Admin has Comments section, which gives us ability to edit comments. But they let us edit only 4 fields: Name, Email, Url, Content.

But what about another data?  This bloggy section of WordPress is outmoded and needs improvements. For example if i change Name field there, it will just change the name field in wp_comments mysql table. But authorhip is defined by user_id and user email, not by name. So changing name is not serious change.

What about wp_update_comment( $commentarr ); function? It neither doesn’t help. Although we pass userid,email parameters via $commentarr  argument, it will not take any effect. Why? For knowing the reason we should check wp core code, namely wp-includes/comment.php, we will see such piece there:

$keys = array( 'comment_content', 'comment_author', 'comment_author_email', 
'comment_approved', 'comment_karma', 'comment_author_url', 'comment_date', 
'comment_date_gmt', 'comment_parent' );
$data = wp_array_slice_assoc( $data, $keys );
$rval = $wpdb->update( $wpdb->comments, $data, compact( 'comment_ID' ) );

Continue reading

wordpress_coming_soon_plugins

Today i’m sharing one simple trick for special situation – when your website is not ready yet and you don’t want visitors to access your website, but at the same time you want to share your website to some alpha testers or friends.
With special plugins may be you can solve this, but the simple code i give below solves this problem perfectly.
Just put this code to the 1st line of your theme’s header.php. You can edit html part of code’s echo part and put there any image, message for visitors which tells them your website is coming soon or under construction. Continue reading

wordpress-bug

Sometimes you may need temporary switch debug on, to test something, then switch it off. You should go to ftp(or any other file manager) explore root folder, edit wp-config, save it, then test something and then edit again, save again. And plus in this case stranger visitors will also be able to open your website in debug mode. So simple trick is needed to do all these easily and safely.
Here is the simple trick to do it.
Go to wp-config.php, open it in editor, and replace
define(‘WP_DEBUG’, false); with

if (!empty($_GET["some_secret_parameter"])) define('WP_DEBUG', true);
else define('WP_DEBUG', false);

Type your own secret parameter instead of “some_secret_parameter”.
Then your website will work in debug=false mode. But you will always be able to open your website in debug=true mode with opening your website with such url: yourwebsite.com/?some_secret_parameter=1
This way is better right? :) And safe, as nobody knows this secret_parameter but you.

googledocs-tips-379x243

If you need to edit/create office documents (.docx,.xls,.ppt etc.) you can do it with desktop apps such as Microsoft Office, OpenOffice, LibreOffice etc, you can also do it via web applications Google Docs, Office 360.

You can also merge these two platforms in one app – Offline Google Docs. Offline Google Docs can behave itself as a desktop app.

What is desktop app for us?

-It should work offline

-It should be in my computer’s applications menu(also i should be able to create its shortcut whereever i want)

So let’s perform these. Continue reading

phone-10

Technology gives us a lot of tools to remind us in its time about something. Calendars, Alarms, Notebook apps etc. can do this.

Now we speak about reminder by locations. It is very useful tool which can remind us f.e. to buy something from gift shop when we are near. Or when we pasted half way, automatically send sms to our friend that i am arriving, half way pasted. So in such cases time is not important, but location is. I use two services for this purpose.

1. Google Keep - All Android and IOS phones can install this app. When we create any note in Google keep we can set reminder by location.  Continue reading