bccampus / pressbooks-textbook Goto Github PK
View Code? Open in Web Editor NEWA plugin that extends Pressbooks for textbook authoring
License: GNU General Public License v2.0
A plugin that extends Pressbooks for textbook authoring
License: GNU General Public License v2.0
WP 4.2.2, PB 3.1.2, PBT 2.1.2, PmPDF 1.0.1
Symptom:
No TOC generated with PDF even though all system configurations are correct.
Workaround Solution:
Go to Open Textbook Theme Options > mPDF Options tab > Table of Contents > disable, then Save Changes, then re-enabled
Now generates TOC in PDF
Circumstances when this happens:
Migrating from one server to another. Everything appears fine across Pressbooks system and sites, except TOC is not generated in PDF.
After 'copy book' button has been pushed and new book as been created
Wordpress 4.3
Pressbooks Version 2.7.1
PressBooks Textbook Version 1.2.15
Visit Site display extends beyond body of text:
EPUB display cuts off table content:
No issue with mPDF rendering
PRESSBOOKS . COM site outputs Visit Site display correctly as a horizontal scroll:
Research links:
Responsive Data Tables - https://css-tricks.com/responsive-data-tables/
How to Create Responsive Tables in WordPress - http://exisweb.net/responsive-tables-in-wordpress
10+ Solutions for Responsive Data Tables - http://exisweb.net/responsive-table-plugins-and-patterns
Workaround for epub display seems to be converting large tables into images with link to larger content.
or
The following appears to be a potential solution for Site visit display:
Themes > Editor > Open Textbooks > style.css > #content table {
CHANGE display:table to block
Example:
/*******************************
Textbook specific styles
********************************/
border-spacing: 0;
display: block;
}
Hello
After updating Pressbook Textbook download formats options disappeared. I'm using the pluging with wordpress with the last version.
Does anybody know how to solve this issue?
Thanks so Much
Aureliano
Brad,
I created a fresh install on a test site as described below, but received an error.
thanks,
Jack
Tested: WP 4.4 + PB 3.0 + (all default themes + PBTextbook)
Parse Sections Enabled a two-level TOC
Result: TOC working correctly on pointing to subheadings except PBTextbook theme
PBTextbook Result - link of sub-heading goes to top of page, not to 2nd level heading.
Example of issue: http://epub-fhd.athabascau.ca/clinical-teaching
Creative commons configurator plugin has filter hook to rewrite the message, currently this is solved in a child theme, but needs to move and be able to receive arguments.
/**
* Completely replaces the CC text with best-practices for derivatives text
*
* @param string $license_text
* @return string The new, best practices CC text for derivatives
*/
function pressbooks_copyright_notice_to_cc_text( $license_text ) {
// we want to replace the entirety of auto-generated text, so
$license_text = '';
$blog = get_bloginfo('name');
switch ( $blog ) {
case "Introduction to Sociology":
$attribution = "<a href='http://cnx.org/content/col11407/latest'>".$blog."</a>";
$author = "Dr. William Little";
break;
default:
$attribution = "an original";
$author = "an author";
break;
}
$extra_text = "This work is a derivative of ".$attribution." by <a href='http://www.rice.edu'>Rice University</a>, used under <a href='http://creativecommons.org/licenses/by/3.0/'>CC-BY 3.0</a>. "
. "This derivative is licensed under <a href='http://creativecommons.org/licenses/by/4.0/'>CC-BY 4.0</a> by ".$author.".";
return $extra_text;
}
add_filter( 'bccl_cc_license_text', 'pressbooks_copyright_notice_to_cc_text', 10, 1 );
Hi, can you include this snippet (or something similar) above Line 403 in pressbooks-textbook.php please?
// Minimum PB requirements
if ( ! @include_once( WP_PLUGIN_DIR . '/pressbooks/compatibility.php' ) ) {
add_action( 'admin_notices', function () {
echo '<div id="message" class="error fade"><p>' . __( 'Cannot find Pressbooks install.', 'pressbooks' ) . '</p></div>';
} );
return;
}
elseif ( ! pb_meets_minimum_requirements() ) {
return;
}
It's a new file that can be used for plugins that depend on the PB plugin. It will prevent PBT from running if a user upgrades and gets bitten by the PHP version change in the next release.
After a 'copy book' button has been clicked
Oh right, Thanks @bdolor. h3 being always centered can be solved at
https://github.com/BCcampus/pressbooks-textbook/blob/dev/themes-book/opentextbook/style.css#L34
by selecting h3 as well.
in textbook buttons plugin
Would it be possible to tag master with tags that correspond to releases on wp.com?
That would make it easier to track releases from git, as opposed to wp.
A few issues with rendering ordered lists (and nested OLs) and the discrepancies between Pressbooks preview and browser rendering.
The following is the code used:
A screenshot from the PressBooks Visual panel view of this code:
A screenshot from the rendered version (same in all major browsers) of this same code:
Issues
The rendered browser version lacks hanging indents, and when nesting the lists there isn't enough space to differentiate between the two levels of hierarchy.
Also, rendering seems to not like the lettered lists, and converts them all to numbers (e.g. a, b, c becomes 1.1, 1.2, 1.3) despite the inline code stating otherwise.
Brad, thanks for adding Google Analytics code for tracking download events. However, it's still not working for me, and I suspect that this may be caused by Google's recent upgrade from Classic to newer Universal Analytics:
https://developers.google.com/analytics/devguides/collection/upgrade/reference/gajs-analyticsjs
See also these references:
http://stackoverflow.com/questions/25506115/does-not-display-track-record-in-google-analytics
and
http://stackoverflow.com/questions/26754109/google-analytics-universal-event-tracking-code-not-working
in line 98, you suggested that Google Analytics users insert this code:
$tracking = "_gaq.push(['_trackEvent','exportFiles','Downloads','$file_class']);";
This version did not work for me, probably because my GA accounts have all been updated from Classic to Universal. My understanding is that newer event code should follow this general format:
ga('send', 'event', 'category', 'action', 'opt_label', opt_value, {'nonInteraction': 1});
But I can't figure out the correct syntax to insert into your code. My failed attempts looked like this:
$tracking = "_ga(['send','event','exportFiles','Downloads','$file_class']);";
Can you point me in the right direction? Thanks.
I have installed Pressbook on my wordpress blog and installed PRESSBOOKS TEXTBOOKS.
When I activate opentexbook theme, the arrows next and back do not appear in the book.
Could you please tell me what to do?
WP version 4.4.1
Pressbook version 3.1.1
Pressbooks Textbook 2.1.1
It is not an error, it does not shows how to pass the pages (< >). I have to click Chapter by chapter
BEST WISHES,
AURELIANO
add useful documentation, including screenshots.
After the 'copy book' button has been clicked and user authentication is checked
Tab based design to enable various features for stigmergic collaboration.
https://bradpayne.ca/wp-content/uploads/2016/08/IMG_20160804_140348.jpg
Thanks Brad for all of the work on PBT. When preparing your next update, please add CSS PDF support for tight and loose tracking, as described here:
http://guide.pressbooks.com/chapter/typhography-tight-and-loose-tracking/
Copy this book button on single and homepage.
https://bradpayne.ca/wp-content/uploads/2016/08/IMG_20160804_140348.jpg
display buttons only if one of the child themes is active
include metadata for a book as per guidelines https://scholar.google.ca/intl/en/scholar/inclusion.html#indexing
I doubt this is a truly github worthy "issue" but I'm trying to get set up with the PressBooks TextBook plugin/theme.
I set up a multisite WordPress install and installed the PressBooks plugin successfully (I believe). I see the basic PB WP themes available and have created a book.
http://jeremydean.org/pressbooks/ananthologyofmyown/
http://jeremydean.org/pressbooks/ananthologyofmyown/chapter/chapter-1/
I've added the PB Textbook plugin and network activated it.
BUT I'm not seeing the "Textbook theme" available at the network or book appearance admin levels.
Again, apologies that this is not likely a bug/feature issue, but any support would be appreciated.
I work with professors who want to do have annotatable PressBooks and want to be able to properly guide them through the process.
The source of the issue is with the pressbooks-textbook plugin:
Current PDF export does not display 2 level TOC.
The Global Options - Enable a two-level TOC - applicable to mPDF TOC ?
Status:
Open Textbooks Theme Options enabled:
- Display table of contents
- Enable a two-level TOC
PressBooks Textbook Version 1.2.15
Pressbooks Version 2.6.5
Theme - Open Textbooks
Brad
I'm not an experienced coder, as you know, but I have managed to create WP child-themes in the past.
Is there something about pressbooks-textbook plugin that prevents me from successfully uploading a child-theme (or is it just my lack of skills?).
Here's the link to my attempted child-theme (with some modified style.css, also in prince export folder, for my publisher) https://github.com/JackDougherty/opentextbook-webwriting-child
Here's the "broken theme" error message I receive on PB
My workaround, which is not ideal, has been to clone and modify your entire plugin
https://github.com/JackDougherty/pressbooks-textbook/blob/master/README.md
curiously
Jack
We are looking into starting to migrate some features from Pressbooks Textbook into the core Pressbooks plugin so as to make them available to all users of Pressbooks. First and foremost is the MCE Table Editor (pressbooks/pressbooks#154) and the MCE Superscript and Subscript buttons (pressbooks/pressbooks#157). I have introduced a couple of commits into pressbooks/dev that bring the MCE Table Editor plugin into Pressbooks core—however, it causes an error when the current version of Pressbooks Textbook is installed and the Open Textbook theme is active. How would you like to coordinate this? I can submit a pull request which removes the table editor from Pressbooks Textbook, and then going forward as I migrate features from Textbook I can submit pull requests to handle the switch similarly. At this point the MCE Table Editor and the superscript and subscript buttons are the two features we are looking to move over. Thanks in advance for your thoughts on this. (FYI, @hughmcguire.)
replace default search functionality with relevanssi plugin
Dear sir:
My name is Toni Devís.
I´m the founder of on-lingua.com. A libre web site for learning second languages.
I want to use PressBooks with my books. And also pressbooks texbooks in one of my installation. Because i want to allow the people to download and share the content.
We have content in many languages, and we hope we will open the site soon. But we have now a problem with your plugin, because it´s easy to download our content from other site.
<<
Search against the following domains.
(You can manage the list of domains to search against at any time:)
Reminder: You are responsible for adhering to all licensing and copyright restrictions.
That is not a problem for the open content, but sometimes we have restrictet content (because we need also charge money some times to our users) . If somebody from other installation can download our premium content, we have not busines. And i think is it not fear for the users if they do not want to share
Can you make a modification and just autorice download a book or chapter if the material is under Creative Commons license, please and if is with copyright do not allow to download?.
thanks
WP 4.4.1, BP 3.1.2, PBT 2.1.2
Some interesting errors output on EPUB and MOBI exports, that I have not seen before:
MOBI - Amazon kindlegen(Linux) V2.9 build 1028-0897292
CSS style specified in content is not supported by Kindle readers. Removing the CSS property: 'max-width' in file: /tmp/mobi-d98Che/OEBPS/open-textbooks.css
Please use % or refer Kindle Publishing Guidelines about usage of property: 'line-height' in file: /tmp/mobi-d98Che/OEBPS/chapter-001-slug-1-introduction.xhtml
EPUB3
ERROR(RSC-007): /var/www/html/wp-content/uploads/sites/3/exports/e-Textbook-Reflections-1453987136._3.epub/OEBPS/open-textbooks.css(23,9): Referenced resource could not be found in the EPUB
on pdf output the footer message is "THIS TEXTBOOK IS AVAILABLE FOR FREE AT OPEN.BCCAMPUS.CA" which won't work for everyone
Wordpress version 4.42
Pressbooks version 2.5
Pressbooks textbooks version 1.28
Issues
A) Cell colours in tables do not render in:
B) Table width scaled to fit table contents, not page width:
C) Footnotes not rendering in xhtml version
D)
E) Figures not appearing in odt export
blob:https://drive.google.com/351c665b-a970-4066-9908-82b382db6f14
I can create custom Textbook styles buttons for boxes, with new titles and CSS, I loose the background CSS (text is displayed correctly with white title):
.au-creative {
background-color: #E8FFFC;
}
.au-field {
background-color: #F7F7F9;
}
.au-box.au-creative h3 {
background-color: #6D97FB;
}
.au-box.au-field h3 {
background-color: #008080;
}
For some reason, bcc-success -highlight -info are linked in ways that I am missing.
From what I can understand, the aforementioned files work together to produce a textbook style:
pressbooks-textbook/symbionts/mce-textbook-buttons/assets/css/editor-style.css
pressbooks-textbook/symbionts/mce-textbook-buttons/assets/js/textbook-buttons.js
pressbooks-textbook/themes-book/opentextbook/style.css
display plugin functionality/settings as it pertains to the categories reuse, remix, revise, redistribute
Re-posted from (pressbooks/pressbooks#303)
MESSAGE
"... can be overridden, so long as it is remains above PHP 5.4.0. Add a line to wp-config.php as follows: $pb_minimum_php = 5.4.0; "
Needs quotes ???
$pb_minimum_php = '5.4.0';
pressbooks-textbook/pressbooks-textbook.php
Line 417 in aa8af8d
facilitate the addition of LRMI metadata to the content and corresponding endpoints in WP to extract that metadata per chapter.
I'm running Wordpress 4.2.2 with Pressbooks 2.5 and PB Textbooks 1.2.8.
I'm using the search and import to search titles of chapters and books and that produces a list of chapters to import. I then select the chapters I'm interested and hit the start button. That quite quickly jumps me to the text organize dashboard page of the book but the chapters I selected for import are not visible in the list of posts included in the book.
I've checked my apache logs and found the following in the error log for the import part of the search and import transaction:
[Sat Jun 20 12:16:16.746234 2015] [:error] [pid 27595] [client 64.134.28.106:50671] [ PBT Search and Import Log ]\nArray\n(\n [time] => Sat Jun 20 12:16:16 2015\n [site_url] => http://samplebook2.lawbooks.cali.org\n [0] => Array\n (\n [171] => Array\n (\n [type] => chapter\n [license] => cc-by-sa\n [author] => J.H. Verkerke\n [link] => http://verkerkecontractsone.lawbooks.cali.org/chapter/contract-formation/\n )\n\n )\n\n)\nTried to import a post from this PressBooks instance and succeeded :), referer: http://samplebook2.lawbooks.cali.org/wp-admin/admin.php?page=api_search_import
Any ideas?
Brad - Thanks for responding to my recent questions, and here's a new one brought to my attention by the U of Michigan Press production team.
The Open TextBooks theme left running header appears to be missing in PDF export. See screenshot comparison below of TextBooks vs Luther themes, using PB master branch and PB Textbook dev branch (as of Oct 25th). Perhaps it has something to do with this recent commit by Hugh?
pressbooks/pressbooks@86893e9
Settings > PB Textbook > Redistribute tab > Yes. I would like the latest export files to be available on the homepage for free, to everyone.
in order to make OTB theme consistent with other PB themes
include a plugin that supports laTeX
Hi Brad,
I received the same fatal error on two test sites when attempting to update Pressbooks Textbook to the newest v 1.2.7, with PB v 2.4.5 (from WP repo) and WP 4.2.2.
Fatal error: Cannot redeclare class PressBooks\Import\Import in /var/www/pressbookstest/wp-content/plugins/pressbooks/includes/modules/import/class-pb-import.php on line 17
Did I screw up something obvious?
Jack
Pressbooks 3
Notice: Undefined index: pb_bisac_subject in /var/www/html/wp-content/plugins/pressbooks-textbook/themes-book/opentextbook/functions.php on line 81
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.