DavidBehler.de

code stuff everyday!

New project

November, 2nd 2009 by David

I know, it's been quite calm around DBlog, but I promise you it's not dead! I'm actively working on getting v1.9 ready to ship but it got delay by some new projects of mine:

  1. I've registered a business in my name and there was quite some work required to do so. I  might tell you a bit more about this later.
  2. I've launched a new website: RapidSeries.tv! It's all about your favorite tv series and helps you to find download links for them quickly! It's brand new, I put it online only yesterday, and it does not have that many users yet. But the latest episodes of most, if not all, your favorite tv shows are already available and I hope you check it out.
    I'm still trying to figure out an easy way to promote my site ... any ideas on this topic are welcome!

So stay tuned for further development on both my new website and DBlog.

David

Share and enjoy:     

UTF-8 and CodeIgniter

August, 17th 2009 by David

Again and again people come to the CodeIgniter Forums and complain about characters not being displayed correctly. Most of the time it's an issue with their settings and not setting UTF-8 correctly in all places.

I guess that's why Phil Sturgeon, a fellow CI coder, had the very good idea of writing an article about how to work with UTF-8 in CodeIgniter. But his mistake was to announce it on Twitter (I'm on there too btw!) before he actually wrote it! Sneaky as I am I stole his idea and ... well ... here we are ;)

Share and enjoy:     

Tags: No tags

Future development

August, 12th 2009 by David

I've been quite busy with some smaller projects for the past few weeks. One of them I was quite excited about as it involved parsing of huge chunks of data and I've never done that before. But it worked quite well and I'm already involved in a follow-up project with more parsing to do.

A new project I started working on is some kind of a dictionary like LEO. The application won't be as extensive as LEO, but it will feature everything you might expect from a simple dictionary. I will have to talk to my client, but I think I'll be able to write some more details about it once it's finished.

As the title of this post is Future development, I want to talk about what I have planned for my website/my projects:
DBlog is making nice progress and a new version 1.9 or maybe even 2.0 should be available in a few weeks, propably before my vacation in september. The modules will be enhanced further and I will add some more AJAX to the administration and fix some smaller bugs that were introduced last version.
I'm thinking about changing the name from DBlog to something else, maybe "FlammingBlog" or "Sparky" or something entirely else. If you got any ideas regarding DBlog, may it be a new name or feature or whatever you have in mind, feel free to contact me!

Additionally to changing the name and releasing a new version I was thinking about creating a new website dedicated to DBlog alone. It would feature a download section, news, usage statistics, the user guide and a directory of all availabe modules, similar to the Plugin Directory on Wordpress.org or the Add-ons listing for Firefox on Mozilla.org. Nothing final yet, just tossing around some ideas. Any input on this would be appreciated.

Some of my libraries like MeNeedz Auth or Search need some serious overhauling/rewriting ... I wonder when I will get to that.

So long
David

Share and enjoy:     

Tags: No tags

CodeIgniter 1.7.1 Cheatsheet v2.0

August, 10th 2009 by David

Senthil Kumar from DesignFellow has just released a new version of his CodeIgniter Cheatsheet.

The new version can be found in his blog.

Have fun!

Share and enjoy:     

Tags: No tags

DBlog 1.8

July, 28th 2009 by David

Finally it's done: Version 1.8 of DBlog is out now! I ticked off quite some items on my todo list, but most of the where purely cosmetic.

New features:

  • Check all/Uncheck all buttons in comment administration
  • More Ajax magic in administration
  • Links can be sorted now
  • DBlog now uses lang() instead of $this->lang->line()
  • Dashboard is finally functional, including version check

You can find the complete changelog including the upgrade and installation instructions in the documentation.

I have not only updated my blog but also the demo installation to the new version, so you can start testing right away!

Download the new version from here!


Greetz
David

Share and enjoy:     

Tags: No tags
Category Ajax, Update, DBlog | Edit | 2 Comment(s)

CodeIgniter 1.7.1 Cheatsheet

July, 26th 2009 by David

Our fellows at DesignFellow have just released something that might be really helpful those of you that work with CodeIgniter:

The CodeIgniter 1.7.1 Cheatsheet!

If you have used e.g. the CSS Cheat Sheet before, then you know what to expect. It's a function reference for all libraries and helpers in CodeIgniter. No need to go through the Guide if you just want to know the name of a function, it's all here!

Have Fun
David

Share and enjoy:     

Tags: Cheat Sheet

Extended logging of database errors in CodeIgniter

July, 21st 2009 by David

Some of you might and now and then have run into a database error while working with CI. Such errors are mostly caused by errors in your querys like not escaping user input or your fields or simply syntax errors.

In small applications that not much of a problem, but the bigger the application the harder it get's to find the part where the bad query is hiding.

dootzky from the CodeIgniter Forum had exactly that problem and with a little help from wiredesignz we were able to add some more detail to the error messages!

Simply add this to the body of 'application/errors/error_db.php':

if($_SERVER['HTTP_HOST'] == 'localhost') {
   $trace = debug_backtrace();
   echo "The error occured in file ".$trace[4]['file']." on line ".$trace[4]['line']."";
}

Now additionally to the error you already know, you will be shown in which file and on which line the error occured (the db->get() method was called)! As this might pose a security risk on live systems, dootzky added the check for localhost.

I hope this is as useful to you as it is to me!

Greetz,
David

Share and enjoy:     

Tags: No tags

Deletr v1.0

July, 7th 2009 by David

