Calendar_xh 1.4.6

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

Moderator: Tata

Post Reply
Ulrich

Calendar_xh 1.4.6

Post by Ulrich » Sat Apr 18, 2015 9:17 am

If I enter a specific date together with a specific start and end time, the marquee will show this event until the start time is reached. After that, the event will not be shown in the marquee anymore. :cry:

IMO should the event be visible until the end time is reached.

For example: We have a soccer tournament on the 18th , starting at 10:00 and ending at 16:00.
It would be better to show the event until 16:00, so visitors can show up and watch, otherwise they wouldn't even know about it if they look at our site after 10:00.

The marquee is more eye catching than "clicking" in the calendar to see what is going on.

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

Re: Calendar_xh 1.4.6

Post by svasti » Sat Apr 18, 2015 12:54 pm

I've added it to the todo list for next version.

tanavots
Posts: 70
Joined: Sat Feb 25, 2012 4:18 pm

Re: Calendar_xh 1.4.6

Post by tanavots » Fri Feb 19, 2016 6:48 am

Hey!

How to fix this?

Code: Select all

DEPRECATED: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead
/plugins/calendar/includes/simplemarkup.php:101

Code: Select all

    $text = preg_replace($pattern, $replacement, $text);

    $text = str_replace(array(chr(10),chr(13),'\\\'','\\"','\\*'),array('','','\'','"','*'), $text);

return $text;
Best,
Alo

cmb
Posts: 13672
Joined: Tue Jun 21, 2011 11:04 am
Location: Mü-Sa, RLP, DE
Contact:

Re: Calendar_xh 1.4.6

Post by cmb » Fri Feb 19, 2016 11:29 am

tanavots wrote:

Code: Select all

DEPRECATED: preg_replace(): The /e modifier is deprecated, use preg_replace_callback instead
/plugins/calendar/includes/simplemarkup.php:101
Oh, indeed that should be addressed, because the /e modifier is no more supported as of PHP 7.0.0. If I remember correctly, this issue has been brought up and solved somewhere else in the forum, but one solution might be to replace line 75-99 in the mentioned file with the following:

Code: Select all

    $br = tag('br');
    $pattern = array(
        '/==([^=]+)==/',               //1 - ==big==
        '/\*\*([^\*]+)\*\*/',          //2 - **bold**
        '/(?<!\\\)\*([^\*]+)\*/',      //3 - *italic*, exept escaped *
       '/\+\+([^\+]+)\+\+/',           //4 - ++red++
        '/\b_([^_]+)_/',               //5 - _underlined_, word like a_b are excluded because of "\b"
        '/__([^_]+)__/',               //6 - __small__
        '/(\\\)\*/',                   //7 - escaped *

        '/\s*\n*\s*$/',                //12- delete all empty lines at the end
        '/\n/'                         //13- transform any remaining line breaks to <br>
    );

    $replacement = array(
        '<span class="big">\1</span>',               //1 - <big>big</big>
        '<b>\1</b>',                   //2 - <b>bold</b>
        '<i>\1</i>',                   //3 - <i>italic</i>
        '<span class="red">$1</span>', //4 - <span class="red">red</span>
        '<u>\1</u>',                   //5 - <u>underlined</u>
        '<small>\1</small>',           //6 - <small>small</small>
        '*',                           //7 - *

        '',                            //12- no empty lines at the end
        $br                            //13- replace line breaks by <br>
    );
I have not tested this, though.
Christoph M. Becker – Plugins for CMSimple_XH

tanavots
Posts: 70
Joined: Sat Feb 25, 2012 4:18 pm

Re: Calendar_xh 1.4.6

Post by tanavots » Fri Feb 19, 2016 12:18 pm

Thanks! Looks like working.

Best,
Alo

Post Reply