Welcome, Guest :: Blog Home | Login | Register

Articles By Tag:
OpenBlog Catalyst App \@ GitHub

2009-08-16 18:33:56 Tags: catalyst perl software

The Catalyst MVC driven software OpenBlog is now available as open source project at GitHub.

Here is the public clone URL:
git://github.com/sasykes/OpenBlog.git

Please contact me if you plan to modify or use the software. I am interested to see if anyone would be interested in future use/development.

~Stephen

[ Comments (5) ]




Domain Lister \@ GitHub

2009-08-12 22:01:12 Tags: catalyst perl software

The Catalyst MVC software driven domain name auction/listing software I developed for MySQLSoftware.net is now available as open source project at GitHub.

Here is the public clone URL:
git://github.com/sasykes/Domain-Lister.git

Please contact me if you plan to modify or use the software. I am interested to see if anyone would be interested in future use/development.

~Stephen

[ Comments (0) ]




MySQLSoftware.net

2008-04-12 03:51:29 Tags: perl software mysql sales

I spent the good part of two days getting mysqlsoftware.net setup on my Linode Fedora 8 VPS. Much work went into server configuration for SSL certification (OpenSSL) and the payment gateway API. When I have some free time I would like to write up a new server prep doc for future reference and for others who may be in need help regrading the same environment setup.

For now, I'll leave this post short. I really need to get back to work on the bulldogracingteam.com Catalyst application.

[stephen]

[ Comments (0) ]




New Blog Up

2008-04-08 17:57:14 Tags: catalyst perl blog software developer mvc

Spent a good deal of time today coding my new blog for stephensykes.us. I'll probably drop the old OpenBlog application as it was just a learning project for me when I started working with Catalyst MVC.

And since I need to test the code tag, here's some interesting code for your amusement. This is actually part of the soon to be implemented tag cloud feature for my blog.

Perl Code:
# Update TagCloud weight
foreach my $fields_dbic (
    $c->model('StephenSykesDB::ArticleTags')->search(
        article_id => $form->{article_id},
        {
         prefetch  => 'tag_cloud',
         },
    )
) {
    if ($fields_dbic->tag_cloud->weight > 0) {
        # Subtract 1 from weight and update tag cloud
        my $new_weight = ($fields_dbic->tag_cloud->weight - 1);
        $c->model('StephenSykesDB::TagCloud')->update_or_create({
            tag_id => $fields_dbic->tag_cloud->tag_id,
            descr  => $fields_dbic->tag_cloud->descr,
            weight => $new_weight,
        });
    }
}
# Delete all ArticleTags and then add new from form
$c->model('StephenSykesDB::ArticleTags')->search({ article_id => $form->{article_id} })->delete;
    
# Split tags on white space
my @tags = split(/ /, $form->{Tags});

foreach my $tag_rec (@tags) {
    $tag_rec =~ tr/[A-Z]/[a-z]/;
    my $tag_cloud_dbic = $c->model('StephenSykesDB::TagCloud')->find({ descr => $tag_rec });
    if ($tag_cloud_dbic) { # update existing tag
        my $new_weight = ($tag_cloud_dbic->weight + 1);
        $c->model('StephenSykesDB::TagCloud')->update_or_create({
            tag_id => $tag_cloud_dbic->tag_id,
            descr  => $tag_cloud_dbic->descr,
            weight => $new_weight,
        });
        # Add tags to site_tags table
        $c->model('StephenSykesDB::ArticleTags')->create({
            article_id => $form->{article_id},
            tag_id     => $tag_cloud_dbic->tag_id,
        });
    } else { # create new tag
        $c->model('StephenSykesDB::TagCloud')->create({
            tag_id => undef,
            descr  => $tag_rec,
            weight => '1',
        });
        # Get new tag_id
        my $tag_dbic = $c->model('StephenSykesDB::TagCloud')->find({ descr => $tag_rec });
        # Add tags to site_tags table
        $c->model('StephenSykesDB::ArticleTags')->create({
            article_id => $form->{article_id},
            tag_id     => $tag_dbic->tag_id,
        });
    }
}


[ Comments (0) ]