Some time ago I came across the blog of David Walsh and his article on "Animated Ajax Record Deletion Using MooTools". Sadly he uses MooTools and not my favorite Javascript framework: Prototype. But as I'm more and more trying to create my own classes based on Prototype I wanted to create this functionality myself! 

And now it's done: Deletr is born!

var Deletr = Class.create({
 initialize: function(options) {
  var list = new Array();
  $$('a.deletr').each(function(element) {
   list.push(element);
  });
  for (var index = 0; index < list.length; ++index) {
   this.setupObserver(list[index]);
  }
  this.options = Object.extend({
   parentNodeType: 'tr',
   useCheck: true,
   checkText: 'Do you really want to delete this record?',
   startColor: '#fb6c6c',
   endColor: '#ffffff'
  }, options);
 },
 setupObserver : function(elm) {
  Event.observe(elm, 'click', this.check.bindAsEventListener(this), false);
 },
 check : function (ev) {
  Event.stop(ev);
  var element = Event.findElement(ev);
  if(!element.match('a')) {
   element = element.ancestors()[0];
  }
  var url = element.readAttribute('href');
  var elementCheckText = element.readAttribute('title');
  var optionCheckText = this.options.checkText;
  var found = false;
  var parentNodeType = this.options[removed]Type;
  var optionUseCheck = this.options.useCheck;
  var elementUseCheck = element.hasClassName('deletr-check');
  var useCheck = (optionUseCheck == true) ? true : (elementUseCheck == true);
  var checkText = (elementCheckText != null) ? elementCheckText : optionCheckText;
  var startColor = this.options.startColor;
  var endColor = this.options.endColor;
  element.ancestors().each(function(elm) {
   if(found == false) {
    if(elm.match(parentNodeType)) {
     found = true;
     if(useCheck) {
      Check = confirm(checkText);
     } else {
      Check = true;
     }
     if(Check) {
      new Ajax.Request(url, {
       method: 'get',
       onCreate: function() {
        new Effect.Highlight(elm, { startcolor: startColor, endcolor: endColor});
        return false;
       },
       onComplete: function(transport) {
        new Effect.SlideUp(elm, {scaleMode: 'contents'});
        return false;
       }
      });
     }
    }
   }
  });
 }
});

Event.observe(window,'load',function(){ new Deletr({parentNodeType: 'div', useCheck: false}); },false);

If you are interested, you can have a look at a demo and download it from here.

Greetz
David

Share and enjoy:     

Tags: No tags

DBlog v1.7

June, 8th 2009 by David

It took me more than a week to release a new version of DBlog but I used that time wisely to make quite some changes and add new features including a documetation!

New features:

  • The before mentioned documentation that should make using DBlog much easier!
  • Optional password protection for posts, pages and galleries
  • Delayed publishing of posts
  • E-Mail notifications on new comments

You can find the complete changelog including the upgrade and installation instructions in the documentation.

I have not only updated my blog but also the demo installation to the new version, so you can start testing right away!

Download the new version from here!


Greetz
David

Share and enjoy:     

Tags: No tags

DBlog demo installation

May, 29th 2009 by David

I have set up a demo installation for you guys to have a look at the newest version of DBlog (v1.6) without having to actually set up an installation yourself!

There are two accounts you can use:

  • Username: admin
    Password: admin
  • Username: user
    Password: user

I have removed the rights to edit the user groups and single users, but everything else can be changed at will!

Feel free to try whatever you want and be sure to report whatever error/misbehaviour you encounter either by using the contact form or leaving a comment to one my posts in my blog.

Greetz
David

Share and enjoy:     

Tags: No tags
Category DBlog, Demo | Edit | 0 Comment(s)

DBlog v1.6

May, 28th 2009 by David

As some people reported some bugs in the current version of DBlog, I decided to release version 1.6 earlier than actually planned. I was mainly focusing on enhancing the module feature, cleaning up some of the code and adding more useful modules and therefor not all modules that I had planned made it into 1.6 but I guess that's not much of a problem as they can be easily added afterwards!

New Featues:

  • Sidebar management: Managing the content of the sidebar is now much easier than before and you don't have to manually add new elements to a list. Instead DBlog offers a comfortable table that allows you to sort and de-/activate items in the sidebar on the fly!
  • Module options: Modules can now create their own pages in the administration and add them to navigation in the admin panel (e.g. the new database backup module) using multiple new hooks.

