Realblog_XH

Third Party Plugins to CMSimple - how to install, use and create plugins

Moderator: Tata

Post Reply
cmb
Posts: 14225
Joined: Tue Jun 21, 2011 11:04 am
Location: Bingen, RLP, DE
Contact:

Realblog_XH

Post by cmb » Sat Jul 26, 2014 3:54 pm

Hello Community,

I have just released Realblog_XH 3.0beta1.
Realblog_XH is a fork of Realblog 2.8, which is developed by Gert Ebersbach. Realblog (which was formerly called Realblog_XH) is based on Advancednews 1.0.5 by Jan Kanters. Many thanks to both for making these popular and useful plugins available under GPL.
There has been a discussion regarding the name of this fork. Gert has asked to give it a different name to avoid confusion, but as Realblog_XH 3.0 is very similar to Realblog 2.8, I believe the similar name is justified and likely to reduce confusion. Der Zwerch argued (translation by myself):
Der Zwerch wrote:On one hand there is CMSimple and the plugins developed by Gert and maybe others. On the other hand there is CMSimple_XH and suitable plugins_XH. This distinction should be completely sufficient, IMHO
I fully agree.

Those who use Realblog <= 2.8 under CMSimple_XH >= 1.6 are encouraged to upgrade to Realblog_XH, as the latter is developed especially for CMSimple_XH 1.6+ and makes use of several new features, fixes CSRF and XSS vulnerabilities[1], as well as a quite a few (mostly minor) bugs and flaws. Upgrading should be easy by simply uploading the new plugin files (keep a backup of the old plugins/realblog/ folder, nonetheless). Check the configuration and language settings (a few have changed), and have a look at the Backward compatibility section in the manual. Further note, that there are new slightly simplified plugin calls (the old ones still work, though). For some details see the changelog.

For those who are new to Realblog(_XH):
Realblog_XH facilitates presenting a blog on your CMSimple_XH website. It offers the basic blogging features, such as an displaying a chronological overview of the posts, an optional monthly archive, automatic scheduled publishing and archiving of posts, searching contents, an RSS feed and very simplistic categorization. Separately written teasers are supported. Teasers and articles may contain arbitrary CMSimple_XH scripting.

Each blog post can be made commentable individually, what requires an external comment plugin. Currently only Comments is supported.

For multilingual websites, each language will have its own blog; besides that, Realblog_XH doesn't have any multilingual capabilities.
Thanks to meltemi who made some good suggestions which I have already partly incorporated.

Any feedback is welcome as usual, but note that I have to concentrate on fixing bugs, so most feature requests will likely be postponed.

Enjoy,
Christoph

[1] The XSS vulnerability has been found and reported to Gert by myself, and has been fixed in Realblog 2.9. I still wonder why I am not credited in the release announcement, as it is common practise.
Christoph M. Becker – Plugins for CMSimple_XH

svasti
Posts: 1651
Joined: Wed Dec 17, 2008 5:08 pm

Re: Realblog_XH

Post by svasti » Sat Jul 26, 2014 4:24 pm

Interesting...
nicely complicated plugin calls :geek: Why not simply {{{realblog();}}} ?
and interesting that humble Miniblog has a category filter for visitors whereas its bigger brother has not.

cmb
Posts: 14225
Joined: Tue Jun 21, 2011 11:04 am
Location: Bingen, RLP, DE
Contact:

Re: Realblog_XH

Post by cmb » Sat Jul 26, 2014 4:59 pm

svasti wrote:Interesting...
nicely complicated plugin calls :geek: Why not simply {{{realblog();}}} ?
The most important reason is to implement a strict "name spacing". And {{{Realblog_blog();}}} isn't too hard, either, is it. At least {{{Realblog_blog(true);}}} is much simpler than {{{showrealblog('showsearch=true');}}}.
and interesting that humble Miniblog has a category filter for visitors whereas its bigger brother has not.
Well, I wouldn't call Realblog_XH the bigger brother of Miniblog. Actually, Miniblog is much more CMSimple-like, as I said before, and it fits much better to the idea of modularization. And by using the <h2> pages as categories (a clever idea!) it saves itself plenty of code.

