set access counter

September 16th, 2007

### environment ###
OS : fedora core Linux 7
php : 5.2.2(cli)
mysql : 5.0.37
###################

I set access counter on right side below by wordpress plugin.

First of all, I downloaded “Counterize plugin” [counterize.php] from the following site:
http://andersdrengen.dk/projects/counterize/

Download four imagefiles too.

Rename “counterize.phps” to “counterize.php”
and place them in wp-content/plugins/ .

I logined wp-admin page and activated Counterize in plugins menu.
But mysql create table error occurred.

it is written on the plugin site about case of MySQL version 4.
But my MySQL version is 5 …

I created new table by myself.

create table wp_Counterize
(
id integer not null auto_increment,
IP varchar(16) not null default ‘unknown’,
timestamp timestamp default current_timestamp not null,
url varchar(255) not null default ‘unknown’,
referer varchar(255) not null default ‘unknown’,
useragent text,
primary key(id)
);

Attention:

Don’t change the field name.
If you changed, it is necessary to change counterize.php too.

I wanted to display this counter on right side below,
I edited sidebar.php as follows:

% vi wp-content/themes/default/sidebar.php

line 59: <li><h2>Meta</h2><h2>
……………
……………
line 68: </h2></li>

<?php echo “Total Hits: “. counterize_getamount(); ?>

The above function displays a simple number of hit.
Please refer to the plugin site or counterize.php source for the function names and the roles.

Go to wp-admin -> manage -> counterize.
Very cool statistical information can be seen.

how to put imagefile on sidebar

September 15th, 2007

I put imagefile on right side below.

I edited sidebar.php as follows:

% vi wp-content/themes/default/sidebar.php

line 59: <li><h2>Meta</h2><h2>
……………
……………
line 68: </h2></li>

[Your image link is pasted here.]

My image link :
<img width=”130″ height=”100″ src=”/path-to-image/imagefile” />

That’s all.

wordpress installation

September 15th, 2007

### environment ###
OS : fedora7 linux
php : 5.2.2 (cli)
wordpress : 1.2.1
###############

When I installed word press on my pc, the follow error occurred:

Fatal error : Cannot use object of type stdClass as array in /path-to-wordpress/wp-admin/upgrade-functions.php on line 705

I modified it as follows:

[before : line 705] if ($res[0][’Type’] != ‘varchar(32)’) {

[after : line 705] if ($res[0]->Type != ‘varchar(32)’) {

The error disappeared.

(no problem for wordpress-2.2.3)

welcome-to-sabakan-diary

September 15th, 2007

This is a English version mirror site of sabakan diary.
(http://www.isokiti.tv/~isobetti/sabakan)

Please feel free to mail me if you have a question.

I’m so poor at writing English, so please teach English to me.