Writing web applications with quorum

The quorum programming language has a little known feature which you can use to create web applications. The quorum program is translated into a java servlet. Quorum masks the complexities of creating the servlet. You can then call the program from a form. You can pass the program parameters via get or post requests. You will have to generate the output dynamically in the form of a HTML page or whatever other end point format you want to use. Most of your code can remain unchanged. The key differences between a web and desktop application are below.

  • you need to use the following libraries.
    • use Libraries.Web.WebResponder
    • use Libraries.Web.WebResponse
  • The main class will have to be derived from the webresponder class.
    class Main is WebResponder
  • The main function changes. You need to use the following function.
    action Respond(WebRequest request) returns WebResponse
    WebResponse response
    //your code
    end
  • You output data to the client by using the following function.

    response:SetPageText("text to output")

The other thing you need to do is to account for situations where web aparameters are not specified. This can happen if you are using a form and the user specifies a blank parameter. You do this using the HasParameter function of the request object.

if request:HasParameter("name of parameter")
//code for handling blank parameter
else
//do something
end

Creating the program

If you are using sodbeans, go into the project’s properties and set the application to web server. Build the program and you will get a war file. You may want to change the name of the war file before building it. You can do this from the project properties dialogue. The edit box containing the name of the final project has the value of default. You can change this to whatever name you like. Once you have the war file, you move it to Tomcat’s webapps folder. In its default configuration, tomcat will deploy the web application automatically.

Calling the program

You can call the program by using its name. See the beginning of the

tag below.


The name is the same name you specified in sodbeans in the project pproperties.

Handling static resources

Your program can refer to static resources. These are not included by default in the war. You need to upload them separately. The root folder for servlets changes depends on a variety of settings. Use the
GetWorkingDirectory() method of the File class to get the servlet path. You can then copy your resources accordingly to that path and reference them as you do regularly. One of the challenges in this process is seeing the value of the working directory. You can either output it in HTML or use an output statement. The items printed by the output statement are recorded in catalina.out in the tomcat/logs folder on Linux and in the tomcat9-stdout.date.log file on Microsoft Windows.

Debugging web applications

The biggest strength when using quorum to write web server applications lies in debugging. You can change the application type to standard and then manually pass parameters via the request object. You get a jar file instead of a war file. Beware that the main action is called instead of the Respond action. See the below code from my chat bot application.

action Main

output("main method invoked")
text qt=""
WebResponse wr
WebRequest wq
output("about to invoke input")
qt=input("Human:")
wq:AddParameter("questiontext",qt)
wr=Respond(wq)

end

Once again, the main function is ignored when you switch to a web application.

Conclusion

Quorum is one of the few languages where transitions to different program running contexts is almost seemless. You can run your programs as web servers, as desktop applications, as mobile apps and as client side java script. The key differences like in the plugin architecture and in the way you reference resources. One of the key advantages of a web application is that you can continue using the same plugin infrastructure and no rewriting is required in the majority of cases.

Acknowledgements

Thanks to Professor Andreas Stefik, the lead creator of quorum for helping understand key aspects of the web application framework.
Thanks also to the members of the quorum list who continue to answer my questions about quorum queries.


Filed under: commonTasks — Tags: , , , , , — security-writer @ June 3, 2017 23:26

Writing quorum plugins

It is possible to extend quorum’s functionality by calling routines from libraries written in other languages such as java. I wanted to create a chat bot using the Program-AB library which is the reference implementation of AIML 2.0. Program-AB is written in java and I will show you how I created a plugin for this library. The basic steps to add a plugin to quorum are as follows.

  1. Create a pure java wrapper for the library you want to add and build it to a jar file..
  2. Define the relevant system actions in quorum.
  3. Use the actions in your quorum project.

Creating the java wrapper