Okay--why is there no category filter? Because I dislike the category solution that has been added in Realblog 2.6 and is still there in Realblog_XH 3.0beta1 (due to lack of time). I'm planning to make the categories a "database" field (actually these should go to a separate table), and then it would be reasonably possible to add category filters or links. As it is now, that might be too slow (all teasers and articles had to be searched), and I don't want to add features to something I'm planning to change anyway.
Christoph M. Becker – Plugins for CMSimple_XH

svasti
Posts: 1651
Joined: Wed Dec 17, 2008 5:08 pm

Re: Realblog_XH

Post by svasti » Sat Jul 26, 2014 6:01 pm

cmb wrote:And {{{Realblog_blog();}}} isn't too hard
Up to now, the naming convention usually was: the plugin name in lower case letters. When things are different and one doesn't quite understand why, it get's difficult — in general.
Are you introducing a new kind of naming scheme? What do you mean by
cmb wrote:to implement a strict "name spacing".
:?:

cmb
Posts: 14225
Joined: Tue Jun 21, 2011 11:04 am
Location: Bingen, RLP, DE
Contact:

Re: Realblog_XH

Post by cmb » Sat Jul 26, 2014 6:30 pm

This naming scheme is part of the PEAR coding standards. Besides, function names are case insensitive in PHP, so one can write {{{realblog_blog();}}}. Maybe I should adjust the manual?

PS: The answer was overly terse, so I'll explain.
svasti wrote:Are you introducing a new kind of naming scheme?
IMO it's best if each component (core, plugins, and maybe templates) life in their own namespace to avoid inadvertent clashes with other components. As there are no namespacing constructs in PHP (well, there are now, but only since 5.3), in JavaScript and HTML (id and class names, as well as names of form elements) , using the component's name as a prefix for all global idenfiers can be used as a workaround. We already do this for new PHP identifiers of the core (XH_...) since a while. If everybody conforms to this rule, there are simply no nameclashes possible.

Of course, it is possible to use shorter prefixes (maybe without an underscore), and collisions will be already unlikely, but they are still possible. Consider a fictious example of the plugin Pagemanager. There could be a global function called pmdosomething(). Another plugin might be called "PersonalMessage", which could use the same abbreviation, and define pmdosomething(), too. And there might be a third plugin called "HumptyDumpty" which is developed by Peter Moosleitner. This developer uses his initials as abbreviation, so there could also be a function pmdosomething().

Multiple definitions of a PHP function would cause a fatal error what would be bad. However, if global variables used by different plugins would have the same name, that could lead to hard to detect bugs, what's even worse. Multiple plugins using the same query parameter name could cause unwanted side effects. Consider Realblog, which uses the query parameter "page". Now a gallery (Svarrer's gallery) is placed in blog post's teaser, which uses the same parameter "page". Clicking on the gallery navigation would cause another realblog overview page to be shown, so a user couldn't go to the next gallery page.

Well, these examples are slightly contrived, but the cost of strictly avoiding potential nameclashes is mostly some more characters to type in the first place. And there are several techniques to reduce this cost: reducing the number of global identifiers in PHP (classes are quite handy here), as well as in JavaScript (objects can be used as namespaces, and it is even possible to not use any global idenfiers); other identifiers (HTML ID and class names, GET and POST parameters, etc.) are usually generated by PHP, so it is possible to do this via own functions that add the prefixes behind the scenes.

Another advantage of having more entropy (i.e. using rather long prefixes) for global identifiers is to reduce the potential to collide with user defined identifiers or identifiers defined by a foreign scripts (for instance, a jQuery plugin, or a PHP class).
Christoph M. Becker – Plugins for CMSimple_XH

cmb
Posts: 14225
Joined: Tue Jun 21, 2011 11:04 am
Location: Bingen, RLP, DE
Contact:

Re: Realblog_XH

