I wondered this morning why the data looked quite odd in WP ShortStat 1.2. After analyzing the PHP, I noticed the column „Hits in the last week“ and a few other parts are calculated with a wrong date. I modified the following parts, and now the data output expresses the identic values which are found in the database. I hope Jeff will test these changes… and include them in the official version (open the article to read the code changes).
function getTodaysHits() {
global $wpdb;
$dt = time();
$dt = mktime(0, 0, 0, date("m",$dt), date("d",$dt), date("Y",$dt));
$query = "SELECT COUNT(*) AS 'total' FROM $this->table_stats WHERE dt >= $dt";
return $wpdb->get_var($query);
}
function getTodaysUniqueHits() {
global $wpdb;
$dt = time();
$dt = mktime(0, 0, 0, date("m",$dt), date("d",$dt), date("Y",$dt));
$query = "SELECT COUNT(DISTINCT remote_ip) AS 'total' FROM $this->table_stats WHERE dt >= $dt";
return $wpdb->get_var($query);
}
function getWeeksHits() {
global $wpdb;
$tmp = "";
$dt_start = time();
$tmp = "<table cellpadding=\"0\" cellspacing=\"0\" border=\"0\">\n";
$tmp .= "\t<tr><th colspan=\"2\">Hits in the last week</th></tr>\n";
$tmp .= "\t<tr><td class=\"accent\">Day</td><td class=\"accent last\">Hits</td></tr>\n";
for ($i=0; $i<7; $i++) {
$dt_start = mktime(0, 0, 0, date("m",$dt_start), date("d",$dt_start), date("Y",$dt_start));
$dt_stop = $dt_start;
$dt_start = $dt_start - (60 * 60 * 24);
$day = date("l, j M Y",$dt_start);
$query = "SELECT COUNT(*) AS 'total' FROM $this->table_stats WHERE dt > $dt_start AND dt <=$dt_stop";
if ($total = $wpdb->get_var($query)) {
$tmp .= "\t<tr><td>$day</td><td class=\"last\">$total</td></tr>\n";
}
}
$tmp .= "</table>";
return $tmp;
}
Expand the Blogstream
BlogkulturIts a small note, but one I’ve enjoyed reading this morning. All those who participate in the Weblog-phenomenon have perhaps understood that blogs are the alternative to the mainstream media. David Gibbons summarize his thoughts on why the blogstream beats the mainstream:
If the definition per-se explains the term blogstream as a play on the term mainstream. But the authors of weblogs do not necessarily reference the overall beloved points of view created by the media. Instead they offer their own (sometimes most personal) alternative by presenting input coming from both professionals and hobbyists authors. With the blogstream as a network of news and information, it grows faster than the mainstream media. Can one set up a radio station within minutes? Are you allowed to send your broadcasting signal without interferring other signals? The mainstream media has regulated itself and is bound to a variety of laws, rules and of course their own corporate culture. Who wouldn’t want to keep all advertisers in line without flaming on one of their product – it’s the mainstream media. What can one do in the blogstream? You may investigate it deeper and strive for your personal expansion as a unique part among many others. As a Citizen Media journalist, you offer things which cannot be caught by the mainstream media, and by offering, you let others think and learn. And always remember, don’t just read the Stars of the blogosphere because they seem to be Dogs after a while – move on to the Cash Cows and Questionmarks, too.
Push and Pull: The Blog Herald
BlogkulturThis is amazing. Not that I haven’t expected it, but we’re mentioned on today’s pick for the 100 blogs in 100 days campaign by the Blog Herald. I already love the discussion in the comments on the post, because the commenters were mostly striked by yesterday’s article about introducing a comment policy for the MikeSchnoor.com. Usually, a comment policy is part of any major blog (just google along), and since Germanic law has some tight restrictions on provinding and maintaining a website (or blog) by applying the idea of „you must identify yourself“, the idea of informing your readers is much better than receiving a plaint from some commenter who has been removed or edited.
Now remember the discussion about the blogger who got sued because of the comments? Watch the discussion about this free-commenter idealism and you’ll notice that both sides have good points. But in the first set of comments, the comment-policy is an evilish concept, and in the others, the commenters cry for hunting down the real people who are responsible for their comments. Now where’s a solution for this paradoxon? So far, I have none. But a major thanks to Duncan for including us!
Die letzte Woche…
Leben…war ehrlich gesagt einfach nicht das, was ich mir versprochen habe. So dümpelt man zwischen der Realität eines dicken Bauches und der Manie des Abnehmeffektes von sagenhaften 3.8 Kilo in 2 Wochen – und das ohne etwas von Sport oder anderem gehört zu haben. Ich jedenfalls, so behaupte ich es mal, bin schon stolz darauf, meine 100.5 Kilo ankündigen zu dürfen. Ich bin weit über dem Ziel, was ich mir mit Katharina gesetzt habe. Jedoch findet alle Euphorie ein schnelles Ende, wenn man sich vor Augen führt, dass alles gegen einen spielt. Wenn der JoJo-Effekt einsetzt, sieht alles ganz anders aus. Jedoch bewundere ich die Essensreduktion… ;)
Community Journalism: J-Learning
MarketingTheir tutorials easily instruct you to become a web publisher within a couple of hours. This is done by showing four main steps including many in-depth articles, seemingly obvious but hidden details – and a lot to read.
Sometimes you strumble upon this stuff on accident, but this time it happened just after exploring the so-far mentioned blogs on 100 blogs in 100 days campaign by Duncan Riley. Is it time to open your eyes and open yourself to the blogosphere? [via Solution Watch]
Announcement: Comment Policy
SpamThis is aimed to those who honestly misbehave. Dear Trolls, you appear in the moderation list and just… don’t fit with all others out there. ;)
During the past, there’s been a few comments which did not fit the MikeSchnoor.com for various reasons. These occasionally appearing comments were removed from the weblog, which includes the silent removal of detected just spammers, but real people, too. This new comment policy shall give you, dear reader, the ability to understand why your comment may not appear on the blog, and why your comment might be a candidate for manual removal. Violations of this comment policy will result in nothing else but a removal. Since the idea of the „common sense“ does not meet the standards of every human being on this world, and since some people are truely stupid, it is time to publish the comment policy which is based on Jeremy Zawodny’s own policy. Update of this post may occurr from time to time as much as the rules change. Notifications of these changes do not happen. This comment policy is linked from the comment form to avoid any claims of ignorance or „I did not know that!“ excuses. Continue to the full comment policy with all the dirty details.
WP ShortStat 1.2 Modification
KuriosesI wondered this morning why the data looked quite odd in WP ShortStat 1.2. After analyzing the PHP, I noticed the column „Hits in the last week“ and a few other parts are calculated with a wrong date. I modified the following parts, and now the data output expresses the identic values which are found in the database. I hope Jeff will test these changes… and include them in the official version (open the article to read the code changes).
function getTodaysHits() {
global $wpdb;
$dt = time();
$dt = mktime(0, 0, 0, date("m",$dt), date("d",$dt), date("Y",$dt));
$query = "SELECT COUNT(*) AS 'total' FROM $this->table_stats WHERE dt >= $dt";
return $wpdb->get_var($query);
}
function getTodaysUniqueHits() {
global $wpdb;
$dt = time();
$dt = mktime(0, 0, 0, date("m",$dt), date("d",$dt), date("Y",$dt));
$query = "SELECT COUNT(DISTINCT remote_ip) AS 'total' FROM $this->table_stats WHERE dt >= $dt";
return $wpdb->get_var($query);
}
function getWeeksHits() {
global $wpdb;
$tmp = "";
$dt_start = time();
$tmp = "<table cellpadding=\"0\" cellspacing=\"0\" border=\"0\">\n";
$tmp .= "\t<tr><th colspan=\"2\">Hits in the last week</th></tr>\n";
$tmp .= "\t<tr><td class=\"accent\">Day</td><td class=\"accent last\">Hits</td></tr>\n";
for ($i=0; $i<7; $i++) { $dt_start = mktime(0, 0, 0, date("m",$dt_start), date("d",$dt_start), date("Y",$dt_start));
$dt_stop = $dt_start;
$dt_start = $dt_start - (60 * 60 * 24);
$day = date("l, j M Y",$dt_start);
$query = "SELECT COUNT(*) AS 'total' FROM $this->table_stats WHERE dt > $dt_start AND dt <=$dt_stop"; if ($total = $wpdb->get_var($query)) {
$tmp .= "\t<tr><td>$day</td><td class=\"last\">$total</td></tr>\n";
}
}
$tmp .= "</table>";
return $tmp;
}
Design Problem
KuriosesI wonder if anybody has some clue why I cannot find a solution for the following problem in the CSS code in Mozilla: The entire layout should be centered (actually the ID #page), and while being centered, the whole should have a white background, which happens not to be visible without the float: left command. I will leave the temporary settings to meet the best usability for both MS IE and Firefox readers. If anybody has some useful tips or the solution – comment along. Thanks!
Update – The morning after…
I’m fed up with this and created the classic no-no of adding a non-classified DIV and the old CENTER on top of an invisible TABLE to conform both MS IE and Firefox. At least in the most recent versions, it looks good. However, it does not satisfy me yet.
Movie Takes in Flensburg
LebenSince 9.30 p.m. some production company is recording their new tv-series called „Alles Kalle“ in Flensburg. Its already 1.30 a.m. and they’re not finished yet, instead the whole street is engulfed with a dozent spotlights including a crane.
Click to enlarge the photos, and… I just hope they will be done soon. ;)
GMail for free!
Web[via GoogleBlog, Basic Thinking]
Update
You will not receive an invitation to GMail from me. You can do whatever you want, but you won’t get one. I will not help you, I will not support you because I’m not some Google Support guy. And if you want something at all, leave some correct and realistic email addresses for me to get in contact with you, or nothing (NOTHING!) will happen.
Which Blog Component Are You?
KuriosesThis is definately a silly quiz and the result is nothing else but what I entered upon being questioned, but it it’s friday and time for some weekend entertainment – including sillyness. Dare them if their server takes ages to load…
If I Were a Blog Component, I would be the RSS / ATOM FEED.
I am helpful and I enjoy efficiency.Which Blog Component Are You?
Take This Blog Quiz at About Web Logs!
[via Dark Cold Coffee]