The java wrapper will define the methods you want to use from the library. Yes I know, the library already does this but you need a way to associate the methods of the library with quorum and this is where the wrapper comes in.

  1. Create a project of type class library using the java template. Press alt+f for file, arrow to new project and activate it by pressing the enter key. Tab once to get to a list of categories where you choose java. Tab once more and choose either a java application or a java class library.
  2. You will be asked to name your library and select some other options. This is also where you can set the location of your library. Leave these options at their default settings unless you need to change something.
  3. Tab to the button labeled “Finish” and press enter.
  4. You will be placed in an empty project. Navigate the project tree until you reach an item called ‘source packages’
  5. Expand this item and you will be on an entry called default package
  6. This is where things get tricky if you are using a screen reader. You need to create a file to hold your code inside this package. You can click in the relevant window and paste your code in. However, as a screen reader user, your best option is to activate the context menu and navigate to the new option. Expand it with the right arrow key and then use the up and down arrow keys to choose java class.
  7. Tab through the resulting dialogue. You will need to enter the name of the class. You also need to enter the package name. This is crucial because it is required for quorom to asociate your wrapper as a plugin. The package name must be prefixed by plugins.quorum. Complete entering the information and hit ok to create the class.

Once you are placed in the class definition, you must add the following line immediately after the opening brace.
public java.lang.Object me_ = null;
You now must add the dependencies for this project. These are usually in the form of jar files. To add them, you do the following.

  1. Hit ctrl+1 to get to the projects tree view.
  2. Navigate to the node called libraries .
  3. Activate the context menu and arrow to the option called add jar folder and press the enter key to activate it.
  4. You will be in a dialogue that resembles the windows file open dialogue. If you are a screen reader user, you will want to paste the path to the folder containing the jar files directly into the edit box that is asking for a file name. This is because if you brows to a folder containing a subfolder and hit enter, that folder will be entered into the dialogue box. The easiest way is to grab the path from windows explorer and paste it into the file name box of the common files dialogue.
  5. Tab to the open button and press the enter key to activate it.

You now have a regular java class where you can write standard java code. If you have elected to use a java class library, you must add a main method otherwise you will be unable to build the program because netBeans will look for a main method when building the project. See the below code for an example of an empty main routine.
public static void main(String[] args) { }
If you are a screen reader user, when you build the project for the first time, you will be asked to select a main method. There is no indication that netbeans is asking you for this. You have to hit the f6 key to navigate to that dialogue box and select the main method. This is a one time operation.

Note

Keep the name that you have defined and the name of the package handy before moving to the next section.

Defining quorum actions

You need to create a quorum project. You can choose the games template or whatever project you like. The steps to create a new project within netbeans are the same as given in the section on creating the java wrapper. Once you have created a quorum project, you need to add a separate quorum class to hold the routines from the wrapper. When creating the class, the name of the class has to be the same as that of the wrapper class. In addition, the name of the package has to be the same as what you defined when creating the wrapper project. There however is one important difference. You will not add the plugins.quorum prefix to the name of your package. Suppose the package name in your wrapper was plugins.quorum.chocolate the package name for the quorum project will be class chocolate Once again, the names of the packages are used by quorum to associate the quorum actions with the underlying code of the plugin. IN addition, you will add the jar that you built as the result of creating the wrapper class to this project. You will also add all other jar files that you added as dependencies in the java wrapper. This is a quirk of netbeans where it has runtime and compile time jar files. See the following link for more information.
How to add a JAR in NetBeans

Writing the action methods

The first thing you need to do is to tell quorum to use the library. You will do this by using the package statement. Add a line similar to the below text before the class declaration.
package chocolate
This line may already be added during the class definition process.
In the class, you need to create action methods. These methods must have the same names and signatures as the public methods of the wrapper class.

Using the plugin in the main class

You are now ready to use the plugin. Navigate to the main class and add a use statement to the top like you would when using any other quorum library.
use chocolate.all
You can begin writing code using the library.

Some sample code

My java wrapper for Program-AB is below.