Changelog:

  • Improved display of tabs in admin panel
    • application/views/_admin/system_css.php
  • Moved search to sidebar in ablaze design
    • application/views/ablaze/sidebar.php
    • application/views/ablaze/index.php
    • application/views/ablaze/index_system.php
  • Reworked the way the sidebar is handled
    • CREATE TABLE IF NOT EXISTS `sidebar_item` (
        `sidebar_item_id` bigint(20) NOT NULL auto_increment,
        `sidebar_item_title` varchar(100) NOT NULL,
        `sidebar_item_name` varchar(100) NOT NULL,
        `sidebar_item_description` text NOT NULL,
        `sidebar_item_is_active` tinyint(1) NOT NULL,
        `sidebar_item_order_by` bigint(20) NOT NULL,
        PRIMARY KEY  (`sidebar_item_id`)
      ) ENGINE=MyISAM  DEFAULT CHARSET=utf8 AUTO_INCREMENT=14 ;
    • INSERT INTO `sidebar_item` (`sidebar_item_id`, `sidebar_item_title`, `sidebar_item_name`, `sidebar_item_description`, `sidebar_item_is_active`, `sidebar_item_order_by`) VALUES
      (1, 'Pages', 'pages', 'A list of all pages', 1, 2),
      (2, 'Archives', 'archives', 'Post archive', 1, 3),
      (3, 'Categories', 'categories', 'A list of all used categories', 1, 4),
      (4, 'Links', 'links', 'A list of all links', 1, 6),
      (5, 'Blogs', 'blogs', 'A list of all links to blogs', 1, 7),
      (6, 'Tags', 'tag_cloud', 'A cloud of all used tags', 1, 5),
      (7, 'Search terms', 'search_cloud', 'A list of recently used search terms', 1, 8),
      (8, 'Newest files', 'newest_files', 'A list of the 5 newest files available for download', 1, 9),
      (9, 'Top file', 'top_files', 'A list of the 5 top files', 1, 10),
      (10, 'Newest galleries', 'newest_galleries', 'A list of the newest galleries', 1, 11),
      (11, 'Search', 'search', 'Search form', 1, 0),
      (12, 'Meta', 'meta', 'Meta links', 1, 12),
      (13, 'Post overview', 'post_overview', 'Link to post overview', 1, 1);
    • ALTER TABLE `config`
        DROP `config_navigation_items`,
        DROP `config_navigation_show_search`,
        DROP `config_navigation_show_meta`,
        DROP `config_navigation_show_post_overview`;
    • application/models/common_model.php
    • application/libraries/MY_Controller.php
    • application/views/*/sidebar.php
    • application/language/*/dblog_lang.php
    • application/views/_admin/config_edit.php
    • application/config/form_validation.php
    • application/models/admin/config_model.php
    • application/views/_admin/navigation.php
    • application/controllers/admin/sidebar.php
    • application/models/admin/sidebar.php
    • application/views/_admin/sidebar_overview.php
  • Rearragend some items in the admin navigation
    • application/_admin/navigation.php
    • application/_admin/system_css.php
  • Enhanced design selection
    • application/views/_admin/config_edit.php
    • images/styles/*/example.png
  • Enhanced comment management
    • application/views/_admin/comment_overview.php
    • application/views/_admin/system_css.php
    • application/config/form_validation.php
    • application/controllers/admin/comment.php
    • application/models/admin/comment_model.php
  • Fixed a bug in Akismet module (Thanks to China-cier and iqbal_kidd for pointing this one out)
    • application/modules/Akismet.php
  • Moved Google Analytics support from config to own module
    • application/modules/Google_Analytics.php
    • application/modules/config/Google_Analytics.php (remember setting your tracker ID!!)
    • application/views/*/index.php
    • application/views/*/google_tracker.php (deleted)
    • application/views/_admin/config_edit.php
    • application/config/Form_validation.php
    • application/models/admin/config_model.php
    • ALTER TABLE `config` DROP `config_google_tracker_id`
  • Moved social bookmarking from config to own module
    • application/modules/Social_Bookmarking.php
    • application/modules/config/Social_Bookmarking.php
    • images/modules/*
    • application/views/*/post_view.php
    • application/views/*/page_view.php
    • application/views/_admin/config_edit.php
    • application/config/Form_validation.php
    • application/models/admin/config_model.php
    • application/libraries/View.php
    • ALTER TABLE `config` DROP `config_show_social_bookmarking_links`
  • Fixed a bug that allowed you to delete a page even though it was set as start page
    • application/views/_admin/page_overview.php
  • Enabled modules to add their own options page to the administration and call custom hooks
    • application/libraries/Modules.php
    • application/views/_admin/navigation.php
    • application/controllers/admin/modules.php
    • application/models/admin/module_model.php
    • application/views/_admin/module_options.php
  • Added a module that allows you to create backups of your dblog database
    • application/modules/DB_Backup.php
  • Added a function to module library that removes modules from the database that are no longer present in the modules folder
    • application/libraries/Modules.php
  • Duplicate ID in right table (Thanks to sigork for this)
    • UPDATE `right` SET right_id = 19 WHERE right_id = 18 and `right_name` like 'can_manage_galleries';
  • Increase version number
    • application/config/dblog_version.php

By now DBlog has become rather large in terms of features and I guess it's time to add some kind of documentation to make it easier for you guys to create your own designs, translate DBlog into your favorite language or even add your own modules! All these tasks actually aren't very difficult but it's always easier to have some examples and somone that tells you how to do something ;) So watch out for a documentation coming soon!

You can get the new version here!

 

Greetz
David

Share and enjoy:     

Tags: sidebar, modules

DBlog v1.5

May, 24th 2009 by David

It's been more than a week since the last update but I'm sure it's worth the wait! Apart from some internal changes and bug fixes there are two major new features:

  • Multi-language support! DBlog now uses the CodeIgniter Language library for purposes of internationalization. You can translate your DBlog site in whatever language you want, provided you have a language file for your desired language! Currently there are only two language files available (english and german) but you can easily add new ones for other languages. If you do so, just send me an e-mail containing your files and I will add them to the archive.
  • Galleries! DBlog offers you the feature to create simple galleries containing as many pictures as you want. The clou is, that galleries can be assigned to blog posts and will be shown when viewing an entry. That way you can easily attach many pictures to a post without clogging the actual post content.

Changelog:

  • Added support for custom 404 error (Thanks to louis for providing the solution)
    • application/errors/error_404.php
    • application/views/*/system_404.php
    • application/config/routes.php
  • Removed admin folder for each design, the views for administration are now in _admin folder. That way changes to the administration don't have to be done in every design
    • application/models/admin/config_model.php
    • application/controllers/admin/*.php
    • application/views/_admin/*.php
    • application/views/*/admin (deleted)
    • images/styles/_admin/*
    • images/styles/*/admin (deleted)
  • Updated some controllers to show 404 errors instead of redirecting to post/overview
    • application/controllers/post.php
    • application/controllers/search.php
    • application/controllers/tag.php
    • application/controllers/archive.php
    • application/controllers/category.php
    • application/controllers/file.php
    • application/controllers/page.php
  • Fixed a typo in class name
    • application/controllers/post.php
    • application/controllers/search.php
    • application/controllers/tag.php
    • application/controllers/archive.php
    • application/controllers/category.php
    • application/controllers/file.php
    • application/controllers/page.php
    • application/controllers/start.php
    • application/controllers/system.php
    • application/libraries/MY_Controller.php
  • Fixed a potential bug that would increase download count even though the file was requested by a robot that followed the mirror link
    • application/controllers/file.php
  • Multi-language support for the front-end
    • application/views/*/*.php
    • application/libraries/MY_Pagination.php
    • application/libraries/MY_Language.php
    • application/models/common_model.php
    • application/controllers/archive.php
    • application/controllers/category.php
    • application/controllers/file.php
    • application/controllers/page.php
    • application/controllers/post.php
    • application/controllers/search.php
    • application/controllers/system.php
    • application/controllers/tag.php
    • application/config/form_validation.php
    • application/config/autoload.php
    • application/language/*/*.php
  • Small changes to the admin navigation
    • application/views/_admin/navigation.php
  • Added galleries
    • application/views/_admin/navigation.php
    • CREATE TABLE IF NOT EXISTS `gallery` (
        `gallery_id` bigint(20) NOT NULL auto_increment,
        `gallery_title` varchar(100) NOT NULL,
        `gallery_is_public` tinyint(1) NOT NULL,
        PRIMARY KEY  (`gallery_id`)
      ) ENGINE=MyISAM  DEFAULT CHARSET=utf8 ;
    • CREATE TABLE IF NOT EXISTS `picture` (
        `picture_id` bigint(20) NOT NULL auto_increment,
        `picture_title` varchar(100) NOT NULL,
        `picture_file_name` varchar(255) NOT NULL,
        `picture_gallery_id` bigint(20) NOT NULL,
        `picture_thumb_file_name` varchar(255) NOT NULL,
        PRIMARY KEY  (`picture_id`)
      ) ENGINE=MyISAM  DEFAULT CHARSET=utf8 ;
    • CREATE TABLE IF NOT EXISTS `post_gallery` (
        `post_gallery_id` bigint(20) NOT NULL auto_increment,
        `post_gallery_post_id` bigint(20) NOT NULL,
        `post_gallery_gallery_id` bigint(20) NOT NULL,
        PRIMARY KEY  (`post_gallery_id`)
      ) ENGINE=MyISAM  DEFAULT CHARSET=utf8 ;
    • INSERT INTO `right` (`right_id` ,`right_name` ,`right_title`) VALUES (NULL , 'can_manage_galleries', 'Can manage galleries');
    • application/controllers/admin/gallery.php
    • application/models/admin/gallery_model.php
    • application/views/_admin/gallery_overview.php
    • application/views/_admin/gallery_add.php
    • application/views/_admin/gallery_edit.php
    • application/views/_admin/picture_edit.php
    • application/config/form_validation.php
    • application/config/dblog_config.php
    • temp
      • CHMOD 777
    • images/gallery
      • CHMOD 777
    • application/config/form_validation.php
    • application/config/autoload.php
    • application/views/_admin/post_edit.php
    • application/views/_admin/post_add.php
    • application/views/_admin/config_edit.php
    • application/controllers/admin/post.php
    • application/models/admin/post_model.php
    • application/models/post_model.php
    • application/libraries/MY_Model.php
    • application/config/routes.php
    • application/controllers/gallery.php
    • application/models/gallery_model.php
    • application/views/*/system_css.php
    • application/views/*/index.php
    • application/views/*/post_view.php
    • js/scriptaculous.js
    • js/lightwindow.js (Thanks to Kevin Miller)
    • images/styles/*/arrow-down.gif
    • images/styles/*/arrow-up.gif
    • images/styles/*/prevlabel.gif
    • images/styles/*/nextlabel.gif
    • images/styles/*/black.png
    • images/styles/*/black-70.png
  • Added a pic of the moment (short Potm) module
    • appliction/views/*/index.php
    • application/modules/Potm.php
  • Adjusted the structure of the sidebar by changing some css styles and html for the standard design
    • application/views/standard/system_css.php
    • application/views/standard/sidebar.php
  • Increase version number
    • application/config/dblog_version.php

