Per Søderlind
Forum Replies Created
-
Forum: Plugins
In reply to: [Read Offline] How to change “download odf” and “print” labelsNo, neither if you create a translation nor if you use the shortcode.
Forum: Plugins
In reply to: [Read Offline] How to change “download odf” and “print” labelsIf you want to translate the labels you should use the language file
languages/read-offline.pot. WPML has a nice article on how to do this.You can also use the Read Offline shortcodes:
[pdf text="Click to download the PDF"] [print text="print me!"]btw, saw that I’m missing a wrapper around the generated html for shortcodes, which makes it harder to align them. I’ll add a wrapper soon.
Forum: Plugins
In reply to: [Read Offline] How to show pdf and print buttons on top corner rightThe HTML generated by the plugin looks like:
<div class="readoffline-embed"> <div class="readoffline-embed-text">Read Offline: </div> <div><a class="pdf" href="http://dev.local/read-offline/992/.pdf" title="Download .pdf">Download PDF</a></div> <div><a class="print" href="http://dev.local/read-offline/992/.print" title="Print ." onclick="read_offline_print_me();return false;">Print</a></div> </div>so you could add the following to your (child) theme style.css to move the buttons to the right:
.readoffline-embed { display: flex; justify-content: flex-end; }btw, I respond quicker to issues if you post them at GitHub
Yes, add the code to functions.php in your child theme.
Put this in the functions.php
define( 'WPPPON_VERSION', '1.0.0' ); // update version number when you change the javascipt code add_action( 'wp_enqueue_scripts', 'wp_pause_playlist_on_next' ); function wp_pause_playlist_on_next() { wp_enqueue_script( 'wp-pause-playlist-on-next', plugins_url( '/js/wp-pause-playlist-on-next.js' , __FILE__ ), array( 'wp-playlist' ), WPPPON_VERSION, true ); }and here is js/wp-pause-playlist-on-next.js:
jQuery(function ($) { $('.mejs-mediaelement video').on('ended', function (e) { e.preventDefault(); $(this)[0].player.pause(); }); });btw, I’ve done a plugin that lets you link to audio/video in a playlist. It might have code you’d like to borrow from: https://github.com/soderlind/wp-link-to-playlist-item
Forum: Plugins
In reply to: [Read Offline] CSS: @pageSorry for the late answer, you’ll reach me quicker via github.
For PDF, see Supported CSS attributes
Forum: Plugins
In reply to: [Read Offline] How to use the shortcodeYou can add the shortcodes to your theme by adding the following:
<?php echo do_shortcode("[pdf]"); ?>
<?php echo do_shortcode("[epub]"); ?>
<?php echo do_shortcode("[mobi]"); ?>Forum: Plugins
In reply to: [Read Offline] XX displaying on top of post before categoryLatest version, 0.7.4, fixes this. I’m sorry that I didn’t catch and fix this earlier.
Forum: Plugins
In reply to: [Read Offline] fatal errorFixed, please try the latest version
Forum: Plugins
In reply to: [Read Offline] Registered users modeYes, sort of. If you are using, for instance, Restrict Content Pro you could do this:
[restrict paid="true]paid content goes here
[pdf] [epub] [mobi]
[/restrict]Forum: Plugins
In reply to: [Read Offline] Disable on homepage???I’m closing this, please report issues at github
Forum: Plugins
In reply to: [Read Offline] XX displaying on top of post before categoryPlease test the latest release (0.7.x)
Forum: Plugins
In reply to: [Read Offline] fills medialibrary with filesFixed in 0.6.x
Forum: Plugins
In reply to: [Read Offline] 404 Error for PDFsFixed in 0.6.x
Forum: Plugins
In reply to: [Read Offline] RTL supportAdded in 0.6.x, but it looks like mobi, al least on the Kindle, doesn’t support rtl.
Forum: Plugins
In reply to: [Read Offline] Support 4.4.2Latest version (0.7.x) supports 4.6