Plugin Directory

Changeset 1599229


Ignore:
Timestamp:
02/19/2017 09:45:32 PM (9 years ago)
Author:
simonwaldherr
Message:

commit v0.5.6

Location:
shownotes/trunk
Files:
12 edited

Legend:

Unmodified
Added
Removed
  • shownotes/trunk/OSFphp/osf.php

    r898846 r1599229  
    9898        $osf_starttime = $unixtimestamps[0][0];
    9999        $regexTS = array(
    100           '/\n[0-9:]{9,23}/e',
     100          '/\n[0-9:]{9,23}/',
    101101          'osf_time_from_timestamp(\'\\0\')'
    102102        );
    103         return preg_replace($regexTS[0], $regexTS[1], $shownotes);
     103        return preg_replace_callback($regexTS[0], function ($matches) {
     104          return osf_time_from_timestamp($matches[0]);
     105        }, $shownotes);
    104106      }
    105107    }
     
    153155  $regex['podcaster'] = '/(Podcaster|Zusammengetragen)[^:]*:([ \S]*)/';
    154156  preg_match_all($regex[$persons], $header, $persons);
    155   $persons    = preg_split('/(,|;| und | and )/', $persons[2][0]);
     157  $persons    = preg_split('/(,|;| und | and )/', @$persons[2][0]);
    156158  $personsArray = array();
    157159  $personsArrayHTML = array();
     
    176178  preg_match_all($regex, $header, $date);
    177179  date_default_timezone_set('Europe/Berlin');
    178   $date = strtotime($date[2][0]);
     180  $date = strtotime(@$date[2][0]);
    179181  if($date != false) {
    180182    return $date;
     
    186188  $regex = '/(Podcast|Podcastname|Sendung)[^:]*:([ \S]*)/';
    187189  preg_match_all($regex, $header, $title);
    188   return $title[2][0];
     190  return @$title[2][0];
    189191}
    190192
     
    192194  $regex = '/(Episode|Folge)[^:]*:([ \S]*)/';
    193195  preg_match_all($regex, $header, $number);
    194   return $number[2][0];
     196  return @$number[2][0];
    195197}
    196198
     
    198200  $regex = '/(Title|Episodetitle|Thema|Subject)[^:]*:([ \S]*)/i';
    199201  preg_match_all($regex, $header, $title);
    200   return $title[2][0];
     202  return @$title[2][0];
    201203}
    202204
    203205function osf_parser($shownotes, $data) {
    204206  // Diese Funktion ist das Herzstück des OSF-Parsers
    205   $tagsmode  = $data['tagsmode'];
     207  $tagsmode  = @$data['tagsmode'];
    206208  $specialtags = $data['tags'];
    207209  $exportall   = $data['fullmode'];
  • shownotes/trunk/OSFphp/parse.php

    r829816 r1599229  
    3030  $shownotesArray = osf_parser($shownotesString, $data);
    3131
    32   $return['podcast'] = osf_get_podcastname($shownotesArray['header']);
    33   $return['episode'] = str_replace($return['podcast'], '', osf_get_episodenumber($shownotesArray['header']));
    34   $return['shownoter'] = osf_get_persons('shownoter', $shownotesArray['header']);
    35   $return['podcaster'] = osf_get_persons('podcaster', $shownotesArray['header']);
    36   $return['episodetime'] = osf_get_episodetime($shownotesArray['header']);
    37   $return['subject'] = osf_get_episodename($shownotesArray['header']);
     32  $return['podcast'] = osf_get_podcastname(@$shownotesArray['header']);
     33  $return['episode'] = str_replace($return['podcast'], '', osf_get_episodenumber(@$shownotesArray['header']));
     34  $return['shownoter'] = osf_get_persons('shownoter', @$shownotesArray['header']);
     35  $return['podcaster'] = osf_get_persons('podcaster', @$shownotesArray['header']);
     36  $return['episodetime'] = osf_get_episodetime(@$shownotesArray['header']);
     37  $return['subject'] = osf_get_episodename(@$shownotesArray['header']);
    3838
    3939  $return['json'] = json_encode($shownotesArray['export']);
  • shownotes/trunk/readme.md

    r1244742 r1599229  
    44Donate link: https://flattr.com/profile/simonwaldherr 
    55Tags: shownotes, osf, markup, podlove, markdown, etherpad, affiliate 
    6 Requires at least: 3.3.1 
    7 Tested up to: 4.3 
     6Requires at least: 4.0 
     7Tested up to: 4.6 
    88Stable tag: trunk 
    99License: MIT License 
     
    5858
    5959##Changelog
     60
     61###0.5.6
     62
     63* fix “PHP Error: The /e modifier is deprecated”
    6064
    6165###0.5.5
  • shownotes/trunk/readme.txt

    r1244742 r1599229  
    33Donate link: https://flattr.com/profile/simonwaldherr
    44Tags: shownotes, osf, markup, podlove, md, podcast, markdown, etherpad, affiliate
    5 Requires at least: 3.3.1
    6 Tested up to: 4.3
     5Requires at least: 4.0
     6Tested up to: 4.6
    77Stable tag: trunk
    88License: MIT License
     
    7272
    7373== Changelog ==
     74
     75= 0.5.6 =
     76* fix “PHP Error: The /e modifier is deprecated”
    7477
    7578= 0.5.5 =
     
    233236== Upgrade Notice ==
    234237
     238= 0.5.6 =
     239fix “PHP Error: The /e modifier is deprecated”
     240
    235241= 0.5.5 =
    236242set search to shownotes + blogpost as default, but you can turn it off (opt-out in settings page)
  • shownotes/trunk/shownotes.php

    r1244742 r1599229  
    44/**
    55 * @package Shownotes
    6  * @version 0.5.5
     6 * @version 0.5.6
    77 */
    88
     
    1212Description: Convert OSF-Shownotes to HTML for your Podcast
    1313Author: Simon Waldherr
    14 Version: 0.5.5
     14Version: 0.5.6
    1515Author URI: http://waldherr.eu
    1616License: MIT License
     
    4040      'style_five'
    4141    );
    42     wp_enqueue_style('shownotesstyle', plugins_url('static/' . $css_styles[$shownotes_options['css_id']] . '.css', __FILE__), array(), '0.5.5');
     42    wp_enqueue_style('shownotesstyle', plugins_url('static/' . $css_styles[$shownotes_options['css_id']] . '.css', __FILE__), array(), '0.5.6');
    4343  }
    4444}
     
    285285function shownotesshortcode_add_admin_scripts() {
    286286  if (!is_feed()) {
    287     wp_enqueue_script('majax', plugins_url('static/majaX/majax.js', __FILE__), array(), '0.5.5', false);
    288     wp_enqueue_script('importPad', plugins_url('static/shownotes_admin.js', __FILE__), array(), '0.5.5', false);
    289     wp_enqueue_script('tinyosf', plugins_url('static/tinyOSF/tinyosf.js', __FILE__), array(), '0.5.5', false);
    290     wp_enqueue_script('tinyosf_exportmodules', plugins_url('static/tinyOSF/tinyosf_exportmodules.js', __FILE__), array(), '0.5.5', false);
     287    wp_enqueue_script('majax', plugins_url('static/majaX/majax.js', __FILE__), array(), '0.5.6', false);
     288    wp_enqueue_script('importPad', plugins_url('static/shownotes_admin.js', __FILE__), array(), '0.5.6', false);
     289    wp_enqueue_script('tinyosf', plugins_url('static/tinyOSF/tinyosf.js', __FILE__), array(), '0.5.6', false);
     290    wp_enqueue_script('tinyosf_exportmodules', plugins_url('static/tinyOSF/tinyosf_exportmodules.js', __FILE__), array(), '0.5.6', false);
    291291  }
    292292}
     
    294294function shownotesshortcode_add_scripts() {
    295295  if (!is_feed()) {
    296     wp_enqueue_script('importPad', plugins_url('static/shownotes.js', __FILE__), array(), '0.5.5', false);
     296    wp_enqueue_script('importPad', plugins_url('static/shownotes.js', __FILE__), array(), '0.5.6', false);
    297297  }
    298298}
  • shownotes/trunk/snsettings.php

    r1244742 r1599229  
    9797
    9898  $options = get_option('shownotes_options');
    99   $version = '0.5.5';
     99  $version = '0.5.6';
    100100
    101101  if(isset($options['version'])) {
     
    103103    if($version != $lastversion) {
    104104      print '<h3>Version</h3><p>Congratulations, you just upgraded the <b>shownotes</b> plugin from <b>version '.$lastversion.'</b> to <b>version '.$version.'</b></p>';
     105      if(versionInt($lastversion) < versionInt('0.5.6')) {
     106        print '<p><b>0.5.6: </b>fix &quot;PHP Error: The /e modifier is deprecated&quot;</p>';
     107      }
    105108      if(versionInt($lastversion) < versionInt('0.5.5')) {
    106109        print '<p><b>0.5.5: </b>searching shownotes <b>AND</b> blogpost by default (you can opt out if you need)</p>';
     
    125128      }
    126129      if(versionInt($lastversion) < versionInt('0.4.0')) {
    127         print '<p><b>0.4.0: </b>more icons and a &#34;error on save&#34; bugfix</p>';
     130        print '<p><b>0.4.0: </b>more icons and a &quot;error on save&quot; bugfix</p>';
    128131      }
    129132      if(versionInt($lastversion) < versionInt('0.3.9')) {
     
    325328  $scriptname = explode('/wp-admin', $_SERVER['SCRIPT_FILENAME']);
    326329  $dirname  = explode('/wp-content', dirname(__FILE__));
    327   print '<p>This is <strong>Version 0.5.5</strong> of the <strong> Shownotes</strong>.<br>
     330  print '<p>This is <strong>Version 0.5.6</strong> of the <strong> Shownotes</strong>.<br>
    328331  The <strong>Including file</strong> is: <code>wp-admin' . $scriptname[1] . '</code><br>
    329332  The <strong>plugin-directory</strong> is: <code>wp-content' . $dirname[1] . '</code></p>
  • shownotes/trunk/static/shownotes.js

    r1244742 r1599229  
    88 * Github:  https://github.com/SimonWaldherr/wp-osf-shownotes
    99 * Wordpress: http://wordpress.org/plugins/shownotes/
    10  * Version: 0.5.5
     10 * Version: 0.5.6
    1111 */
    1212
  • shownotes/trunk/static/shownotes_admin.js

    r1244742 r1599229  
    88 * Github:  https://github.com/SimonWaldherr/wp-osf-shownotes
    99 * Wordpress: http://wordpress.org/plugins/shownotes/
    10  * Version: 0.5.5
     10 * Version: 0.5.6
    1111 */
    1212
  • shownotes/trunk/static/style_four.css

    r1244742 r1599229  
    1 /* https://github.com/SimonWaldherr/wp-osf-shownotes/blob/master/static/style_four.css 0.5.5 */
     1/* https://github.com/SimonWaldherr/wp-osf-shownotes/blob/master/static/style_four.css 0.5.6 */
    22
    33.osf_chaptertime {
  • shownotes/trunk/static/style_one.css

    r1244742 r1599229  
    1 /* https://github.com/SimonWaldherr/wp-osf-shownotes/blob/master/static/style_one.css 0.5.5 */
     1/* https://github.com/SimonWaldherr/wp-osf-shownotes/blob/master/static/style_one.css 0.5.6 */
    22
    33.osf_chaptertime {
  • shownotes/trunk/static/style_three.css

    r1244742 r1599229  
    1 /* https://github.com/SimonWaldherr/wp-osf-shownotes/blob/master/static/style_three.css 0.5.5 */
     1/* https://github.com/SimonWaldherr/wp-osf-shownotes/blob/master/static/style_three.css 0.5.6 */
    22
    33.osf_chaptertime {
  • shownotes/trunk/static/style_two.css

    r1244742 r1599229  
    1 /* https://github.com/SimonWaldherr/wp-osf-shownotes/blob/master/static/style_two.css 0.5.5 */
     1/* https://github.com/SimonWaldherr/wp-osf-shownotes/blob/master/static/style_two.css 0.5.6 */
    22
    33.osf_chaptertime {
Note: See TracChangeset for help on using the changeset viewer.