As you can see I did quite some changes and you should definetly update your DBlog installation! If you run into any problems while updating your installation or have any questions regarding the new features, just tell me via the contact form or leave me a comment to this post.

You can get the new version here!

 

Greetz
David

Share and enjoy:     

Category Update, DBlog | Edit | 0 Comment(s)

DBlog v1.4

May, 15th 2009 by David

Some days have passed since the last update and guess what I have here: version 1.4 with quite some nice new features!

New features:

  • Support for meta-tags
  • Some parts of the administration have been enhanced with tabs using my new javascript class: Tabr
  • Added a module system! This is quite a huge feature that allows 3rd parties to develop modules (others might call them plugins) that extend the standard range of functions. To show how this works I have added 2 exemplary modules:
    • Quotes, this is a small module that shows random quotes in top bar in the administration
    • Akismet, this is a replacement for my Akismet library that has so far been part of DBlog

Changelog:

  • Added meta-tags to default themes
    • ALTER TABLE `config` ADD `config_meta_description` VARCHAR( 255 ) NOT NULL ,
        ADD `config_meta_keywords` VARCHAR( 255 ) NOT NULL ;
    • application/views/*/index.php
    • application/views/*/admin/config_edit.ph
    • application/config/form_validation.php
    • application/models/admin/config_model.php
  • Added missing RSS link to ablaze theme
    • application/views/ablaze/index.php
  • Added missing trackback links
    • application/views/*/post_view.php
  • Fixed caption of several buttons in administration
    • application/views/*/admin/comment_edit.php
    • application/views/*/admin/config_edit.php
    • application/views/*/admin/file_add.php
    • application/views/*/admin/file_edit.php
    • application/views/*/admin/group_add.php
    • application/views/*/admin/group_edit.php
    • application/views/*/admin/link_add.php
    • application/views/*/admin/link_edit.php
    • application/views/*/admin/page_add.php
    • application/views/*/admin/page_edit.php
    • application/views/*/admin/post_add.php
    • application/views/*/admin/post_edit.php
    • application/views/*/admin/user_edit.php
  • Added module system
    • CREATE TABLE IF NOT EXISTS `module` (
        `module_id` bigint(20) NOT NULL auto_increment,
        `module_name` varchar(100) NOT NULL,
        `module_description` text NOT NULL,
        `module_version` varchar(10) NOT NULL,
        `module_is_active` tinyint(1) NOT NULL,
        `module_file_name` varchar(100) NOT NULL,
        `module_url` varchar(255) NOT NULL,
        PRIMARY KEY  (`module_id`)
      ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
    • application/controllers/admin/module.php
    • application/models/admin/module.php
    • INSERT INTO `dblog`.`right` (`right_id` ,`right_name` ,`right_title`) VALUES (NULL , 'can_manage_modules', 'Can manage modules');
    • application/views/*/navigation.php
    • application/views/*/module_overview.php
    • application/libraries/modules.php
    • application/models/post_model.php
    • application/models/admin/comment_model.php
    • application/views/*/admin/index.php
  • Changed Akismet library into a module for the new module system
    • application/libraries/Akismet.php (moved to application/modules/config)
    • application/config/akismet.php (deleted)
    • application/modules/Akismet.php
    • application/modules/config/Akismet.php
    • application/models/post_model.php
    • application/models/admin/comment_model.php
    • application/models/admin/config_model.php
    • application/config/form_validation.php
    • application/controllers/admin/comment.php
    • application/views/*/post_view.php
    • application/views/*/admin/comment_overview.php
    • application/views/*/admin/config_edit.php
    • application/config/autoload.php
    • ALTER TABLE `config` DROP `config_enable_akismet_spam_protection` 
  • Updated admin css
    • application/views/*/admin/system_css.php
    • application/views/*/admin/index.php
  • Added exemplary module that shows random quotes in administration
    • application/modules/Quotes.php
  • Added tabs to some admin views using my new javascript library Tabr
    • application/libraries/View.php
    • application/controllers/admin/config.php
    • js/prototype.js
    • js/effects.js
    • js/tabr.js
    • application/views/*/admin/config_edit.php
    • application/views/*/admin/system_css.php
    • application/views/*/admin/index.php
  • Increase version number
    • application/config/dblog_version.php

Each module defines actions that are called when a hook is called in a module, a controller, a view or where ever it might be needed. So far the amount of hooks is very limited to these 5:

  • comment_submit_spam_check
  • admin_comment_spam
  • admin_comment_unspam
  • admin_view_head
  • admin_view_top_bar

But I will add more hooks as the need arises. If you want to develope a module and need a hook that does not exist yet, just leave me a comment or use the contact form!

Just like before the download can be found by browsing the downloads or following this link.


Greetz
David

Share and enjoy:     

Tags: No tags
Category Tabr, Update, DBlog | Edit | 0 Comment(s)

DBlog v1.3

May, 11th 2009 by David

Newest version of Dblog is out now! Apart from some bug fixes it has 2 new features:

1. Support for social bookmarking services:
Below every post and page there are 4 links to some well known social bookmarking services, for now that's Digg, reddit, Stumbleupon and Delicious. If there are other services you want me to support, just drop me a commet and I will add them to the default templates.

2. Download manager:
It's now possible to offer files for download using the build in download manager. You can provide a title, description and multiple mirrors for every file. The actual file to every file is hidden so that the included download counter should always hold tell you how often a file was actually downloaded. You can add a list of the 5 newest or the 5 most downloaded files to the navigation. I know this is not a typical feature for a blog, but as I needed this one I thought I might add it to Dblog anyways and if you don't want to, you don't have to use it.

Changelog:

  • Added support for social bookmarks
    • ALTER TABLE `config` ADD `config_show_social_bookmarking_links` BOOL NOT NULL ;
    • application/models/admin/config_model.php
    • application/views/*/admin/config_edit.php
    • application/views/*/post_list.php
    • application/views/*/post_view.php
    • application/views/*/page_view.php
  • Added missing js files for syntax highlighting in other languages than PHP
    • js/shBrushJScript.js
    • js/shBrushSQL.js
    • js/shBrushCss.js
    • js/shBrushJava.js
    • application/views/*/index.php
  • Fixed a problem with syntax highlighting when using the ablaze design
    • application/views/ablaze/system_css.php
  • Added download manager
    • CREATE TABLE IF NOT EXISTS `file` (
      `file_id` bigint( 20 ) NOT NULL AUTO_INCREMENT ,
      `file_title` varchar( 100 ) NOT NULL ,
      `file_description` text NOT NULL ,
      `file_date_add` datetime NOT NULL ,
      `file_mirror` text NOT NULL ,
      `file_download_count` bigint( 20 ) NOT NULL ,
      `file_is_online` tinyint( 1 ) NOT NULL ,
      `file_size` varchar( 100 ) NOT NULL ,
      PRIMARY KEY ( `file_id` )
      ) ENGINE = MYISAM DEFAULT CHARSET = utf8;
    • INSERT INTO `right` (`right_name`, `right_title`) VALUES ('can_manage_files', 'Can manage files');
    • application/controllers/admin/file.php
    • application/controllers/file.php
    • application/models/admin/file_model.php
    • application/models/file_model.php
    • application/models/common_model.php
    • application/config/form_validation.php
    • application/views/*/admin/navigation.php
    • application/views/*/admin/file_edit.php
    • application/views/*/admin/file_add.php
    • application/views/*/admin/file_overview.php
    • application/views/*/admin/config_edit.php
    • application/views/*/file_view.php
    • application/views/*/file_overview.php
    • application/views/*/system_css.php
  • Added check to avoid calling not existing methods when fetching data for navigation
    • application/models/commen_model.php
  • Increase version number
    • application/config/dblog_version.php

You can get the new version either by browsing the downloads or follow this link.

Greetz
David

Share and enjoy:     

Tags: No tags
Category Update, DBlog | Edit | 0 Comment(s)

Tabr v1.0

May, 10th 2009 by David

Recently as I was working on a new project for a client I needed tabs and came across the Fabtabulous! class created by Andrew Tetlaw. After implementing his solution my client complained, that the page keeps scrolling down to the beginning of the active panel everytime he clicked on a tab instead of staying at the current position and only switch tabs (see here for example of the behaviour). After looking into it I quickly recognized, that it's caused by the anchor attached to the link that of every tab and I came up with a solution that does not use links for the tabs: Tabr was born!

My tab solution is heavily based on Fabtabulous! and therefor they look much alike as you might notice when comparing the source. My Tabr class looks like this:

var Tabr = Class.create();

Tabr.prototype =
{
 initialize : function(element)
 {
  this.element = $(element);
  var options = Object.extend({}, arguments[1] || {});
  this.menu = this.element.childElements();
  this.show(this.getInitialTab());
  this.menu.each(this.setupTab.bind(this));
 },
 setupTab : function(elm)
 {
  Event.observe(elm,'click',this.activate.bindAsEventListener(this),false)
 },
 activate :  function(ev)
 {
  var elm = Event.findElement(ev, "div");
  this.show(elm);
  this.menu.without(elm).each(this.hide.bind(this));
 },
 hide : function(elm)
 {
  $(elm).removeClassName('active-tab');
  $(this.panelID(elm)).removeClassName('active-panel');
 },
 show : function(elm)
 {
  $(elm).addClassName('active-tab');
  $(this.panelID(elm)).addClassName('active-panel');
 },
 panelID : function(elm)
 {
  return elm.id + '_panel';
 },
 getInitialTab : function()
 {
  return this.menu.first();
 }
}

Event.observe(window,'load',function(){ new Tabr('tabs'); },false);

Pretty much all it does it get all tabs and attach an event to these tabs on which it reacts and then hides all non active panels and shows the active panel and setting a new style class for the active tab to make it stand out. Every tab must have a unique id and the corresponding panel must has the same id + '_panel'. See, not much magic here ;)

