Gesbit

The other blog manager

Ñuño Martínez author, 11 post(s)

Feed Rss, Atom

Problems with PHP 5

I started to deal with Gesbit and I've discovered a bad, very bad thing:  Gesbit isn't compatible with PHP 7.

Gesbit used the old MySQL API wich was declared obsolote by PHP 5 and removed in PHP 7.  That mean it just doesn't work.  As far as I know, most data base access is done through file gbdb.class.php but I must to valorate if it is worth to do the conversion or get rid of version 2 and start version 3.

What I know about Gesbit data base code

Actually I'm still ignorant about how Gesbit works in the insides.  I tryed some time ago to find the program flow but I get lost several times so I gave up, may be too soon.  It also uses Autoload, wich is plain evil in my opinion, making it harder.  In any case I wasn't able to see the main Gesbit structure except that it seems to try some kind of model-view-controller pattern.

On the other hand I've took a look in gbdb.class.php and gbdb.const.php files and seems that every data base bit of Gesbit is in there.  Actually it looks like it is possible ot replace the old MySQL API to the new PDO with not big effort keeping the same internal API.  If so, this is an opportunity to improve it allowing more data base managers or a more modular implementaton.

But is it the only incompatible code?  That's the question.  With version 2.1 I got rid of some incompatible code but there might be more and the only way to know it is to test it.  Unfortunatelly PHP shows error only when running, there's a compillation phase but I don't know how to make it compile all the files to tell where are problems as I would do with Pascal, C or Java.

Valorating alternatives

Right now I'm not sure what to do.  I'm really tempted to start with version 3 seriously, but it require a lot of work and time.  But I would start to port the old data base code to the new one just to discover that there's more non compatible code hidden in the deeps.

There are a lot of reasons to not start from scratch but sometimes it is a good thing to do even if you don't agree in the begginning*.  There's a lot of stuff I want to do with version 3 that too different about how Gesbit is right now that a new fledged version seems the best option right now.

I need to think a bit more though.


* Actually I was against the new Allegro API introduced by version 5, but later I find it is actually much better.  Without such API I wouldn't never made Allegro.pas compatibile with Delphi.

Added Wiki pages and Tickets

I know I've said I would work on version 3 but Real Lifetm didn't let me have a lot of free time, you know work, family, friends...

Anyway I've finished a milestone in a long-term project and I decided it is time to change a bit.  Also this long-term project needs a new website and I should fix my personal blog, so I will spend some time in Gesbit in the next months.  It won't be enough for the new full-fledged version it needs but it should be enough to improve the current one, may be some plugin improvement and bug-fixing if I can, but at least some documentation updates.

So I started easy by adding two services to the project.

The Wiki pages

A problem with Gesbit is the lack of documentation.  So to try to fix that I've open the Wiki pages.  Any SourceForge user should be able to create and modify pages (I hope I've configured it correctly).  Let see how it works.

At the moment there's only one page but I'll add more soon.  I'm doing a research about the stuff I need for the website updates I'll do and the bugs I've added to the ticket system, so I'll add new pages with everything I discover.

As the wiki evolves I would extract some text to create a proper documentation to add to future releases.

The Tickets

Some time ago I started to use Trello, an on-line project management tool.  I'm not used to project management tools but after a time learning I've found it quite useful and helpful even with personal and one-member-team projects.  Then I started to experiment with SourceForge tikets in that long-term project I was talking about.

So now I've activated two ticket services for Gesbit.  There's one for Bugs and the other for Feature Requests.  Any SourceForge user can create and comment tickets so feel free to use them.

I've added some bug issues, two that I want to fix and other two quite desirable.  I have also some ideas for new features but I'll not add to the Feature Request list yet.  I have no date for these changes but you can join the RSS if you're interested.

To GIT or not to GIT

Some days ago, Leo has posted a comment asking why does Gesbit stay in SourceForge. I answered that I know that GitHub is the trend and SourceForge have a bad reputation, but I prefer SVN over GIT and SourceForge did work for many years.

Later I found that new owners of SourceForge posted an article in his blog one day before Leo posted his comment. You can read it; they recognize SourceForge's bad reputation problem, and talks about planning how to fix it. And they started by terminating the DevShare program, which was one of the main sources of that bad reputation. They also promised that there will be more changes in the future.

That means I'll keep my SourceForge projects here for a while.

Updating Easy Videos plug-in

I said I want to go to the 3.0 version, but this new version will take long time as I have to rewrite almost everything.  In the while, the pages that use Gesbit (a few, but there are some) need to be up and working.

One of those pages is El Saloncito del Cómic, a coffee&library specialised in comic books sited in the same place the studio where I work.  Such page needs multimedia as videos and images.  As you know, Gesbit support for multimedia stuff is almost unexistent, except for a few add-ons... And they doesn't work properly!  So I'm working to fix that.

First I've updated the Easy Videos plug-in.  YouTube, Dailymotion and Vimeo now use the modern API.  I don't know about the other sites supported, may be I'll update them later.  Also, I've reformatted the code, so it is smaller and I think more easy to maintain.

In a near future I want to add a new plug-in similar to the Easy Videos but to be used with on-line galleries such as Instagram, Flickr and so.

Once finished, I'll create a new plug-in package with them.  Until that, you can take a look and download the changes from the code repository. Also you can suggest or send me changes and updates to the plug-ins.  Just put a message in the comments.

Thinking next step

Yesterday I was testing and updating a plug-in that helps the video insertion on articles to be used in El Saloncito del Cómic weblog.

The point is that I think it is one of those times when you have to decide. As I said in the first entry, version 3.0 was included in my plans since I rescued the project, however I'm postponing it while current version can be improved.  There are gaps that are difficult to improve without breaking the current code, such as to only allow the use of MySQL/MariaDB data bases, or filter some HTML5 tags as unwanted, whatever to be put into the configuration, plus some discomforts that do not prevent logs malfunction but aren't comfortable to use and update (the latter refers not only to update entries but also the modification of the source code) . For example, if Gesbit had a simple system to add images, and I know it can be added an extension I think this feature would be more efficient if it is part of core manager instead of as an addition.

So, surely I'll create a new development branch and start the planning and development of the core of this new version 3.0 of Gesbit soon.