package plugins.quorum.botPackage;
import org.alicebot.ab.*;
public class botHandler {
public java.lang.Object me_ = null;
String botname="ciso";
String botPath="D:/bdump";
Bot bot;
public botHandler()
{
bot=new Bot(botname,botPath);

};
public String botConverse(String rq)
{
String answer="";
Chat chatSession = new Chat(bot);
answer=chatSession.multisentenceRespond(rq);

return answer;

};
public static void main(String[] args) { }
}

My quorom test action code is below.

package botPackage
class botHandler

system action botConverse(text rq) returns text
end


I am using the library in my quorom main class as follows. Please note, this is test code to ensure that the plugin is working.

use Libraries.Game.Game
use botPackage.all

class Main is Game

botHandler bt
action Main

StartGame()
end

action CreateGame
text ans=bt:botConverse("what is cyber security")
output ans
say ans
end

/*
The update action is called on every "frame" of animation in a game. This
action should be used to do operations on items. So, for example, we
might use this action to change frames of animation, to rotate items,
or to make creatures jump.
*/
action Update(number seconds)
end
end

References

program-ab – ProgrammingInterface.wiki
Writing Quorum Plugins
Multiple Skype chats will William Allee


Filed under: robotics — Tags: , , , , — security-writer @ October 9, 2016 09:25

How to install Program-O with the LEMP stack

Program-O is an environment that allows you to host chatbots. As of this writing, it is AIML version 1.1 compliant. Its interface is easy to use and you can get started easily. However, installation can take some time and troubleshooting. Here is the guide I wish I had when I began installing Program-O.

My environment

  • Ubuntu 16.04 64bit
  • Nginx
  • MySQL
  • PHP
  • Vmware workstation and player version 12 running on Windows 10 professional 64bit.
  • Your machine obtains its IP address automatically via DHCP.

Prepareing Ubuntu

If you are starting from scratch, let the automatic installer handle the creation of the virtual machine. Follow the prompts and you will be fine. The only thing you should change is the network connection. I have set mine to bridged and to replicate the state of the physical network connection. This way, the virtual machine gets its own IP address and comes up with a working connection to your LAN. Once you have ubuntu installed, you will have to add a SSH server. You can install this using the gui but I will cover the commandline approach. Once you are at the ubuntu desktop, hit ctrl+alt+t to get into the terminal. Then type
sudo apt-get update
to ensure that the package repositories are updated and then type
sudo apt-get install openssh-server -y
this command will download and install the SSH server.
You can then run ifconfig to see the address that has been assigned to your virtual machine.
Exit the terminal and return to Windows. Use a terminal emulator to login into your virtual machine.

Configuring users and groups

You do not run as root in ubuntu. The user you created at the time of installation has sudo access. It is tempting to do everything as root but avoid that temptation because you may have to do a fair bit of ownership changes once you are ready to deploy your machine. You need to add your user to the www-data group. You will need this to work with nginx. To do this, run the following command.
usermod -a -G www-data bob

Note

I am working on the assummption that bob is your user name.
This completes the ubuntu configuration.

Installing git

You will need a git client to pull Program-O from its git repository. Git is not installed on ubuntu by default. You can install it by typing the following command into the terminal.
sudo apt-get install git -y

Installing the components required for Program-O

MySQL

The first thing you need is the MySQL database server. You can install it by issuing the following command and following the prompts.
sudo apt-get install mysql-server -y
You should secure your MySQL installation. Run the following command.
sudo mysql_secure_installation
You do not need the test database. Once this script has finished running, login into the MySQL database by typing the following command.
mysql -u root -p
Once you are in, you need to create a database. You can do this by issuing the command
create database bots;
You need a database user too as you do not want the root user doing any work with the database.
CREATE USER ‘botmaster’@’localhost’ IDENTIFIED BY ‘bot123’;
you then issue the command
use database bots;
At this point, you have a user and a blank database but the user cannot do anything. You need to make the user capable of administering the bots database.
GRANT ALL PRIVILEGES ON * . * TO ‘botmaster’@’localhost’;