Post by cmb » Thu Aug 07, 2014 7:52 pm

Hello Community,

I have just released Realblog_XH 3.0beta2.

This is a bugfix release only; for details see the changelog. Thanks to pmschulze for reporting resp. reminding me of the issues.

Enjoy,
Christoph
Christoph M. Becker – Plugins for CMSimple_XH

cmb
Posts: 14225
Joined: Tue Jun 21, 2011 11:04 am
Location: Bingen, RLP, DE
Contact:

Re: Realblog_XH

Post by cmb » Tue Aug 19, 2014 2:24 pm

Hello Community,

I have just released Realblog_XH 3.0beta3.

The new version encodes the titles of articles in the URL regarding urichar_org/new (thanks to oldnema for the suggestion). Furthermore I have fixed the wrong documentation of the plugin calls in the manual (thanks to stoa for reporting this issue).

The most important addition, however, is that the hard-coded dependency on Comments has been replaced with a general API for comments plugins. Currently there is no compatible comments plugin available, but I'm planning to release an update of Twocents_XH soon.

Enjoy,
Christoph
Christoph M. Becker – Plugins for CMSimple_XH

cmb
Posts: 14225
Joined: Tue Jun 21, 2011 11:04 am
Location: Bingen, RLP, DE
Contact:

Re: Realblog_XH

Post by cmb » Tue Aug 19, 2014 6:00 pm

cmb wrote:Currently there is no compatible comments plugin available, but I'm planning to release an update of Twocents_XH soon.
The impatient can already use Twocents_XH 1.0alpha2 with Realblog_XH 3.0beta3 with a small modification. In plugins/twocents/index.php line 53 is:

Code: Select all

define('TWOCENTS_VERSION', '1.0alpha2'); 
Insert the following code directly after this line:

Code: Select all

class Twocents_RealblogBridge implements Realblog_CommentsBridge
{
    static public function count($topic)
    {
        return count(Twocents_Comment::findByTopicname($topic));
    }

    static public function handle($topic)
    {
        global $_Twocents_controller;

        return $_Twocents_controller->renderComments($topic);
    }

    static public function getEditUrl($topic)
    {
        return false;
    }
} 
This also serves as an example how simple it can be to make a comments plugin compatible with Realblog_XH 3.0.

PS: In the meantime I have released Twocents_XH 1.0alpha3. Thus the mentionend modification is obsolete.
Christoph M. Becker – Plugins for CMSimple_XH

cmb
Posts: 14225
Joined: Tue Jun 21, 2011 11:04 am
Location: Bingen, RLP, DE
Contact:

Re: Realblog_XH

Post by cmb » Wed Aug 20, 2014 11:46 am

Hello Community,

I have just released Realblog_XH 3.0beta4.

I have fixed an incompatibility with PHP < 5.3 (thanks to stoa for reporting the bug), and removed the ineffective protection of the comments form.

Enjoy,
Christoph
Christoph M. Becker – Plugins for CMSimple_XH

cmb
Posts: 14225
Joined: Tue Jun 21, 2011 11:04 am
Location: Bingen, RLP, DE
Contact:

Re: Realblog_XH

Post by cmb » Sun Oct 05, 2014 12:02 pm

Hello Community,

I have just released Realblog_XH 3.0beta5.

I have concentrated on resolving some issues related to dates. Firstly, dates were formatted according to two different language settings: Date -> Format und Display -> Date format. This happened somewhat arbitrarily, so I have removed the latter of these settings; dates are now formatted according to Date -> Format throughout. Secondly, I have replaced the old JavaScript date picker component with native HTML5 date pickers. Unfortunately, these are not widely supported by browsers yet (neither IE nor FF offer them, for instance), so the old date picker is used as a fallback.

Furthermore I have added the Slovak translation which has been contributed by Tata.

I am especially interested in feedback regarding the date related changes, but of course, any feedback is welcome.

Enjoy,
Christoph
Christoph M. Becker – Plugins for CMSimple_XH

Post Reply