If you are interested, you can have a look at a demo and download it from here.

Greetz
David

Share and enjoy:     

Tags: No tags

DBlog 1.2

May, 9th 2009 by David

 Some weeks passed since my last update, but now it's finally ready: DBlog 1.2!

Apart from some minor fixes it's now possible to change the order of the pages in then navigation and you can use syntax highlighting for the most common languages like PHP, C#, CSS, Java, SQL and many more. An example can be seen at the end of this post.

Changelog:

  • Fixed charset in trackback table
    • ALTER TABLE `trackback` CHANGE `trackback_url` `trackback_url` VARCHAR( 200 ) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL ,
      CHANGE `trackback_title` `trackback_title` VARCHAR( 200 ) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL ,
      CHANGE `trackback_blog_name` `trackback_blog_name` VARCHAR( 200 ) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL ,
      CHANGE `trackback_excerpt` `trackback_excerpt` TEXT CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL;
  • Added ability to order pages
    • ALTER TABLE `page` ADD `page_order_by` BIGINT NOT NULL ;
      UPDATE `page` SET `page_order_by` = `page_id`;
    • application/controllers/admin/page.php
    • application/models/admin/page_model.php
    • application/models/common_model.php
    • application/view/standard/admin/page_overview.php
    • application/view/ablaze/admin/page_overview.php
  • Fixed listing of pinged urls when editing a post
    • application/view/standard/admin/post_edit.php
    • application/view/ablaze/admin/post_edit.php
  • Added ability to highlight code syntax
    • application/view/*/index.php
    • application/view/*/system_css.php
    • application/plugins/fckeditor/fckconfig.js
    • application/plugins/fckeditor/editor/css/fck_editorarea.css
    • js/shCore.js
    • js/shBrushPhp.js
    • images/styles/*/fckeditor/help.png
    • images/styles/*/fckeditor/magnifier.png
    • images/styles/*/fckeditor/page_white_code.png
    • images/styles/*/fckeditor/printer.png
    • images/styles/*/fckeditor/wrapping.png

Download the new version from here!

Example for PHP syntax highlighting:

$test = 'test';
if($test == 'test')
{
   echo 'test';
}
else
{
   echo 'no test';
}

Syntax highlightning is done using the FCKeditor plugin by Alex Gorbatchev! Check it out here!

Greetz
David

Share and enjoy:     

Category Update, DBlog | Edit | 0 Comment(s)

MeNeedz Akismet 1.0

April, 15th 2009 by David

As promised in my last post, I have altered my DBlog Akismet library to make it work with other CodeIgniter applications and not just mine!

The user guide can be found here.

The archive including the user guide and the library can be found here.

Greetz
David

Share and enjoy:     

Tags: No tags

DBlog 1.1 - Trackback and Akismet

April, 15th 2009 by David

I have just finished the first major update to Dblog!

With version 1.1 DBlog now supports Trackback and Akismet for spam protection!

Changelog:

  • Fixed title of rss feed
    • application/views/standard/post_rss.php
    • application/views/ablaze/post_rss.php
  • Added support for trackbacks
    • ALTER TABLE `post` ADD `post_trackback_is_allowed` BOOL NOT NULL DEFAULT '1';
    • CREATE TABLE `trackback` (
      `trackback_id` BIGINT NOT NULL AUTO_INCREMENT ,
      `trackback_post_id` BIGINT NOT NULL ,
      `trackback_url` VARCHAR( 200 ) NOT NULL ,
      `trackback_date_added` DATETIME NOT NULL ,
      `trackback_title` VARCHAR( 200 ) NOT NULL ,
      `trackback_blog_name` VARCHAR( 200 ) NOT NULL ,
      `trackback_excerpt` TEXT NOT NULL ,
      PRIMARY KEY ( `trackback_id` )
      );
    • ALTER TABLE `post` ADD `post_trackback_list` TEXT NOT NULL ;
    • application/controllers/post.php
    • application/models/post_model.php
    • application/views/standard/post_trackback_response.php
    • application/views/ablaze/post_trackback_response.php
    • application/config/form_validation.php
    • application/libraries/View.php
    • application/views/standard/post_view.php
    • application/views/ablaze/post_view.php
    • application/models/admin/post_model.php
    • application/views/standard/admin/post_edit.php
    • application/views/ablaze/admin/post_edit.php
    • application/views/standard/admin/post_add.php
    • application/views/ablaze/admin/post_add.php
  • Fixed attempt to load cloud library twice
    • application/models/common_model.php
    • application/libraries/MY_Controller.php
  • Minial performance win in group administration
    • application/models/admin/group_model.php
  • Added Akismet support for spam protection
    • ALTER TABLE `config` ADD `config_enable_akismet_spam_protection` BOOL NOT NULL DEFAULT '0';
    • ALTER TABLE `comment` ADD `comment_is_spam` BOOL NOT NULL DEFAULT '0';
    • ALTER TABLE `trackback` ADD `trackback_is_spam` BOOL NOT NULL DEFAULT '0';
    • application/libraries/Akismet.php
    • applicatiob/config/akismet.php
    • application/config/form_validation.php
    • application/models/admin/config_model.php
    • application/views/standard/admin/config_edit.php
    • application/views/ablaze/admin/config_edit.php
    • application/models/post_model.php
    • application/models/admin/comment_model.php
    • application/views/ablaze/admin/comment_overview.php
    • application/views/standard/admin/comment_overview.php
    • application/views/ablaze/post_view.php
    • application/views/standard/post_view.php
    • applicatin/controllers/admin/comment.php

You can enabled and disable trackbacks per every post. To add a trackback to a post, simply edit the post and enter the trackback urls seperated by space in the provided input field.

Akismet support can be enabled globally by editing the config and will automatically check submitted comments for spam. You can manually mark und unmark comments as spam using the comment administration. Comments marked as spam will not be shown to users surfing your page! For Akismet to work propably, an api-key is required which can be obtained from here and must be set in the akismet config file.

Shortly I will release a stand-alone version of my Akismet library for you to use in your projects!

Greetz,
David

Share and enjoy:     

DBlog 1.03

April, 11th 2009 by David

Another minor update!

Changelog:

  • Fixed a bug that caused static pages to be shown without line breaks when using standard design
    • application/views/standard/page_view.php
    • application/views/standard/system_css.php
  • Added a contact form
    • application/views/standard/system_css.php
    • application/views/standard/sidebar.php
    • application/views/standard/system_contact.php
    • application/views/ablaze/system_contact.php
    • application/views/ablaze/index.php
    • application/views/ablaze/index_system.php
    • application/controllers/system.php
    • application/config/form_validation.php
  • Fixed some cases where some default e-mail adress was used instead of the one set in the config
    • application/controllers/system.php
  • Changed validation of comment form
    • application/controllers/post.php
    • application/config/form_validation.php

Get it here!

P.S.: The "DBlog Download" link on the left will from now on always point to "dblog.rar", an archive with the newest version of DBlog.

Greetz
David

Share and enjoy:     

Tags: 1.03
Category Update, DBlog | Edit | 0 Comment(s)

DBlog 1.02

April, 10th 2009 by David

They keep coming and coming, 1.02 just left the factory!

There aren't many changes, but what can I do? I just want to keep you up to date!

  • Fixed a bug in auth library that prevented not logged in users from commenting on posts
  • Added a new front-end design: Ablaze! It's based on one of the free templates from styleshout. Have a look at the screenshot page for some impressions!

Download it from here!

All you have to do to update your existing installation is:

  • Replace application/libries/Auth.php with the updated one
  • Copy the application/views/ablaze folder to your installation
  • Copy the images/style/ablaze folder to your installation

Have fun
David

Share and enjoy:     

Category DBlog, Update | Edit | 0 Comment(s)

DBlog 1.01

April, 10th 2009 by David

In my last post I described how to install DBlog and it contained a part where you actually had to use a database administration tool to update the password of the user "admin".

I have just released a small update to DBlog that enables a user to change its own password using the administration.

Get it here!

The following files have changed:

  • application/config/form_validation.php
  • application/controllers/admin/user.php
  • application/models/admin/user_model.php
  • application/views/standard/admin/user_edit.php

Greetz
David

Share and enjoy:     

Tags: No tags
Category DBlog, Update | Edit | 1 Comment(s)

DBlog version 1.0: Out now!

April, 10th 2009 by David

After quite some final code adjustments till deep in the night it's finally done! DBlog 1.0 is ready for download!

I didn't want to wait until I'm done with the new design, as it's more or less the only things that's missing right now (apart from Pingback/Trackback support where I'm thinking about not implementing it at all right now...but you never know).

Anyway as of version 1.0 DBlog offers the following features:

  • WYSIWYG editor using FCKeditor
  • Add, edit and delete posts and static pages as you like
  • Comment management! Approve, edit or delete comments and define on a per user group basis who can post without approval and who can't
  • Completet user management: Have as many different user groups with different rights as you wish, define a default user group for new users and unregistered users and assign multiple user groups to one user
  • Search within posts
  • RSS feed for newest posts in general, in a specific category or with a specific tag
  • List posts by category, tag, search term or browse the archives
  • Use static pages only and define what page to use as start page for your website
  • Config the sidebar to your wishes
  • Add links to other website or blogs
  • Support for Google Analytics, simply enter your tracker ID in the config and the script will be added automatically
  • User can register (if you want them to) and retrieve their forgotten password

You want to know how to get and use this beauty? It's quite easy!

  1. Download the archive from here!
  2. Unzip it and upload it' contents to your website
  3. Edit application/config/config.php and change the base_url setting
  4. Edit application/config/database.php and enter your connection info
  5. Use the attached dblog.sql file to create the needed tables
  6. Open your browser and surf to your website, you are almost done!
  7. Login using username "admin" and password "admin" and change the config to your needs
  8. Change the password for the user "admin" by editing the profile using the administration
  9. If you want to use the FCKeditor filemanager, you have to edit the application/plugins/fckeditor/editor/filemanager/connectors/php/config.php and set Enabled to true and set the UserFilesPath to the images/upload folder and set 777 rights for that folder to allow for file upload

For future versions I will add a function to change ones password without direct database access, I see how someone might miss that ;)

Anyway, now you are done and your new blog powered by DBlog is up and running (atleast I hope so).

Please tell me if you encounter any difficulties following the install instructions, any errors while using the software or anything else you don't like or like.

Screenshots of the administration can be viewed here. As my blog is running on DBlog, there is no need for screenshots of the front-end ;)

P.S.: You can easily add your own design, just add a new folder to the application/views folder and copy all the files from an existing design. Now you can edit your design to your needs! If you come up with a nicer one than mine I will include it in the next release!

Greetz
David

Share and enjoy:     

Tags: 1.0, release
Category Coding, DBlog | Edit | 0 Comment(s)

Upate

April, 9th 2009 by David

I got a small update on the newest featues!

Currently up and running:

  • WYSIWYG editor using FCKeditor
    • Including Youtube plugin
  • Multi-design option. Can switch between designs easily using the administration
  • RSS feed (currently only for the newest posts, feeds for different categories and tags will follow soon)

Still working on the other features and a new design, the current one is just kinda simple ;)

 

Greetz,
David

Share and enjoy:     

Tags: No tags

Up and running!

April, 3rd 2009 by David

Finally, I got my own blog up and running! And just like one would expect from a dedicated CI coder like me, I didn't simply use an already existing blogging system like Wordpress or Movable Type or whatever else there might be, but I created my own!

So now I proudly present: DBlog!
The current version is still alpha (v0.6 to be exact) and already got most of the features I have planned for the first release, but quite a few are still missing.

Available features in the current version:

  • Add, edit posts (=entries in your blog) and manage categories and tags assigned to these posts
  • Add and edit static pages
  • User management (creating unlimited user groups with different rights, assign multiple groups to one user, config a default group for users that are not logged in and for newly registered users)
  • Reply to posts by adding a comment (depending on the rights of the user's groups the comment must be approved by an administrator first before it's being published)
  • Search within posts
  • List posts by category, tag, search term or browse the archives
  • ...some more that I can't think of right now ;)

Planned features for future versions:

  • WYSIWYG editor for posts
  • Comment management for the administrator to actually be able to approve comments or mark them as spam and so on (has to be done via direct access to the database right now)
  • Support of Trackback and/or Pingback
  • RSS feeds
  • Gallery using lightview
  • Downloads (not sure about that though, more like a feature for a cms than a blog)
  • ...whatever else I can think of

As you can see more or less all of my features (available and planned) are well known from other blogging systems. So you might ask: Why create DBlog in the first place?

Firstly because there are not that many blogging systems based on CI (Open Blog and Typeigniter are the only ones I can think of right now).
Secondly because I kinda tend to do things myself instead of relying on other peoples work. Not that my work is superior to theirs, but I prefer my own to other peoples code because with my code I know exactly what it does and why it does what it does. It's a question of trust.
And thirdly: Because I can ;)

DBlog is far from being done and ready for download but I wanted to show you what I'm working on and initate my new website with some news on my newest project. Mission accomplished!

Greetz
David

Share and enjoy:     

Tags: No tags