Nginx

It is now time to setup the web server which is nginx. To install nginx, issue the followig command at the terminal.
sudo apt-get install nginx -y

Install php

It is time to install php. Nginx can serve static content but your chatbot is dynamic content because its input and output will change. Program-O also needs to write configuration values to the server.
sudo apt-get install -y php-fpm php-mysql php7.0-mbstring php7.0-zip php7.0-xml 
You need to change one setting in the php configuration to make things more secure. See the references section for details. Execute the following command.
sudo nano /etc/php/7.0/fpm/php.ini
You can use any editor of your choice.
Change thecgi.fix_pathinfo=1 to
cgi.fix_pathinfo=0
remembering to uncomment the above line.
Restart the php preprocessor by issuing the following command.
sudo systemctl restart php7.0-fpm
also restart the web server by using the below command.
 service nginx reload

Configuring nginx to use php

If you have followed this guide, everythingng that you need to run Program-O should be installed. You have to configure nginx to use php. This involves careful editing of the nginx configuration file. Do not be distracted by the comments in that file.
sudo nano /etc/nginx/sites-available/default
Again, you can use whatever editor you want.
The first thing we do is to set our server’s name or ip address to prevent unnecessary warnings. The chances are that you do not have a local domain name server running so set the IP of your virtual machine here.
server_name 192.168.xx.xxx
Find the line that reads
root /var/www/html;
Note the line below it.
index index.html index.htm index.nginx-debian.html;
You need to add index.php to the above line so that nginx first servers files with a php extention. The modified line looks like this.
index index.php index.html index.htm index.nginx-debian.html;
You now need to uncomment the following lines.
location ~ \.php$ {
include snippets/fastcgi-php.conf;
fastcgi_pass unix:/run/php/php7.0-fpm.sock;
}
location ~ /\.ht {
deny all;
}
}
Once you have completed these changes, save the file. It is crucial to test it for errors. To do this, run the following command.
sudo nginx -t
If there are no errors, move on. If you encounter errors, recheck what you changed.

Installing Program-O

You need to get the Program-O files into the web root of your web server. This should be /var/www/html if you have not changed this in nginx. To install Program-O, do the following.

  1. cd /var/www/html
  2. sudo git clone https://github.com/Program-O/Program-O.git

Setting ownership and permissions

One of the trickiest things when configuring web servers and web applications is to set the right ownership of files and folders. You have to get this right else php will be unable to write configuration information or logs may not be generated in the event of errors etc.
The web server files should not be owned by root and php should be permitted to write to the folders under the Program-O folder.To do all of this, execute the following commands.
sudo chown -R www-data:www-data /var/www/html/Program-O
The /var/logs/nginx folder should also be owned by www-data so that logs can be created.
sudo chown -R www-data:www-data /var/log/nginx

Running the installation script

You are ready to run the Program-O installation. Launch a web browser and navigate to the following link.
http://your_virtual_machine_ip_address/Program-O/install/install_programo.php
Follow the prompts and if there are no errors, you should be good to go and setup your chatbot.

References


Filed under: commonTasks,robotics — Tags: , , , — security-writer @ October 2, 2016 12:53

Using the keyboard to create a contact group in Microsoft Outlook 2013

