Get Blogged by JoKi
|

The only frontiers are in your mind, welcome to my blog sphere. Your host is Jochen Kirstätter aka JoKi.
Dive into the weird world of a professional software developer and follow his daily victories and struggles with modern technology. I am a Microsoft Certified Professional (MCP) for Visual FoxPro, was Microsoft Most Valuable Professional (MVP) for Visual FoxPro in 2006 and 2007, and from spring 2004 until end of 2006 I organized monthly user group meetings as regional director of German FoxPro User Group (dFPUG). Based on this community activities I am also member of Microsoft Community Leader/Insider Program (CLIP) and PASS Deutschland e.V.
This blog is also about the beautiful island of Mauritius, my home.
Sincerely, JoKi
|
|
Community
|
|
Monday, 08 February 2010 07:46 |
|
Finally, I could convince myself to register an account on Twitter to start micro-blogging. The registration is free, easy and straight forward. No woes at all...
I could have set up a tweet already ages ago but honestly I have to say that I never had any real motivation about this whole concept. Even now, I am not 100% sure about the pros and benefits of Twitter are. Maybe I will get some feedback on this during the next weeks. Perhaps I might use this micro-blogging space for some more questions or even rants... Let's see. ;)
Anyways, the "Get in contact" area in the sidebar is updated and you might follow my tweet on this URL: http://www.twitter.com/JKirstaetter
Sadly, my alias "JoKi" is alerady in use by someone else, but that's life: First come, first serve.
One of the next things I am going to do is to check out of one the many Codeplex projects, namely VFPTweetAPI by Olaf Doschke. First of all, it is to get more familiar with Twitter itself and second I hope that it is easier to tweet from VFP directly than to launch my favorite browser. And last but not least, I might integrate the component into one of my projects like Sunshine.
Definetily more on this topic in the future... |
|
|
Development
|
|
Saturday, 30 January 2010 15:17 |
|
While looking for some improvements of Joomla! native SEF engine I found the following extension quite interesting and easy to use: HP Router of Hannes Papenberg. Installation is straight forward and no struggles at all. For best results you might install this extension before starting any kind of search engine optimization for your website.
But after a short time I was confronted with some 'nasty' behaviour in my website that was introduced by this extension. Some articles did not show up properly and ended in an HTTP 404 error message. Well, actually reading the description of HP Router gave me an idea of the problem:
ATTENTION!! There are a few things you have to keep in mind with this plugin: 1. You can't have the same alias for two articles, even though they are in different categories. To be precise, you can't have the same alias for any type of content item. As a rule of thumb: If you can get to the list of this type of content items from the administrator menu, you can't use the same alias on two items in that list.
My 404 problem is directly caused by duplicated aliases... but not the obvious way!
The reason here is that the extension (as of writing this article) does not respect the state of the articles in the Joomla! CMS. And due to migration processing from previous blog databases I had a bunch of duplicated topics but deleted. This refers to state -2 instead of published content that has a state of 1.
To correct this problem it is necessary to modify two PHP files of the original HP Router:
- hprouter/com_contentrouter.php
- hprouter/com_contactrouter.php
Almost of the end of each file there are the SQL statements to query the database. After you made a backup of your two files you should change them like so:
$db =& JFactory::getDBO(); if($vars['view'] == 'article') { $query = 'SELECT id FROM #__content WHERE state = 1 AND alias = '.$db->Quote($vars['id']); } elseif($vars['view'] == 'category') {
Modified version of hprouter/com_contentrouter.php
$db =& JFactory::getDBO(); $query = 'SELECT id FROM #__contact_details WHERE state = 1 AND alias = '.$db->Quote($vars['id']);
Modified version of hprouter/com_contactrouter.php
With those modifications the HP Router works as expected and queries only published articles. Currently, I am not using the archive state of articles but in case that you will, just extend those two queries to include the necessary state values. |
|
Development
|
|
Saturday, 23 January 2010 16:06 |
|
Joomla! content management system (CMS) is great for websites of any type in general. Even using the system as a blog software is quite easy to configure. Instead of the classical Frontpage Layout as default you configure the system to use one of the available Blog Layouts as default page. Then some tweaks according to leading articles, columns, etc. and you are almost done. Almost...
One of the great features that I like with blog application is the ability to display an Archive list of existing articles based on their creation date. Well, Joomla!s own archive functionality works in a similar way but sadly I experienced own mayor drawback: Archived articles are not part of the internal search engine anymore and therefore results are not displayed.
After my usual online research I found a recently added Joomla! extension called Mod LCA of JoniJnm. The description gives the direct motivation / link to other blog applications:
Mod LCA shows articles sorted by year and month, such as wordpress or blogspot
The module itself is really easy to install and works as expected. Almost...
In case that your content is created the usual way, Mod LCA is just fine. But in my special case I did some direct data migrations via SQL statements from my previous blog software and therefore my sequence of itemids differs from the original creation date of an article. It was quite funny to see that an article of June 2006 was listed in December 2009 by Mod LCA. But hey, when does it happen that the ID and the creation date are controversal? Not quite often but it can happen like in case.
Alright, having a look at the source code files of Mod LCA gives a direct glue about how we can improve the situation. At least, it's nothing complicated but the correct order clause of a SQL statement, or? And there we go...
Before any modifications be aware to have a backup at hand. Open the file mod_lca/helper.php with your favourite text editor and change the query statement like so:
$query = 'SELECT a.id, a.title, a.alias, a.catid, a.sectionid, c.alias as calias, '. $created. ' FROM #__content AS a'. ' LEFT JOIN #__categories AS c ON c.id=a.catid'. ' LEFT JOIN #__sections AS s ON s.id=a.sectionid'. ' WHERE ( a.state = 1 AND s.id > 0 )' . ' AND ( a.publish_up = '.$db->Quote($nullDate).' OR a.publish_up <= '.$db->Quote($now).' )'. ' AND ( a.publish_down = '.$db->Quote($nullDate).' OR a.publish_down >= '.$db->Quote($now).' )'. ' AND s.published = 1'. ' AND c.published = 1'. ' ORDER BY a.created DESC'; $db->setQuery($query);
Modified code of mod_lca/helper.php
The original code orders the result set by a.id and this might cause problems. With this minor code change articles are queried in the expected order and as a consequence in my case my 'Article Time Line' in the sidebar is properly rendered and displayed. |
|
General
|
|
Sunday, 20 December 2009 15:57 |
|
One of the interesting aspects for a blogger might be to know where her/his readers are from. At least, this is something that I would like to know.
Technically, it is not a real problem as every visitor offers its IP address while accessing a website and usually those information and others - like user agent, browser capabilities, preferred languages, etc. - are logged by the web server. Running any kind of log analyzing software like AWStats, WebLog or utilizing external services like Google's Webmaster Tools visualizes that data to the interested site owner.
But what about some more transparency and on-the-spot-visualiztion? I mean, wouldn't it be nice to show your readers that they are not alone on your site? Well, lately I found exactly this kind of visualization on another website and from there I dropped at who's amung us. They offer an easy to use, customizable and free 'map widget' in JavaScript and Flash that can be integrated into a website. Actually, it took me more time to make up my mind about the UI properties than putting the resulting code into my blog site. Take a look here:
GeoLocation of 'Get Blogged by JoKi' reader.
Of course, the services of who's.amung.us only displays the locations the very moment you start using their widget. It would have been nice to provide existing web server logs for the initial setup. But, hey... it's a nice gimmick / gadget and it's for free!
Sincerely, JoKi |
|
General
|
|
Friday, 28 November 2008 11:53 |
Hm, not yet.
Well, we already know that members of my family come to stay at our place (for five and two weeks) but aside of this, we do not have any detailed plans on how to spend Christmas and New Year's Eve. But for sure, it will be my first Christmas ever at the beach. We already went shopping for tree and Christmas decorations last weekend.
In terms of business, well, I do not know, if there will be an End of Year party 2008. Currently, there are no plans - or at least I have no information about that. Maybe there will be a surprise... Who knows.
Kind regards, JoKi
|
|
|
|
|
|
|
Page 1 of 56 |
|