Miniblog

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

Moderator: Tata

Post Reply
Ulrich

Miniblog

Post by Ulrich » Mon Apr 20, 2015 9:52 am

As I see it, miniblog in the current version does not support the call of plugins from within the text.

But , would it be possible to mask the plugin call

Code: Select all

{{{plugin();}}}
so that it is not displayed within the blog as it is right now.

Background:

My blog file is edited via extedit. When displaying the blog, this plugin call is visible in the text :(

So any chance, with a quick fix, not to display this or other plugin calls?
*** Edit ***
Or even better to call another plugin!

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

Re: Miniblog

Post by cmb » Mon Apr 20, 2015 12:41 pm

Ulrich wrote:As I see it, miniblog in the current version does not support the call of plugins from within the text.
Indeed, plugincalls are not evaluated in the teasers.
Ulrich wrote:So any chance, with a quick fix, not to display this or other plugin calls?
*** Edit ***
Or even better to call another plugin!
Both is possible. It is not clear to me what would generally be best; the teasers are stripping all HTML markup, so the result might look strange.

Anyhow, a quickfix to evaluate plugincalls: in plugins/miniblog/index.php replace line 82-84:

Code: Select all

    $mblog['teaser'][] = isset($page_data['description']) && $page_data['description']
        ? $page_data['description']
        : mb_substr(strip_tags(substr($c[$page],(strpos($c[$page],$plugin_cf['miniblog']['teaser_2nd_source'])),550)),0,$plugin_cf['miniblog']['teaser_generated_length']);
 with the following:

Code: Select all

    if (isset($page_data['description']) && $page_data['description']) {
        $mblog['teaser'][] = $page_data['description'];
    } else {
        $evaldPage = evaluate_plugincall($c[$page]);
        $mblog['teaser'][] = mb_substr(strip_tags(substr($evaldPage,(strpos($evaldPage,$plugin_cf['miniblog']['teaser_2nd_source'])),550)),0,$plugin_cf['miniblog']['teaser_generated_length']);
    } 
Christoph M. Becker – Plugins for CMSimple_XH

Tata
Posts: 3587
Joined: Tue May 20, 2008 5:34 am
Location: Slovakia
Contact:

Re: Miniblog

Post by Tata » Thu Jul 30, 2015 9:01 am

The plugin is fine. However, I miss some "back" button to skip back to teasers' page.
CMSimple.sk
It's no shame to ask for an answer if all efforts failed.
But it's awful to ask without any effort to find the answer yourself.

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

Re: Miniblog

Post by svasti » Wed Feb 10, 2016 4:56 pm

Tata wrote:I miss some "back" button to skip back to teasers' page.
Now it is there

Download Miniblog 0.4
Demo Miniblog 0.4

TODO for version 0.5: writing blogs for non-admins via extedit

Post Reply