Many times, you would be in a situation where you need to communicate with a group of people. Addressing a message to this group is made simple by using contact groups. A contact group is a mechanism that allows you to combine a number of contacts into one. You place the group in the “to” field of a message and the e-mail is sent to everyone. Be warned, all the recipient addresses are visible therefore it is better to blind carbon copy the recipients by placing the name of the contact group in the “bcc” field. The approach below is a keyboard centric way of creating contact groups. Most other tutorials focus on using the mouse.

  1. Launch outlook.
  2. Go to the ribbon by tapping the alt key; navigate to the entry called “new items”. It is in the new group.
  3. Expand it by pressing the right arrow key.
  4. Arrow down to the “more items” entry and expand it by using the right arrow key.
  5. Arrow down to contact group and press enter.
  6. You will be in a dialog box where you can enter the name of the group. Do so.
  7. Press the tab key once to reach the members list box.
  8. Activate the ribbon and navigate to the item called “add members” It is in the Members group.
  9. Expand that group.
  10. Choose the source from where you are adding a member. I chose the source called “from outlook contacts”.
  11. You will be in the contacts folder. You can search for contacts here.
  12. Once you have found a contact you want to add, tab to the “member” button and press it.
  13. Repeat steps 11 and 12 until you have added all the contacts you want.
  14. Once you have finished, navigate to the ribbon, choose “save and close”, answer in the affirmative to prompts asking you if you want to save.

Filed under: commonTasks — Tags: , , — security-writer @ July 8, 2015 21:53

How to delete individual messages in WhatsApp messenger on the iPhone

WhatsApp messenger has become one of the most popular messaging apps around. We get everything from business meeting schedules to photos of grandchildren on WhatsApp. People use the term “whatsapp” as a synonim for messaging.

Those of us on active WhatsApp groups get several messages per day. We may not want to store all of them. If you want to delete messages selectively, follow the below steps.

  1. Navigate to a conversation out of which you want to delete messages and open it.
  2. Hit the button labeled “Edit.”
  3. Navigate to the message you want to delete and tap it to select it.
  4. Do the same for any other messages you want to delete from that conversation.
  5. Hit the button labeled “Delete” which is to the right of the button labeled “Share.”

That is it, you have selectively deleted messages from your whatsapp conversation!


Filed under: commonTasks — Tags: , , , — security-writer @ October 26, 2014 19:11

Getting your contacts back in Outlook 2013 after iCloud synchronization

I had had the iCloud control panel installed for sometime but had not sined in. I wanted to get my Outlook calendar appointments on to my iPhone so was forced to synchronize my contacts, calendars and tasks.

Apple, please give me a choice of what to synchronize.

I let the synchronization finish and then looked at my contacts folder.

My regular contacts folder was blank. All the contacts had been moved to the iCloud contacts folder.

There were all kinds of instructions showing me how to asociate my iCloud contacts folder with Outlook such that it became my regular addressbook. I did not want any of that. I wanted my contacts back. One of the most agrovating things about the iCloud contacts folder is that it is not possible to address a message from it. There are none of the “to”, “cc” buttons that I am used to. Moreover, when I hit alt+. in the “to” field of a message, I am unable to search for a contact.

I finally found a way to move my contacts back to the regular contacts folder using the keyboard. My thanks to Diane Poremsky who indicated that this was possible.

Yes, I prefer using the keyboard.

  1. I navigated to the iCloud contacts folder using the treeview invoked by hitting ctrl+y in Outlook 2013.
  2. I hit ctrl+shift+end to select all the contacts.
  3. I then hit the windows key to activate the context menu.
  4. I navigated to the “other folders” option using the arrow keys.
  5. I was able to navigate to my regular contacts folder.
  6. I then hit ctrl+v to paste the contacts back.

Filed under: commonTasks — Tags: , , — security-writer @ June 28, 2014 19:50

Raspberry PI video streaming: a note on resolution

I wanted to use my raspberry pi model B as a video camera. A search lead me to the following 2 links.
Remote Motion-Activated Web-Based Surveillance with Raspberry Pi
for a good overview of the process.
href=”http://www.codeproject.com/Articles/665518/Raspberry-Pi-as-low-cost-HD-surveillance-camera”>Raspberry Pi as low-cost HD surveillance camera
for details on installing motion and camera housing.

One of the things I had to do was to stream the video at a sufficiently high resolution so that it was useful to my end user. Most articles on the Internet tell you that this is a trial and error thing. This is correct. There were times when I just wanted a set of values to try. The maximum resolution I have been able to achieve is 640 by 480 pixels. Anything higher appears to make motion restart constantly. I am streaming at 8 frames per second.

As for viewing the stream, I am using Firefox.


Filed under: commonTasks — Tags: , , , — security-writer @ June 14, 2014 10:49

Initial experiences with the Qu-Bot, a beginner’s robot

I have recently decided to concretize my interest in robotics. Towards this, I shopped around for beginner kits. A key criterion for me was that I should not have to do any soldering. Yeah, I know, it is just one of those things. I do plan to solder at some point but not with my beginner kit. My competency is software and I would much prefer to get ready-made hardware. I was pleasantly surprised to find the Quickly Programmable Robot or the Qu-Bot, a beginner’s robotic kit. Its website claims that you don’t need any other tools except a screwdriver, a pair of pliers and perhaps a spanner. I had several other questions before I bought the device. One of them was how would I program it? The Qu-Bot comes with its own visual programming environment. I’ve never been comfortable with this. Give me actual lines of code to see. In addition, I wanted to command it using the raspberry pie. This was indeed possible given that the Qu-Bot connects to a computer using a virtual serial port over USB.

My questions were answered promptly though the store (Robokits) always did not meet the four hour deadline which it claims on its website. Moreover, the website hints at an intermediate programming environment called quick c. As of this writing, this is not available for download. This is apparently a variant of the C programming language designed especially for the Qu-Bot. Robo kits sent me a copy of this programming environment even though it is still in beta and I had not bought anything from them. I like the clean interface and the simple commands. There are good sample programs that would allow me to get started quickly. Once I had seen this, I ordered the Qu-Bot. The kit arrived on time and, I began the process of assembly. This is where things became interesting.

  • The Robokits website claims that there is a printed assembly manual. I did not find any such manual. However, there was a copy of this manual in the portable document format on the accompanying CD as well as on the website.
  • The next problem I had was the pictures. No, it was not that there were no pictures, but the pictures in the manual did not match what was supplied. For example, the battery supplied with the Qu-Bot is a small rectangular piece of equipment. The picture showed something round. This led to a fair bit of searching and confusion. There were other minor mismatches enough to be sufficiently annoying.
  • There was also a situation where I had to attach three screws to the bottom of the board. It was fortunate that my family carpenter came around since 2 of the screws went in flawlessly but the hole to fit the third screw was too small. Once the hole had been enlarged using an ordinary drill machine, assembly proceeded on course. (Yes, I was hoping that no sensitive component had been damaged.)

Once I had the Qu-Bot assembled, I connected the USB cable to the back of the device and plug the other end into the computer. I was rewarded by the beep signaling that new hardware had been detected and the Qu-Bot came to life.

Note

The Qu-Bot, when fully assembled resembles a large circuit board on wheels. There is a left wheel, a right wheel and a third wheel at the bottom. The left and right wheels are connected to the motors. The third wheel at the bottom resembles the wheel of a computer mouse.

The first thing I did was to try all the sample programs. The LEDs blink, the speaker beeped and the motors spun. I have spent over two weeks with the Qu-Bot. I plan to describe my experience in the following posts, because there seems to be very little documentation out there on this product.

Current problems

The front obstacle sensor appears to be malfunctioning. It continuesly indicates that there is an obstacle in front of the robot. I am asking the Qu-Bot people about this and will update this post if I get a resolution


Filed under: robotics — Tags: , , — security-writer @ February 2, 2014 18:15

Outsmarting that malicious document

Most of us would be familiar with the injunction not to open executable attachments. Executable attachments are those files which are sometimes attached to email messages and can be run directly by clicking on them. These days most people have stopped sending executable files via email. A majority of Internet service providers filter out such files. Attackers have now adapted to use documents as a vector of attack. The objective of the attacker as always is to gain control of at least one machine in your network. Once he does that, he is easily able to go through the network and gain control over other machines. Yes, it is possible to have defenses in place and isolate the machine the moment it is infected but that is the topic of another post. Here, I would like to tell you how to avoid getting trapped by malicious documents.

We need to step back and understand why documents work as a vector of infection. Today’s word processors and file readers are very sophisticated applications. They can render almost any kind of file in whatever fancy format you wish. More importantly, they can execute bits of programs as they open. This capability helps you submit things like forms in PDF files, use macros in Microsoft Office applications et cetera. It is this capability that malware authors have begun to exploit. Let us take Adobe Acrobat Reader as an example. Acrobat Reader is a powerful application that can render a variety of PDF files. These files can not only contain text and graphics but also multimedia content. Moreover, you can have forms and other objects embedded in PDF files. Over the years, Adobe has done a significant amount to ensure that malware does not break out of the Acrobat Reader sandbox. However, it sometimes does and this is where the problem starts. As of this writing, there is no way to disable executable content in Adobe reader. The only thing you can do is mitigate the effects of the malware.

In Microsoft Office, from version 2007, Microsoft has made the primary word document format such that it cannot contain executable code. Any file with a docx extension cannot contain word macro code. You need to use a special kind of file which is known as a Word macro enabled file if you want to use macros in your Word documents. The same applies across Microsoft Office.

I am not going to debate which approach is better. Things can and do go wrong. Here are the steps you need to take to mitigate the impact of malicious documents.

  • If you do not expect an attachment, do not open it. The usual caveats about spam apply. Remember, there are no free lunches.
  • As far as possible, do not run with administrator privileges. As long as you run with restricted privileges, even if malware breaks out of the Adobe sandbox or otherwise infects your computer, it will be limited to the privileges assigned to the current user. Malware can escalate its privileges but it needs a hook and that hook is harder to get when you are running as a nonprivileged user.

    Note

    I use the term hook in the loosest possible context. Any programmers reading this post should not mistake the term hook for the hook that is used when dealing with Windows messages.

  • Ensure that you keep your systems and applications fully patched. Companies are quick about patching vulnerabilities that are found in their programs.
  • As with any malware mitigation strategy, keep backups handy in case the worst happens.
  • Use services such as open DNS on your Internet infrastructure so that it is harder for malware to phone home.
  • Keep anti-malware applications updated.

Filed under: commonTasks,networking — Tags: , , , , , — security-writer @ December 30, 2013 20:51

Getting Google+ Authorship to work on your WordPress blog or website

if you run a blog or website, you could be forgiven for thinking that Google author is the next best thing to sliced bread. The problem is that with WordPress version 3.6, there is no way to enter a Google author URL or id. I spent countless hours searching the settings of my blog without success. I mentioned my frustration to Megarush who told me about how WordPress had decided not to put in the Google author related options into version 3.6. The Google author related options were incorporated into plugins. Some more searching led me to the following post which explains how Google author is to be enabled.
How to Implement Verified Google+ Authorship on Your WordPress Website

I searched for “google author” and found the plugin called “Google author+ Plugin” by Dan Taylor. I installed and activated it. I went into my WordPress profile and added my Google+ profile id.

I then tried the structured data tool to test if my blog had been associated with my Google+ profile. No go. Google was unable to retrieve any authorship information from my blog.

After a significant bit of head scratching and keyboard pounding I concluded that I needed something to populate the meta tags of my previous blog posts. The Google+ Author plugin just added my profile id to WordPress. There was no mention of it adding Meta information to posts that were already made on the blog.

the solution was the plugin called Single Author G+ META. Once I had installed, activated and configured it, Google reported that Google+ authorship was working.

when implementing Google+ authorship for your blog, do ensure that you add meta information to the posts that you have already made.

If you liked this post and need similar material written, please use the contact form on the Contact Me webpage to get in touch with me.


Filed under: commonTasks — Tags: , , , — security-writer @ August 11, 2013 12:07
Older Posts »